Timeline



Oct 21, 2016:

11:38 PM Changeset in webkit [207708] by ddkilzer@apple.com
  • 27 edits in trunk

Bug 163762: IntSize::area() should used checked arithmetic
<https://webkit.org/b/163762>

Reviewed by Darin Adler.

Source/WebCore:

No new tests since no change in nominal behavior.

  • platform/graphics/IntSize.h:

(WebCore::IntSize::area): Change to return a
Checked<unsigned, T> value. Use WTF:: namespace to avoid
including another header.

  • platform/graphics/IntRect.h:

(WebCore::IntRect::area): Ditto.

The remaining changes are to use the Checked<unsigned> return
value of IntSize::area() and IntRect::area() correctly in
context, in addition to items noted below.

  • html/HTMLPlugInImageElement.cpp:

(WebCore::HTMLPlugInImageElement::isTopLevelFullPagePlugin):
Declare contentWidth and contentHeight as float values to
prevent overflow when computing the area, and to make the
inequality comparison in the return statement uses the same type
for both sides.

  • html/ImageData.cpp:

(WebCore::ImageData::ImageData):

  • html/MediaElementSession.cpp:

(WebCore::isElementRectMostlyInMainFrame):

  • platform/graphics/ImageBackingStore.h:

(WebCore::ImageBackingStore::setSize): Restructure logic to
compute area only once.
(WebCore::ImageBackingStore::clear):

  • platform/graphics/ImageFrame.h:

(WebCore::ImageFrame::frameBytes):

  • platform/graphics/ImageSource.cpp:

(WebCore::ImageSource::maximumSubsamplingLevel):

  • platform/graphics/ca/LayerPool.cpp:

(WebCore::LayerPool::backingStoreBytesForSize):

  • platform/graphics/cg/ImageDecoderCG.cpp:

(WebCore::ImageDecoder::frameBytesAtIndex):

  • platform/graphics/filters/FEGaussianBlur.cpp:

(WebCore::FEGaussianBlur::platformApplySoftware):

  • platform/graphics/filters/FilterEffect.cpp:

(WebCore::FilterEffect::asUnmultipliedImage):
(WebCore::FilterEffect::asPremultipliedImage):
(WebCore::FilterEffect::copyUnmultipliedImage):
(WebCore::FilterEffect::copyPremultipliedImage):
(WebCore::FilterEffect::createUnmultipliedImageResult):
(WebCore::FilterEffect::createPremultipliedImageResult):

  • platform/graphics/win/ImageBufferDataDirect2D.cpp:

(WebCore::ImageBufferData::getData): Update overflow check,
rename local variable to numBytes, and compute numBytes once.

  • platform/graphics/win/ImageDecoderDirect2D.cpp:

(WebCore::ImageDecoder::frameBytesAtIndex):

  • platform/image-decoders/ImageDecoder.cpp:

(WebCore::ImageDecoder::frameBytesAtIndex):

  • platform/ios/LegacyTileLayerPool.mm:

(WebCore::LegacyTileLayerPool::bytesBackingLayerWithPixelSize):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::requiresCompositingForCanvas):

  • rendering/shapes/Shape.cpp:

(WebCore::Shape::createRasterShape):

Source/WebKit2:

  • Shared/ShareableBitmap.cpp:

(WebKit::ShareableBitmap::create): Add overflow check and return
nullptr on overflow.
(WebKit::ShareableBitmap::createShareable): Ditto.
(WebKit::ShareableBitmap::create): Change debug assert for
adequate buffer size check into release check.

  • Shared/ShareableBitmap.h:

(WebKit::ShareableBitmap::numBytesForSize): Change to return a
Checked<unsigned, RecordOverflow> value.
(WebKit::ShareableBitmap::sizeInBytes):

  • Shared/cairo/ShareableBitmapCairo.cpp:

(WebKit::ShareableBitmap::numBytesForSize): Ditto.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _takeViewSnapshot]): Call unsafeGet().

Tools:

  • TestWebKitAPI/Tests/WebCore/IntRect.cpp:

(TestWebKitAPI::TEST): Call unsafeGet().

  • TestWebKitAPI/Tests/WebCore/IntSize.cpp:

(TestWebKitAPI::TEST): Ditto.

11:14 PM Changeset in webkit [207707] by jcraig@apple.com
  • 2 edits in trunk/Tools

Unreviewed: Added Aaron Chu <aaron_chu@apple.com> to contributors list.

  • Scripts/webkitpy/common/config/contributors.json:
11:07 PM Changeset in webkit [207706] by barraclough@apple.com
  • 15 edits in trunk/Source

Source/WebCore:
WebPageProxy should not need PageActivityState
https://bugs.webkit.org/show_bug.cgi?id=163821

Reviewed by Geoff Garen.

The PageActivityState is currently plumbed back from WebCore up to the UI process, to
determine whether to enabled process suppression. However the information it contains
(whether a page load is ongoing, whether audio is playing) is already available via
other means. Remove this use of PageActivityState.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaState):

  • Fix a bug in how we compute IsPlayingAudio - if the volume of the MediaElement is set to zero, then audio is not playing (we were already checking muted).
  • page/ChromeClient.h:
    • removed setPageActivityState
  • page/Page.cpp:

(WebCore::Page::setPageActivityState): Deleted.

  • setPageActivityState -> pageActivityStateChanged, remove call to ChromeClient
  • page/Page.h:

(WebCore::Page::pageActivityStateChanged):

  • setPageActivityState -> pageActivityStateChanged
  • page/PageThrottler.cpp:

(WebCore::PageThrottler::setActivityFlag):

  • setPageActivityState -> pageActivityStateChanged

Source/WebKit2:
[MediaStream] Dynamically generate media capture sandbox extensions
https://bugs.webkit.org/show_bug.cgi?id=154861
<rdar://problem/24909411>

Patch by Eric Carlson <eric.carlson@apple.com> on 2016-10-21
Reviewed by Tim Horton.

  • Shared/SandboxExtension.h:

(WebKit::SandboxExtension::createHandleForGenericExtension):

  • Shared/mac/SandboxExtensionMac.mm:

(WebKit::wkSandboxExtensionType): Add case for generic handle.
(WebKit::SandboxExtension::createHandleForGenericExtension): New.

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::invalidateRequests): Clear the list of extensions granted.
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Extend the web

process sandbox as necessary.

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
  • WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:

(WebKit::UserMediaPermissionRequestManager::~UserMediaPermissionRequestManager): Revoke all

sandbox extensions.

(WebKit::UserMediaPermissionRequestManager::grantUserMediaDevicesSandboxExtension): Consume

sandbox extensions.

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::grantUserMediaDevicesSandboxExtension): Pass-through to user media manager.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in: Add GrantUserMediaDevicesSandboxExtension.
  • WebProcess/com.apple.WebProcess.sb.in: Add rules, defines, and a macro to allow dynamic extensions for media capture devices.
10:27 PM Changeset in webkit [207705] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

[Web ID] Overload resolution is wrong if one of the types is a nullable union
https://bugs.webkit.org/show_bug.cgi?id=163816

Reviewed by Alex Christensen.

Overload resolution was wrong if one of the types was a nullable union. This
is because we never considered the union type itself, only its subtypes.
Therefore, we checked if any of the union's subtypes were nullable but we
failed to check if the union itself was nullable.

See:

No new tests, extended bindings tests.

  • bindings/scripts/CodeGeneratorJS.pm:

(GetOverloadThatMatchesIgnoringUnionSubtypes):
(GenerateOverloadedFunctionOrConstructor):

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion1):
(WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion1Caller):
(WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion2):
(WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion2Caller):
(WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnion):
(WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnion1):
(WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnion1Caller):
(WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnion2):
(WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnion2Caller):
(WebCore::jsTestObjPrototypeFunctionOverloadWithOptionalUnion):

  • bindings/scripts/test/TestObj.idl:
8:35 PM Changeset in webkit [207704] by eric.carlson@apple.com
  • 17 edits in trunk/Source

[MediaStream] Dynamically generate media capture sandbox extensions
https://bugs.webkit.org/show_bug.cgi?id=154861
<rdar://problem/24909411>

Reviewed by Tim Horton.

Source/WebCore:

No new tests, some of these changes are covered by existing tests and some can only be tested
with physical capture devices.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: AVSampleBufferAudioRenderer and AVSampleBufferRenderSynchronizer are now declared in AVFoundationSPI.h.
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC): Initialize

AVSampleBufferRenderSynchronizer.

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable): Fail if AVSampleBufferRenderSynchronizer

isn't available.

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueAudioSampleBufferFromTrack): Take a MediaSample&

instead of a PlatformSample&.

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSampleBufferFromTrack): Ditto.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayer): Add the sample buffer display

later to the synchronizer.

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::destroyLayer): Remove the sample buffer display

later from the synchronizer.

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play): Start the synchronizer.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pause): Stash the current clock time in

m_pausedTime, but leave the clock running. Pause the synchronizer.

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentMediaTime): Return the clock time

when playing, m_pausedTime time when paused because we leave the clock running forever.

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::sampleBufferUpdated):

  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: AVSampleBufferAudioRenderer is now declared in AVFoundationSPI.h.
  • platform/spi/mac/AVFoundationSPI.h: Add AVSampleBufferAudioRenderer and AVSampleBufferRenderSynchronizer.

Source/WebKit2:

  • Shared/SandboxExtension.h:

(WebKit::SandboxExtension::createHandleForGenericExtension):

  • Shared/mac/SandboxExtensionMac.mm:

(WebKit::wkSandboxExtensionType): Add case for generic handle.
(WebKit::SandboxExtension::createHandleForGenericExtension): New.

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::invalidateRequests): Clear the list of extensions granted.
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Extend the web

process sandbox as necessary.

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
  • WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:

(WebKit::UserMediaPermissionRequestManager::~UserMediaPermissionRequestManager): Revoke all

sandbox extensions.

(WebKit::UserMediaPermissionRequestManager::grantUserMediaDevicesSandboxExtension): Consume

sandbox extensions.

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::grantUserMediaDevicesSandboxExtension): Pass-through to user media manager.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in: Add GrantUserMediaDevicesSandboxExtension.
  • WebProcess/com.apple.WebProcess.sb.in: Add rules, defines, and a macro to allow dynamic extensions for media capture devices.
7:47 PM Changeset in webkit [207703] by rniwa@webkit.org
  • 9 edits
    16 copies
    2 moves
    8 adds
    4 deletes in trunk/LayoutTests

Update custom elements tests
https://bugs.webkit.org/show_bug.cgi?id=163815

Reviewed by Joseph Pecoraro.

LayoutTests/imported/w3c:

Re-import the custom elements as of 5078aa44879c87c38b6430670583951dbeae3025.

  • web-platform-tests/custom-elements/Document-createElement-expected.txt: Moved from from fast/custom-elements/Document-createElement.html.
  • web-platform-tests/custom-elements/Document-createElement.html: Ditto.
  • web-platform-tests/custom-elements/parser/parser-constructs-custom-element-in-document-write-expected.txt: Moved from from fast/custom-elements/parser/.
  • web-platform-tests/custom-elements/parser/parser-constructs-custom-element-in-document-write.html: Ditto.
  • web-platform-tests/custom-elements/parser/parser-constructs-custom-element-synchronously-expected.txt: Ditto.
  • web-platform-tests/custom-elements/parser/parser-constructs-custom-element-synchronously.html: Ditto.
  • web-platform-tests/custom-elements/parser/parser-constructs-custom-elements-expected.txt: Ditto.
  • web-platform-tests/custom-elements/parser/parser-constructs-custom-elements.html: Ditto.
  • web-platform-tests/custom-elements/parser/parser-fallsback-to-unknown-element-expected.txt: Ditto.
  • web-platform-tests/custom-elements/parser/parser-fallsback-to-unknown-element.html: Ditto.
  • web-platform-tests/custom-elements/parser/parser-sets-attributes-and-children-expected.txt: Ditto.
  • web-platform-tests/custom-elements/parser/parser-sets-attributes-and-children.html: Ditto.
  • web-platform-tests/custom-elements/parser/parser-uses-constructed-element-expected.txt: Ditto.
  • web-platform-tests/custom-elements/parser/parser-uses-constructed-element.html: Ditto.
  • web-platform-tests/custom-elements/parser/parser-uses-registry-of-owner-document-expected.txt: Ditto.
  • web-platform-tests/custom-elements/parser/parser-uses-registry-of-owner-document.html: Ditto.
  • web-platform-tests/custom-elements/parser/w3c-import.log: Added.
  • web-platform-tests/custom-elements/reactions/DOMTokenList-expected.txt:
  • web-platform-tests/custom-elements/reactions/DOMTokenList.html:
  • web-platform-tests/custom-elements/reactions/Document-expected.txt:
  • web-platform-tests/custom-elements/reactions/Document.html:
  • web-platform-tests/custom-elements/reactions/Range-expected.txt:
  • web-platform-tests/custom-elements/reactions/resources/reactions.js:
  • web-platform-tests/custom-elements/upgrading-expected.txt: Added.
  • web-platform-tests/custom-elements/upgrading.html: Moved from fast/custom-elements/enqueue-custom-element-upgrade-reaction.html.
  • web-platform-tests/custom-elements/upgrading/Node-cloneNode-expected.txt: Moved from fast/custom-elements/upgrading/.
  • web-platform-tests/custom-elements/upgrading/Node-cloneNode.html: Ditto.
  • web-platform-tests/custom-elements/upgrading/upgrading-parser-created-element-expected.txt: Ditto.
  • web-platform-tests/custom-elements/upgrading/upgrading-parser-created-element.html: Ditto.
  • web-platform-tests/custom-elements/upgrading/w3c-import.log: Added.
  • web-platform-tests/custom-elements/w3c-import.log:

LayoutTests:

Removed the tests that have been upstreamed and reimported from web-platform-tests.

  • fast/custom-elements/Document-createElement-expected.txt: Removed.
  • fast/custom-elements/enqueue-custom-element-upgrade-reaction-expected.txt: Removed.
  • fast/custom-elements/parser/: Removed.
  • fast/custom-elements/upgrading/: Removed.
7:17 PM Changeset in webkit [207702] by Michael Catanzaro
  • 4 edits
    7 adds in trunk/LayoutTests

Unreviewed GTK test gardening

  • platform/gtk/TestExpectations:
  • platform/gtk/svg/W3C-SVG-1.1/struct-dom-03-b-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/struct-dom-04-b-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/struct-dom-05-b-expected.txt: Added.
  • platform/gtk/svg/custom/dynamic-svg-document-creation-expected.txt:
  • platform/gtk/svg/custom/simple-text-double-shadow.txt: Added.
  • platform/gtk/svg/text/repaint-shadow-expected.txt: Added.
  • platform/gtk/svg/text/text-hkern-on-vertical-text-expected.png:
  • platform/gtk/svg/text/text-hkern-on-vertical-text-expected.txt: Added.
  • platform/gtk/svg/text/text-vkern-on-horizontal-text-expected.txt: Added.
7:17 PM WebKitGTK/Gardening/Calendar edited by Michael Catanzaro
(diff)
5:03 PM Changeset in webkit [207701] by matthew_hanson@apple.com
  • 9 edits in tags/Safari-603.1.10

Merge r207700. rdar://problem/28897179

4:55 PM Changeset in webkit [207700] by achristensen@apple.com
  • 9 edits in trunk

Unreviewed, rolling out r207582.
https://bugs.webkit.org/show_bug.cgi?id=163819

Not quite ready rdar://problem/28897179 (Requested by
alexchristensen on #webkit).

Reverted changeset:

"Re-enable URLParser for non-Safari Cocoa apps after r207321"
https://bugs.webkit.org/show_bug.cgi?id=163690
http://trac.webkit.org/changeset/207582

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

4:20 PM Changeset in webkit [207699] by barraclough@apple.com
  • 6 edits in trunk/Source

WebPage should take UserActivity directly for user input
https://bugs.webkit.org/show_bug.cgi?id=163813

Reviewed by Anders Carlsson.

When we receive mouse/keyboard events in a page, we want to prevent AppNap. We currently do so
via the PageThrottler. This patch is to just make the WebPage drive the UserActivity directly.

Two reasons to do so: (1) to cleanup & simplify for further refactoring. (2) The current code
isn't really achieving the desired effect. The page setting the flag in the throttler to get
the activity to be set is now a less effective way of achieving this goal, since the
PageActivityState bounces back across to the UI process & then messages back to the WebContent
process to take the UserActivity. These extra hops defeat the purpose of making sure the boost
from the initial message isn't lost.

Source/WebCore:

  • page/PageThrottler.cpp:

(WebCore::PageThrottler::PageThrottler):
(WebCore::m_userInputHysteresis): Deleted.

  • page/PageThrottler.h:

(WebCore::PageThrottler::didReceiveUserInput): Deleted.

  • removed PageActivityState::UserInputActivity, didReceiveUserInput, m_userInputHysteresis.

Source/WebKit2:

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_userActivityHysteresis):

  • m_userActivityHysteresis triggers updateUserActivity.

(WebKit::WebPage::setPageSuppressed):

  • setPageSuppressed starts/stops m_userActivityHysteresis.

(WebKit::WebPage::updateUserActivity):

  • update UserActivity based on state of m_userActivityHysteresis.

(WebKit::WebPage::mouseEvent):
(WebKit::WebPage::wheelEvent):
(WebKit::WebPage::keyEvent):

  • input events impulse m_userActivityHysteresis.
  • WebProcess/WebPage/WebPage.h:
4:06 PM Changeset in webkit [207698] by Wenson Hsieh
  • 15 edits
    8 adds in trunk

Support (insertFrom|deleteBy)Composition and (insert|delete)CompositionText inputTypes for InputEvents
https://bugs.webkit.org/show_bug.cgi?id=163460
<rdar://problem/28784142>

Reviewed by Darin Adler.

Source/WebCore:

Adds basic support for the composition inputTypes in the InputEvent spec. See w3.org/TR/input-events,
github.com/w3c/input-events/issues/41 and github.com/w3c/input-events/issues/42 for more details. While input
events are fired in the correct order with respect to each other, additional work will be required to ensure
that input events are fired in the correct order with respect to composition(start|update|end) events and
textInput events. This is held off until the expected ordering of events is officially defined in the spec.

Tests: fast/events/before-input-events-prevent-insert-composition.html

fast/events/before-input-events-prevent-recomposition.html
fast/events/input-events-ime-composition.html
fast/events/input-events-ime-recomposition.html

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::apply):

  • editing/CompositeEditCommand.h:

(WebCore::CompositeEditCommand::isBeforeInputEventCancelable):

Adds a new virtual method hook for subclasses to mark their beforeinput events as non-cancelable (see
TypingCommand::isBeforeInputEventCancelable). By default, beforeinput events are cancelable.

  • editing/EditAction.h:

Adds 4 new EditActions corresponding to the 4 composition-related inputTypes. These are:
EditActionTypingDeletePendingComposition => "deleteCompositionText"
EditActionTypingDeleteFinalComposition => "deleteByComposition"
EditActionTypingInsertPendingComposition => "insertCompositionText"
EditActionTypingInsertFinalComposition => "insertFromComposition"

  • editing/EditCommand.cpp:

(WebCore::inputTypeNameForEditingAction):

  • editing/Editor.cpp:

(WebCore::dispatchBeforeInputEvent):
(WebCore::dispatchBeforeInputEvents):
(WebCore::Editor::willApplyEditing):
(WebCore::Editor::insertTextWithoutSendingTextEvent):
(WebCore::Editor::setComposition):

In setComposition(text, mode), tweak the logic for committing a composition to always delete the selection
before inserting the final composition text. In setComposition(text, underlines, start, end), catch the case
where we're beginning to recompose an existing range in the DOM and delete the recomposed text first.

  • editing/TypingCommand.cpp:

(WebCore::editActionForTypingCommand):
(WebCore::TypingCommand::TypingCommand):
(WebCore::TypingCommand::deleteSelection):

Adds a TextCompositionType parameter so that call sites (see Editor::setComposition) can indicate what state the
edited composition is in. This allows us to differentiate between deletion of finalized composition text in
preparation of recomposing a range in the DOM, and deletion of composition text that has not yet been committed
in preparation for inserting a finalized composition into the DOM.

(WebCore::TypingCommand::deleteKeyPressed):
(WebCore::TypingCommand::forwardDeleteKeyPressed):
(WebCore::TypingCommand::insertText):
(WebCore::TypingCommand::insertLineBreak):
(WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent):
(WebCore::TypingCommand::insertParagraphSeparator):
(WebCore::TypingCommand::isBeforeInputEventCancelable):
(WebCore::TypingCommand::inputEventData):
(WebCore::TypingCommand::willAddTypingToOpenCommand):

  • editing/TypingCommand.h:

Source/WebKit/mac:

Handle new EditAction types for inserting/deleting pending/final compositions.

  • WebCoreSupport/WebEditorClient.mm:

(undoNameForEditAction):

Source/WebKit2:

Handle new EditAction types for inserting/deleting pending/final compositions.

  • UIProcess/WebEditCommandProxy.cpp:

(WebKit::WebEditCommandProxy::nameForEditAction):

LayoutTests:

Adds 4 new layout tests to verify that composition events are dispatched as expected when using IME, and that
input events of type "insertFromComposition" and "deleteByComposition" can be prevented.

Also rebaselines an existing WK1 editing test (text-input-controller.html) to account for how we now delete the
existing composition text before inserting the finalized composition text in Editor::setComposition. This means
that there are a few more delegate calls than there were before (as seen in the expected output), although the
resulting behavior is still the same.

  • editing/mac/input/text-input-controller-expected.txt:
  • fast/events/before-input-events-prevent-insert-composition.html: Added.
  • fast/events/before-input-events-prevent-recomposition.html: Added.
  • fast/events/input-events-ime-composition.html: Added.
  • fast/events/input-events-ime-recomposition.html: Added.
  • platform/ios-simulator/TestExpectations:
3:38 PM Changeset in webkit [207697] by sbarati@apple.com
  • 3 edits
    1 add in trunk

SpeculativeJIT::compileTryGetById needs to pass in NeedsToSpill along both the cell speculation and untyped speculation path
https://bugs.webkit.org/show_bug.cgi?id=163622

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/try-get-by-id-should-spill-registers-dfg.js: Added.

(let.f.createBuiltin):

Source/JavaScriptCore:

We were passing in DontSpill in the Untyped:child1() case, which caused us
not to spill the base register. This is obviously wrong because the
DFG's register allocator expected the base to still be in the register
that it allocated for it after the TryGetById node executed.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileTryGetById):

3:20 PM Changeset in webkit [207696] by keith_miller@apple.com
  • 10 edits in trunk

Expand Trunc in B3 to support Double to Float
https://bugs.webkit.org/show_bug.cgi?id=163809

Source/JavaScriptCore:

Reviewed by Geoffrey Garen.

This feature is useful for passing floating point arguments via registers.
Currently, ArgumentRegValue returns a the full 64-bit register. Thus, we
need a way to indicate to B3 that we only want the low 32-bits.

  • b3/B3Common.h:

(JSC::B3::isIdentical):

  • b3/B3LowerToAir.cpp:

(JSC::B3::Air::LowerToAir::lower):

  • b3/B3Opcode.h:
  • b3/B3ReduceStrength.cpp:
  • b3/B3Validate.cpp:
  • b3/B3Value.cpp:

(JSC::B3::Value::typeFor):

  • b3/testb3.cpp:

(JSC::B3::testAddFPRArgsFloat):
(JSC::B3::testCeilArgWithEffectfulDoubleConversion):
(JSC::B3::testFloorArgWithEffectfulDoubleConversion):
(JSC::B3::testDoubleProducerPhiToFloatConversionWithDoubleConsumer):
(JSC::B3::run):

Websites/webkit.org:

Update the docs to explain that Trunc now works with fleating point numbers.

Reviewed by Geoffrey Garen.

  • docs/b3/intermediate-representation.html:
2:23 PM October 2016 Meeting edited by Jon Davis
(diff)
2:19 PM October 2016 Meeting edited by Jon Davis
(diff)
2:08 PM October 2016 Meeting edited by Simon Fraser
(diff)
2:07 PM Changeset in webkit [207695] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Make sure shadow user agent sheets parse in UASheetMode
https://bugs.webkit.org/show_bug.cgi?id=163810

Reviewed by Dean Jackson.

  • dom/InlineStyleSheetOwner.cpp:

(WebCore::parserContextForElement):
(WebCore::makeInlineStyleSheetCacheKey):
(WebCore::InlineStyleSheetOwner::createSheet):
(WebCore::parserContextForForElement): Deleted.

2:05 PM October 2016 Meeting edited by Simon Fraser
(diff)
12:52 PM Changeset in webkit [207694] by jer.noble@apple.com
  • 16 edits in trunk/Source/WebCore

YouTube stalls when seeking beyond buffered range
https://bugs.webkit.org/show_bug.cgi?id=162813

Reviewed by Eric Carlson.

When seeking a MediaPlayerPrivateMediaSourceAVFObjC, we will first seek the AVSampleBufferRenderSynchronizer,
flush and enqueue non-displaying frames, enqueue regular frames, then begin playback. The above stall will occur
when we enqueue so many non- displaying frames that the display layer is not ready for normal ones before
playback begins. Then, when the synchronizer attempts to synchronize the enqueued audio and video renderers, the
only available samples are back at the original media time, and so it "seeks" by updating the CMTimebase back to
the original media time, causing playback to appear "stalled". The overall solution is to "flush" the contents
of the renderers before the seek, so that the synchronizer doesn't reset the currentTime, and to only restart
the synchronizer when there are visible (or audible) samples available for display.

Breaking the fix down into sections:

Don't enqueue too many non-displaying samples at once:

  • Rename SourceBufferPrivate::flushAndEnqueueNonDisplayingSamples() to SourceBufferPrivate::flush(), and no longer pass in an array of non-displaying samples.
  • Add a new virtual method to MediaSample, createNonDisplayingCopy(), used by SourceBuffer to enqueue non-displaying samples.
  • in SourceBuffer::reenqueueMediaForTime(), use that new createNonDisplayingCopy() method to enqueue non-displaying samples in the same queue as regular samples.
  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::provideMediaData):
(WebCore::SourceBuffer::reenqueueMediaForTime):

  • platform/MediaSample.h:

(WebCore::MediaSample::isNonDisplaying):

  • platform/graphics/SourceBufferPrivate.h:

(WebCore::SourceBufferPrivate::flush):
(WebCore::SourceBufferPrivate::flushAndEnqueueNonDisplayingSamples): Renamed -> flush().

  • platform/graphics/avfoundation/MediaSampleAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:

(WebCore::CMSampleBufferIsNonDisplaying):
(WebCore::MediaSampleAVFObjC::flags):
(WebCore::MediaSampleAVFObjC::createNonDisplayingCopy):

  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:

(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
(WebCore::SourceBufferPrivateAVFObjC::willSeek):
(WebCore::createNonDisplayingCopy): Moved to MediaSampleAVFObjC.
(WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples): Renamed -> flush().

  • platform/mock/mediasource/MockBox.h:
  • platform/mock/mediasource/MockSourceBufferPrivate.cpp:

(WebCore::MockMediaSample::flags):
(WebCore::MockMediaSample::createNonDisplayingCopy):

  • platform/mock/mediasource/MockSourceBufferPrivate.h:

Don't start playing until all renderers have visible/audible samples:

  • SourceBufferPrivateAVFObjC will notify its associated MediaPlayerPrivateMediaSourceAVFObjC when it flushes and receives visible/audible samples.
  • The MediaPlayer will store audio renderers as keys to a HashMap which allows it to track which have available samples.
  • This requires changing all the places where we loop over the available renderers.
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:

(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
(WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
(WebCore::SourceBufferPrivateAVFObjC::flush):
(WebCore::SourceBufferPrivateAVFObjC::willSeek):

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::allRenderersHaveAvailableSamples):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setHasAvailableVideoFrame): Deleted.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVolume):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setMuted):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setHasAvailableVideoFrame):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setHasAvailableAudioSample):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateAllRenderersHaveAvailableSamples):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setPreservesPitch):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seeking):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::shouldBePlaying):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):

  • platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:

(WebCore::MediaSourcePrivateAVFObjC::willSeek):

  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:

Don't display new samples mid-seek.

  • MediaSource should clear its m_pendingSeekTime ivar, which is used whyn SourceBuffer queries whether or not a seek is pending, when instructing its SourceBuffers to seekToTime().
  • This allows SourceBuffer to decline to enqueue new samples during a MediaSource seek operation.
  • Modules/mediasource/MediaSource.cpp:

(WebCore::MediaSource::completeSeek):

12:14 PM Changeset in webkit [207693] by keith_miller@apple.com
  • 9 edits
    18 moves in trunk/Source/JavaScriptCore

Rename WASM to Wasm
https://bugs.webkit.org/show_bug.cgi?id=163796

Rubber stamped by Filip Pizlo.

  • CMakeLists.txt:
  • Configurations/ToolExecutable.xcconfig:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • llint/LLIntThunks.cpp:

(JSC::vmEntryToWasm):
(JSC::vmEntryToWASM): Deleted.

  • llint/LLIntThunks.h:
  • runtime/Executable.cpp:

(JSC::WebAssemblyExecutable::WebAssemblyExecutable):

  • runtime/Executable.h:
  • shell/CMakeLists.txt:
  • testWASM.cpp:

(runWASMTests): Deleted.

  • testWasm.cpp: Renamed from Source/JavaScriptCore/testWASM.cpp.

(CommandLine::CommandLine):
(printUsageStatement):
(CommandLine::parseArguments):
(runLEBTests):
(invoke):
(box):
(runWasmTests):
(main):

  • wasm/JSWASMModule.cpp:

(JSC::JSWASMModule::JSWASMModule): Deleted.
(JSC::JSWASMModule::destroy): Deleted.
(JSC::JSWASMModule::visitChildren): Deleted.

  • wasm/JSWASMModule.h:

(JSC::JSWASMModule::create): Deleted.
(JSC::JSWASMModule::createStructure): Deleted.
(JSC::JSWASMModule::i32Constants): Deleted.
(JSC::JSWASMModule::f32Constants): Deleted.
(JSC::JSWASMModule::f64Constants): Deleted.
(JSC::JSWASMModule::signatures): Deleted.
(JSC::JSWASMModule::functionImports): Deleted.
(JSC::JSWASMModule::functionImportSignatures): Deleted.
(JSC::JSWASMModule::globalVariableTypes): Deleted.
(JSC::JSWASMModule::functionDeclarations): Deleted.
(JSC::JSWASMModule::functionPointerTables): Deleted.
(JSC::JSWASMModule::arrayBuffer): Deleted.
(JSC::JSWASMModule::functions): Deleted.
(JSC::JSWASMModule::functionStartOffsetsInSource): Deleted.
(JSC::JSWASMModule::functionStackHeights): Deleted.
(JSC::JSWASMModule::globalVariables): Deleted.
(JSC::JSWASMModule::importedFunctions): Deleted.

  • wasm/JSWasmModule.cpp: Renamed from Source/JavaScriptCore/wasm/JSWASMModule.cpp.

(JSC::JSWasmModule::JSWasmModule):
(JSC::JSWasmModule::destroy):
(JSC::JSWasmModule::visitChildren):

  • wasm/JSWasmModule.h: Renamed from Source/JavaScriptCore/wasm/JSWASMModule.h.

(JSC::JSWasmModule::create):
(JSC::JSWasmModule::createStructure):
(JSC::JSWasmModule::i32Constants):
(JSC::JSWasmModule::f32Constants):
(JSC::JSWasmModule::f64Constants):
(JSC::JSWasmModule::signatures):
(JSC::JSWasmModule::functionImports):
(JSC::JSWasmModule::functionImportSignatures):
(JSC::JSWasmModule::globalVariableTypes):
(JSC::JSWasmModule::functionDeclarations):
(JSC::JSWasmModule::functionPointerTables):
(JSC::JSWasmModule::arrayBuffer):
(JSC::JSWasmModule::functions):
(JSC::JSWasmModule::functionStartOffsetsInSource):
(JSC::JSWasmModule::functionStackHeights):
(JSC::JSWasmModule::globalVariables):
(JSC::JSWasmModule::importedFunctions):

  • wasm/WASMB3IRGenerator.cpp:

(JSC::WASM::createJSWrapper): Deleted.
(JSC::WASM::parseAndCompile): Deleted.

  • wasm/WASMCallingConvention.cpp:

(JSC::WASM::jscCallingConvention): Deleted.
(JSC::WASM::wasmCallingConvention): Deleted.

  • wasm/WASMCallingConvention.h:

(JSC::WASM::CallingConvention::CallingConvention): Deleted.
(JSC::WASM::CallingConvention::marshallArgumentImpl): Deleted.
(JSC::WASM::CallingConvention::marshallArgument): Deleted.
(JSC::WASM::CallingConvention::loadArguments): Deleted.
(JSC::WASM::CallingConvention::setupCall): Deleted.
(JSC::WASM::nextJSCOffset): Deleted.

  • wasm/WASMFormat.h:

(JSC::WASM::toB3Type): Deleted.
(JSC::WASM::isValueType): Deleted.

  • wasm/WASMFunctionParser.h:

(JSC::WASM::FunctionParser<Context>::FunctionParser): Deleted.
(JSC::WASM::FunctionParser<Context>::parse): Deleted.
(JSC::WASM::FunctionParser<Context>::parseBlock): Deleted.
(JSC::WASM::FunctionParser<Context>::parseExpression): Deleted.
(JSC::WASM::FunctionParser<Context>::parseUnreachableExpression): Deleted.

  • wasm/WASMMemory.cpp:

(JSC::WASM::Memory::Memory): Deleted.

  • wasm/WASMMemory.h:

(JSC::WASM::Memory::~Memory): Deleted.
(JSC::WASM::Memory::memory): Deleted.
(JSC::WASM::Memory::size): Deleted.
(JSC::WASM::Memory::pinnedRegisters): Deleted.
(JSC::WASM::Memory::mode): Deleted.
(JSC::WASM::Memory::grow): Deleted.
(JSC::WASM::Memory::offsetOfSize): Deleted.

  • wasm/WASMModuleParser.cpp:

(JSC::WASM::ModuleParser::parse): Deleted.
(JSC::WASM::ModuleParser::parseMemory): Deleted.
(JSC::WASM::ModuleParser::parseFunctionTypes): Deleted.
(JSC::WASM::ModuleParser::parseFunctionSignatures): Deleted.
(JSC::WASM::ModuleParser::parseFunctionDefinitions): Deleted.

  • wasm/WASMModuleParser.h:

(JSC::WASM::ModuleParser::ModuleParser): Deleted.
(JSC::WASM::ModuleParser::functionInformation): Deleted.
(JSC::WASM::ModuleParser::memory): Deleted.

  • wasm/WASMOps.h:

(JSC::WASM::isValidOpType): Deleted.
(JSC::WASM::isControlOp): Deleted.

  • wasm/WASMParser.h:

(JSC::WASM::Parser::parseVarUInt32): Deleted.
(JSC::WASM::Parser::parseVarUInt64): Deleted.
(JSC::WASM::Parser::Parser): Deleted.
(JSC::WASM::Parser::consumeCharacter): Deleted.
(JSC::WASM::Parser::consumeString): Deleted.
(JSC::WASM::Parser::parseUInt32): Deleted.
(JSC::WASM::Parser::parseUInt7): Deleted.
(JSC::WASM::Parser::parseVarUInt1): Deleted.
(JSC::WASM::Parser::parseValueType): Deleted.

  • wasm/WASMPlan.cpp:

(JSC::WASM::Plan::Plan): Deleted.

  • wasm/WASMSections.h:

(JSC::WASM::Sections::validateOrder): Deleted.

  • wasm/WasmB3IRGenerator.cpp: Renamed from Source/JavaScriptCore/wasm/WASMB3IRGenerator.cpp.

(dumpProcedure):
(JSC::Wasm::createJSWrapper):
(JSC::Wasm::parseAndCompile):

  • wasm/WasmB3IRGenerator.h: Renamed from Source/JavaScriptCore/wasm/WASMB3IRGenerator.h.
  • wasm/WasmCallingConvention.cpp: Renamed from Source/JavaScriptCore/wasm/WASMCallingConvention.cpp.

(JSC::Wasm::jscCallingConvention):
(JSC::Wasm::wasmCallingConvention):

  • wasm/WasmCallingConvention.h: Renamed from Source/JavaScriptCore/wasm/WASMCallingConvention.h.

(JSC::Wasm::CallingConvention::CallingConvention):
(JSC::Wasm::CallingConvention::marshallArgumentImpl):
(JSC::Wasm::CallingConvention::marshallArgument):
(JSC::Wasm::CallingConvention::loadArguments):
(JSC::Wasm::CallingConvention::setupCall):
(JSC::Wasm::nextJSCOffset):

  • wasm/WasmFormat.h: Renamed from Source/JavaScriptCore/wasm/WASMFormat.h.

(JSC::Wasm::toB3Type):
(JSC::Wasm::isValueType):

  • wasm/WasmFunctionParser.h: Renamed from Source/JavaScriptCore/wasm/WASMFunctionParser.h.

(JSC::Wasm::FunctionParser<Context>::FunctionParser):
(JSC::Wasm::FunctionParser<Context>::parse):
(JSC::Wasm::FunctionParser<Context>::parseBlock):
(JSC::Wasm::FunctionParser<Context>::parseExpression):
(JSC::Wasm::FunctionParser<Context>::parseUnreachableExpression):

  • wasm/WasmMemory.cpp: Renamed from Source/JavaScriptCore/wasm/WASMMemory.cpp.

(JSC::Wasm::Memory::Memory):

  • wasm/WasmMemory.h: Renamed from Source/JavaScriptCore/wasm/WASMMemory.h.

(JSC::Wasm::Memory::~Memory):
(JSC::Wasm::Memory::memory):
(JSC::Wasm::Memory::size):
(JSC::Wasm::Memory::pinnedRegisters):
(JSC::Wasm::Memory::mode):
(JSC::Wasm::Memory::grow):
(JSC::Wasm::Memory::offsetOfSize):

  • wasm/WasmModuleParser.cpp: Renamed from Source/JavaScriptCore/wasm/WASMModuleParser.cpp.

(JSC::Wasm::ModuleParser::parse):
(JSC::Wasm::ModuleParser::parseMemory):
(JSC::Wasm::ModuleParser::parseFunctionTypes):
(JSC::Wasm::ModuleParser::parseFunctionSignatures):
(JSC::Wasm::ModuleParser::parseFunctionDefinitions):

  • wasm/WasmModuleParser.h: Renamed from Source/JavaScriptCore/wasm/WASMModuleParser.h.

(JSC::Wasm::ModuleParser::ModuleParser):
(JSC::Wasm::ModuleParser::functionInformation):
(JSC::Wasm::ModuleParser::memory):

  • wasm/WasmOps.h: Renamed from Source/JavaScriptCore/wasm/WASMOps.h.

(JSC::Wasm::isValidOpType):
(JSC::Wasm::isControlOp):

  • wasm/WasmParser.h: Renamed from Source/JavaScriptCore/wasm/WASMParser.h.

(JSC::Wasm::Parser::parseVarUInt32):
(JSC::Wasm::Parser::parseVarUInt64):
(JSC::Wasm::Parser::Parser):
(JSC::Wasm::Parser::consumeCharacter):
(JSC::Wasm::Parser::consumeString):
(JSC::Wasm::Parser::parseUInt32):
(JSC::Wasm::Parser::parseUInt7):
(JSC::Wasm::Parser::parseVarUInt1):
(JSC::Wasm::Parser::parseValueType):

  • wasm/WasmPlan.cpp: Renamed from Source/JavaScriptCore/wasm/WASMPlan.cpp.

(JSC::Wasm::Plan::Plan):

  • wasm/WasmPlan.h: Renamed from Source/JavaScriptCore/wasm/WASMPlan.h.
  • wasm/WasmSections.h: Renamed from Source/JavaScriptCore/wasm/WASMSections.h.

(JSC::Wasm::Sections::validateOrder):

12:10 PM Changeset in webkit [207692] by dino@apple.com
  • 6 edits
    2 adds in trunk

SVG should not paint selection within a mask
https://bugs.webkit.org/show_bug.cgi?id=163772
<rdar://problem/28705129>

Reviewed by Simon Fraser.

Source/WebCore:

When masking content, we shouldn't paint the text
selection as we are rendering into the masking
offscreen buffer.

Test: svg/masking/mask-should-not-paint-selection.html

  • rendering/PaintPhase.h: Add a new behavior - PaintBehaviorSkipSelectionHighlight.
  • rendering/svg/SVGInlineTextBox.cpp:

(WebCore::SVGInlineTextBox::paint): Don't update the selectionStyle if
PaintBehaviorSkipSelectionHighlight is true.

  • rendering/svg/SVGRenderingContext.cpp:

(WebCore::SVGRenderingContext::renderSubtreeToImageBuffer): Add PaintBehaviorSkipSelectionHighlight
to the PaintInfo.

LayoutTests:

  • svg/masking/mask-should-not-paint-selection-expected.html: Added.
  • svg/masking/mask-should-not-paint-selection.html: Added.
11:58 AM Changeset in webkit [207691] by Jonathan Bedard
  • 2 edits in trunk/Tools

WebKitTestRunnerApp packages .idl file
https://bugs.webkit.org/show_bug.cgi?id=163788

Reviewed by Darin Adler.

  • WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Removed .idl file from app package, removed bad reference to app icon.
11:53 AM Changeset in webkit [207690] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

[Web IDL] MediaControlsHost has invalid operation overloads
https://bugs.webkit.org/show_bug.cgi?id=163793

Reviewed by Darin Adler.

MediaControlsHost has invalid operation overloads:

  • sortedTrackListForMenu()
  • displayNameForTrack()

The parameter is nullable for both overloads which is not valid IDL.

  • sortedTrackListForMenu(): The parameter is no longer nullable. This is a minor behavior change and it should be safe since this is Apple-specific and only called from mediaControlsApple.js which uses HTMLMediaElement.videoTracks and HTMLMediaElement.audioTracks as input, both of which are not nullable. Note that we could have also kept one of the parameters as nullable to not change behavior but allowing null does not seem useful here.
  • displayNameForTrack(): Use a union instead of overloading, no behavior change.
  • Modules/mediacontrols/MediaControlsHost.cpp:

(WebCore::MediaControlsHost::sortedTrackListForMenu):
(WebCore::MediaControlsHost::displayNameForTrack):

  • Modules/mediacontrols/MediaControlsHost.h:
  • Modules/mediacontrols/MediaControlsHost.idl:
11:45 AM Changeset in webkit [207689] by commit-queue@webkit.org
  • 21 edits in trunk/Source

Implement basic pointer lock behavior for WebKit and WebKit2.
https://bugs.webkit.org/show_bug.cgi?id=162745

Patch by Jeremy Jones <jeremyj@apple.com> on 2016-10-21
Reviewed by Simon Fraser.

Source/WebCore:

When ENABLE_POINTER_LOCK is enabled, these tests now pass with DumpRenderTree.
LayoutTests/pointer-lock/lock-already-locked.html
LayoutTests/pointer-lock/lock-element-not-in-dom.html
LayoutTests/pointer-lock/locked-element-iframe-removed-from-dom.html
LayoutTests/pointer-lock/mouse-event-api.html

Export pointer lock symbols and cancel pointer lock on "escape".

  • dom/Document.h: Export symbols.
  • dom/Element.h: Export symbols.
  • page/EventHandler.cpp:

(WebCore::EventHandler::keyEvent): Cancel pointer lock on "escape".

  • page/PointerLockController.cpp: Add missing include.
  • page/PointerLockController.h: Export symbols.

Source/WebKit/mac:

Add basic pointer lock functionality. User permission is not yet implemented.

  • WebCoreSupport/WebChromeClient.h:
  • WebCoreSupport/WebChromeClient.mm:

(WebChromeClient::requestPointerLock):
(WebChromeClient::requestPointerUnlock):

Source/WebKit2:

Enable basic pointer lock functionality by plumbing requests through WebPage IPC.
Pass through mouse movement deltas.
Unlock pointer when view is no longer visible.

  • Shared/WebEventConversion.cpp:

(WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent): Pass along mouse movement.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::dispatchViewStateChange): Unlock pointer when page is not visible.
(WebKit::WebPageProxy::requestPointerLock): Hide and disassociate pointer.
(WebKit::WebPageProxy::requestPointerUnlock): Show and associate pointer.

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in: Add methods.
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::requestPointerLock): Pass along to web page.
(WebKit::WebChromeClient::requestPointerUnlock): Ditto.

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didAcquirePointerLock): Forward to PointerLockController.
(WebKit::WebPage::didNotAcquirePointerLock): Ditto.
(WebKit::WebPage::didLosePointerLock): Ditto.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in: Add methods.
11:37 AM Changeset in webkit [207688] by jer.noble@apple.com
  • 3 edits in trunk/Source/WebCore

WebCore::PlatformMediaSession::stopSession + 13
https://bugs.webkit.org/show_bug.cgi?id=163799

Reviewed by Eric Carlson.

Because m_sessions can be mutated by removeSession() while iterating over m_sessions, and because
PlatformMediaSessions are not refcounted, it is not enough to copy m_sessions into a copied Vector
before iterating. Instead, wrap iteration of m_sessions in a convenience function, which sets an
iteration counter which, when cleared, removes all null entries from m_session. In parallel, modify
removeSession() to check this iteration counter, and replace the session with a null value rather
than mutating the m_sessions vector itself.

  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::has):
(WebCore::PlatformMediaSessionManager::activeAudioSessionRequired):
(WebCore::PlatformMediaSessionManager::canProduceAudio):
(WebCore::PlatformMediaSessionManager::removeSession):
(WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):
(WebCore::PlatformMediaSessionManager::sessionWillEndPlayback):
(WebCore::PlatformMediaSessionManager::currentSessionsMatching):
(WebCore::PlatformMediaSessionManager::applicationWillEnterBackground):
(WebCore::PlatformMediaSessionManager::applicationDidEnterForeground):
(WebCore::PlatformMediaSessionManager::systemWillSleep):
(WebCore::PlatformMediaSessionManager::systemDidWake):
(WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForDocument):
(WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForProcess):
(WebCore::PlatformMediaSessionManager::forEachSession):
(WebCore::PlatformMediaSessionManager::anyOfSessions):

  • platform/audio/PlatformMediaSessionManager.h:
11:32 AM Changeset in webkit [207687] by Darin Adler
  • 38 edits in trunk/Source/WebCore

Move some more assorted classes from ExceptionCode to Exception
https://bugs.webkit.org/show_bug.cgi?id=163775

Reviewed by Chris Dumez.

  • Modules/fetch/WorkerGlobalScopeFetch.cpp:

(WebCore::WorkerGlobalScopeFetch::fetch): Remove unnecessary calls to
WorkerGlobalScope::scriptExcutionObject, which just returns the scope itself.

  • Modules/notifications/Notification.cpp: Added now-needed include.
  • Modules/webdatabase/DOMWindowWebDatabase.cpp: Ditto.
  • WebCore.xcodeproj/project.pbxproj: Added WindowOrWorkerGlobalScope.idl.
  • bindings/js/JSDedicatedWorkerGlobalScopeCustom.cpp:

(WebCore::JSDedicatedWorkerGlobalScope::postMessage): Pass a reference instead
of a pointer to handlePostMessage.

  • bindings/js/JSMessagePortCustom.cpp:

(WebCore::JSMessagePort::postMessage): Ditto.

  • bindings/js/JSMessagePortCustom.h: Use pragma once. Change handlePostMessage

to take a reference to the object instead of a pointer, and also to use
propagateException since postMessage now uses ExceptionOr.

  • bindings/js/JSWorkerCustom.cpp:

(WebCore::JSWorker::postMessage): Pass a reference instead of a pointer to
handlePostMessage.
(WebCore::constructJSWorker): Use the version of toJSNewlyCreated that handles
propagating an exception from ExceptionOr.

  • bindings/js/JSWorkerGlobalScopeCustom.cpp:

(WebCore::JSWorkerGlobalScope::visitAdditionalChildren): Use auto.
Remove unnecessary round trip through the scriptExecutionContext function.
(WebCore::JSWorkerGlobalScope::importScripts): Use reserveInitialCapacity and
uncheckedAppend to build up the vector of strings. Use propagateException
to deal with ExceptionOr result.

  • dom/MessagePort.cpp:

(WebCore::MessagePort::MessagePort): Initialize boolean data members in the
class definition instead of here.
(WebCore::MessagePort::postMessage): Use ExceptionOr.
(WebCore::MessagePort::entangle): Use an rvalue reference.
(WebCore::MessagePort::dispatchMessages): Use ExceptionOr.
(WebCore::MessagePort::disentanglePorts): Ditto. Also use a more efficient
idiom that does half as much hashing as the old algorithm, and got rid an
unneeded local variable.
(WebCore::MessagePort::entanglePorts): Use an rvalue reference.

  • dom/MessagePort.h: Updated for above changes.
  • fileapi/FileReader.cpp:

(WebCore::FileReader::create): Use auto.
(WebCore::FileReader::FileReader): Initialize scalars in the class definition.
(WebCore::FileReader::~FileReader): Call cancel on the loader directly
instead of sharing code with the stop function.
(WebCore::FileReader::stop): Moved the body of the terminate function here.
(WebCore::FileReader::readAsArrayBuffer): Use ExceptionOr.
(WebCore::FileReader::readAsBinaryString): Ditto.
(WebCore::FileReader::readAsText): Ditto.
(WebCore::FileReader::readAsDataURL): Ditto.
(WebCore::FileReader::readInternal): Ditto. Also add a cast now that
we derive privately from FileReaderLoaderClient.
(WebCore::FileReader::abort): Call stop instead of terminate.
(WebCore::FileReader::terminate): Deleted. Moved code into stop.
(WebCore::FileReader::didReceiveData): Moved comment to where the constant is.

  • fileapi/FileReader.h: Updated for above changes. Made more functions private

and used final instead of override.

  • fileapi/FileReader.idl: Use non-legacy exceptions.
  • fileapi/FileReaderSync.cpp:

(WebCore::FileReaderSync::readAsArrayBuffer): Use ExceptionOr.
(WebCore::FileReaderSync::readAsBinaryString): Ditto.
(WebCore::FileReaderSync::readAsText): Ditto.
(WebCore::FileReaderSync::readAsDataURL): Ditto.
(WebCore::FileReaderSync::startLoading): Ditto.
(WebCore::FileReaderSync::startLoadingString): Added. Helper to cut down on
repeated code in functions above.

  • fileapi/FileReaderSync.h: Updated for above changes.
  • fileapi/FileReaderSync.idl: Use non-legacy exceptions.
  • page/Base64Utilities.cpp:

(WebCore::Base64Utilities::btoa): Use ExceptionOr.
(WebCore::Base64Utilities::atob): Ditto.

  • page/Base64Utilities.h: Updated for above changes.
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::navigator): Pass a reference to the frame.
(WebCore::DOMWindow::postMessage): Use ExceptionOr when calling
MessagePort::disentanglePorts. Also udpated for changes to the
PostMessageTimer.

  • page/Navigator.cpp:

(WebCore::Navigator::Navigator): Take a reference.
(WebCore::shouldHideFourDot): Ditto
(WebCore::Navigator::appVersion): Pass a reference.
(WebCore::Navigator::plugins): Return a reference.
(WebCore::Navigator::mimeTypes): Ditto.

  • page/Navigator.h: Updated for above changes. Also marked the

class final and moved derivation from RefCounted to NavigatorBase.

  • page/NavigatorBase.h: Addded derivation from RefCounted since

both derived classes want that, and the destructor is already virtual.

  • page/WindowOrWorkerGlobalScope.idl: Use non-legacy exceptions.
  • page/WorkerNavigator.cpp:

(WebCore::WorkerNavigator::~WorkerNavigator): Deleted.

  • page/WorkerNavigator.h: Moved derivation from RefCounted to

NavigatorBase. Also marked class final.

  • workers/AbstractWorker.cpp:

(WebCore::AbstractWorker::resolveURL): Use ExceptionOr.

  • workers/AbstractWorker.h: Updated for above changes.
  • workers/DedicatedWorkerGlobalScope.cpp:

(WebCore::DedicatedWorkerGlobalScope::create): Use RefPtr&&
instead of PassRefPtr.
(WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):
Ditto.
(WebCore::DedicatedWorkerGlobalScope::postMessage): Use ExceptionOr.
(WebCore::DedicatedWorkerGlobalScope::importScripts): Ditto.

  • workers/DedicatedWorkerGlobalScope.h: Updated for above changes.
  • workers/DedicatedWorkerGlobalScope.idl: Use non-legacy exceptions.
  • workers/Worker.cpp:

(WebCore::Worker::create): Use ExceptionOr.
(WebCore::Worker::postMessage): Ditto.

  • workers/Worker.h: Updated for above changes.
  • workers/Worker.idl: Use non-legacy exception.
  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::WorkerGlobalScope): Moved initialization
of m_closing to class definition.
(WebCore::WorkerGlobalScope::~WorkerGlobalScope): Removed call to
deleted notifyObserversOfStop function.
(WebCore::WorkerGlobalScope::importScripts): Use ExceptionOr. Also use
reserveInitialCapacity and uncheckedAppend to build a vector.
(WebCore::WorkerGlobalScope::addConsoleMessage): Use an rvalue reference.
Also moved the body of one of the addMessageToWorkerConsole overloads into
one of the overloads of this function, and changed the other to call addMessage.
(WebCore::WorkerGlobalScope::addMessage): Moved the body of the other
addMessageToWorkerConsole here.
(WebCore::WorkerGlobalScope::addMessageToWorkerConsole): Deleted.
(WebCore::WorkerGlobalScope::Observer::Observer): Deleted.
(WebCore::WorkerGlobalScope::Observer::~Observer): Deleted.
(WebCore::WorkerGlobalScope::Observer::stopObserving): Deleted.
(WebCore::WorkerGlobalScope::registerObserver): Deleted.
(WebCore::WorkerGlobalScope::unregisterObserver): Deleted.
(WebCore::WorkerGlobalScope::notifyObserversOfStop): Deleted.

  • workers/WorkerGlobalScope.h: Removed unneeded includes. Moved many virtual

function overrides into the private section. Marked many functions final instead
of just override. Removed unused Observer class and m_workerObservers set.

  • workers/WorkerThread.cpp:

(WebCore::WorkerThread::stop): Removed call to deleted
WorkerGlobalScope::notifyObserversOfStop function.

11:20 AM Changeset in webkit [207686] by Antti Koivisto
  • 6 edits in trunk/Source/WebCore

Tighten ComputedStyleExtractor to use Element instead of Node
https://bugs.webkit.org/show_bug.cgi?id=163798

Reviewed by Andreas Kling.

Also make its functions non-const as they may compute style.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::styleElementForNode):
(WebCore::ComputedStyleExtractor::ComputedStyleExtractor):

If we are called with a Node figure out the style Element in constructor.

(WebCore::ComputedStyleExtractor::getFontSizeCSSValuePreferringKeyword):
(WebCore::ComputedStyleExtractor::useFixedFontDefaultSize):
(WebCore::ComputedStyleExtractor::styledElement):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
(WebCore::CSSComputedStyleDeclaration::copyProperties):
(WebCore::elementOrItsAncestorNeedsStyleRecalc):

Use composed tree iterator for increased correctness in shadow trees.

(WebCore::updateStyleIfNeededForElement):
(WebCore::computeRenderStyleForProperty):
(WebCore::ComputedStyleExtractor::customPropertyValue):
(WebCore::ComputedStyleExtractor::customPropertyText):
(WebCore::ComputedStyleExtractor::propertyValue):
(WebCore::CSSComputedStyleDeclaration::length):
(WebCore::CSSComputedStyleDeclaration::item):
(WebCore::ComputedStyleExtractor::propertyMatches):
(WebCore::ComputedStyleExtractor::copyProperties):
(WebCore::ComputedStyleExtractor::getCSSPropertyValuesForShorthandProperties):
(WebCore::ComputedStyleExtractor::getCSSPropertyValuesForSidesShorthand):
(WebCore::ComputedStyleExtractor::getCSSPropertyValuesForGridShorthand):
(WebCore::ComputedStyleExtractor::copyPropertiesInSet):
(WebCore::CSSComputedStyleDeclaration::getPropertyValue):
(WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
(WebCore::ComputedStyleExtractor::styledNode): Deleted.
(WebCore::nodeOrItsAncestorNeedsStyleRecalc): Deleted.
(WebCore::updateStyleIfNeededForNode): Deleted.

  • css/CSSComputedStyleDeclaration.h:
  • css/SVGCSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::svgPropertyValue):

  • editing/EditingStyle.cpp:

(WebCore::EditingStyle::removeEquivalentProperties):

  • editing/EditingStyle.h:
10:56 AM Changeset in webkit [207685] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

WebGL2RenderingContext.texSubImage3D() should use a union instead of overloading
https://bugs.webkit.org/show_bug.cgi?id=163792

Reviewed by Darin Adler.

WebGL2RenderingContext.texSubImage3D() should use a union instead of overloading for

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::texSubImage3D):

  • html/canvas/WebGL2RenderingContext.h:
  • html/canvas/WebGL2RenderingContext.idl:
10:49 AM Changeset in webkit [207684] by caitp@igalia.com
  • 3 edits
    1 add in trunk

[JSC] don't crash when arguments to new Function() produce unexpected AST
https://bugs.webkit.org/show_bug.cgi?id=163748

Reviewed by Mark Lam.

JSTests:

  • stress/regress-163748.js: Added.

(assert):
(shouldThrowSyntaxError):
(GeneratorFunction):

Source/JavaScriptCore:

The ASSERT(statement); and ASSERT(funcDecl); lines are removed, replaced with blocks
to report a generic Parser error message. These lines are only possible to be reached
if the input string produced an unexpected AST, which previously could be used to crash
the process via ASSERT failure.

The node type assertions are left in the tree, as it should be impossible for a top-level
{ to produce anything other than a Block node. If the node turns out not to be a Block,
it indicates that the (C++) caller of this function (E.g in FunctionConstructor.cpp), is
doing something incorrect. Similarly, it should be impossible for the funcDecl node to
be anything other than a function declaration given the conventions of the caller of this
function.

  • runtime/CodeCache.cpp:

(JSC::CodeCache::getFunctionExecutableFromGlobalCode):

10:39 AM Changeset in webkit [207683] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Do not mutate the render tree while collecting selection repaint rects.
https://bugs.webkit.org/show_bug.cgi?id=163800
<rdar://problem/28806886>

Reviewed by David Hyatt.

Source/WebCore:

RenderListItem not only mutates the tree while in layout but it also uses
the old descendant context to find the insertion point.
This patch strictly ensures that we only do it while in layout and never
in other cases such as collecting repaint rects.
This gets redundant when webkit.org/b/163789 is fixed.

Test: fast/lists/crash-when-list-marker-is-moved-during-selection.html

  • rendering/RenderListItem.cpp:

(WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded):

LayoutTests:

  • fast/lists/crash-when-list-marker-is-moved-during-selection-expected.txt: Added.
  • fast/lists/crash-when-list-marker-is-moved-during-selection.html: Added.
10:23 AM Changeset in webkit [207682] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Support horizontal-bt writing mode
https://bugs.webkit.org/show_bug.cgi?id=163797

Reviewed by Zalan Bujtas.

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):

10:10 AM Changeset in webkit [207681] by Brent Fulgham
  • 8 edits in trunk/Source/WebCore

[Win][Direct2D] Correct some memory leaks and other minor bugs
https://bugs.webkit.org/show_bug.cgi?id=163769

Reviewed by Alex Christensen.

Several D2D handles were being leaked.

Direct2D sometimes returns an infinite rect containing { -inf, -inf, FloatMax, FloatMax },
sometimes { -FloatMax, -FloatMax, inf, inf }, and various combinations thereof. This caused
most SVG drawing to decide no screen rect was contained in the "infinite rect" so nothing
would be drawn.

Tested by existing layout tests.

  • platform/graphics/GraphicsContext.h:
  • platform/graphics/win/FloatRectDirect2D.cpp:

(WebCore::isInfiniteRect): Recognize various infinite rects in Windows.
(WebCore::FloatRect::FloatRect): Convert a Windows infinite rect to the style
we use inside WebKit.

  • platform/graphics/win/FontCascadeDirect2D.cpp:

(WebCore::FontCascade::drawGlyphs): Use cached brushes if possible.

  • platform/graphics/win/GlyphPageTreeNodeDirect2D.cpp:

(WebCore::GlyphPage::fill): Don't terminate on this error case.

  • platform/graphics/win/GradientDirect2D.cpp:

(WebCore::Gradient::generateGradient): Don't leak gradients.

  • platform/graphics/win/GraphicsContextDirect2D.cpp:

(WebCore::GraphicsContextPlatformPrivate::brushWithColor): Added.
(WebCore::GraphicsContext::brushWithColor): Added.
(WebCore::GraphicsContextPlatformPrivate::concatCTM): Perform transform multiplication
in the right order (hint: it's not distributive).
(WebCore::GraphicsContext::drawWithShadow): Use convenience method.
(WebCore::GraphicsContext::fillRect): Ditto.
(WebCore::GraphicsContext::platformFillRoundedRect): Ditto.
(WebCore::GraphicsContext::clearRect): Ditto.
(WebCore::GraphicsContext::setPlatformStrokeColor): Ditto.
(WebCore::GraphicsContext::setPlatformFillColor): Ditto.

  • platform/graphics/win/PathDirect2D.cpp:

(WebCore::Path::polygonPathFromPoints): No need to convert manually.
(WebCore::Path::~Path): Don't leak ID2D1Geometry entities.
(WebCore::Path::appendGeometry): Ditto.
(WebCore::Path::createGeometryWithFillMode): Ditto.
(WebCore::Path::Path): Ditto.
(WebCore::Path::operator=): Ditto.
(WebCore::Path::strokeBoundingRect): Provide an implementation.
(WebCore::Path::addRect): No need for manual casting here.

10:08 AM Changeset in webkit [207680] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

Fix minor style issue in the signature of StaticRange::create
https://bugs.webkit.org/show_bug.cgi?id=163786
<rdar://problem/28853079>

Reviewed by Alex Christensen.

Change Ref<WebCore::Node> && to Ref<Node>&&.

  • dom/StaticRange.cpp:

(WebCore::StaticRange::create):

10:03 AM Changeset in webkit [207679] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Add support for -webkit-line-box-contain
https://bugs.webkit.org/show_bug.cgi?id=163794

Reviewed by Zalan Bujtas.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeLineBoxContain):
(WebCore::CSSPropertyParser::parseSingleValue):

10:00 AM Changeset in webkit [207678] by matthew_hanson@apple.com
  • 5 edits in trunk/Source

Versioning.

9:49 AM WikiStart edited by Jon Davis
Added 2016 WebKit Contributors Meeting (diff)
9:47 AM October 2016 Meeting created by Jon Davis
9:35 AM Changeset in webkit [207677] by hyatt@apple.com
  • 7 edits in trunk/Source/WebCore

[CSS Parser] Add support for @-webkit-region rules
https://bugs.webkit.org/show_bug.cgi?id=163787

Reviewed by Zalan Bujtas.

  • css/StyleRule.cpp:

(WebCore::StyleRuleRegion::StyleRuleRegion):

  • css/StyleRule.h:
  • css/parser/CSSAtRuleID.cpp:

(WebCore::cssAtRuleID):

  • css/parser/CSSAtRuleID.h:
  • css/parser/CSSParserImpl.cpp:

(WebCore::CSSParserImpl::consumeAtRule):
(WebCore::CSSParserImpl::consumePageRule):
(WebCore::CSSParserImpl::consumeRegionRule):

  • css/parser/CSSParserImpl.h:
9:14 AM Changeset in webkit [207676] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

Bug 163757: Use IntSize::unclampedArea() in PDFDocumentImage::updateCachedImageIfNeeded()
<https://webkit.org/b/163757>

Reviewed by Brent Fulgham.

No new tests since there is no change in nominal behavior.

  • platform/graphics/cg/PDFDocumentImage.cpp:

(WebCore::PDFDocumentImage::updateCachedImageIfNeeded): Use
IntSize::unclampedArea() where manual calculations were used
previously. Also gets rid of more safeCast<size_t>() use.

9:12 AM Changeset in webkit [207675] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GTK] Unreviewed gardening: update expectations after r207664
https://bugs.webkit.org/show_bug.cgi?id=163784

Unreviewed gardening.

Patch by Miguel Gomez <magomez@igalia.com> on 2016-10-21

  • platform/gtk/TestExpectations:
9:12 AM Changeset in webkit [207674] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

[Web IDL] Support unions in our overload resolution algorithm
https://bugs.webkit.org/show_bug.cgi?id=163764

Reviewed by Darin Adler.

Support unions in our overload resolution algorithm as per:

  • bindings/scripts/CodeGeneratorJS.pm:

(IsIDLTypeDistinguishableWithUnionForOverloadResolution):
(AreTypesDistinguishableForOverloadResolution):
(GetOverloadThatMatches):
(GenerateOverloadedFunctionOrConstructor):

  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/TestObj.idl:
9:10 AM Changeset in webkit [207673] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-603.1.10

New tag.

9:09 AM Changeset in webkit [207672] by Chris Dumez
  • 9 edits in trunk

AudioNode.connect(): First parameter should not be nullable
https://bugs.webkit.org/show_bug.cgi?id=163773

Reviewed by Darin Adler.

Source/WebCore:

AudioNode.connect()'s first parameter should not be nullable:

We were throwing a SYNTAX_ERR when passing null, we now throw
a TypeError instead.

No new tests, updated existing test.

  • Modules/webaudio/AudioBasicInspectorNode.cpp:

(WebCore::AudioBasicInspectorNode::connect):

  • Modules/webaudio/AudioBasicInspectorNode.h:
  • Modules/webaudio/AudioNode.cpp:

(WebCore::AudioNode::connect):

  • Modules/webaudio/AudioNode.h:
  • Modules/webaudio/AudioNode.idl:

LayoutTests:

Improve test coverage.

  • webaudio/audionode-expected.txt:
  • webaudio/audionode.html:
9:02 AM Changeset in webkit [207671] by keith_miller@apple.com
  • 16 edits in trunk

Add support for WASM calls
https://bugs.webkit.org/show_bug.cgi?id=161727

Reviewed by Filip Pizlo and Michael Saboff.

JSTests:

Add members of the Call category to the WASMOps special group.

  • wasm/generate-wasmops-header.js:

Source/JavaScriptCore:

Add support for WASM calls. Since most of the work for this was already done when we added
WASM Memory, this is mostly just cleanup work. The main interesting part of this patch is
how we link calls to other WASM functions in the same module. Since a WASM callee may not
have been compiled by the time the current function has started compilation we don't know
what address we need to call to. For each callsite in the compiling function, WASM
remembers the CodeLocationCall and the target function index. Once all WASM functions are
compiled, each callsite is linked to the appropriate entrypoint.

  • testWASM.cpp:

(runWASMTests):

  • wasm/WASMB3IRGenerator.cpp:

(JSC::WASM::createJSWrapper):
(JSC::WASM::parseAndCompile):

  • wasm/WASMB3IRGenerator.h:
  • wasm/WASMCallingConvention.cpp:

(JSC::WASM::jscCallingConvention):
(JSC::WASM::wasmCallingConvention):

  • wasm/WASMCallingConvention.h:

(JSC::WASM::CallingConvention::CallingConvention):
(JSC::WASM::CallingConvention::marshallArgumentImpl):
(JSC::WASM::CallingConvention::marshallArgument):
(JSC::WASM::CallingConvention::loadArguments):
(JSC::WASM::CallingConvention::setupCall):
(JSC::WASM::CallingConvention::iterate): Deleted.

  • wasm/WASMFormat.h:
  • wasm/WASMFunctionParser.h:

(JSC::WASM::FunctionParser<Context>::FunctionParser):
(JSC::WASM::FunctionParser<Context>::parseBlock):
(JSC::WASM::FunctionParser<Context>::parseExpression):

  • wasm/WASMModuleParser.cpp:

(JSC::WASM::ModuleParser::parse):

  • wasm/WASMOps.h:
  • wasm/WASMParser.h:

(JSC::WASM::Parser::parseVarUInt32):
(JSC::WASM::Parser::parseVarUInt64):

  • wasm/WASMPlan.cpp:

(JSC::WASM::Plan::Plan):

Source/WTF:

Added a new decodeUInt64. Also, added WTF::LEBDecoder namespace.

  • wtf/LEBDecoder.h:

(WTF::LEBDecoder::decodeUInt):
(WTF::LEBDecoder::decodeUInt32):
(WTF::LEBDecoder::decodeUInt64):
(WTF::LEBDecoder::decodeInt32):
(decodeUInt32): Deleted.
(decodeInt32): Deleted.

8:51 AM Changeset in webkit [207670] by Wenson Hsieh
  • 34 edits
    3 copies
    6 adds in trunk

Implement InputEvent.getTargetRanges() for the input events spec
https://bugs.webkit.org/show_bug.cgi?id=162947
<rdar://problem/28853079>

Reviewed by Darin Adler.

Source/JavaScriptCore:

Boilerplate change to add a runtime guard for InputEvents-related IDL interfaces. See WebCore ChangeLog entry
for more details.

  • runtime/CommonIdentifiers.h:

Source/WebCore:

Implements InputEvent.getTargetRanges(). See individual method changes below for more details. Adds a new hook
for subclasses of CompositeEditCommand to vend a list of target StaticRanges when retrieving target ranges for
an editing command on a contenteditable area.

Tests: fast/events/before-input-delete-empty-list-target-ranges.html

fast/events/before-input-delete-text-target-ranges.html
fast/events/before-input-replace-text-target-ranges.html

  • CMakeLists.txt:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:

Add StaticRange.idl, StaticRange.cpp and StaticRange.h.

  • bindings/generic/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setInputEventsEnabled):
(WebCore::RuntimeEnabledFeatures::inputEventsEnabled):

Add a new runtime bindings flag for InputEvents and guard both InputEvent and StaticRange behind it.

  • dom/DOMAllInOne.cpp:
  • dom/InputEvent.cpp:

(WebCore::InputEvent::InputEvent):

  • dom/InputEvent.h:
  • dom/InputEvent.idl:
  • dom/StaticRange.cpp: Copied from Source/WebCore/dom/InputEvent.cpp.

(WebCore::StaticRange::StaticRange):
(WebCore::StaticRange::create):
(WebCore::StaticRange::createFromRange):

Convenience method for creating a StaticRange from a Range's start/end container and offset.

(WebCore::StaticRange::startContainer):
(WebCore::StaticRange::endContainer):
(WebCore::StaticRange::collapsed):

  • dom/StaticRange.h: Copied from Source/WebCore/dom/InputEvent.cpp.

(WebCore::StaticRange::startOffset):
(WebCore::StaticRange::endOffset):

  • dom/StaticRange.idl: Copied from Source/WebCore/editing/ReplaceRangeWithTextCommand.h.
  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::willApplyCommand):
(WebCore::CompositeEditCommand::targetRanges):

Virtual method that returns a list of target ranges which are associated with this command.

(WebCore::CompositeEditCommand::targetRangesForBindings):

Non-virtual method that calls the above targetRanges(). Takes whether or not the CompositeEditCommand is editing
a textarea or plain text input into account.

(WebCore::CompositeEditCommand::moveParagraphs):

  • editing/CompositeEditCommand.h:
  • editing/EditCommand.cpp:

(WebCore::EditCommand::frame):

  • editing/EditCommand.h:

(WebCore::EditCommand::document):

  • editing/Editor.cpp:

(WebCore::dispatchBeforeInputEvent):
(WebCore::dispatchInputEvent):
(WebCore::dispatchBeforeInputEvents):

Changed the beforeinput event dispatch to use the regular Node::dispatchEvent instead of dispatchScopedEvent.
This is because if the page prevents the beforeinput event, we need to know immediately in order to bail from
the default action.

(WebCore::dispatchInputEvents):
(WebCore::Editor::willApplyEditing):

Added a list of static ranges as a parameter when calling on the Editor to dispatch beforeinput events.
By default, this uses the composite edit command's targetRangesForBindings(), though it may be special cased
by subclasses of CompositeEditCommand (see ReplaceRangeWithTextCommand, SpellingCorrectionCommand, and
TypingCommand).

  • editing/Editor.h:
  • editing/ReplaceRangeWithTextCommand.cpp:

(WebCore::ReplaceRangeWithTextCommand::targetRanges):

  • editing/ReplaceRangeWithTextCommand.h:
  • editing/SpellingCorrectionCommand.cpp:

(WebCore::SpellingCorrectionCommand::targetRanges):

  • editing/SpellingCorrectionCommand.h:
  • editing/TypingCommand.cpp:

(WebCore::editActionIsDeleteByTyping):
(WebCore::TypingCommand::shouldDeferWillApplyCommandUntilAddingTypingCommand):
(WebCore::TypingCommand::willApplyCommand):
(WebCore::TypingCommand::willAddTypingToOpenCommand):
(WebCore::TypingCommand::deleteKeyPressed):
(WebCore::TypingCommand::forwardDeleteKeyPressed):

Moves the firing of the beforeinput until after the selection range to delete has been computed.

  • editing/TypingCommand.h:

Source/WebKit2:

Boilerplate change to add a runtime guard for InputEvents-related IDL interfaces. See WebCore ChangeLog entry
for more details.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

LayoutTests:

Adds 3 new layout tests and tweaks some existing unit tests. See WebCore ChangeLog entry for more details.
Tests verify the result of getTargetRanges() when breaking out of a list, deleting backwards and forwards at
all text granularities, deleting selected text, and spell checking (candidate text replacement).

  • fast/events/before-input-delete-empty-list-target-ranges-expected.txt: Added.
  • fast/events/before-input-delete-empty-list-target-ranges.html: Added.
  • fast/events/before-input-delete-text-target-ranges-expected.txt: Added.
  • fast/events/before-input-delete-text-target-ranges.html: Added.
  • fast/events/before-input-events-prevent-default-in-textfield.html:
  • fast/events/before-input-replace-text-target-ranges-expected.txt: Added.
  • fast/events/before-input-replace-text-target-ranges.html: Added.
  • fast/events/input-events-fired-when-typing-expected.txt:
  • fast/events/input-events-fired-when-typing.html:
  • js/dom/global-constructors-attributes-expected.txt:
  • platform/ios-simulator/TestExpectations:
  • platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
8:36 AM WebKitGTK/Gardening/Calendar edited by clopez@igalia.com
(diff)
8:36 AM WebKitGTK/Gardening/Calendar edited by clopez@igalia.com
(diff)
6:36 AM Changeset in webkit [207669] by Antti Koivisto
  • 29 edits in trunk/Source

Style resolver should be updated lazily
https://bugs.webkit.org/show_bug.cgi?id=163721

Reviewed by Andreas Kling.

Currently when stylesheets change in some way we generally update style resolvers and
invalidate style immediately. We should do this lazily to avoid unnecessary work.

Also improve naming of the stylesheet invalidation functions and use more optimal functions in some places.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::updateStyleIfNeededForNode):

  • css/CSSStyleSheet.cpp:

(WebCore::CSSStyleSheet::didMutateRules):
(WebCore::CSSStyleSheet::didMutate):
(WebCore::CSSStyleSheet::setDisabled):

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::StyleResolver):

Initialize root style font with null font selector.
This avoids hitting a CSSFontSelector assert in fast/media/mq-relative-constraints-08.html where
media query evaluation requires font information before it is ready.
Exposed by increased laziness in this patch.

  • dom/Document.cpp:

(WebCore::Document::setContentLanguage):
(WebCore::Document::updateLayoutIgnorePendingStylesheets):
(WebCore::Document::isPageBoxVisible):
(WebCore::Document::pageSizeAndMarginsInPixels):
(WebCore::Document::processHttpEquiv):
(WebCore::Document::setSelectedStylesheetSet):
(WebCore::Document::didInsertInDocumentShadowRoot):
(WebCore::Document::didRemoveInDocumentShadowRoot):

  • dom/Document.h:

(WebCore::Document::inDocumentShadowRoots):

Track all shadow roots in the document. This allows us to find and flush style scopes cheaply.

  • dom/Element.cpp:

(WebCore::Element::computedStyle):

  • dom/ExtensionStyleSheets.cpp:

(WebCore::ExtensionStyleSheets::ExtensionStyleSheets):
(WebCore::ExtensionStyleSheets::clearPageUserSheet):
(WebCore::ExtensionStyleSheets::updatePageUserSheet):
(WebCore::ExtensionStyleSheets::invalidateInjectedStyleSheetCache):
(WebCore::ExtensionStyleSheets::addUserStyleSheet):
(WebCore::ExtensionStyleSheets::addAuthorStyleSheetForTesting):
(WebCore::ExtensionStyleSheets::addDisplayNoneSelector):
(WebCore::ExtensionStyleSheets::maybeAddContentExtensionSheet):
(WebCore::ExtensionStyleSheets::styleResolverChangedTimerFired): Deleted.

Since updates are now done lazily we don't need a special timer for extension stylesheets.

  • dom/ExtensionStyleSheets.h:
  • dom/ProcessingInstruction.cpp:

(WebCore::ProcessingInstruction::checkStyleSheet):
(WebCore::ProcessingInstruction::sheetLoaded):
(WebCore::ProcessingInstruction::removedFrom):

  • dom/ShadowRoot.cpp:

(WebCore::ShadowRoot::ShadowRoot):
(WebCore::ShadowRoot::insertedInto):
(WebCore::ShadowRoot::removedFrom):
(WebCore::ShadowRoot::styleScope):

  • dom/ShadowRoot.h:
  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::setDisabledState):
(WebCore::HTMLLinkElement::parseAttribute):
(WebCore::HTMLLinkElement::process):
(WebCore::HTMLLinkElement::removePendingSheet):

  • html/HTMLStyleElement.cpp:

(WebCore::HTMLStyleElement::parseAttribute):

  • inspector/InspectorCSSAgent.cpp:

(WebCore::InspectorCSSAgent::createInspectorStyleSheetForDocument):
(WebCore::InspectorCSSAgent::forcePseudoState):
(WebCore::InspectorCSSAgent::resetPseudoStates):

  • inspector/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::setEmulatedMedia):

  • page/Frame.cpp:

(WebCore::Frame::setPrinting):

  • page/FrameView.cpp:

(WebCore::FrameView::layout):
(WebCore::FrameView::setPagination):
(WebCore::FrameView::setViewportSizeForCSSViewportUnits):

  • page/Page.cpp:

(WebCore::Page::setViewMode):
(WebCore::Page::setNeedsRecalcStyleInAllFrames):
(WebCore::Page::invalidateInjectedStyleSheetCacheInAllFrames):

  • style/StyleScope.cpp:

(WebCore::Style::Scope::setPreferredStylesheetSetName):
(WebCore::Style::Scope::setSelectedStylesheetSetName):
(WebCore::Style::Scope::removePendingSheet):
(WebCore::Style::Scope::removeStyleSheetCandidateNode):
(WebCore::Style::Scope::activeStyleSheetsForInspector):
(WebCore::Style::Scope::flushPendingUpdate):

Also flush descendant shadow roots.

(WebCore::Style::Scope::scheduleUpdate):
(WebCore::Style::Scope::didChangeActiveStyleSheetCandidates):

Make lazy.

(WebCore::Style::Scope::didChangeStyleSheetContents):

Make lazy.

(WebCore::Style::Scope::didChangeStyleSheetEnvironment):

Environment changes also affect author shadow roots.

(WebCore::Style::Scope::styleSheetsForStyleSheetList):
(WebCore::Style::Scope::scheduleActiveSetUpdate): Deleted.
(WebCore::Style::Scope::didChangeCandidatesForActiveSet): Deleted.
(WebCore::Style::Scope::didChangeContentsOrInterpretation): Deleted.

Improved naming of these and split didChangeContentsOrInterpretation into two separate functions.

  • style/StyleScope.h:

(WebCore::Style::Scope::styleSheetsForStyleSheetList): Deleted.
(WebCore::Style::Scope::setPreferredStylesheetSetName): Deleted.
(WebCore::Style::Scope::setSelectedStylesheetSetName): Deleted.

  • svg/SVGFontFaceElement.cpp:

(WebCore::SVGFontFaceElement::rebuildFontFace):
(WebCore::SVGFontFaceElement::removedFrom):

  • testing/Internals.cpp:

(WebCore::Internals::resetToConsistentState):

Ensure that cationsStyleSheetOverride really becomes empty. Some tests rely on not having suprise
inserted stylesheets. Previously this was racy and the patch affected order of things.

(WebCore::Internals::styleChangeType):

  • xml/XMLTreeViewer.cpp:

(WebCore::XMLTreeViewer::transformDocumentToTreeView):

  • xml/parser/XMLDocumentParser.cpp:

(WebCore::XMLDocumentParser::end):

  • xml/parser/XMLDocumentParserLibxml2.cpp:

(WebCore::XMLDocumentParser::doEnd):

6:27 AM Changeset in webkit [207668] by Csaba Osztrogonác
  • 4 edits in trunk

[EFL] REGRESSION(r207616): Build is broken due to missing libgeoclue-dev package
https://bugs.webkit.org/show_bug.cgi?id=163733

Reviewed by Gyuyoung Kim.

.:

  • Source/cmake/OptionsEfl.cmake: Expose USE_GEOCLUE2 to the build properly.

Tools:

  • efl/install-dependencies: Added geoclue-2.0 package.
5:24 AM Changeset in webkit [207667] by adam.bergkvist@ericsson.com
  • 2 edits
    1 copy
    1 delete in trunk/Source/WebCore

WebRTC: [OpenWebRTC] Move SDPProcessorScriptResource(Gtk) to openwebrtc directory
https://bugs.webkit.org/show_bug.cgi?id=163778

Reviewed by Philippe Normand.

Move SDPProcessorScriptResourceGtk from the platform gtk directory to the port generic
openwebrtc directory to make it usable by other ports. Also drop the Gtk-suffix.

No change of behavior.

  • PlatformGTK.cmake:
  • platform/mediastream/gtk/SDPProcessorScriptResourceGtk.cpp:

(WebCore::SDPProcessorScriptResource::scriptString): Deleted.

  • platform/mediastream/openwebrtc/SDPProcessorScriptResource.cpp: Renamed from Source/WebCore/platform/mediastream/gtk/SDPProcessorScriptResourceGtk.cpp.

(WebCore::SDPProcessorScriptResource::scriptString):

3:26 AM Changeset in webkit [207666] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebCore

[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-21
Reviewed by Carlos Garcia Campos.

Perform the video repaint in the main thread when accelerated compositing is disabled. Added a new method to
MediaPlayerClient to get whether accelerated compositing is enabled from the MediaPlayer. This is needed
because mediaPlayerAcceleratedCompositingEnabled() will return false while HTMLMediaElement doesn't have a
RenderVideo, even when accelerated compositing is enabled.

Covered by existent tests.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaPlayerAcceleratedCompositingEnabled):

  • html/HTMLMediaElement.h:
  • platform/graphics/MediaPlayer.h:

(WebCore::MediaPlayerClient::mediaPlayerAcceleratedCompositingEnabled):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::repaint):
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
3:20 AM Changeset in webkit [207665] by adam.bergkvist@ericsson.com
  • 5 edits
    3 adds in trunk

WebRTC: [GTK] Add MediaEndpointOwr - an OpenWebRTC WebRTC backend
https://bugs.webkit.org/show_bug.cgi?id=163327

Reviewed by Philippe Normand.

.:

Add manual WebRTC test. Test features:

  • Two RTCPeerConnection instances communicate in a single browser tab.
  • Supports setting up bidirectional media with a single SDP dialog, as well as one direction at a time.
  • Strips vendor prefixes (runs in Chrome and Firefox as well)
  • Supports modern as well as legacy APIs (mainly to make the test run in Chrome)
  • ManualTests/webrtc-one-tab-p2p.html: Added.

Source/WebCore:

Add MediaEndpointOwr which is a MediaEndpoint implementation (WebRTC backend) based on
OpenWebRTC [1]. The WebRTC backend can be tested with a manual test. Automatic testing
is still done with MockMediaEndpoint.

[1] http://www.openwebrtc.org/

Testing: Added manual test (webrtc-one-tab-p2p.html)

  • CMakeLists.txt:
  • platform/GStreamer.cmake:
  • platform/mediastream/openwebrtc/MediaEndpointOwr.cpp: Added.

(WebCore::createMediaEndpointOwr):
(WebCore::MediaEndpointOwr::MediaEndpointOwr):
(WebCore::MediaEndpointOwr::~MediaEndpointOwr):
(WebCore::MediaEndpointOwr::setConfiguration):
(WebCore::cryptoDataCallback):
(WebCore::MediaEndpointOwr::generateDtlsInfo):
(WebCore::MediaEndpointOwr::getDefaultAudioPayloads):
(WebCore::MediaEndpointOwr::getDefaultVideoPayloads):
(WebCore::payloadsContainType):
(WebCore::MediaEndpointOwr::filterPayloads):
(WebCore::MediaEndpointOwr::updateReceiveConfiguration):
(WebCore::findRtxPayload):
(WebCore::MediaEndpointOwr::updateSendConfiguration):
(WebCore::MediaEndpointOwr::addRemoteCandidate):
(WebCore::MediaEndpointOwr::replaceMutedRemoteSourceMid):
(WebCore::MediaEndpointOwr::createMutedRemoteSource):
(WebCore::MediaEndpointOwr::replaceSendSource):
(WebCore::MediaEndpointOwr::stop):
(WebCore::MediaEndpointOwr::transceiverIndexForSession):
(WebCore::MediaEndpointOwr::sessionMid):
(WebCore::MediaEndpointOwr::matchTransceiverByMid):
(WebCore::MediaEndpointOwr::dispatchNewIceCandidate):
(WebCore::MediaEndpointOwr::dispatchGatheringDone):
(WebCore::MediaEndpointOwr::processIceTransportStateChange):
(WebCore::MediaEndpointOwr::dispatchDtlsFingerprint):
(WebCore::MediaEndpointOwr::unmuteRemoteSource):
(WebCore::MediaEndpointOwr::prepareSession):
(WebCore::MediaEndpointOwr::prepareMediaSession):
(WebCore::parseHelperServerUrl):
(WebCore::MediaEndpointOwr::ensureTransportAgentAndTransceivers):
(WebCore::MediaEndpointOwr::internalAddRemoteCandidate):
(WebCore::gotCandidate):
(WebCore::candidateGatheringDone):
(WebCore::iceConnectionStateChange):
(WebCore::gotIncomingSource):

  • platform/mediastream/openwebrtc/MediaEndpointOwr.h: Added.

(WebCore::OwrTransceiver::create):
(WebCore::OwrTransceiver::~OwrTransceiver):
(WebCore::OwrTransceiver::mid):
(WebCore::OwrTransceiver::session):
(WebCore::OwrTransceiver::owrIceState):
(WebCore::OwrTransceiver::setOwrIceState):
(WebCore::OwrTransceiver::gotEndOfRemoteCandidates):
(WebCore::OwrTransceiver::markGotEndOfRemoteCandidates):
(WebCore::OwrTransceiver::OwrTransceiver):

  • platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h:

(WebCore::RealtimeMediaSourceOwr::RealtimeMediaSourceOwr):
(WebCore::RealtimeMediaSourceOwr::swapOutShallowSource):
Add support for an initially muted source. This is used for early
creation of remote sources.

1:17 AM Changeset in webkit [207664] by commit-queue@webkit.org
  • 2 edits
    1 delete in trunk/Tools

Unreviewed, rolling out r207609.
https://bugs.webkit.org/show_bug.cgi?id=163776

As glib bump was rollout, we need to rollout this too
(Requested by rego on #webkit).

Reverted changeset:

"[GTK] Cannot build GTK+ with CUPS 2.* versions"
https://bugs.webkit.org/show_bug.cgi?id=163591
http://trac.webkit.org/changeset/207609

1:11 AM Changeset in webkit [207663] by jfernandez@igalia.com
  • 5 edits in trunk

[css-grid] Content Alignment broken with indefinite sized grid container
https://bugs.webkit.org/show_bug.cgi?id=163724

Reviewed by Manuel Rego Casasnovas.

Source/WebCore:

The Grid Tracks sizing algorithm receives as parameter the
available space to be used as space for tracks. We hold a variable
to store the remaining free space for each dimension.

When the grid container size is indefinite we can't compute the
available free space after computing track sizes until such
indefinite size is resolved.

No new tests, just added some additional test cases.

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::layoutBlock): Compute freeSpace for Rows
after doing layout and resolving the indefinite height.

LayoutTests:

Added additional test cases to verify we compute properly the
available free space for content-alignment, handling correctly the
overflow when needed.

  • fast/css-grid-layout/grid-content-alignment-overflow.html:
1:04 AM Changeset in webkit [207662] by jer.noble@apple.com
  • 3 edits in trunk/LayoutTests

[mac-wk2 release] LayoutTest media/media-source/media-source-seek-detach-crash.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=163751

Reviewed by Eric Carlson.

Don't log when we receive an "error" event; this makes the test non-deterministic.

  • media/media-source/media-source-seek-detach-crash-expected.txt:
  • media/media-source/media-source-seek-detach-crash.html:
1:03 AM Changeset in webkit [207661] by jer.noble@apple.com
  • 3 edits
    2 adds in trunk

CRASH in SourceBuffer::sourceBufferPrivateDidReceiveSample + 2169
https://bugs.webkit.org/show_bug.cgi?id=163735

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/media-source/media-source-sample-wrong-track-id.html

When SourceBuffer receives a sample in sourceBufferPrivateDidReceiveSample() containing
a trackID not previously seen in an initialization segment, it creates a default TrackBuffer
object to contain that track's samples. One of the fields in TrackBuffer, description, is
normally filled out when an initialization segment is received, but with this default
TrackBuffer, it's still null when it's checked later in sourceBufferPrivateDidReceiveSample().

Rather than adding a null-check on trackBuffer.description, drop any sample that has a
trackID which was not present during a previous initialization segment.

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):

LayoutTests:

  • media/media-source/media-source-sample-wrong-track-id-expected.txt: Added.
  • media/media-source/media-source-sample-wrong-track-id.html: Added.

Oct 20, 2016:

11:08 PM Changeset in webkit [207660] by zandobersek@gmail.com
  • 9 edits
    187 adds in trunk/LayoutTests

Import W3C EME tests
https://bugs.webkit.org/show_bug.cgi?id=163214

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Import the W3C EME tests from the web-platform-tests repository on GitHub.
The import was done via the import-w3c-tests script.

All the tests are still missing baselines, and they're skipped on all platforms.
The baselines will be added incrementally as the implementation grows. The idlharness.html
test will be unskipped first when the navigator.requestMediaKeySystemAccess() is added.

  • resources/ImportExpectations: Skip Google EME tests.
  • web-platform-tests/encrypted-media/: Added. The file list is omitted for clarity.

LayoutTests:

Skip the newly-imported W3C EME tests on all platforms.

  • platform/efl/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/win/TestExpectations:
  • tests-options.json:
11:00 PM Changeset in webkit [207659] by zandobersek@gmail.com
  • 4 edits in trunk/Source/JavaScriptCore

Fix JSC cast-align compiler warnings on ARMv7
https://bugs.webkit.org/show_bug.cgi?id=163744

Reviewed by Mark Lam.

Use the reinterpret_cast_ptr workaround in a few places where
the cast alignment warning is being thrown by the GCC compiler
when compiling for the ARMv7 architecture.

  • heap/Heap.cpp:

(JSC::Zombify::visit):

  • heap/HeapCell.h:

(JSC::HeapCell::zap):
(JSC::HeapCell::isZapped):

  • heap/MarkedBlock.cpp:

(JSC::MarkedBlock::Handle::specializedSweep):

10:30 PM Changeset in webkit [207658] by Carlos Garcia Campos
  • 21 edits in trunk

[GTK] Configures but fails to link with ENABLE_OPENGL=OFF
https://bugs.webkit.org/show_bug.cgi?id=163449

Reviewed by Michael Catanzaro.

.:

Remove wrong dependency of Wayland on OpenGL introduced in r190615, it should be possible to build for Wayland
without GL.

  • Source/cmake/OptionsGTK.cmake:

Source/WebCore:

Only define sharingGLContext in PlatformDisplay if EGL or GLX are enabled.

  • platform/graphics/PlatformDisplay.cpp:
  • platform/graphics/PlatformDisplay.h:
  • platform/graphics/wayland/PlatformDisplayWayland.cpp:

(WebCore::PlatformDisplayWayland::initialize):

  • platform/graphics/x11/PlatformDisplayX11.cpp:

(WebCore::PlatformDisplayX11::~PlatformDisplayX11):

Source/WebKit2:

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseRealize): Check TEXTURE_MAPPER_GL instead of TEXTURE_MAPPER and also ensure the current
display is X11.
(webkitWebViewBaseUnrealize): Ditto.
(webkitWebViewBaseDidRelaunchWebProcess): Check TEXTURE_MAPPER_GL instead of TEXTURE_MAPPER.
(webkitWebViewBasePageClosed): Ditto.

  • UIProcess/AcceleratedDrawingAreaProxy.cpp:

(WebKit::AcceleratedDrawingAreaProxy::didUpdateBackingStoreState): Ditto.
(WebKit::AcceleratedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState): Check EGL is enabled before
trying to use the WaylandCompositor.

  • UIProcess/AcceleratedDrawingAreaProxy.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::createNewWebProcess): Ditto.

  • UIProcess/gtk/AcceleratedBackingStore.cpp:

(WebKit::AcceleratedBackingStore::create): Ditto.

  • UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
  • UIProcess/gtk/WaylandCompositor.cpp:
  • UIProcess/gtk/WaylandCompositor.h:
  • WebProcess/WebPage/AcceleratedDrawingArea.cpp:

(WebKit::AcceleratedDrawingArea::enterAcceleratedCompositingMode): Check TEXTURE_MAPPER_GL instead of TEXTURE_MAPPER.

  • WebProcess/WebPage/AcceleratedDrawingArea.h:
  • WebProcess/WebPage/DrawingArea.h:
  • WebProcess/WebPage/DrawingArea.messages.in:
  • WebProcess/WebPage/LayerTreeHost.h:
10:07 PM Changeset in webkit [207657] by bshafiei@apple.com
  • 2 edits in tags/Safari-602.3.3.0.1/Source/WebCore

Merge r207654. rdar://problem/28883727

10:05 PM Changeset in webkit [207656] by bshafiei@apple.com
  • 5 edits in tags/Safari-602.3.3.0.1/Source

Versioning.

10:03 PM Changeset in webkit [207655] by bshafiei@apple.com
  • 1 copy in tags/Safari-602.3.3.0.1

New tag.

10:01 PM Changeset in webkit [207654] by bshafiei@apple.com
  • 2 edits in branches/safari-602-branch/Source/WebCore

Build fix. rdar://problem/28883727

7:17 PM Changeset in webkit [207653] by fpizlo@apple.com
  • 37 edits
    6 adds
    3 deletes in trunk/Source

The tracking of the coarse-grain Heap state (allocating or not, collector or not, eden vs full) should respect the orthogonality between allocating and collecting
https://bugs.webkit.org/show_bug.cgi?id=163738

Reviewed by Geoffrey Garen.
Source/JavaScriptCore:


We need to know if we're currently in an allocation slow path, so that code can assert that
it's not being used from inside a destructor that runs during a sweep. We need to know if
we're currently collecting, because some code behaves differently during collection, and
other code wants to assert that it's not being used from inside a visitChildren method that
runs during marking. If we are collecting, we need to know if it's an eden collection or a
full collection. If we are requesting a collection, we need to know if we're requesting an
eden collection, a full collection, or any kind of collection.

Prior to this change, you would reason about all of these things using the HeapOperation. It
had the following states: NoOperation, Allocation, FullCollection, EdenCollection, and
AnyCollection. NoOperation versus Allocation was primarily for asserting that sweep didn't
call arbitrary JS. FullCollection versus EdenCollection was about describing generations. We
would even use HeapOperation in places where we knew that it could only be either Full or
Eden, because we just needed a variable to tell us which generation we were talking about.
It was all very confusing.

Where it completely breaks down is the fact that a concurrent GC has two logical threads, the
mutator and the collector, which can change state independently. The mutator can be
allocating. It can also be doing some work to help the GC. That's three states: running,
allocating, or helping GC. At the same time, the GC thread could either be running or not,
and if it's running, it could be a full collection or an eden collection. Because the mutator
and collector can run at the same time, it means that if we used one enum, we would need nine
states: every combination of mutator running, allocating, or helping GC, crossed with
collector not running, running eden, or running full. So, this change decouples mutator state
from collector state and uses two separate fields with two different types.

Mutator state is described using MutatorState, which can be either MutatorState::Running,
MutatorState::Allocating, or MutatorState::HelpingGC.

Collector state is described using Optional<CollectionScope>. CollectionScope describes how
big the scope of the collection is, and it can be either CollectionScope::Eden or
CollectionScope::Full. If the Optional is Nullopt, it means that we are not collecting. This
way, you can treat collectionScope as a boolean (an Optional is true iff it's engaged). You
can pass around just a CollectionScope if you know that you must be collecting and you just
want to know about the generation. Also, we can use Nullopt in methods that request
collection, which those methods take to mean that they can run any kind of collection (the
old AnyCollection).

Another use of HeapOperation was to answer questions about whether the caller is running as
part of the GC or as part of the mutator. Optional<CollectionScope> does not answer this,
since code that runs in the mutator while the mutator is not HelpingGC at the same time as
the collector is running should run as if it was part of the mutator not as if it was part of
the GC. MutatorState is needed to answer this question, but it doesn't tell the whole story
since code that runs in the collector thread at the same time as the mutator is running
should run as if it was part of the GC not as if it was part of the mutator. So, we need to
know if we're on the collector thread or the mutator thread. We already have a WTF facility
for this, which answers if a thread is a GC thread. But we already use this to answer a
stronger question: are we part of the parallel GC helpers? Some functions in the GC, like
mark bit queries, will work fine in a concurrent collector thread so long as there is no
parallel marking. So, this change also changes WTF's mayBeGCThread to tell what kind of GC
thread we may be: either GCThreadType::Main or GCThreadType::Helper. The parallel GC safety
checks look for GCThreadType::Helper. The "should I run as mutator" query can now be answered
by checking with mayBeGCThread, which returns Optional<GCThreadType>; if engaged, then run as
GC, else run as GC if MutatorState is HelpingGC, else run as mutator.

This doesn't change the way that the GC behaves, but it does change how the GC represents a
fundamental piece of state. So, it's a big change. It should be perf-neutral (still testing).

  • API/JSBase.cpp:

(JSSynchronousEdenCollectForDebugging):

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::jettison):

  • dfg/DFGWorklist.cpp:
  • ftl/FTLCompile.cpp:

(JSC::FTL::compile):

  • heap/AllocatingScope.h: Added.

(JSC::AllocatingScope::AllocatingScope):
(JSC::AllocatingScope::~AllocatingScope):

  • heap/AllocationScope.h: Removed.
  • heap/CodeBlockSet.cpp:

(JSC::CodeBlockSet::deleteUnmarkedAndUnreferenced):

  • heap/CodeBlockSet.h:
  • heap/CollectionScope.cpp: Added.

(JSC::collectionScopeName):
(WTF::printInternal):

  • heap/CollectionScope.h: Added.
  • heap/EdenGCActivityCallback.cpp:

(JSC::EdenGCActivityCallback::doCollection):

  • heap/FullGCActivityCallback.cpp:

(JSC::FullGCActivityCallback::doCollection):

  • heap/GCTypeMap.h:

(JSC::GCTypeMap::operator[]):

  • heap/Heap.cpp:

(JSC::Heap::Heap):
(JSC::Heap::lastChanceToFinalize):
(JSC::Heap::markRoots):
(JSC::Heap::beginMarking):
(JSC::Heap::visitSmallStrings):
(JSC::Heap::updateObjectCounts):
(JSC::Heap::deleteAllCodeBlocks):
(JSC::Heap::deleteUnmarkedCompiledCode):
(JSC::Heap::collectAllGarbage):
(JSC::Heap::collect):
(JSC::Heap::collectWithoutAnySweep):
(JSC::Heap::collectImpl):
(JSC::Heap::willStartCollection):
(JSC::Heap::flushWriteBarrierBuffer):
(JSC::Heap::pruneStaleEntriesFromWeakGCMaps):
(JSC::Heap::notifyIncrementalSweeper):
(JSC::Heap::updateAllocationLimits):
(JSC::Heap::didFinishCollection):
(JSC::Heap::isValidAllocation):
(JSC::Heap::shouldDoFullCollection):

  • heap/Heap.h:

(JSC::Heap::mutatorState):
(JSC::Heap::collectionScope):
(JSC::Heap::operationInProgress): Deleted.

  • heap/HeapInlines.h:

(JSC::Heap::shouldCollect):
(JSC::Heap::isCurrentThreadBusy):
(JSC::Heap::isMarked):
(JSC::Heap::reportExtraMemoryVisited):
(JSC::Heap::reportExternalMemoryVisited):
(JSC::Heap::collectAccordingToDeferGCProbability):
(JSC::Heap::isBusy): Deleted.
(JSC::Heap::isCollecting): Deleted.

  • heap/HeapObserver.h:
  • heap/HeapOperation.cpp: Removed.
  • heap/HeapOperation.h: Removed.
  • heap/HeapVerifier.cpp:

(JSC::HeapVerifier::initializeGCCycle):
(JSC::HeapVerifier::reportObject):
(JSC::HeapVerifier::collectionTypeName): Deleted.

  • heap/HeapVerifier.h:

(JSC::HeapVerifier::GCCycle::collectionTypeName): Deleted.

  • heap/HelpingGCScope.h: Added.

(JSC::HelpingGCScope::HelpingGCScope):
(JSC::HelpingGCScope::~HelpingGCScope):

  • heap/LargeAllocation.cpp:

(JSC::LargeAllocation::flip):

  • heap/MarkedAllocator.cpp:

(JSC::MarkedAllocator::doTestCollectionsIfNeeded):
(JSC::MarkedAllocator::allocateSlowCaseImpl):

  • heap/MarkedBlock.h:
  • heap/MarkedSpace.cpp:

(JSC::MarkedSpace::prepareForAllocation):
(JSC::MarkedSpace::visitWeakSets):
(JSC::MarkedSpace::reapWeakSets):
(JSC::MarkedSpace::prepareForMarking):
(JSC::MarkedSpace::beginMarking):
(JSC::MarkedSpace::snapshotUnswept):

  • heap/MutatorState.cpp: Added.

(WTF::printInternal):

  • heap/MutatorState.h: Added.
  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::didStartMarking):

  • inspector/agents/InspectorHeapAgent.cpp:

(Inspector::protocolTypeForHeapOperation):
(Inspector::InspectorHeapAgent::didGarbageCollect):

  • inspector/agents/InspectorHeapAgent.h:
  • interpreter/Interpreter.cpp:

(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall):

  • jsc.cpp:

(functionFullGC):
(functionEdenGC):

  • runtime/Completion.cpp:

(JSC::evaluate):
(JSC::loadAndEvaluateModule):
(JSC::loadModule):
(JSC::linkAndEvaluateModule):

  • runtime/JSLock.cpp:

(JSC::JSLock::DropAllLocks::DropAllLocks):

  • runtime/SmallStrings.h:

(JSC::SmallStrings::needsToBeVisited):

  • runtime/VM.h:

(JSC::VM::isCollectorBusyOnCurrentThread):
(JSC::VM::isCollectorBusy): Deleted.

  • tools/JSDollarVMPrototype.cpp:

(JSC::JSDollarVMPrototype::edenGC):

Source/WebCore:

No new tests because no change in behavior.

  • bindings/js/GCController.cpp:

(WebCore::GCController::garbageCollectNow):

Source/WTF:


There will soon be different kinds of GC threads, and WTF's "are you a GC thread" thing
should know about this.

  • wtf/MainThread.cpp:

(WTF::initializeGCThreads):
(WTF::registerGCThread):
(WTF::mayBeGCThread):

  • wtf/MainThread.h:
6:33 PM Changeset in webkit [207652] by Yusuke Suzuki
  • 11 edits
    11 adds in trunk

[JSC] Drop isEnvironmentRecord type info flag and use JSType information instead
https://bugs.webkit.org/show_bug.cgi?id=163761

Reviewed by Keith Miller.

JSTests:

  • modules/string-prototype-module-scope.js: Added.

(shouldBe):
(catch):
(refer):

  • stress/string-prototype-scopes-global-lexical-environment-strict.js: Added.

(shouldBe):
(catch):

  • stress/string-prototype-scopes-global-lexical-environment.js: Added.

(shouldBe):
(catch):

  • stress/string-prototype-scopes-strict.js: Added.

(shouldBe):
(catch):
(try.refer):
(refer):

  • stress/string-prototype-scopes.js: Added.

(shouldBe):
(catch):
(try.refer):
(refer):
(object.toString):
(with):

Source/JavaScriptCore:

When we call a function in the following form,

var charAt = String.prototype.charAt;
charAt(); |this| becomes the global object.

we should see |this| as undefined/null. In StringPrototype.cpp,
we use IsEnvironmentRecord type info flag to check whther the
given |this| is an environment record.
However, type info flag is precious thing and only StringPrototype.cpp
uses IsEnvironmentRecord. In addition to that, JSType should
already knows whether the given object is an environment record.
So IsEnvironmentRecord type info flag should be dropped.

This patch adds a new JSType, StrictEvalActivation. And we add a new
method JSObject::isEnvironmentRecord(). This method uses JSType to
return the result. And we drop IsEnvironmentRecord type info flag.
This patch makes a room for putting one bit flag to the out of line
type info flag. Previously, it is already exhausted.

  • llint/LLIntData.cpp:

(JSC::LLInt::Data::performAssertions):

  • llint/LowLevelInterpreter.asm:
  • runtime/JSObject.h:

(JSC::JSObject::isStrictEvalActivation):
(JSC::JSObject::isEnvironmentRecord):

  • runtime/JSSymbolTableObject.h:
  • runtime/JSType.h:
  • runtime/JSTypeInfo.h:

(JSC::TypeInfo::newImpurePropertyFiresWatchpoints):
(JSC::TypeInfo::isEnvironmentRecord): Deleted.

  • runtime/StrictEvalActivation.h:

(JSC::StrictEvalActivation::createStructure):

  • runtime/StringPrototype.cpp:

(JSC::checkObjectCoercible):

LayoutTests:

  • js/dom/script-tests/string-prototype-scopes-in-workers.js: Added.

(catch):

  • js/dom/script-tests/string-prototype-scopes.js: Added.

(catch):

  • js/dom/string-prototype-scopes-expected.txt: Added.
  • js/dom/string-prototype-scopes-in-workers-expected.txt: Added.
  • js/dom/string-prototype-scopes-in-workers.html: Added.
  • js/dom/string-prototype-scopes.html: Added.
6:27 PM Changeset in webkit [207651] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

[Bindings] Start using signature->idlType instead of signature->type in the overload resolution code
https://bugs.webkit.org/show_bug.cgi?id=163767

Reviewed by Darin Adler.

Start using signature->idlType instead of signature->type in the overload resolution code
to prepare for union type support.

  • bindings/scripts/CodeGeneratorJS.pm:

(ComputeEffectiveOverloadSet):
(AreTypesDistinguishableForOverloadResolution):
(GetDistinguishingArgumentIndex):
(GetOverloadThatMatches):
(GenerateOverloadedFunctionOrConstructor):

6:19 PM Changeset in webkit [207650] by jfbastien@apple.com
  • 44 edits
    3 copies
    1 move
    1 delete in trunk

WebAssembly API: implement exception constructors properly

  • Rename WebAssemblyObject to JSWebAssembly for consistency.
  • WebAssembly object now has its own prototype: add WebAssemblyPrototype, and use it to register JSWebAssembly's function properties through auto-generated .lut.h, instead of manually.
  • The error constructors used to throw (e.g. new WebAssembly.CompileError()).
  • Register WebAssembly's constructors from the global object, and hold a reference to their structure and prototype so that invoking the constructor can use the structure directly from the global object.
  • Add a prototype base field to global object creation. Previous ones all had Object's prototype as their base, but WebAssembly's error constructors have Error as their base.
  • Test for the error object's correctness.
  • Add missing #if ENABLE(WEBASSEMBLY)

WebAssembly API: implement exception constructors properly
https://bugs.webkit.org/show_bug.cgi?id=163699

Reviewed by Keith Miller.

JSTests:

  • wasm/js-api/test_basic_api.js:

(const.c.in.constructorProperties): more tests

Source/JavaScriptCore:

  • CMakeLists.txt: rename WebAssemblyObject -> JSWebAssembly; add a .lut.h file
  • DerivedSources.make: new .lut.h file
  • JavaScriptCore.xcodeproj/project.pbxproj: ditto
  • runtime/JSGlobalObject.cpp: new prototypeBase macro

(JSC::JSGlobalObject::init): register WebAssembly constructors here
(JSC::JSGlobalObject::visitChildren): use the macro to visit

  • runtime/JSGlobalObject.h: declare the WebAssembly constructor macro
  • wasm/JSWebAssembly.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::JSWebAssembly::create):
(JSC::JSWebAssembly::createStructure):
(JSC::JSWebAssembly::finishCreation):
(JSC::JSWebAssembly::JSWebAssembly):

  • wasm/JSWebAssembly.h: Renamed from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
  • wasm/WebAssemblyObject.cpp: Removed.
  • wasm/js/JSWebAssemblyCompileError.cpp:
  • wasm/js/JSWebAssemblyCompileError.h:

(JSC::JSWebAssemblyCompileError::create): string convenience

  • wasm/js/JSWebAssemblyInstance.cpp:
  • wasm/js/JSWebAssemblyInstance.h:
  • wasm/js/JSWebAssemblyMemory.cpp:
  • wasm/js/JSWebAssemblyMemory.h:
  • wasm/js/JSWebAssemblyModule.cpp:
  • wasm/js/JSWebAssemblyModule.h:
  • wasm/js/JSWebAssemblyRuntimeError.cpp:
  • wasm/js/JSWebAssemblyRuntimeError.h:

(JSC::JSWebAssemblyRuntimeError::create): string convenience

  • wasm/js/JSWebAssemblyTable.cpp:
  • wasm/js/JSWebAssemblyTable.h:
  • wasm/js/WebAssemblyCompileErrorConstructor.cpp:

(JSC::constructJSWebAssemblyCompileError):don't throw, create the object
(JSC::WebAssemblyCompileErrorConstructor::finishCreation):no need for the structure, it's on the global object

  • wasm/js/WebAssemblyCompileErrorConstructor.h:
  • wasm/js/WebAssemblyCompileErrorPrototype.cpp:
  • wasm/js/WebAssemblyCompileErrorPrototype.h:
  • wasm/js/WebAssemblyInstanceConstructor.cpp:
  • wasm/js/WebAssemblyInstanceConstructor.h:
  • wasm/js/WebAssemblyInstancePrototype.cpp:
  • wasm/js/WebAssemblyInstancePrototype.h:
  • wasm/js/WebAssemblyMemoryConstructor.cpp:
  • wasm/js/WebAssemblyMemoryConstructor.h:
  • wasm/js/WebAssemblyMemoryPrototype.cpp:
  • wasm/js/WebAssemblyMemoryPrototype.h:
  • wasm/js/WebAssemblyModuleConstructor.cpp:
  • wasm/js/WebAssemblyModuleConstructor.h:
  • wasm/js/WebAssemblyModulePrototype.cpp:
  • wasm/js/WebAssemblyModulePrototype.h:
  • wasm/js/WebAssemblyPrototype.cpp: Copied from Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorPrototype.cpp.

(JSC::webAssemblyFunctionValidate):
(JSC::webAssemblyFunctionCompile):
(JSC::WebAssemblyPrototype::create):
(JSC::WebAssemblyPrototype::createStructure):
(JSC::WebAssemblyPrototype::finishCreation):
(JSC::WebAssemblyPrototype::WebAssemblyPrototype):

  • wasm/js/WebAssemblyPrototype.h: Copied from Source/JavaScriptCore/wasm/js/WebAssemblyMemoryPrototype.h.
  • wasm/js/WebAssemblyRuntimeErrorConstructor.cpp:

(JSC::constructJSWebAssemblyRuntimeError):don't throw, create the object
(JSC::WebAssemblyRuntimeErrorConstructor::finishCreation):no need for the structure, it's on the global object

  • wasm/js/WebAssemblyRuntimeErrorConstructor.h:
  • wasm/js/WebAssemblyRuntimeErrorPrototype.cpp:
  • wasm/js/WebAssemblyRuntimeErrorPrototype.h:
  • wasm/js/WebAssemblyTableConstructor.cpp:
  • wasm/js/WebAssemblyTableConstructor.h:
  • wasm/js/WebAssemblyTablePrototype.cpp:
  • wasm/js/WebAssemblyTablePrototype.h:
6:17 PM Changeset in webkit [207649] by mmaxfield@apple.com
  • 6 edits
    2 adds in trunk

Implement WebGL2 bufferData() and bufferSubData() methods
https://bugs.webkit.org/show_bug.cgi?id=163759

Reviewed by Dean Jackson.

Source/WebCore:

These new overloads simply clip the input array buffer.

Test: fast/canvas/webgl/bufferData-offset-length.html

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::bufferData):
(WebCore::WebGL2RenderingContext::bufferSubData):

  • html/canvas/WebGL2RenderingContext.h:
  • html/canvas/WebGL2RenderingContext.idl:

LayoutTests:

  • fast/canvas/webgl/bufferData-offset-length-expected.txt: Added.
  • fast/canvas/webgl/bufferData-offset-length.html: Added.
  • fast/canvas/webgl/resources/webgl-test.js:

(create3DContext):
(initWebGL):

6:15 PM Changeset in webkit [207648] by Chris Dumez
  • 15 edits
    2 adds in trunk

"Download Linked File" context menu action should use 'download' attribute as suggested filename
https://bugs.webkit.org/show_bug.cgi?id=163742
<rdar://problem/28840734>

Reviewed by Darin Adler.

Source/WebCore:

Add convenience method to HitTestResult to return the URL element's
download attribute.

  • rendering/HitTestResult.cpp:

(WebCore::HitTestResult::URLElementDownloadAttribute):

  • rendering/HitTestResult.h:

Source/WebKit2:

Update "Download Linked File" context menu action to use the anchor
element's 'download' attribute as suggested filename for the download.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::downloadRequest):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • Shared/WebHitTestResultData.cpp:

(WebKit::WebHitTestResultData::WebHitTestResultData):
(WebKit::WebHitTestResultData::encode):
(WebKit::WebHitTestResultData::decode):

  • Shared/WebHitTestResultData.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::contextMenuItemSelected):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::download):

  • UIProcess/WebProcessPool.h:
  • WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:

(WebKit::InjectedBundleHitTestResult::linkSuggestedFilename):

Tools:

Add API test coverage.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2/link-with-download-attribute.html: Added.
  • TestWebKitAPI/Tests/WebKit2/mac/ContextMenuDownload.mm: Added.

(TestWebKitAPI::didFinishLoadForFrame):
(TestWebKitAPI::getContextMenuFromProposedMenu):
(TestWebKitAPI::decideDestinationWithSuggestedFilename):
(TestWebKitAPI::TEST):

6:15 PM Changeset in webkit [207647] by n_wang@apple.com
  • 5 edits
    2 adds in trunk

AX: VoiceOver is not detecting ARIA treeview if it contains role="presentation"
https://bugs.webkit.org/show_bug.cgi?id=163763

Reviewed by Chris Fleizach.

Source/WebCore:

Test: accessibility/mac/aria-tree-with-presentation-role.html

Web authors sometimes use presentation role in the aria tree to hide elements. We should
consider this a valid case if they specify tree items and groups correctly.

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::hierarchicalLevel):

  • accessibility/AccessibilityTree.cpp:

(WebCore::AccessibilityTree::nodeHasTreeItemChild):
(WebCore::AccessibilityTree::isTreeValid):

  • accessibility/AccessibilityTree.h:

LayoutTests:

  • accessibility/mac/aria-tree-with-presentation-role-expected.txt: Added.
  • accessibility/mac/aria-tree-with-presentation-role.html: Added.
5:15 PM Changeset in webkit [207646] by mark.lam@apple.com
  • 2 edits in trunk/Source/bmalloc

bmalloc api should crash on failure to allocate when !isBmallocEnabled.
https://bugs.webkit.org/show_bug.cgi?id=163766

Reviewed by Keith Miller and Filip Pizlo.

We want to crash in bmalloc on failure to allocate even when !isBmallocEnabled.
This is so that failures to allocate memory will manifest as crashes with a
unique signature (i.e. as a SIGTRAP on release builds, or as a write to illegal
address 0xbbadbeef on debug builds) and the crash will manifest inside bmalloc.
This distinguishes allocation failures from other crashing bugs that manifest as
SIGSEGVs due to random pointer dereferences in the clients of bmalloc.

  • bmalloc/Allocator.cpp:

(bmalloc::Allocator::allocateImpl):
(bmalloc::Allocator::reallocate):
(bmalloc::Allocator::allocateSlowCase):

5:04 PM Changeset in webkit [207645] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-602.3.3

New tag.

4:51 PM Changeset in webkit [207644] by mmaxfield@apple.com
  • 7 edits in trunk/Source/WebCore

Many WebGL functions which don't throw are marked as possibly throwing
https://bugs.webkit.org/show_bug.cgi?id=163747

Reviewed by Dean Jackson.

Mechanically remove the exception code.

No new tests because there is no behavior change.

  • bindings/js/JSWebGLRenderingContextBaseCustom.cpp:

(WebCore::getObjectParameter):
(WebCore::JSWebGLRenderingContextBase::getAttachedShaders):
(WebCore::JSWebGLRenderingContextBase::getProgramParameter):
(WebCore::JSWebGLRenderingContextBase::getShaderParameter):
(WebCore::JSWebGLRenderingContextBase::getUniform):
(WebCore::dataFunctionf):
(WebCore::dataFunctioni):
(WebCore::dataFunctionMatrix):

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::texSubImage2D):

  • html/canvas/WebGLRenderingContext.cpp:

(WebCore::WebGLRenderingContext::texSubImage2D):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::activeTexture):
(WebCore::WebGLRenderingContextBase::attachShader):
(WebCore::WebGLRenderingContextBase::bindAttribLocation):
(WebCore::WebGLRenderingContextBase::bindBuffer):
(WebCore::WebGLRenderingContextBase::bindFramebuffer):
(WebCore::WebGLRenderingContextBase::bindRenderbuffer):
(WebCore::WebGLRenderingContextBase::bindTexture):
(WebCore::WebGLRenderingContextBase::bufferData):
(WebCore::WebGLRenderingContextBase::bufferSubData):
(WebCore::WebGLRenderingContextBase::compileShader):
(WebCore::WebGLRenderingContextBase::createShader):
(WebCore::WebGLRenderingContextBase::detachShader):
(WebCore::WebGLRenderingContextBase::disableVertexAttribArray):
(WebCore::WebGLRenderingContextBase::drawArrays):
(WebCore::WebGLRenderingContextBase::drawElements):
(WebCore::WebGLRenderingContextBase::enableVertexAttribArray):
(WebCore::WebGLRenderingContextBase::framebufferRenderbuffer):
(WebCore::WebGLRenderingContextBase::framebufferTexture2D):
(WebCore::WebGLRenderingContextBase::getActiveAttrib):
(WebCore::WebGLRenderingContextBase::getActiveUniform):
(WebCore::WebGLRenderingContextBase::getAttachedShaders):
(WebCore::WebGLRenderingContextBase::getBufferParameter):
(WebCore::WebGLRenderingContextBase::getProgramParameter):
(WebCore::WebGLRenderingContextBase::getProgramInfoLog):
(WebCore::WebGLRenderingContextBase::getRenderbufferParameter):
(WebCore::WebGLRenderingContextBase::getShaderParameter):
(WebCore::WebGLRenderingContextBase::getShaderInfoLog):
(WebCore::WebGLRenderingContextBase::getShaderPrecisionFormat):
(WebCore::WebGLRenderingContextBase::getShaderSource):
(WebCore::WebGLRenderingContextBase::getTexParameter):
(WebCore::WebGLRenderingContextBase::getUniform):
(WebCore::WebGLRenderingContextBase::getUniformLocation):
(WebCore::WebGLRenderingContextBase::getVertexAttrib):
(WebCore::WebGLRenderingContextBase::linkProgram):
(WebCore::WebGLRenderingContextBase::readPixels):
(WebCore::WebGLRenderingContextBase::shaderSource):
(WebCore::WebGLRenderingContextBase::videoFrameToImage):
(WebCore::WebGLRenderingContextBase::texImage2D):
(WebCore::WebGLRenderingContextBase::uniform1f):
(WebCore::WebGLRenderingContextBase::uniform1fv):
(WebCore::WebGLRenderingContextBase::uniform1i):
(WebCore::WebGLRenderingContextBase::uniform1iv):
(WebCore::WebGLRenderingContextBase::uniform2f):
(WebCore::WebGLRenderingContextBase::uniform2fv):
(WebCore::WebGLRenderingContextBase::uniform2i):
(WebCore::WebGLRenderingContextBase::uniform2iv):
(WebCore::WebGLRenderingContextBase::uniform3f):
(WebCore::WebGLRenderingContextBase::uniform3fv):
(WebCore::WebGLRenderingContextBase::uniform3i):
(WebCore::WebGLRenderingContextBase::uniform3iv):
(WebCore::WebGLRenderingContextBase::uniform4f):
(WebCore::WebGLRenderingContextBase::uniform4fv):
(WebCore::WebGLRenderingContextBase::uniform4i):
(WebCore::WebGLRenderingContextBase::uniform4iv):
(WebCore::WebGLRenderingContextBase::uniformMatrix2fv):
(WebCore::WebGLRenderingContextBase::uniformMatrix3fv):
(WebCore::WebGLRenderingContextBase::uniformMatrix4fv):
(WebCore::WebGLRenderingContextBase::useProgram):
(WebCore::WebGLRenderingContextBase::validateProgram):
(WebCore::WebGLRenderingContextBase::vertexAttribPointer):
(WebCore::WebGLRenderingContextBase::restoreCurrentFramebuffer):
(WebCore::WebGLRenderingContextBase::restoreCurrentTexture2D):

  • html/canvas/WebGLRenderingContextBase.h:
  • html/canvas/WebGLRenderingContextBase.idl:
4:41 PM Changeset in webkit [207643] by commit-queue@webkit.org
  • 2 edits
    2 adds in trunk/Tools

Unreviewed, rolling out r207589.
https://bugs.webkit.org/show_bug.cgi?id=163765

Introduced 17 new layout test failures (Requested by
mcatanzaro on #webkit).

Reverted changeset:

"[GTK] Bump glib to 2.50.1"
https://bugs.webkit.org/show_bug.cgi?id=163689
http://trac.webkit.org/changeset/207589

4:05 PM Changeset in webkit [207642] by mmaxfield@apple.com
  • 15 edits
    6 moves
    1 add in trunk

[macOS] [iOS] Disable variation fonts on macOS El Capitan and iOS 9
https://bugs.webkit.org/show_bug.cgi?id=163374

Reviewed by Darin Adler.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Because of platform lack of support for variations in in-memory fonts,
this feature should be disabled on the affected OSes.

No tests because there is no behavior change (on the relevant platforms).

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

  • Configurations/FeatureDefines.xcconfig:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

LayoutTests:

Moving animations/font-variation-settings* tests to animations/font-variations
in order to make them easier to mark as failing.

Mark the relevant tests as failing on El Capitan and iOS 9.

  • animations/font-variations/font-variation-settings-expected.html: Renamed from LayoutTests/animations/font-variation-settings-expected.html.
  • animations/font-variations/font-variation-settings-order-expected.html: Renamed from LayoutTests/animations/font-variation-settings-order-expected.html.
  • animations/font-variations/font-variation-settings-order.html: Renamed from LayoutTests/animations/font-variation-settings-order.html.
  • animations/font-variations/font-variation-settings-unlike-expected.html: Renamed from LayoutTests/animations/font-variation-settings-unlike-expected.html.
  • animations/font-variations/font-variation-settings-unlike.html: Renamed from LayoutTests/animations/font-variation-settings-unlike.html.
  • animations/font-variations/font-variation-settings.html: Renamed from LayoutTests/animations/font-variation-settings.html.
  • platform/gtk/TestExpectations:
  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
4:03 PM Changeset in webkit [207641] by beidson@apple.com
  • 53 edits
    5 adds in trunk

IndexedDB 2.0: Support IDBObjectStore name assignment.
<rdar://problem/28806931> and https://bugs.webkit.org/show_bug.cgi?id=163749

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/IndexedDB/idbobjectstore-rename-errors-expected.txt:
  • web-platform-tests/IndexedDB/idbobjectstore-rename-store-expected.txt:

Source/WebCore:

Tests: storage/indexeddb/modern/objectstore-rename-1-private.html

storage/indexeddb/modern/objectstore-rename-1.html

Touches a *lot* of code sites, but none of them are particularly interesting.
They are all just getting the new name spread out to all of the various objects that need it.

  • Modules/indexeddb/IDBDatabase.cpp:

(WebCore::IDBDatabase::renameObjectStore):

  • Modules/indexeddb/IDBDatabase.h:
  • Modules/indexeddb/IDBObjectStore.cpp:

(WebCore::IDBObjectStore::setName):

  • Modules/indexeddb/IDBObjectStore.h:
  • Modules/indexeddb/IDBObjectStore.idl:
  • Modules/indexeddb/IDBTransaction.cpp:

(WebCore::IDBTransaction::renameObjectStore):
(WebCore::IDBTransaction::renameObjectStoreOnServer):
(WebCore::IDBTransaction::didRenameObjectStoreOnServer):

  • Modules/indexeddb/IDBTransaction.h:
  • Modules/indexeddb/client/IDBConnectionProxy.cpp:

(WebCore::IDBClient::IDBConnectionProxy::renameObjectStore):

  • Modules/indexeddb/client/IDBConnectionProxy.h:
  • Modules/indexeddb/client/IDBConnectionToServer.cpp:

(WebCore::IDBClient::IDBConnectionToServer::renameObjectStore):
(WebCore::IDBClient::IDBConnectionToServer::didRenameObjectStore):

  • Modules/indexeddb/client/IDBConnectionToServer.h:
  • Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
  • Modules/indexeddb/server/IDBBackingStore.h:
  • Modules/indexeddb/server/IDBConnectionToClient.cpp:

(WebCore::IDBServer::IDBConnectionToClient::didDeleteObjectStore):
(WebCore::IDBServer::IDBConnectionToClient::didRenameObjectStore):

  • Modules/indexeddb/server/IDBConnectionToClient.h:
  • Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
  • Modules/indexeddb/server/IDBServer.cpp:

(WebCore::IDBServer::IDBServer::renameObjectStore):

  • Modules/indexeddb/server/IDBServer.h:
  • Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:

(WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreRenamed):
(WebCore::IDBServer::MemoryBackingStoreTransaction::abort):

  • Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
  • Modules/indexeddb/server/MemoryIDBBackingStore.cpp:

(WebCore::IDBServer::MemoryIDBBackingStore::renameObjectStore):

  • Modules/indexeddb/server/MemoryIDBBackingStore.h:
  • Modules/indexeddb/server/MemoryObjectStore.h:

(WebCore::IDBServer::MemoryObjectStore::rename):

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore):

  • Modules/indexeddb/server/SQLiteIDBBackingStore.h:
  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::performRenameObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformRenameObjectStore):

  • Modules/indexeddb/server/UniqueIDBDatabase.h:
  • Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:

(WebCore::IDBServer::UniqueIDBDatabaseConnection::didRenameObjectStore):

  • Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
  • Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:

(WebCore::IDBServer::UniqueIDBDatabaseTransaction::renameObjectStore):

  • Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
  • Modules/indexeddb/shared/IDBDatabaseInfo.cpp:

(WebCore::IDBDatabaseInfo::renameObjectStore):

  • Modules/indexeddb/shared/IDBDatabaseInfo.h:
  • Modules/indexeddb/shared/IDBObjectStoreInfo.h:

(WebCore::IDBObjectStoreInfo::rename):

  • Modules/indexeddb/shared/IDBResultData.cpp:

(WebCore::IDBResultData::renameObjectStoreSuccess):

  • Modules/indexeddb/shared/IDBResultData.h:
  • Modules/indexeddb/shared/InProcessIDBServer.cpp:

(WebCore::InProcessIDBServer::didRenameObjectStore):
(WebCore::InProcessIDBServer::renameObjectStore):

  • Modules/indexeddb/shared/InProcessIDBServer.h:

Source/WebKit2:

  • DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:

(WebKit::WebIDBConnectionToClient::didRenameObjectStore):
(WebKit::WebIDBConnectionToClient::renameObjectStore):

  • DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
  • DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:
  • WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:

(WebKit::WebIDBConnectionToServer::renameObjectStore):
(WebKit::WebIDBConnectionToServer::didRenameObjectStore):

  • WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
  • WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in:

LayoutTests:

  • storage/indexeddb/modern/objectstore-rename-1-expected.txt: Added.
  • storage/indexeddb/modern/objectstore-rename-1-private-expected.txt: Added.
  • storage/indexeddb/modern/objectstore-rename-1-private.html: Added.
  • storage/indexeddb/modern/objectstore-rename-1.html: Added.
  • storage/indexeddb/modern/resources/objectstore-rename-1.js: Added.
  • storage/indexeddb/readonly-expected.txt:
  • storage/indexeddb/readonly-private-expected.txt:
  • storage/indexeddb/resources/readonly.js: Removed the test that verifies that object store names are readonly as they are no longer readonly.
2:00 PM Changeset in webkit [207640] by Chris Dumez
  • 9 edits in trunk

Make table.deleteRow(-1) a no-op when there are no rows
https://bugs.webkit.org/show_bug.cgi?id=163746

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Import test coverage from:

  • web-platform-tests/html/semantics/tabular-data/the-table-element/remove-row-expected.txt:
  • web-platform-tests/html/semantics/tabular-data/the-table-element/remove-row.html:
  • web-platform-tests/html/semantics/tabular-data/the-tbody-element/deleteRow-expected.txt:
  • web-platform-tests/html/semantics/tabular-data/the-tbody-element/deleteRow.html:
  • web-platform-tests/html/semantics/tabular-data/the-tr-element/deleteCell-expected.txt:
  • web-platform-tests/html/semantics/tabular-data/the-tr-element/deleteCell.html:

Source/WebCore:

Make table.deleteRow(-1) a no-op when there are no rows, instead of throwing:

This is more consistent with the behavior of tbody.deleteRow(-1) and
tr.deleteCell(-1). This is also consistent with Gecko. Blink is doing the
same change via:

No new tests, updated existing tests.

  • html/HTMLTableElement.cpp:

(WebCore::HTMLTableElement::deleteRow):

1:28 PM Changeset in webkit [207639] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

Unreviewed gardening.

Update expected results.

  • imported/blink/fast/pagination/first-letter-inherit-all-crash-expected.txt:
1:13 PM Changeset in webkit [207638] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Make sure to handle prefixed transform-style
https://bugs.webkit.org/show_bug.cgi?id=163756

Reviewed by Dean Jackson.

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):

1:10 PM Changeset in webkit [207637] by dino@apple.com
  • 2 edits in trunk/LayoutTests

Shapes tests failing on iOS
https://bugs.webkit.org/show_bug.cgi?id=163755
<rdar://problem/28875780>

Skip these temporarily on iOS.

  • platform/ios-simulator/TestExpectations:
1:10 PM Changeset in webkit [207636] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Fix crash when parsing -webkit-margin-collapse
https://bugs.webkit.org/show_bug.cgi?id=163753

Reviewed by Dean Jackson.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseShorthand):

12:59 PM Changeset in webkit [207635] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking compositing/iframes/page-cache-layer-tree.html as flaky on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=163750

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
12:52 PM Changeset in webkit [207634] by Chris Dumez
  • 6 edits in trunk

Passing a number as the pixel parameter to texImage2D() doesn't thrown an exception
https://bugs.webkit.org/show_bug.cgi?id=163715

Reviewed by Darin Adler.

Source/WebCore:

Enable strict type checking for typed arrays in the bindings, similarly
do what we do for other wrapper types, as per Web IDL.

No new tests, updated existing tests.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):
(GenerateParametersCheck):

LayoutTests:

Update existing tests now that we throw a TypeError when passing an unexpected
type for a parameter where we expect a typed array.

  • fast/canvas/webgl/script-tests/texImageTest.js:
  • fast/canvas/webgl/texImageTest-expected.txt:
  • webgl/1.0.2/resources/webgl_test_files/conformance/textures/tex-image-with-invalid-data.html:
12:48 PM Changeset in webkit [207633] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking media/modern-media-controls/media-controller/media-controller-resize.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=163636

Unreviewed test gardening.

12:17 PM Changeset in webkit [207632] by mmaxfield@apple.com
  • 5 edits
    2 adds in trunk

Improve error message when passing a null ArrayBuffer to bufferData()
https://bugs.webkit.org/show_bug.cgi?id=163745

Reviewed by Dean Jackson.

Source/WebCore:

Test: fast/canvas/webgl/bufferData-nullable-array-buffer-view.html

Update the idl file to accept a nullable ArrayBuffer, and throw
the relevant error with a more helpful error string.

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::bufferData):

  • html/canvas/WebGLRenderingContextBase.h:
  • html/canvas/WebGLRenderingContextBase.idl:

LayoutTests:

  • fast/canvas/webgl/bufferData-nullable-array-buffer-view-expected.txt: Added.
  • fast/canvas/webgl/bufferData-nullable-array-buffer-view.html: Added.
12:15 PM Changeset in webkit [207631] by Alan Bujtas
  • 4 edits
    2 adds in trunk

Stop searching for first-letter containers at multi-column boundary.
https://bugs.webkit.org/show_bug.cgi?id=163739
<rdar://problem/28810750>

Source/WebCore:

We should not cross the multi-column boundary while searching for the first-letter container.
While moving first-letter renderers to a multi-column parent, it could result in finding the wrong
container and end up adding a new wrapper under the original container (from where we are moving the renderers).

Reviewed by David Hyatt.

Test: fast/css-generated-content/first-letter-move-to-multicolumn-crash.html

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::moveChildrenTo):

  • rendering/RenderTextFragment.cpp:

(WebCore::RenderTextFragment::blockForAccompanyingFirstLetter):

LayoutTests:

Reviewed by David Hyatt.

  • fast/css-generated-content/first-letter-move-to-multicolumn-crash-expected.txt: Added.
  • fast/css-generated-content/first-letter-move-to-multicolumn-crash.html: Added.
12:09 PM Changeset in webkit [207630] by dino@apple.com
  • 11 edits
    91 adds in trunk

Support CSS Shapes Level 1 without a prefix
https://bugs.webkit.org/show_bug.cgi?id=163709
<rdar://problem/28859369>

Reviewed by Myles Maxfield.

Source/WebCore:

Support the unprefixed form of CSS Shapes, now that
it is in CR.

We have a few failing tests:

Tests: imported/w3c/csswg-test/css-shapes-1

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::propertyValue):

  • css/CSSPropertyNames.in:
  • css/CSSValueKeywords.in:
  • css/parser/CSSParser.cpp:

(WebCore::isSimpleLengthPropertyID):
(WebCore::CSSParser::parseValue):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseSingleValue):

  • page/animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

Source/WebInspectorUI:

Replace -webkit-shape-outside with shape-outside.

  • UserInterface/Models/CSSKeywordCompletions.js:

LayoutTests:

Unskip all but a couple of tests.

11:35 AM Changeset in webkit [207629] by hyatt@apple.com
  • 3 edits in trunk/Source/WebCore

[CSS Parser] Fix region, column and page break parsing
https://bugs.webkit.org/show_bug.cgi?id=163743

Reviewed by Simon Fraser.

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
Add the missing values for break support.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::isLegacyBreakProperty):
(WebCore::CSSPropertyParser::parseValueStart):
Add a special case for handling legacy break properties. Blink treats them like
shorthands, but we can't do that without breaking the old parser, so for now
we add a special case.

(WebCore::mapFromPageBreakBetween):
(WebCore::mapFromColumnBreakBetween):
(WebCore::mapFromRegionBreakBetween):
Updated to have the AvoidXXX values (where XXX is Column/Page/Region).

(WebCore::CSSPropertyParser::parseShorthand):
Remove the consumeLegacyBreak from the shorthand function, since we can't treat
the legacy break properties as shorthands yet.

11:30 AM Changeset in webkit [207628] by caitp@igalia.com
  • 4 edits in trunk

[JSC] disallow references to await in AsyncFunction formal parameters
https://bugs.webkit.org/show_bug.cgi?id=163694

Reviewed by Saam Barati.

JSTests:

  • stress/async-await-syntax.js:

Source/JavaScriptCore:

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseAssignmentExpression):

11:27 AM Changeset in webkit [207627] by weinig@apple.com
  • 10 edits in trunk

Add convenience function that combines WTF::visit(...) with WTF::makeVisitor(...)
https://bugs.webkit.org/show_bug.cgi?id=163713

Reviewed by Dan Bernstein.

Source/WebCore:

Switch uses of WTF::visit to use WTF::switchOn.

  • dom/MessageEvent.cpp:

(WebCore::MessageEvent::source):

  • dom/Node.cpp:

(WebCore::nodeSetPreTransformedFromNodeOrStringVector):
(WebCore::Node::convertNodesOrStringsIntoNode):

  • html/HTMLSelectElement.cpp:

(WebCore::HTMLSelectElement::add):

  • html/track/TrackEvent.cpp:

(WebCore::TrackEvent::TrackEvent):

  • testing/TypeConversions.h:

(WebCore::TypeConversions::typeConversionsDictionaryUnionType):

Source/WTF:

  • Add WTF::switchOn which merges WTF::visit with WTF::makeVisitor in the following way:

WTF::visit(WTF::makeVisitor(...), variant)

  • wtf/Variant.h:

(WTF::switchOn):

Tools:

  • TestWebKitAPI/Tests/WTF/Variant.cpp:

Add test for WTF::switchOn()

11:06 AM Changeset in webkit [207626] by matthew_hanson@apple.com
  • 17 edits
    2 adds in branches/safari-602-branch

Merge r206449. rdar://problem/28635085

11:02 AM Changeset in webkit [207625] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Move InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero to out of line type info flags
https://bugs.webkit.org/show_bug.cgi?id=163716

Reviewed by Saam Barati.

We found that all the accesses to the InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero flag is
done through the Structure. There is no user that accesses this flag in the cell inlined member. And JIT
code does not access it directly. That means that we can move this flag from inlined flags to out of line
flags. This patch moves it to the out of line flags. And make one bit empty in inlined flags. Later this
new empty flag will be used by megamorphic DOMJIT implementation.

  • runtime/JSTypeInfo.h:

(JSC::TypeInfo::hasStaticPropertyTable):
(JSC::TypeInfo::interceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero):

10:44 AM Changeset in webkit [207624] by dbates@webkit.org
  • 46 edits
    7 adds in branches/safari-602-branch

Merge r206809. rdar://problem/28718761

10:40 AM Changeset in webkit [207623] by keith_miller@apple.com
  • 3 edits
    1 add in trunk

Invalid assertion in arguments elimination
https://bugs.webkit.org/show_bug.cgi?id=163740
<rdar://problem/27911462>

Reviewed by Michael Saboff.

JSTests:

  • stress/direct-arguments-osr-entry.js: Added.

(foo.):
(foo):

Source/JavaScriptCore:

The DFGFTL's arguments elimination phase incorrectly asserted that a GetFromArguments' first
child would always be a CreateDirectArguments. While we only create the
op_get_from_arguments bytecode pointing to a create_direct_arguments, its possible for a
number of reasons that a DFG GetFromArguments may not point to a CreateDirectArguments. For
example, if we are OSR entering in some function with direct arguments the
CreateDirectArguments node might become ExtractOSREntryLocals.

  • dfg/DFGArgumentsEliminationPhase.cpp:
10:25 AM Changeset in webkit [207622] by hyatt@apple.com
  • 4 edits in trunk/Source/WebCore

[CSS Parser] Fix font family parsing and add CSS region property parsing
https://bugs.webkit.org/show_bug.cgi?id=163741

Reviewed by Zalan Bujtas.

  • css/parser/CSSParser.cpp:

(WebCore::isKeywordPropertyID):
(WebCore::parseKeywordValue):
(WebCore::CSSParser::parseValue):
Modify the old CSSParser to have its own keyword check, since keywords were
incorrectly added to the new parser when this check was consolidated. Column
and region breaks are considered keyword properties by the old parser, but
not by the new parser, since the new parser special cases them and maps them
into the generic break property.

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):
Update for regions to make sure all the region properties are there. Remove the
column and region break properties, since they're not supposed to be here in the
new parser.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeFamilyName):
Fix font parsing to make font family values so that fonts work.

(WebCore::consumeFlowProperty):
Add a function for handling -webkit-flow-from and -webkit-flow-into.

(WebCore::CSSPropertyParser::parseSingleValue):
Add support for the region properties.

(WebCore::mapFromRegionBreakBetween):
(WebCore::mapFromColumnRegionOrPageBreakInside):
(WebCore::mapFromLegacyBreakProperty):
(WebCore::CSSPropertyParser::consumeLegacyBreakProperty):
(WebCore::mapFromColumnOrPageBreakInside): Deleted.
Update to handle the region break properties in the same way that column break
properties are handled.

9:53 AM Changeset in webkit [207621] by jer.noble@apple.com
  • 3 edits
    4 adds in trunk

CRASH in WebCore::MediaSource::seekToTime + 185
https://bugs.webkit.org/show_bug.cgi?id=163652

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/media-source/media-source-seek-detach-crash.html

Add isClosed() checks (which are effectively m_private null-checks) everywhere m_private is
dereferenced. The one place where m_private is cleared without setting the state to closed
is stop(), so make stop() set the state to closed as well (without firing any events).

  • Modules/mediasource/MediaSource.cpp:

(WebCore::MediaSource::seekToTime):
(WebCore::MediaSource::completeSeek):
(WebCore::MediaSource::monitorSourceBuffers):
(WebCore::MediaSource::streamEndedWithError):
(WebCore::MediaSource::stop):

LayoutTests:

  • media/media-source/content/test-48kHz.m4a: Added.
  • media/media-source/content/test-48khz-manifest.json: Added.
  • media/media-source/media-source-seek-detach-crash-expected.txt: Added.
  • media/media-source/media-source-seek-detach-crash.html: Added.
9:38 AM Changeset in webkit [207620] by akling@apple.com
  • 13 edits in trunk

Drop StyleResolver and SelectorQueryCache when entering PageCache.
<https://webkit.org/b/154238>

Reviewed by Antti Koivisto.

Source/WebCore:

Stop keeping these around for cached pages to save lots of memory.
We can easily rebuild them if a cached navigation occurs, and this
way we also don't need to worry about invalidating style for cached
pages in all the right places.

Restoring a cached page will now lead to a forced style recalc.
We don't try to defer this (beyond a zero-timer) since it's going
to happen anyway, and it's nicer to front-load the cost rather than
stuttering on the first user content interaction.

  • dom/Document.cpp:

(WebCore::Document::setPageCacheState):

  • history/CachedPage.cpp:

(WebCore::CachedPage::restore):
(WebCore::CachedPage::clear):

  • history/CachedPage.h:

(WebCore::CachedPage::markForVisitedLinkStyleRecalc): Deleted.
(WebCore::CachedPage::markForFullStyleRecalc): Deleted.

  • history/PageCache.cpp:

(WebCore::PageCache::markPagesForVisitedLinkStyleRecalc): Deleted.
(WebCore::PageCache::markPagesForFullStyleRecalc): Deleted.

  • history/PageCache.h:
  • page/Frame.cpp:

(WebCore::Frame::setPageAndTextZoomFactors):

  • page/Page.cpp:

(WebCore::Page::setViewScaleFactor):
(WebCore::Page::setDeviceScaleFactor):
(WebCore::Page::setPagination):
(WebCore::Page::setPaginationLineGridEnabled):
(WebCore::Page::setVisitedLinkStore):

LayoutTests:

Progression in compositing/iframes/page-cache-layer-tree.html, when navigating back,
the two iframes' dimensions correctly exclude the horizontal scrollbar's height since
it's not present after a style recalc.

  • compositing/iframes/page-cache-layer-tree-expected.txt:
8:57 AM Changeset in webkit [207619] by clopez@igalia.com
  • 3 edits in trunk/Source/WebCore

[GTK] Build fix after r207616
https://bugs.webkit.org/show_bug.cgi?id=163333

Reviewed by Carlos Garcia Campos.

EGL_PLATFORM_X11_KHR and EGL_PLATFORM_WAYLAND_KHR are not defined
on the EGL headers shipped by Mesa 10.3 (shipped by Debian 8)

  • platform/graphics/wayland/PlatformDisplayWayland.cpp:

(WebCore::PlatformDisplayWayland::initialize):

  • platform/graphics/x11/PlatformDisplayX11.cpp:

(WebCore::PlatformDisplayX11::initializeEGLDisplay):

8:00 AM Changeset in webkit [207618] by caitp@igalia.com
  • 4 edits in trunk

[JSC] throw TypeError when constructing dynamically created JSGeneratorFunction
https://bugs.webkit.org/show_bug.cgi?id=163714

Reviewed by Mark Lam.

JSTests:

Add missing test coverage that dynamically created
JSGeneratorFunctions can not be constructed.

  • stress/generator-function-constructor.js:

(shouldThrow):

Source/JavaScriptCore:

According to CreateDynamicFunction() (https://tc39.github.io/ecma262/#sec-createdynamicfunction),
non-normal functions are not constructors. Previously, dynamically created functions would always
be constructible, and so it was possible to evaluate new (function*() {}.constructor()),
and have it return an Iterator object.

This change selects a dynamically created function's ConstructAbility based on its parse mode instead.

  • runtime/CodeCache.cpp:

(JSC::CodeCache::getFunctionExecutableFromGlobalCode):

7:34 AM Changeset in webkit [207617] by commit-queue@webkit.org
  • 7 edits
    1 add in trunk

[CMake] CMake does not support the dep files for implicit dependency
https://bugs.webkit.org/show_bug.cgi?id=161433

Patch by Fujii Hironori <Fujii Hironori> on 2016-10-20
Reviewed by Brent Fulgham.

Created a Perl script to generate all IDL bindings for CMake.
This script can regenerate outdated bindings by based on the
supplemental dependency and dep files created by
'--write-dependencies' switch of generate-bindings.pl.

add_custom_target is used to invoke the script instead of
add_custom_command because Ninja deletes all output files before
executing the command in case of add_custom_command.

USES_TERMINAL option of add_custom_target has two effects:
1) Not buffering output of the command
2) Invoking the command in the special Ninja pool which inhibits parallel build
One needs to use CMake 3.2 or later to enable this feature.

.:

  • Source/cmake/WebKitMacros.cmake (GENERATE_BINDINGS): Included

ProcessorCount. Added a new argument 'target'. Use
add_custom_target instead of add_custom_command. Invoke the new
script.

Source/WebCore:

  • CMakeLists.txt: Specified target names for

GENERATE_BINDINGS. Added dependency for the targets.

  • bindings/scripts/generate-bindings-all.pl: Added.

Tools:

  • DumpRenderTree/CMakeLists.txt: Specified a target name for

GENERATE_BINDINGS. Added dependency for the target.

  • WebKitTestRunner/CMakeLists.txt: Ditto.
6:51 AM WebKitGTK/2.14.x edited by clopez@igalia.com
(diff)
6:50 AM WebKitGTK/2.14.x edited by clopez@igalia.com
(diff)
6:18 AM Changeset in webkit [207616] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Prefer eglGetPlatformDisplay to eglGetDisplay
https://bugs.webkit.org/show_bug.cgi?id=163333

Patch by Adam Jackson <ajax@redhat.com> on 2016-10-20
Reviewed by Carlos Garcia Campos.

eglGetDisplay forces the implementation to guess what kind of void* it's been handed. Different implementations
do different things, in particular glvnd and Mesa behave differently. Fortunately there exists API to tell EGL
what kind of display it is, so let's use it.

  • platform/graphics/wayland/PlatformDisplayWayland.cpp:

(WebCore::PlatformDisplayWayland::initialize):

  • platform/graphics/x11/PlatformDisplayX11.cpp:

(WebCore::PlatformDisplayX11::initializeEGLDisplay):

5:37 AM Changeset in webkit [207615] by Carlos Garcia Campos
  • 10 edits
    2 adds in trunk/Source/WebCore

[GTK] Avoid including egl.h headers in internal headers
https://bugs.webkit.org/show_bug.cgi?id=163722

Reviewed by Žan Doberšek.

egl.h includes eglplatform.h that decides the native types for the platform at compile time. However, we support
to build with X11 and Wayland at the same time and decide what to use at runtime. Currently GLContext.h includes
eglplatform.h after wayland-egl.h if Wayland is enabled. That means that the wayland native types are used by
default from all cpp files including GLContext.h. It currently works in X11 because we cast the value anyway and
for example EGLNativeWindowType is a pointer in Wayland that can be casted to unsigned long in X11 to represent
the X Window. This is very fragile in any case, we should avoid adding egl headers in our headers and only
include it in cpp files. But we also need to ensure we don't use X11 and Wayland in the same cpp file.

  • PlatformGTK.cmake:
  • platform/graphics/GLContext.cpp:

(WebCore::GLContext::createContextForWindow):

  • platform/graphics/GLContext.h:
  • platform/graphics/egl/GLContextEGL.cpp:

(WebCore::GLContextEGL::createWindowContext):
(WebCore::GLContextEGL::createContext):
(WebCore::GLContextEGL::~GLContextEGL):

  • platform/graphics/egl/GLContextEGL.h:
  • platform/graphics/egl/GLContextEGLWayland.cpp: Added.

(WebCore::GLContextEGL::GLContextEGL):
(WebCore::GLContextEGL::createWindowSurfaceWayland):
(WebCore::GLContextEGL::createWaylandContext):
(WebCore::GLContextEGL::destroyWaylandWindow):

  • platform/graphics/egl/GLContextEGLX11.cpp: Added.

(WebCore::GLContextEGL::GLContextEGL):
(WebCore::GLContextEGL::createWindowSurfaceX11):
(WebCore::GLContextEGL::createPixmapContext):

  • platform/graphics/glx/GLContextGLX.cpp:

(WebCore::GLContextGLX::createWindowContext):
(WebCore::GLContextGLX::createContext):
(WebCore::GLContextGLX::GLContextGLX):

  • platform/graphics/glx/GLContextGLX.h:
  • platform/graphics/wayland/PlatformDisplayWayland.cpp:
  • platform/graphics/x11/PlatformDisplayX11.cpp:
5:36 AM Changeset in webkit [207614] by Carlos Garcia Campos
  • 7 edits in trunk/Source

[GTK] Avoid strstr() when checking (E)GL extensions
https://bugs.webkit.org/show_bug.cgi?id=161958

Reviewed by Žan Doberšek.

Source/WebCore:

Add static method GLContext::isExtensionSupported() to properly search extenstions in the given extension
list, and use it instead of strstr().

  • platform/graphics/GLContext.cpp:

(WebCore::GLContext::isExtensionSupported):

  • platform/graphics/GLContext.h:
  • platform/graphics/egl/GLContextEGL.cpp:

(WebCore::GLContextEGL::createSurfacelessContext):

  • platform/graphics/glx/GLContextGLX.cpp:

(WebCore::hasSGISwapControlExtension):

Source/WebKit2:

Use GLContext::isExtensionSupported() instead of strstr().

  • UIProcess/gtk/WaylandCompositor.cpp:

(WebKit::WaylandCompositor::initializeEGL):

4:12 AM Changeset in webkit [207613] by matthew_hanson@apple.com
  • 4 edits
    11 adds in branches/safari-602-branch

Merge r206217. rdar://problem/28811877

4:12 AM Changeset in webkit [207612] by matthew_hanson@apple.com
  • 4 edits
    1 add in branches/safari-602-branch

Merge r207385. rdar://problem/28811872

4:12 AM Changeset in webkit [207611] by matthew_hanson@apple.com
  • 4 edits in branches/safari-602-branch/Source/WebKit2

Merge r206413. rdar://problem/28744171

4:12 AM Changeset in webkit [207610] by matthew_hanson@apple.com
  • 2 edits in branches/safari-602-branch/Source/WebCore

Merge r206881. rdar://problem/28721519

3:11 AM Changeset in webkit [207609] by Manuel Rego Casasnovas
  • 2 edits
    1 add in trunk/Tools

[GTK] Cannot build GTK+ with CUPS 2.* versions
https://bugs.webkit.org/show_bug.cgi?id=163591

Reviewed by Michael Catanzaro.

GTK+ is wrongly checking about the available CUPS version,
so if you have CUPS 2.* the configure step fails.

This has been already fixed upstream and included in 2.30 series:
https://git.gnome.org/browse/gtk+/commit/?id=631f6b536485829a0bd00532f5826ad302b4951b

Added patch on JHBuild so we can now build GTK+ with CUPS 2.*.

  • gtk/jhbuild.modules: Applied patch and avoid using "configure" script directly

as the patch modifies "configure.ac".

  • gtk/patches/configure-fix-detecting-CUPS-2.x.patch: Added.
3:00 AM Changeset in webkit [207608] by matthew_hanson@apple.com
  • 2 edits in branches/safari-602-branch/Source/WebKit/mac

Merge r207246. rdar://problem/28732731

3:00 AM Changeset in webkit [207607] by matthew_hanson@apple.com
  • 33 edits in branches/safari-602-branch/Source

Merge r204637. rdar://problem/28216256

3:00 AM Changeset in webkit [207606] by matthew_hanson@apple.com
  • 2 edits in branches/safari-602-branch/Source/WebCore

Merge r207157. rdar://problem/28857500

3:00 AM Changeset in webkit [207605] by matthew_hanson@apple.com
  • 10 edits
    31 adds in branches/safari-602-branch

Merge r207155. rdar://problem/28857500

2:59 AM Changeset in webkit [207604] by matthew_hanson@apple.com
  • 2 edits in branches/safari-602-branch/Source/WebKit2

Merge r206834. rdar://problem/28634858

2:59 AM Changeset in webkit [207603] by matthew_hanson@apple.com
  • 11 edits in branches/safari-602-branch

Merge r206833. rdar://problem/28634858

2:59 AM Changeset in webkit [207602] by matthew_hanson@apple.com
  • 12 edits
    1 copy
    1 add in branches/safari-602-branch

Merge r206829. rdar://problem/28634858

2:59 AM Changeset in webkit [207601] by matthew_hanson@apple.com
  • 21 edits
    2 copies in branches/safari-602-branch/Tools

Merge r205329. rdar://problem/28634858

2:59 AM Changeset in webkit [207600] by matthew_hanson@apple.com
  • 6 edits in branches/safari-602-branch

Merge r206247. rdar://problem/28216256

2:59 AM Changeset in webkit [207599] by matthew_hanson@apple.com
  • 5 edits in branches/safari-602-branch/Source

Merge r206132. rdar://problem/28634856

2:59 AM Changeset in webkit [207598] by matthew_hanson@apple.com
  • 8 edits in branches/safari-602-branch

Merge r205326. rdar://problem/28476952

2:59 AM Changeset in webkit [207597] by matthew_hanson@apple.com
  • 4 edits in branches/safari-602-branch

Merge r205306. rdar://problem/28476952

2:59 AM Changeset in webkit [207596] by matthew_hanson@apple.com
  • 2 edits in branches/safari-602-branch/Source/WebCore

Merge r205274. rdar://problem/28476952

2:59 AM Changeset in webkit [207595] by matthew_hanson@apple.com
  • 22 edits in branches/safari-602-branch

Merge r205271. rdar://problem/28476952

2:59 AM Changeset in webkit [207594] by matthew_hanson@apple.com
  • 9 edits in branches/safari-602-branch/Source/WebCore

Merge r205214. rdar://problem/28476952

2:59 AM Changeset in webkit [207593] by matthew_hanson@apple.com
  • 6 edits
    1 add in branches/safari-602-branch

Merge r205212. rdar://problem/28476952

2:58 AM Changeset in webkit [207592] by matthew_hanson@apple.com
  • 2 edits in branches/safari-602-branch/Source/WTF

Merge r205859. rdar://problem/28635084

2:03 AM Changeset in webkit [207591] by pvollan@apple.com
  • 3 edits in trunk/Source/WebCore

[Win][Direct2D] Implement ImageBufferData::getData.
https://bugs.webkit.org/show_bug.cgi?id=163668

Reviewed by Brent Fulgham.

Render data to a bitmap in system memory, which data can be read from.

  • platform/graphics/win/ImageBufferDataDirect2D.cpp:

(WebCore::ImageBufferData::getData):

  • platform/graphics/win/ImageBufferDirect2D.cpp:

(WebCore::ImageBuffer::ImageBuffer):

1:33 AM Changeset in webkit [207590] by Carlos Garcia Campos
  • 6 edits
    2 adds in trunk/Source

Wrong use of EGL_DEPTH_SIZE
https://bugs.webkit.org/show_bug.cgi?id=155536

Reviewed by Michael Catanzaro.

Source/WebCore:

What happens here is that the driver doesn't implement EGL_DEPTH_SIZE and the default value, which is 0, is
returned. Then XCreatePixmap fails because 0 is not a valid depth. The thing is that even if EGL_DEPTH_SIZE or
EGL_BUFFER_SIZE returned a valid depth, it still might not be supported by the default screen and XCreatePixmap
can fail. What we need to ensure is that the depth we pass is compatible with the X display, not only with the
EGL config, to avoid failures when creating the pixmap. So, we can use EGL_NATIVE_VISUAL_ID instead, and
then ask X for the visual info for that id. If it isn't found then we just return before creating the pixmap,
but if the visual is found then we can be sure that the depth of the visual will not make the pixmap creation
fail. However, with the driver I'm using it doesn't matter how we create the pixmap that eglCreatePixmapSurface
always fails, again with X errors that are fatal by default. Since the driver is not free, I assume it doesn't
support eglCreatePixmapSurface or it's just buggy, so the only option we have here is trap the x errors and
ignore them. It turns out that the X errors are not fatal in this case, because eglCreatePixmapSurface ends up
returning a surface, and since these are offscreen contexts, it doesn't really matter if they contain an
invalid pixmap, because we never do swap buffer on them, so just ignoring the X errors fixes the crashes and
makes everythig work. This patch adds a helper class XErrorTrapper that allows to trap XErrors and decide what
to do with them (ignore, warn or crash) or even not consider a particular set of errors as errors.

  • PlatformEfl.cmake: Add new file to compilation.
  • PlatformGTK.cmake: Ditto.
  • platform/graphics/egl/GLContextEGL.cpp:

(WebCore::GLContextEGL::createPixmapContext): Use EGL_NATIVE_VISUAL_ID instead of EGL_DEPTH_SIZE to figure out
the depth to be passed to XCreatePixmap. Also use the XErrorTrapper class to ignore all BadDrawable errors
produced by eglCreatePixmapSurface() and only show a warning about all other X errors.

  • platform/graphics/x11/XErrorTrapper.cpp: Added.

(WebCore::xErrorTrappersMap):
(WebCore::XErrorTrapper::XErrorTrapper):
(WebCore::XErrorTrapper::~XErrorTrapper):
(WebCore::XErrorTrapper::errorCode):
(WebCore::XErrorTrapper::errorEvent):

  • platform/graphics/x11/XErrorTrapper.h: Added.

(WebCore::XErrorTrapper::XErrorTrapper):

Source/WebKit2:

Use XErrorTrapper class instead of the custom XErrorHandler.

  • PluginProcess/unix/PluginProcessMainUnix.cpp:

(WebKit::PluginProcessMainUnix):

1:30 AM Changeset in webkit [207589] by Manuel Rego Casasnovas
  • 2 edits
    2 deletes in trunk/Tools

[GTK] Bump glib to 2.50.1
https://bugs.webkit.org/show_bug.cgi?id=163689

Reviewed by Michael Catanzaro.

This is need in order to fix GTK+ build with CUPS 2.* (bug #163591).

  • gtk/jhbuild.modules: Bump glib version. Pass --disable-libmount to build properly.

Also we don't need the patches anymore.

  • gtk/patches/gdate-suppress-string-format-literal-warning.patch: Removed.
  • gtk/patches/glib-warning-fix.patch: Removed.
12:26 AM Changeset in webkit [207588] by nael.ouedraogo@crf.canon.fr
  • 5 edits in trunk

WebRTC: The MediaStreamTrackEvent init dictionary needs a required track member
https://bugs.webkit.org/show_bug.cgi?id=146232

Update MediaStreamTrackEvent IDL as per specification.

Source/WebCore:

Reviewed by Darin Adler.

No additional test required, rebase existings tests.

  • Modules/mediastream/MediaStreamTrackEvent.idl:

LayoutTests:

No additional test required, rebase existings tests.

Reviewed by Darin Adler.

  • fast/mediastream/MediaStreamTrackEvent-constructor-expected.txt:
  • fast/mediastream/MediaStreamTrackEvent-constructor.html: Remove

useless tests.

Oct 19, 2016:

11:43 PM Changeset in webkit [207587] by commit-queue@webkit.org
  • 14 edits
    4 copies
    4 adds in trunk

[Modern Media Controls] Media Controller: mute support
https://bugs.webkit.org/show_bug.cgi?id=163677
<rdar://problem/28851582>

Patch by Antoine Quint <Antoine Quint> on 2016-10-19
Reviewed by Dean Jackson.

Source/WebCore:

We introduce the MuteSupport class which brings support for muting the media
by clicking on the mute button in the media controls and correctly reflecting
the media's muted state should the media be muted via the media API.

Tests: media/modern-media-controls/mute-support/mute-support-button-click.html

media/modern-media-controls/mute-support/mute-support-media-api.html
media/modern-media-controls/mute-support/mute-support-muted.html

  • Modules/modern-media-controls/media/media-controller.js:

(MediaController):

  • Modules/modern-media-controls/media/mute-support.js: Copied from Source/WebCore/Modules/modern-media-controls/media/media-controller.js.

(MuteSupport.prototype.get control):
(MuteSupport.prototype.get mediaEvents):
(MuteSupport.prototype.buttonWasClicked):
(MuteSupport.prototype.syncControl):
(MuteSupport):

  • WebCore.xcodeproj/project.pbxproj:
  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::mediaControlsScript):

LayoutTests:

New tests for the MuteSupport class and adding the new resource to other MediaController tests.

  • media/modern-media-controls/media-controller/media-controller-constructor.html:
  • media/modern-media-controls/media-controller/media-controller-resize.html:
  • media/modern-media-controls/mute-support/mute-support-button-click-expected.txt: Added.
  • media/modern-media-controls/mute-support/mute-support-button-click.html: Added.
  • media/modern-media-controls/mute-support/mute-support-media-api-expected.txt: Added.
  • media/modern-media-controls/mute-support/mute-support-media-api.html: Added.
  • media/modern-media-controls/mute-support/mute-support-muted-expected.txt: Added.
  • media/modern-media-controls/mute-support/mute-support-muted.html: Added.
  • media/modern-media-controls/start-support/start-support-audio.html:
  • media/modern-media-controls/start-support/start-support-autoplay.html:
  • media/modern-media-controls/start-support/start-support-click-to-start.html:
  • media/modern-media-controls/start-support/start-support-error.html:
  • media/modern-media-controls/start-support/start-support-fullscreen.html:
  • media/modern-media-controls/start-support/start-support-manual-play.html:
  • media/modern-media-controls/start-support/start-support-no-source.html:
11:42 PM Changeset in webkit [207586] by Carlos Garcia Campos
  • 19 edits
    1 copy
    1 add in trunk/Source/WebKit2

[SOUP] Add NetworkSession implementation and switch to use it
https://bugs.webkit.org/show_bug.cgi?id=163597

Reviewed by Alex Christensen.

Basically move the ResourceHandle implementation to the network process, but modernized, cleaned up, and adapted
to the NetworkSession model.

  • CMakeLists.txt: Add new files to compilation.
  • NetworkProcess/Downloads/Download.cpp:

(WebKit::Download::Download): Use the same code for all ports using NetworkSession and add missing
initialization of m_sessionID.

  • NetworkProcess/Downloads/Download.h:

(WebKit::Download::Download): Define PlatformDownloadTaskRef on every platform to make the constructor common to
all ports using NetworkSession.

  • NetworkProcess/Downloads/soup/DownloadSoup.cpp:

(WebKit::Download::cancelNetworkLoad):
(WebKit::Download::platformDidFinish):

  • NetworkProcess/NetworkDataTask.h:

(WebKit::NetworkDataTask::pendingDownloadID): Make const.
(WebKit::NetworkDataTask::pendingDownload): Ditto.
(WebKit::NetworkDataTask::pendingDownloadLocation): Ditto.
(WebKit::NetworkDataTask::isDownload): Helper to check if the task is a download.

  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::didReceiveResponseNetworkSession): Use NetworkDataTask::isDownload().

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::NetworkProcess): NetworkSession::setCustomProtocolManager() is Cocoa only.

  • NetworkProcess/NetworkSession.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSession::networkStorageSession): Make const.

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp: Added.

(WebKit::NetworkDataTask::NetworkDataTask):
(WebKit::NetworkDataTask::~NetworkDataTask):
(WebKit::NetworkDataTask::scheduleFailure):
(WebKit::NetworkDataTask::failureTimerFired):
(WebKit::NetworkDataTask::suggestedFilename):
(WebKit::NetworkDataTask::setSuggestedFilename):
(WebKit::NetworkDataTask::setPendingDownloadLocation):
(WebKit::NetworkDataTask::allowsSpecificHTTPSCertificateForHost):
(WebKit::NetworkDataTask::createRequest):
(WebKit::NetworkDataTask::clearRequest):
(WebKit::NetworkDataTask::resume):
(WebKit::NetworkDataTask::suspend):
(WebKit::NetworkDataTask::cancel):
(WebKit::NetworkDataTask::invalidateAndCancel):
(WebKit::NetworkDataTask::state):
(WebKit::NetworkDataTask::timeoutFired):
(WebKit::NetworkDataTask::startTimeout):
(WebKit::NetworkDataTask::stopTimeout):
(WebKit::NetworkDataTask::sendRequestCallback):
(WebKit::NetworkDataTask::didSendRequest):
(WebKit::NetworkDataTask::didReceiveResponse):
(WebKit::NetworkDataTask::tlsErrorsChangedCallback):
(WebKit::NetworkDataTask::tlsErrorsChanged):
(WebKit::NetworkDataTask::applyAuthenticationToRequest):
(WebKit::NetworkDataTask::authenticateCallback):
(WebKit::isAuthenticationFailureStatusCode):
(WebKit::NetworkDataTask::authenticate):
(WebKit::NetworkDataTask::continueAuthenticate):
(WebKit::NetworkDataTask::skipInputStreamForRedirectionCallback):
(WebKit::NetworkDataTask::skipInputStreamForRedirection):
(WebKit::NetworkDataTask::didFinishSkipInputStreamForRedirection):
(WebKit::shouldRedirectAsGET):
(WebKit::NetworkDataTask::shouldStartHTTPRedirection):
(WebKit::NetworkDataTask::continueHTTPRedirection):
(WebKit::NetworkDataTask::readCallback):
(WebKit::NetworkDataTask::read):
(WebKit::NetworkDataTask::didRead):
(WebKit::NetworkDataTask::didFinishRead):
(WebKit::NetworkDataTask::requestNextPartCallback):
(WebKit::NetworkDataTask::requestNextPart):
(WebKit::NetworkDataTask::didRequestNextPart):
(WebKit::NetworkDataTask::didFinishRequestNextPart):
(WebKit::NetworkDataTask::gotHeadersCallback):
(WebKit::NetworkDataTask::didGetHeaders):
(WebKit::NetworkDataTask::wroteBodyDataCallback):
(WebKit::NetworkDataTask::didWriteBodyData):
(WebKit::NetworkDataTask::download):
(WebKit::NetworkDataTask::writeDownloadCallback):
(WebKit::NetworkDataTask::writeDownload):
(WebKit::NetworkDataTask::didWriteDownload):
(WebKit::NetworkDataTask::didFinishDownload):
(WebKit::NetworkDataTask::didFailDownload):
(WebKit::NetworkDataTask::cleanDownloadFiles):
(WebKit::NetworkDataTask::didFail):
(WebKit::NetworkDataTask::networkEventCallback):
(WebKit::NetworkDataTask::networkEvent):
(WebKit::NetworkDataTask::startingCallback):
(WebKit::NetworkDataTask::requestStartedCallback):
(WebKit::NetworkDataTask::didStartRequest):
(WebKit::NetworkDataTask::restartedCallback):
(WebKit::NetworkDataTask::didRestart):

  • NetworkProcess/soup/NetworkSessionSoup.cpp:

(WebKit::NetworkSession::create):
(WebKit::NetworkSession::defaultSession):
(WebKit::NetworkSession::networkStorageSession):
(WebKit::NetworkSession::NetworkSession):
(WebKit::NetworkSession::~NetworkSession):
(WebKit::NetworkSession::soupSession):
(WebKit::NetworkSession::invalidateAndCancel):
(WebKit::NetworkSession::clearCredentials):

  • NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:

(WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession): Add implementation matching
WebFrameNetworkingContext::ensurePrivateBrowsingSession().
(WebKit::RemoteNetworkingContext::storageSession): Do not always return the default session if the given one is
in the global map.

  • PlatformEfl.cmake: Ad new files to compilation.
  • PlatformGTK.cmake: Ditto.
  • WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:

(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession): Also create a NetworkSession.

  • config.h: Enable NetworkSession unconditionally for Soup based ports.
11:05 PM Changeset in webkit [207585] by achristensen@apple.com
  • 79 edits
    3 adds in trunk

Revert r207151
https://bugs.webkit.org/show_bug.cgi?id=163675

Reviewed by Brent Fulgham.

.:

  • Source/cmake/OptionsAppleWin.cmake:

Source/WebCore:

This code is still useful for comparison with Windows. I'll remove it again soon.

No new tests. No change in behavior.

  • WebCore.xcodeproj/project.pbxproj:
  • WebCorePrefix.h:
  • loader/DocumentLoader.h:
  • loader/EmptyClients.h:
  • loader/FrameLoaderClient.h:
  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::didReceiveAuthenticationChallenge):

  • loader/ResourceLoader.h:
  • loader/SubresourceLoader.h:
  • loader/cf/ResourceLoaderCFNet.cpp:
  • loader/cocoa/SubresourceLoaderCocoa.mm:

(WebCore::SubresourceLoader::willCacheResponse):

  • loader/mac/DocumentLoaderMac.cpp:
  • loader/mac/ResourceLoaderMac.mm:

(WebCore::ResourceLoader::willCacheResponse):

  • page/mac/PageMac.mm:

(WebCore::Page::platformInitialize):
(WebCore::Page::addSchedulePair):
(WebCore::Page::removeSchedulePair):

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::WebCoreNSURLAuthenticationChallengeClient::create):
(WebCore::WebCoreNSURLAuthenticationChallengeClient::WebCoreNSURLAuthenticationChallengeClient):
(WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForResponseToAuthenticationChallenge):

  • platform/mac/WebCoreSystemInterface.h:
  • platform/network/NetworkStorageSession.h:
  • platform/network/ProtectionSpace.h:
  • platform/network/ProtectionSpaceBase.cpp:
  • platform/network/ResourceHandle.cpp:
  • platform/network/ResourceHandle.h:
  • platform/network/ResourceHandleClient.cpp:
  • platform/network/ResourceHandleClient.h:
  • platform/network/ResourceHandleInternal.h:

(WebCore::ResourceHandleInternal::ResourceHandleInternal):

  • platform/network/ResourceRequestBase.cpp:
  • platform/network/cf/AuthenticationCF.cpp:

(WebCore::AuthenticationChallenge::AuthenticationChallenge):
(WebCore::AuthenticationChallenge::setAuthenticationClient): Deleted.
(WebCore::AuthenticationChallenge::authenticationClient): Deleted.
(WebCore::AuthenticationChallenge::platformCompare): Deleted.
(WebCore::createCF): Deleted.
(WebCore::core): Deleted.

  • platform/network/cf/AuthenticationCF.h:
  • platform/network/cf/AuthenticationChallenge.h:
  • platform/network/cf/CookieJarCFNet.cpp:
  • platform/network/cf/CredentialStorageCFNet.cpp:

(WebCore::CredentialStorage::getFromPersistentStorage):
(WebCore::CredentialStorage::saveToPersistentStorage):

  • platform/network/cf/LoaderRunLoopCF.cpp:
  • platform/network/cf/LoaderRunLoopCF.h:
  • platform/network/cf/NetworkStorageSessionCFNet.cpp:

(WebCore::NetworkStorageSession::cookieStorage):

  • platform/network/cf/ProtectionSpaceCFNet.cpp:
  • platform/network/cf/ProtectionSpaceCFNet.h:
  • platform/network/cf/ResourceError.h:
  • platform/network/cf/ResourceErrorCF.cpp:
  • platform/network/cf/ResourceHandleCFNet.cpp:

(WebCore::shouldSniffConnectionProperty):
(WebCore::ResourceHandle::createCFURLConnection):
(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
(WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication):
(WebCore::ResourceHandle::receivedCredential):
(WebCore::ResourceHandle::schedule):
(WebCore::ResourceHandle::unschedule):

  • platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
  • platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
  • platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:

(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):

  • platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h:
  • platform/network/cf/ResourceRequest.h:

(WebCore::ResourceRequest::encodingRequiresPlatformData):

  • platform/network/cf/ResourceRequestCFNet.cpp:

(WebCore::findCFURLRequestSetContentDispositionEncodingFallbackArrayFunction):
(WebCore::findCFURLRequestCopyContentDispositionEncodingFallbackArrayFunction):
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::ResourceRequest::setStorageSession):

  • platform/network/cf/ResourceRequestCFNet.h:
  • platform/network/cf/ResourceResponse.h:
  • platform/network/cf/ResourceResponseCFNet.cpp:

(WebCore::ResourceResponse::cfURLResponse):

  • platform/network/cf/SynchronousLoaderClientCFNet.cpp:
  • platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:

(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupRequest):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupConnectionScheduling):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willCacheResponse):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpace):

  • platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h:
  • platform/network/cocoa/CredentialCocoa.h:
  • platform/network/cocoa/CredentialCocoa.mm:

(WebCore::Credential::Credential):
(WebCore::Credential::cfCredential):

  • platform/network/cocoa/ProtectionSpaceCocoa.h:
  • platform/network/cocoa/ProtectionSpaceCocoa.mm:

(WebCore::ProtectionSpace::ProtectionSpace):
(WebCore::ProtectionSpace::cfSpace):

  • platform/network/cocoa/ResourceRequestCocoa.mm:

(WebCore::ResourceRequest::nsURLRequest):

  • platform/network/cocoa/ResourceResponseCocoa.mm:

(WebCore::ResourceResponse::platformCertificateInfo):
(WebCore::ResourceResponse::nsURLResponse):
(WebCore::ResourceResponse::ResourceResponse):

  • platform/network/ios/QuickLook.h:
  • platform/network/ios/QuickLook.mm:

(-[WebQuickLookHandleAsDelegate initWithConnectionDelegate:]):
(-[WebQuickLookHandleAsDelegate connection:didReceiveDataArray:]):
(-[WebQuickLookHandleAsDelegate connection:didReceiveData:lengthReceived:]):
(-[WebQuickLookHandleAsDelegate connectionDidFinishLoading:]):
(-[WebQuickLookHandleAsDelegate connection:didFailWithError:]):
(-[WebQuickLookHandleAsDelegate detachHandle]):
(WebCore::QuickLookHandle::create):
(WebCore::QuickLookHandle::cfResponse):

  • platform/network/mac/AuthenticationMac.mm:

(-[WebCoreAuthenticationClientAsChallengeSender setCFChallenge:]):
(-[WebCoreAuthenticationClientAsChallengeSender cfChallenge]):
(WebCore::core):
(WebCore::mac):

  • platform/network/mac/CookieJarMac.mm:

(WebCore::setCookiesFromDOM):
(WebCore::addCookie):
(WebCore::cookieStorage):

  • platform/network/mac/CredentialStorageMac.mm:
  • platform/network/mac/FormDataStreamMac.h:
  • platform/network/mac/FormDataStreamMac.mm:
  • platform/network/mac/ResourceErrorMac.mm:

(NSErrorFromCFError):
(WebCore::ResourceError::ResourceError):
(WebCore::ResourceError::nsError):
(WebCore::ResourceError::operator NSError *):

  • platform/network/mac/ResourceHandleMac.mm:

(WebCore::ResourceHandle::getConnectionTimingData):

  • platform/network/mac/ResourceRequestMac.mm: Added.

(WebCore::ResourceRequest::ResourceRequest):
(WebCore::ResourceRequest::updateNSURLRequest):

  • platform/network/mac/SynchronousLoaderClient.mm:
  • platform/network/mac/WebCoreResourceHandleAsDelegate.h:
  • platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
  • platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
  • platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
  • platform/network/mac/WebCoreURLResponse.mm:
  • platform/win/TemporaryLinkStubs.cpp:
  • testing/js/WebCoreTestSupportPrefix.h:

Source/WebKit:

  • WebCoreSupport/WebResourceLoadScheduler.cpp:

(WebResourceLoadScheduler::scheduleLoad):

Source/WebKit/mac:

  • Misc/WebDownload.mm:

(-[WebDownload _initWithLoadingCFURLConnection:request:response:delegate:proxy:]):

  • Misc/WebDownloadInternal.h:
  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::convertMainResourceLoadToDownload):

  • WebView/WebPreferences.mm:

(+[WebPreferences _setCurrentNetworkLoaderSessionCookieAcceptPolicy:]):

  • WebView/WebView.mm:

(-[WebView scheduleInRunLoop:forMode:]):
(-[WebView unscheduleFromRunLoop:forMode:]):

Source/WebKit/win:

  • DefaultDownloadDelegate.h:
  • WebCoreSupport/WebFrameLoaderClient.cpp:

(WebFrameLoaderClient::savePlatformDataToCachedFrame):

  • WebCoreSupport/WebFrameNetworkingContext.cpp:

(WebFrameNetworkingContext::ensurePrivateBrowsingSession):

  • WebCoreSupport/WebFrameNetworkingContext.h:
  • WebCoreSupport/WebPlatformStrategies.cpp:
  • WebDownload.h:
  • WebError.cpp:

(WebError::localizedDescription):
(WebError::sslPeerCertificate):

  • WebError.h:
  • WebMutableURLRequest.cpp:

(WebMutableURLRequest::mutableCopy):

  • WebURLAuthenticationChallenge.cpp:

(WebURLAuthenticationChallenge::initWithProtectionSpace):
(WebURLAuthenticationChallenge::initWithAuthenticationChallenge):

  • WebURLResponse.cpp:

(WebURLResponse::sslPeerCertificate):

  • WebURLResponse.h:
  • WebView.cpp:

(WebView::setCacheModel):
(WebView::canHandleRequest):
(WebView::notifyPreferencesChanged):
(updateSharedSettingsFromPreferencesIfNeeded):

Source/WebKit2:

  • NetworkProcess/Downloads/Download.h:
  • NetworkProcess/Downloads/mac/DownloadMac.mm:
  • NetworkProcess/NetworkLoad.h:
  • NetworkProcess/mac/NetworkLoadMac.mm:

(WebKit::NetworkLoad::willCacheResponseAsync):

  • Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm:

(WebKit::AuthenticationManager::receivedCredential):
(WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
(WebKit::AuthenticationManager::receivedCancellation):
(WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
(WebKit::AuthenticationManager::receivedChallengeRejection):

  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):

  • Shared/WebProcessCreationParameters.h:
  • Shared/mac/WebCoreArgumentCodersMac.mm:

(IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):

  • WebKit2.xcodeproj/project.pbxproj:

Source/WTF:

  • wtf/Platform.h:
  • wtf/SchedulePair.h:
  • wtf/SchedulePairMac.mm:
8:10 PM Changeset in webkit [207584] by jer.noble@apple.com
  • 6 edits
    2 adds in trunk

REGRESSION (r206025): All YouTube videos play with black bars on all four sides
https://bugs.webkit.org/show_bug.cgi?id=163308

Reviewed by Darin Adler.

Source/WebCore:

Test: media/media-source/media-source-resize.html

After r206025, we do not fire resize events when the size change notification happens equal-
to-or-before the current time, which can happen at the very beginning of a stream. Take care
of this case by checking that the target time isn't actually in the past inside of
sizeWillChangeAtTime(), and also always skip the boundary time observer when there was no
previous size (such as after a flush due to a seek).

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::sizeWillChangeAtTime):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setNaturalSize):

  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:

(WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples):
(WebCore::SourceBufferPrivateAVFObjC::enqueueSample):

LayoutTests:

  • media/media-source/media-source-resize-expected.txt: Added.
  • media/media-source/media-source-resize.html: Added.
7:33 PM Changeset in webkit [207583] by n_wang@apple.com
  • 11 edits
    1 add in trunk

AX: [Mac] Mark element AXAPI should comform to specs
https://bugs.webkit.org/show_bug.cgi?id=163707

Reviewed by Chris Fleizach.

Source/WebCore:

Created a new role for mark elements on Mac and exposed the role
description.

Changes are covered in modified test expectaions.

  • English.lproj/Localizable.strings:
  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::determineAccessibilityRole):

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):

  • accessibility/mac/AccessibilityObjectMac.mm:

(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(createAccessibilityRoleMap):
(-[WebAccessibilityObjectWrapper roleDescription]):

  • platform/LocalizedStrings.cpp:

(WebCore::AXMarkText):

  • platform/LocalizedStrings.h:

LayoutTests:

Added the modified roles-computedRoleString-expected.txt in mac platform so
that the exposed mark element won't affect other platform.

  • platform/mac/accessibility/roles-computedRoleString-expected.txt: Added.
  • platform/mac/accessibility/roles-exposed-expected.txt:
5:47 PM Changeset in webkit [207582] by commit-queue@webkit.org
  • 9 edits in trunk

Re-enable URLParser for non-Safari Cocoa apps after r207321
https://bugs.webkit.org/show_bug.cgi?id=163690

Patch by Alex Christensen <achristensen@webkit.org> on 2016-10-19
Reviewed by Darin Adler.

Source/WebCore:

I disabled the URLParser for non-Safari applications in r207305
to give me time to make URLParser more compatible, which I did in r207321

Updated some API tests which will be investigated in
https://bugs.webkit.org/show_bug.cgi?id=163127

  • platform/URLParser.cpp:

(WebCore::URLParser::setEnabled):
(WebCore::URLParser::enabled):

  • testing/js/WebCoreTestSupport.cpp:

(WebCoreTestSupport::setURLParserEnabled): Deleted.

  • testing/js/WebCoreTestSupport.h:

Tools:

  • DumpRenderTree/mac/DumpRenderTree.mm:

(DumpRenderTreeMain):

  • TestWebKitAPI/Tests/WebKit2Cocoa/LoadInvalidURLRequest.mm:

(-[LoadInvalidURLNavigationActionDelegate webView:didFailProvisionalNavigation:withError:]):

  • TestWebKitAPI/Tests/mac/LoadInvalidURLRequest.mm:

(TestWebKitAPI::TEST):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::TestController):

5:39 PM Changeset in webkit [207581] by mmaxfield@apple.com
  • 3 edits
    2 adds in trunk

CSS font-variation-settings does not handle uppercase axis names in variable fonts
https://bugs.webkit.org/show_bug.cgi?id=163546

Reviewed by Dean Jackson.

Source/WebCore:

Remove the extra toASCIILower() call.

Test: fast/text/variations/case-axis-names.html

  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseFontVariationTag):

LayoutTests:

  • fast/text/variations/case-axis-names-expected.html: Added.
  • fast/text/variations/case-axis-names.html: Added.
5:31 PM Changeset in webkit [207580] by andersca@apple.com
  • 3 edits in trunk/Source/WebCore

Remove m_redirectURLs from HistoryItem
https://bugs.webkit.org/show_bug.cgi?id=163704

Reviewed by Dan Bernstein.

  • history/HistoryItem.cpp:

(WebCore::HistoryItem::HistoryItem):
(WebCore::HistoryItem::reset):

  • history/HistoryItem.h:
4:55 PM Changeset in webkit [207579] by Chris Dumez
  • 5 edits in trunk/Source/WebKit2

[WK2] Expose suggested filename via WKBundleHitTestResult API
https://bugs.webkit.org/show_bug.cgi?id=163693
<rdar://problem/28840734>

Reviewed by Anders Carlsson.

Expose suggested filename via WKBundleHitTestResult API. The implementation
currently relies on the 'download' attribute on anchor / area elements
that we recently started supporting.

  • WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:

(WKBundleHitTestResultCopyLinkSuggestedFilename):

  • WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
  • WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:

(WebKit::InjectedBundleHitTestResult::create):
(WebKit::InjectedBundleHitTestResult::mediaType):
(WebKit::InjectedBundleHitTestResult::linkSuggestedFilename):
(WebKit::InjectedBundleHitTestResult::imageRect):

  • WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
4:49 PM Changeset in webkit [207578] by joone.hur@intel.com
  • 19 edits in trunk

Add a plain space instead of &nbsp; between text nodes
https://bugs.webkit.org/show_bug.cgi?id=123163

Reviewed by Ryosuke Niwa.

When we rebalance white spaces, &nbsp; can be added as space
under some conditions. This patch adds a condition that the next
sibling text node should not exist.

Source/WebCore:

No new tests, updated existing test.

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring):

  • editing/htmlediting.cpp:

(WebCore::stringWithRebalancedWhitespace):

  • editing/htmlediting.h:

LayoutTests:

  • accessibility/mac/find-and-replace-match-capitalization-expected.txt:
  • accessibility/mac/find-and-replace-match-capitalization.html:
  • accessibility/mac/select-text/select-text-135575-expected.txt:
  • accessibility/mac/select-text/select-text-7-expected.txt:
  • accessibility/mac/select-text/select-text-8-expected.txt:
  • accessibility/mac/select-text/select-text-9-expected.txt:
  • editing/mac/spelling/autocorrection-blockquote-crash-expected.txt:
  • editing/pasteboard/paste-text-003-expected.txt:
  • platform/gtk/editing/execCommand/paste-1-expected.txt:
  • platform/gtk/editing/pasteboard/paste-2-expected.txt:
  • platform/gtk/editing/pasteboard/unrendered-br-expected.txt:
  • platform/mac/editing/execCommand/paste-1-expected.txt:
  • platform/mac/editing/pasteboard/paste-2-expected.txt:
  • platform/mac/editing/pasteboard/unrendered-br-expected.txt:
4:37 PM Changeset in webkit [207577] by fpizlo@apple.com
  • 2 edits in trunk/Source/WTF

REGRESSION (r207480): 3 Dromaeo tests failing
https://bugs.webkit.org/show_bug.cgi?id=163633

Reviewed by Mark Lam.

It's a ParkingLot bug: if we timeout and get unparked at the same time, then the unparking
thread will clear our address eventually - but not immediately. This causes a nasty
assertion failure. The tricky thing is that when we detect this, we need to wait until that
unparking thread does the deed. Otherwise, they will still do it at some later time.

Alternatively, we could use some kind of versioning to detect this - increment the version
when you park, so that unparking threads will know if they are time travelers. That seems
more yucky.

I don't think it matters too much what we do here, so long as it's simple and correct, since
this requires a race that is rare enough that it didn't happen once in my testing, and I was
pretty thorough. For example, it didn't happen once in 15 runs of JetStream. The race is
rare because it requires the timeout to happen right as someone else is unparking. Since
it's so rare, its probably OK that the unparked thread waits just a tiny moment until the
unparking thread is done.

  • wtf/ParkingLot.cpp:

(WTF::ParkingLot::parkConditionallyImpl):
(WTF::ParkingLot::unparkOneImpl):

4:34 PM Changeset in webkit [207576] by jfbastien@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

create_hash_table: allow empty tables

The Windows build was broken by because I added empty tables and Windows insists that empty tables are horrible. Put in dummy entries in that case.

create_hash_table: allow empty tables
https://bugs.webkit.org/show_bug.cgi?id=163701

Reviewed by Keith Miller.

  • create_hash_table:
4:31 PM Changeset in webkit [207575] by weinig@apple.com
  • 12 edits in trunk

Add support for sequences and dictionaries in unions
https://bugs.webkit.org/show_bug.cgi?id=163695

Reviewed by Chris Dumez.

Source/WebCore:

Tests:

  • Updated js/dom/webidl-type-mapping.html
  • bindings/generic/IDLTypes.h:

Add additional helper predicates and fix formatting.

  • bindings/js/JSDOMBinding.h:

Export hasIteratorMethod for use in testing.

  • bindings/js/JSDOMConvert.h:
  • Change return type of Converter<IDLDictionary<T>> to T, from Optional<T>.
  • Add support for unions conversion step 12 (parts 1-3).
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateDefaultValue):
Support complex default value computations for unions using the convert infrastructure.

(GenerateParametersCheck):
(GenerateConstructorDefinition):
Remove incorrect .value() calls now that Converter<IDLDictionary<T>> returns T.

  • bindings/scripts/test/JS/JSTestEventConstructor.cpp:
  • bindings/scripts/test/JS/JSTestObj.cpp:

Update bindings test results.

  • testing/TypeConversions.h:

(WebCore::TypeConversions::setTypeConversionsDictionary):
(WebCore::TypeConversions::typeConversionsDictionaryLongValue):
(WebCore::TypeConversions::typeConversionsDictionaryStringValue):
(WebCore::TypeConversions::typeConversionsDictionarySequenceValue):
(WebCore::TypeConversions::typeConversionsDictionaryUnionType):

  • testing/TypeConversions.idl:

Add some complex types to allow testing IDL conversions from tests.

LayoutTests:

  • js/dom/webidl-type-mapping-expected.txt:
  • js/dom/webidl-type-mapping.html:

Add tests for more complex conversions.

4:01 PM Changeset in webkit [207574] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking platform/mac-wk2/plugins/muted-state.html as failing.
https://bugs.webkit.org/show_bug.cgi?id=163702

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
3:28 PM Changeset in webkit [207573] by dino@apple.com
  • 3 edits
    372 adds in trunk/LayoutTests

Import W3C CSS Shapes tests
https://bugs.webkit.org/show_bug.cgi?id=163697

Rubberstamped by Anders Carlsson.

LayoutTests/imported/w3c:

They are marked as skipped for the moment, since we don't yet
support the unprefixed form.

  • csswg-test/css-shapes-1/shape-outside-invalid-001.html: Added.
  • csswg-test/css-shapes-1/shape-outside-invalid-circle-000.html: Added.
  • csswg-test/css-shapes-1/shape-outside-invalid-circle-001.html: Added.
  • csswg-test/css-shapes-1/shape-outside-invalid-circle-002.html: Added.
  • csswg-test/css-shapes-1/shape-outside-invalid-circle-003.html: Added.
  • csswg-test/css-shapes-1/shape-outside-invalid-ellipse-001.html: Added.
  • csswg-test/css-shapes-1/shape-outside-invalid-ellipse-002.html: Added.
  • csswg-test/css-shapes-1/shape-outside-invalid-ellipse-003.html: Added.
  • csswg-test/css-shapes-1/shape-outside-invalid-ellipse-004.html: Added.
  • csswg-test/css-shapes-1/shape-outside-invalid-ellipse-005.html: Added.
  • csswg-test/css-shapes-1/shape-outside-invalid-ellipse-006.html: Added.
  • csswg-test/css-shapes-1/shape-outside-invalid-inset-001.html: Added.
  • csswg-test/css-shapes-1/shape-outside-invalid-inset-002.html: Added.
  • csswg-test/css-shapes-1/shape-outside-invalid-inset-003.html: Added.
  • csswg-test/css-shapes-1/shape-outside-invalid-inset-004.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-box/shape-outside-box-002-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-box/shape-outside-box-002.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-box/shape-outside-box-003-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-box/shape-outside-box-003.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-box/shape-outside-box-004-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-box/shape-outside-box-004.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-box/shape-outside-box-006-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-box/shape-outside-box-006.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-box/shape-outside-box-007-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-box/shape-outside-box-007.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-box/shape-outside-box-008-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-box/shape-outside-box-008.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-box/w3c-import.log: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/gradients/shape-outside-linear-gradient-001-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/gradients/shape-outside-linear-gradient-001.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/gradients/shape-outside-linear-gradient-002-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/gradients/shape-outside-linear-gradient-002.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/gradients/shape-outside-linear-gradient-003-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/gradients/shape-outside-linear-gradient-003.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/gradients/shape-outside-linear-gradient-004-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/gradients/shape-outside-linear-gradient-004.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/gradients/shape-outside-radial-gradient-001.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/gradients/shape-outside-radial-gradient-002.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/gradients/shape-outside-radial-gradient-003.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/gradients/shape-outside-radial-gradient-004.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/gradients/w3c-import.log: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-000-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-000.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-001-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-001.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-002-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-002.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-003-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-003.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-004-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-004.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-005-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-005.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-006-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-006.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-007-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-007.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-008-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-008.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-009-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-009.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-010-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-010.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-011-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-011.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-012-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-012.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-013-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-013.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-014-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-014.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-015-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-015.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-016-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-016.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-017-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-017.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-018-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-018.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-019-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-019.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-020-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-020.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-021-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-021.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-022-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-022.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-023-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-023.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-024-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-024.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-025-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/shape-image-025.html: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/support/animated.gif: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/support/left-half-rectangle-20.png: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/support/left-half-rectangle-20.svg: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/support/left-half-rectangle-50.png: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/support/left-half-rectangle-50.svg: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/support/left-half-rectangle-70.png: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/support/left-half-rectangle-70.svg: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/support/left-half-rectangle.jpg: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/support/left-half-rectangle.png: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/support/left-half-rectangle.svg: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/support/right-half-rectangle-20.png: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/support/right-half-rectangle-50.png: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/support/right-half-rectangle-70.png: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/support/right-half-rectangle-70.svg: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/support/right-half-rectangle.gif: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/support/right-half-rectangle.jpg: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/support/right-half-rectangle.png: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/support/right-half-rectangle.svg: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/support/w3c-import.log: Added.
  • csswg-test/css-shapes-1/shape-outside/shape-image/w3c-import.log: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-013-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-013.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-014-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-014.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-015-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-015.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-016-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-016.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-017-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-017.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-018-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-018.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-019-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-019.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-020-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-020.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-021-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-021.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-022-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-022.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-024-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-024.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-025-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-025.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-026-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-026.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-027-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-027.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-028-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-028.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-029-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-029.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-030-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-030.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-031-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/shape-outside-circle-031.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/circle/w3c-import.log: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-013-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-013.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-014-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-014.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-015-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-015.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-016-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-016.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-017-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-017.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-018-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-018.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-019-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-019.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-020-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-020.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-021-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-021.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-022-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-022.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-023-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-023.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-024-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-024.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-025-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-025.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-030-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-030.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-031-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/shape-outside-ellipse-031.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/ellipse/w3c-import.log: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/inset/shape-outside-inset-010-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/inset/shape-outside-inset-010.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/inset/shape-outside-inset-011-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/inset/shape-outside-inset-011.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/inset/shape-outside-inset-012-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/inset/shape-outside-inset-012.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/inset/shape-outside-inset-013-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/inset/shape-outside-inset-013.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/inset/shape-outside-inset-014-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/inset/shape-outside-inset-014.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/inset/shape-outside-inset-015-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/inset/shape-outside-inset-015.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/inset/w3c-import.log: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/polygon/shape-outside-polygon-007-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/polygon/shape-outside-polygon-007.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/polygon/shape-outside-polygon-008-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/polygon/shape-outside-polygon-008.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/polygon/shape-outside-polygon-009-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/polygon/shape-outside-polygon-009.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/polygon/shape-outside-polygon-010-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/polygon/shape-outside-polygon-010.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/polygon/shape-outside-polygon-011-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/polygon/shape-outside-polygon-011.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/polygon/shape-outside-polygon-012-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/polygon/shape-outside-polygon-012.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/polygon/shape-outside-polygon-013-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/polygon/shape-outside-polygon-013.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/polygon/shape-outside-polygon-014-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/polygon/shape-outside-polygon-014.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/polygon/shape-outside-polygon-015-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/polygon/shape-outside-polygon-015.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/polygon/shape-outside-polygon-016-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/polygon/shape-outside-polygon-016.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/polygon/shape-outside-polygon-017-expected.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/polygon/shape-outside-polygon-017.html: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/polygon/w3c-import.log: Added.
  • csswg-test/css-shapes-1/shape-outside/supported-shapes/support/rounded-rectangle.js: Added.

(ellipseXIntercept):
(scanConvertRoundedRectangleOutside):
(genLeftRoundedRectFloatShapeOutsideRefTest):
(getRoundedRectLeftEdge):
(genRightRoundedRectFloatShapeOutsideRefTest):

  • csswg-test/css-shapes-1/shape-outside/supported-shapes/support/subpixel-utils.js: Added.

(isEnabled):
(return.snapToLayoutUnit):
(return.ceilSnapToLayoutUnit):
(SubPixelLayout):

  • csswg-test/css-shapes-1/shape-outside/supported-shapes/support/test-utils.js: Added.

(verifyTextPoints):

  • csswg-test/css-shapes-1/shape-outside/supported-shapes/support/w3c-import.log: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-image-threshold-000.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-image-threshold-001.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-image-threshold-002.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-image-threshold-003.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-margin-000.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-margin-001.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-margin-002.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-margin-003.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-margin-004.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-margin-005.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-box-000.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-circle-000.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-circle-001.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-circle-002.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-circle-003.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-circle-004.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-circle-005.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-circle-006.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-circle-007.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-circle-008.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-circle-009.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-circle-010.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-circle-011.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-computed-shape-000.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-computed-shape-001.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-ellipse-000.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-ellipse-001.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-ellipse-002.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-ellipse-003.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-ellipse-004.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-ellipse-005.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-ellipse-006.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-ellipse-007.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-ellipse-008.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-ellipse-009.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-ellipse-010.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-ellipse-011.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-inset-000.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-inset-001.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-inset-002.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-inset-003.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-inset-004.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-inset-005.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-inset-006.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-inset-007.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-inset-008.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-inset-009.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-polygon-000.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-polygon-001.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-polygon-002.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-polygon-003.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-polygon-004.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-polygon-005.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-polygon-006.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-shape-arguments-000.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-shape-arguments-001.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-shape-box-pair-000.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-shape-inherit-000.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-shape-initial-000.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-shape-none-000.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/shape-outside-shape-notation-000.html: Added.
  • csswg-test/css-shapes-1/shape-outside/values/support/parsing-utils.js: Added.

(testComputedStyle):
(testShapeMarginComputedStyle):
(testShapeThresholdComputedStyle):
(buildPositionTests):
(buildRadiiTests):
(buildInsetTests):
(buildCalcTests):
(unique):
(setUnit):
(convertToPx):
(roundResultStr):
(insetRound):
(serializedInsetRound):
(generateInsetRoundCases):

  • csswg-test/css-shapes-1/shape-outside/values/support/w3c-import.log: Added.
  • csswg-test/css-shapes-1/shape-outside/values/w3c-import.log: Added.
  • csswg-test/css-shapes-1/spec-examples/shape-outside-001-expected.html: Added.
  • csswg-test/css-shapes-1/spec-examples/shape-outside-001.html: Added.
  • csswg-test/css-shapes-1/spec-examples/shape-outside-002-expected.html: Added.
  • csswg-test/css-shapes-1/spec-examples/shape-outside-002.html: Added.
  • csswg-test/css-shapes-1/spec-examples/shape-outside-003-expected.html: Added.
  • csswg-test/css-shapes-1/spec-examples/shape-outside-003.html: Added.
  • csswg-test/css-shapes-1/spec-examples/shape-outside-004-expected.html: Added.
  • csswg-test/css-shapes-1/spec-examples/shape-outside-004.html: Added.
  • csswg-test/css-shapes-1/spec-examples/shape-outside-005-expected.html: Added.
  • csswg-test/css-shapes-1/spec-examples/shape-outside-005.html: Added.
  • csswg-test/css-shapes-1/spec-examples/shape-outside-006-expected.html: Added.
  • csswg-test/css-shapes-1/spec-examples/shape-outside-006.html: Added.
  • csswg-test/css-shapes-1/spec-examples/shape-outside-007-expected.html: Added.
  • csswg-test/css-shapes-1/spec-examples/shape-outside-007.html: Added.
  • csswg-test/css-shapes-1/spec-examples/shape-outside-008-expected.html: Added.
  • csswg-test/css-shapes-1/spec-examples/shape-outside-008.html: Added.
  • csswg-test/css-shapes-1/spec-examples/shape-outside-010.html: Added.
  • csswg-test/css-shapes-1/spec-examples/shape-outside-011.html: Added.
  • csswg-test/css-shapes-1/spec-examples/shape-outside-012.html: Added.
  • csswg-test/css-shapes-1/spec-examples/shape-outside-013.html: Added.
  • csswg-test/css-shapes-1/spec-examples/shape-outside-014.html: Added.
  • csswg-test/css-shapes-1/spec-examples/shape-outside-015.html: Added.
  • csswg-test/css-shapes-1/spec-examples/shape-outside-016.html: Added.
  • csswg-test/css-shapes-1/spec-examples/shape-outside-017.html: Added.
  • csswg-test/css-shapes-1/spec-examples/shape-outside-018.html: Added.
  • csswg-test/css-shapes-1/spec-examples/shape-outside-019.html: Added.
  • csswg-test/css-shapes-1/spec-examples/support/circle-no-shadow.png: Added.
  • csswg-test/css-shapes-1/spec-examples/support/circle-shadow.png: Added.
  • csswg-test/css-shapes-1/spec-examples/support/rounded-triangle.svg: Added.
  • csswg-test/css-shapes-1/spec-examples/support/spec-example-utils.js: Added.

(runTest):
(approxShapeTest):

  • csswg-test/css-shapes-1/spec-examples/support/w3c-import.log: Added.
  • csswg-test/css-shapes-1/spec-examples/w3c-import.log: Added.
  • csswg-test/css-shapes-1/support/1x1-green.png: Added.
  • csswg-test/css-shapes-1/support/1x1-lime.png: Added.
  • csswg-test/css-shapes-1/support/1x1-maroon.png: Added.
  • csswg-test/css-shapes-1/support/1x1-navy.png: Added.
  • csswg-test/css-shapes-1/support/1x1-red.png: Added.
  • csswg-test/css-shapes-1/support/1x1-white.png: Added.
  • csswg-test/css-shapes-1/support/60x60-gg-rr.png: Added.
  • csswg-test/css-shapes-1/support/60x60-green.png: Added.
  • csswg-test/css-shapes-1/support/60x60-red.png: Added.
  • csswg-test/css-shapes-1/support/README: Added.
  • csswg-test/css-shapes-1/support/a-green.css: Added.

(.a):

  • csswg-test/css-shapes-1/support/b-green.css: Added.

(.b):

  • csswg-test/css-shapes-1/support/c-red.css: Added.

(.c):

  • csswg-test/css-shapes-1/support/cat.png: Added.
  • csswg-test/css-shapes-1/support/pattern-grg-rgr-grg.png: Added.
  • csswg-test/css-shapes-1/support/pattern-grg-rrg-rgg.png: Added.
  • csswg-test/css-shapes-1/support/pattern-rgr-grg-rgr.png: Added.
  • csswg-test/css-shapes-1/support/pattern-tr.png: Added.
  • csswg-test/css-shapes-1/support/square-purple.png: Added.
  • csswg-test/css-shapes-1/support/square-teal.png: Added.
  • csswg-test/css-shapes-1/support/square-white.png: Added.
  • csswg-test/css-shapes-1/support/swatch-blue.png: Added.
  • csswg-test/css-shapes-1/support/swatch-green.png: Added.
  • csswg-test/css-shapes-1/support/swatch-lime.png: Added.
  • csswg-test/css-shapes-1/support/swatch-orange.png: Added.
  • csswg-test/css-shapes-1/support/swatch-red.png: Added.
  • csswg-test/css-shapes-1/support/swatch-white.png: Added.
  • csswg-test/css-shapes-1/support/swatch-yellow.png: Added.
  • csswg-test/css-shapes-1/support/test-bl.png: Added.
  • csswg-test/css-shapes-1/support/test-br.png: Added.
  • csswg-test/css-shapes-1/support/test-outer.png: Added.
  • csswg-test/css-shapes-1/support/test-tl.png: Added.
  • csswg-test/css-shapes-1/support/test-tr.png: Added.
  • csswg-test/css-shapes-1/support/w3c-import.log: Added.
  • csswg-test/css-shapes-1/test-plan/index.html: Added.
  • csswg-test/css-shapes-1/test-plan/w3c-import.log: Added.
  • csswg-test/css-shapes-1/w3c-import.log: Added.

LayoutTests:

3:11 PM Changeset in webkit [207572] by jfbastien@apple.com
  • 15 edits
    30 copies
    7 adds in trunk

JavaScript WebAssembly API: baby steps

  • Expand WebAssembly constructors into their own files. This requires a lot of boilerplate, as well as adding the .lut.h files. All of the JSWebAssembly*.{h,cpp}, as well as Constructor and Prototype files, are currently the same between the 4 specified WebAssembly constructors. It'll be easy to implement individual functions on constructed objects as per the spec, and have each of these files diverge. The error constructors are also similar, except that their instance derives from ErrorInstance.
  • Use constructor macro when initializing the global object.
  • Dramatically improve testing of the WebAssembly API by checking for properties specified in the spec [*].
  • Clean up assert.js' exception testing.
  • Fix a copy-paste bug in wasm.json: floating-point const return values were swapped.

[*] https://github.com/WebAssembly/design/blob/master/JS.md

Implement more of the JavaScript WebAssembly API
https://bugs.webkit.org/show_bug.cgi?id=163571

Reviewed by Keith Miller.

JSTests:

  • wasm/assert.js:

(export.const.isUndef): add this useful helper
(export.const.throws): fold other throw checks into this one, and check message as well

  • wasm/js-api/test_basic_api.js:

(const.checkOwnPropertyDescriptor): check own property descriptor follows the spec

  • wasm/self-test/test_BuilderJSON.js:

(const.assertOpThrows): use new assert API
(CheckedOpcodeArgumentsTooMany): ditto
(CheckedOpcodeArgumentsNotEnough): ditto
(CallInvalid): ditto
(I32ConstInvalid): ditto
(F32ConstInvalid): ditto (and this caugth the JSON copy-paste bug)
(F64ConstInvalid): ditto

  • wasm/self-test/test_LowLevelBinary_varint.js: use new assert API
  • wasm/self-test/test_LowLevelBinary_varuint.js: use new assert API
  • wasm/utilities.js: add "global" object, used in basic API test (to access global.WebAssembly).
  • wasm/wasm.json: fix copy-paste

Source/JavaScriptCore:

  • CMakeLists.txt: add .lut.h generation
  • DerivedSources.make: ditto
  • JavaScriptCore.xcodeproj/project.pbxproj: add .lut.h generation and all the new files
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init): use macro to list all constructors

  • wasm/WebAssemblyObject.cpp: unboilerplate, all constructors into their own files
  • wasm/WebAssemblyObject.h: ditto
  • wasm/js/JSWebAssemblyCompileError.cpp: Added.

(JSC::JSWebAssemblyCompileError::create):
(JSC::JSWebAssemblyCompileError::createStructure):
(JSC::JSWebAssemblyCompileError::JSWebAssemblyCompileError):
(JSC::JSWebAssemblyCompileError::finishCreation):
(JSC::JSWebAssemblyCompileError::destroy):
(JSC::JSWebAssemblyCompileError::visitChildren):

  • wasm/js/JSWebAssemblyCompileError.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
  • wasm/js/JSWebAssemblyInstance.cpp: Added.

(JSC::JSWebAssemblyInstance::create):
(JSC::JSWebAssemblyInstance::createStructure):
(JSC::JSWebAssemblyInstance::JSWebAssemblyInstance):
(JSC::JSWebAssemblyInstance::finishCreation):
(JSC::JSWebAssemblyInstance::destroy):
(JSC::JSWebAssemblyInstance::visitChildren):

  • wasm/js/JSWebAssemblyInstance.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
  • wasm/js/JSWebAssemblyMemory.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::JSWebAssemblyMemory::create):
(JSC::JSWebAssemblyMemory::createStructure):
(JSC::JSWebAssemblyMemory::JSWebAssemblyMemory):
(JSC::JSWebAssemblyMemory::finishCreation):
(JSC::JSWebAssemblyMemory::destroy):
(JSC::JSWebAssemblyMemory::visitChildren):

  • wasm/js/JSWebAssemblyMemory.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
  • wasm/js/JSWebAssemblyModule.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::JSWebAssemblyModule::create):
(JSC::JSWebAssemblyModule::createStructure):
(JSC::JSWebAssemblyModule::JSWebAssemblyModule):
(JSC::JSWebAssemblyModule::finishCreation):
(JSC::JSWebAssemblyModule::destroy):
(JSC::JSWebAssemblyModule::visitChildren):

  • wasm/js/JSWebAssemblyModule.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
  • wasm/js/JSWebAssemblyRuntimeError.cpp: Added.

(JSC::JSWebAssemblyRuntimeError::create):
(JSC::JSWebAssemblyRuntimeError::createStructure):
(JSC::JSWebAssemblyRuntimeError::JSWebAssemblyRuntimeError):
(JSC::JSWebAssemblyRuntimeError::finishCreation):
(JSC::JSWebAssemblyRuntimeError::destroy):
(JSC::JSWebAssemblyRuntimeError::visitChildren):

  • wasm/js/JSWebAssemblyRuntimeError.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
  • wasm/js/JSWebAssemblyTable.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::JSWebAssemblyTable::create):
(JSC::JSWebAssemblyTable::createStructure):
(JSC::JSWebAssemblyTable::JSWebAssemblyTable):
(JSC::JSWebAssemblyTable::finishCreation):
(JSC::JSWebAssemblyTable::destroy):
(JSC::JSWebAssemblyTable::visitChildren):

  • wasm/js/JSWebAssemblyTable.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
  • wasm/js/WebAssemblyCompileErrorConstructor.cpp: Added.

(JSC::constructJSWebAssemblyCompileError):
(JSC::callJSWebAssemblyCompileError):
(JSC::WebAssemblyCompileErrorConstructor::create):
(JSC::WebAssemblyCompileErrorConstructor::createStructure):
(JSC::WebAssemblyCompileErrorConstructor::finishCreation):
(JSC::WebAssemblyCompileErrorConstructor::WebAssemblyCompileErrorConstructor):
(JSC::WebAssemblyCompileErrorConstructor::getConstructData):
(JSC::WebAssemblyCompileErrorConstructor::getCallData):
(JSC::WebAssemblyCompileErrorConstructor::visitChildren):

  • wasm/js/WebAssemblyCompileErrorConstructor.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::WebAssemblyCompileErrorConstructor::CompileErrorStructure):

  • wasm/js/WebAssemblyCompileErrorPrototype.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::WebAssemblyCompileErrorPrototype::create):
(JSC::WebAssemblyCompileErrorPrototype::createStructure):
(JSC::WebAssemblyCompileErrorPrototype::finishCreation):
(JSC::WebAssemblyCompileErrorPrototype::WebAssemblyCompileErrorPrototype):

  • wasm/js/WebAssemblyCompileErrorPrototype.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
  • wasm/js/WebAssemblyInstanceConstructor.cpp: Added.

(JSC::constructJSWebAssemblyInstance):
(JSC::callJSWebAssemblyInstance):
(JSC::WebAssemblyInstanceConstructor::create):
(JSC::WebAssemblyInstanceConstructor::createStructure):
(JSC::WebAssemblyInstanceConstructor::finishCreation):
(JSC::WebAssemblyInstanceConstructor::WebAssemblyInstanceConstructor):
(JSC::WebAssemblyInstanceConstructor::getConstructData):
(JSC::WebAssemblyInstanceConstructor::getCallData):
(JSC::WebAssemblyInstanceConstructor::visitChildren):

  • wasm/js/WebAssemblyInstanceConstructor.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::WebAssemblyInstanceConstructor::InstanceStructure):

  • wasm/js/WebAssemblyInstancePrototype.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::WebAssemblyInstancePrototype::create):
(JSC::WebAssemblyInstancePrototype::createStructure):
(JSC::WebAssemblyInstancePrototype::finishCreation):
(JSC::WebAssemblyInstancePrototype::WebAssemblyInstancePrototype):

  • wasm/js/WebAssemblyInstancePrototype.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
  • wasm/js/WebAssemblyMemoryConstructor.cpp: Added.

(JSC::constructJSWebAssemblyMemory):
(JSC::callJSWebAssemblyMemory):
(JSC::WebAssemblyMemoryConstructor::create):
(JSC::WebAssemblyMemoryConstructor::createStructure):
(JSC::WebAssemblyMemoryConstructor::finishCreation):
(JSC::WebAssemblyMemoryConstructor::WebAssemblyMemoryConstructor):
(JSC::WebAssemblyMemoryConstructor::getConstructData):
(JSC::WebAssemblyMemoryConstructor::getCallData):
(JSC::WebAssemblyMemoryConstructor::visitChildren):

  • wasm/js/WebAssemblyMemoryConstructor.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::WebAssemblyMemoryConstructor::MemoryStructure):

  • wasm/js/WebAssemblyMemoryPrototype.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::WebAssemblyMemoryPrototype::create):
(JSC::WebAssemblyMemoryPrototype::createStructure):
(JSC::WebAssemblyMemoryPrototype::finishCreation):
(JSC::WebAssemblyMemoryPrototype::WebAssemblyMemoryPrototype):

  • wasm/js/WebAssemblyMemoryPrototype.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
  • wasm/js/WebAssemblyModuleConstructor.cpp: Added.

(JSC::constructJSWebAssemblyModule):
(JSC::callJSWebAssemblyModule):
(JSC::WebAssemblyModuleConstructor::create):
(JSC::WebAssemblyModuleConstructor::createStructure):
(JSC::WebAssemblyModuleConstructor::finishCreation):
(JSC::WebAssemblyModuleConstructor::WebAssemblyModuleConstructor):
(JSC::WebAssemblyModuleConstructor::getConstructData):
(JSC::WebAssemblyModuleConstructor::getCallData):
(JSC::WebAssemblyModuleConstructor::visitChildren):

  • wasm/js/WebAssemblyModuleConstructor.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::WebAssemblyModuleConstructor::ModuleStructure):

  • wasm/js/WebAssemblyModulePrototype.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::WebAssemblyModulePrototype::create):
(JSC::WebAssemblyModulePrototype::createStructure):
(JSC::WebAssemblyModulePrototype::finishCreation):
(JSC::WebAssemblyModulePrototype::WebAssemblyModulePrototype):

  • wasm/js/WebAssemblyModulePrototype.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
  • wasm/js/WebAssemblyRuntimeErrorConstructor.cpp: Added.

(JSC::constructJSWebAssemblyRuntimeError):
(JSC::callJSWebAssemblyRuntimeError):
(JSC::WebAssemblyRuntimeErrorConstructor::create):
(JSC::WebAssemblyRuntimeErrorConstructor::createStructure):
(JSC::WebAssemblyRuntimeErrorConstructor::finishCreation):
(JSC::WebAssemblyRuntimeErrorConstructor::WebAssemblyRuntimeErrorConstructor):
(JSC::WebAssemblyRuntimeErrorConstructor::getConstructData):
(JSC::WebAssemblyRuntimeErrorConstructor::getCallData):
(JSC::WebAssemblyRuntimeErrorConstructor::visitChildren):

  • wasm/js/WebAssemblyRuntimeErrorConstructor.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::WebAssemblyRuntimeErrorConstructor::RuntimeErrorStructure):

  • wasm/js/WebAssemblyRuntimeErrorPrototype.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::WebAssemblyRuntimeErrorPrototype::create):
(JSC::WebAssemblyRuntimeErrorPrototype::createStructure):
(JSC::WebAssemblyRuntimeErrorPrototype::finishCreation):
(JSC::WebAssemblyRuntimeErrorPrototype::WebAssemblyRuntimeErrorPrototype):

  • wasm/js/WebAssemblyRuntimeErrorPrototype.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
  • wasm/js/WebAssemblyTableConstructor.cpp: Added.

(JSC::constructJSWebAssemblyTable):
(JSC::callJSWebAssemblyTable):
(JSC::WebAssemblyTableConstructor::create):
(JSC::WebAssemblyTableConstructor::createStructure):
(JSC::WebAssemblyTableConstructor::finishCreation):
(JSC::WebAssemblyTableConstructor::WebAssemblyTableConstructor):
(JSC::WebAssemblyTableConstructor::getConstructData):
(JSC::WebAssemblyTableConstructor::getCallData):
(JSC::WebAssemblyTableConstructor::visitChildren):

  • wasm/js/WebAssemblyTableConstructor.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::WebAssemblyTableConstructor::TableStructure):

  • wasm/js/WebAssemblyTablePrototype.cpp: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.

(JSC::WebAssemblyTablePrototype::create):
(JSC::WebAssemblyTablePrototype::createStructure):
(JSC::WebAssemblyTablePrototype::finishCreation):
(JSC::WebAssemblyTablePrototype::WebAssemblyTablePrototype):

  • wasm/js/WebAssemblyTablePrototype.h: Copied from Source/JavaScriptCore/wasm/WebAssemblyObject.h.
3:06 PM Changeset in webkit [207571] by rniwa@webkit.org
  • 15 edits
    2 adds in trunk

Annotate more DOM and HTML IDLs with CEReactions
https://bugs.webkit.org/show_bug.cgi?id=163653

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaselined the tests now that more test cases are passing.

  • web-platform-tests/custom-elements/attribute-changed-callback-expected.txt:
  • web-platform-tests/custom-elements/reactions/DOMStringMap-expected.txt:
  • web-platform-tests/custom-elements/reactions/Document-expected.txt:
  • web-platform-tests/custom-elements/reactions/Element-expected.txt:
  • web-platform-tests/custom-elements/reactions/ElementContentEditable-expected.txt:
  • web-platform-tests/custom-elements/reactions/HTMLElement-expected.txt:
  • web-platform-tests/custom-elements/reactions/Selection-expected.txt:

Source/WebCore:

Added CEReactions to more IDL files.

Test: fast/custom-elements/reactions-for-webkit-extensions.html

  • bindings/js/JSDOMStringMapCustom.cpp:

(WebCore::JSDOMStringMap::deleteProperty): Instantiate CustomElementReactionStack, which is equivalent to
adding CEReactions in IDL.
(WebCore::JSDOMStringMap::putDelegate): Ditto.

  • dom/Document.idl:
  • dom/Element.idl:
  • html/HTMLElement.idl:
  • page/DOMSelection.idl:

LayoutTests:

Added a regression test to make sure webkitdropzone IDL attribute on HTMLElement
honors CEReactions semantics using the web-platform-tests' infrastructure I added.

  • fast/custom-elements/reactions-for-webkit-extensions-expected.txt: Added.
  • fast/custom-elements/reactions-for-webkit-extensions.html: Added.
2:34 PM Changeset in webkit [207570] by commit-queue@webkit.org
  • 1 edit
    48 adds in trunk/LayoutTests/imported/w3c

Import encoding web-platform-tests
https://bugs.webkit.org/show_bug.cgi?id=163684

Patch by Alex Christensen <achristensen@webkit.org> on 2016-10-19
Reviewed by Chris Dumez.

  • web-platform-tests/encoding: Added.
  • web-platform-tests/encoding/OWNERS: Added.
  • web-platform-tests/encoding/api-basics-expected.txt: Added.
  • web-platform-tests/encoding/api-basics.html: Added.
  • web-platform-tests/encoding/api-invalid-label-expected.txt: Added.
  • web-platform-tests/encoding/api-invalid-label.html: Added.
  • web-platform-tests/encoding/api-replacement-encodings-expected.txt: Added.
  • web-platform-tests/encoding/api-replacement-encodings.html: Added.
  • web-platform-tests/encoding/api-surrogates-utf8-expected.txt: Added.
  • web-platform-tests/encoding/api-surrogates-utf8.html: Added.
  • web-platform-tests/encoding/big5-encoder-expected.txt: Added.
  • web-platform-tests/encoding/big5-encoder.html: Added.
  • web-platform-tests/encoding/gb18030-encoder-expected.txt: Added.
  • web-platform-tests/encoding/gb18030-encoder.html: Added.
  • web-platform-tests/encoding/gbk-encoder-expected.txt: Added.
  • web-platform-tests/encoding/gbk-encoder.html: Added.
  • web-platform-tests/encoding/idlharness-expected.txt: Added.
  • web-platform-tests/encoding/idlharness.html: Added.
  • web-platform-tests/encoding/iso-2022-jp-decoder-expected.txt: Added.
  • web-platform-tests/encoding/iso-2022-jp-decoder.html: Added.
  • web-platform-tests/encoding/iso-2022-jp-encoder-expected.txt: Added.
  • web-platform-tests/encoding/iso-2022-jp-encoder.html: Added.
  • web-platform-tests/encoding/resources: Added.
  • web-platform-tests/encoding/resources/encodings.js: Added.
  • web-platform-tests/encoding/resources/single-byte-raw.py: Added.

(main):

  • web-platform-tests/encoding/resources/text-plain-charset.py: Added.

(main):

  • web-platform-tests/encoding/single-byte-decoder-expected.txt: Added.
  • web-platform-tests/encoding/single-byte-decoder.html: Added.
  • web-platform-tests/encoding/textdecoder-byte-order-marks-expected.txt: Added.
  • web-platform-tests/encoding/textdecoder-byte-order-marks.html: Added.
  • web-platform-tests/encoding/textdecoder-fatal-expected.txt: Added.
  • web-platform-tests/encoding/textdecoder-fatal-single-byte-expected.txt: Added.
  • web-platform-tests/encoding/textdecoder-fatal-single-byte.html: Added.
  • web-platform-tests/encoding/textdecoder-fatal-streaming-expected.txt: Added.
  • web-platform-tests/encoding/textdecoder-fatal-streaming.html: Added.
  • web-platform-tests/encoding/textdecoder-fatal.html: Added.
  • web-platform-tests/encoding/textdecoder-ignorebom-expected.txt: Added.
  • web-platform-tests/encoding/textdecoder-ignorebom.html: Added.
  • web-platform-tests/encoding/textdecoder-labels-expected.txt: Added.
  • web-platform-tests/encoding/textdecoder-labels.html: Added.
  • web-platform-tests/encoding/textdecoder-streaming-expected.txt: Added.
  • web-platform-tests/encoding/textdecoder-streaming.html: Added.
  • web-platform-tests/encoding/textdecoder-utf16-surrogates-expected.txt: Added.
  • web-platform-tests/encoding/textdecoder-utf16-surrogates.html: Added.
  • web-platform-tests/encoding/textencoder-constructor-non-utf-expected.txt: Added.
  • web-platform-tests/encoding/textencoder-constructor-non-utf.html: Added.
  • web-platform-tests/encoding/textencoder-utf16-surrogates-expected.txt: Added.
  • web-platform-tests/encoding/textencoder-utf16-surrogates.html: Added.
2:27 PM Changeset in webkit [207569] by caitp@igalia.com
  • 4 edits in trunk

[JSC] forbid "use strict" directive in generator functions with non-simple parameters
https://bugs.webkit.org/show_bug.cgi?id=163683

Reviewed by Geoffrey Garen.

JSTests:

Update various generator*-non-simple-param.js tests to be passing.

  • test262.yaml:

Source/JavaScriptCore:

Because generator functions and async functions both have an implicit
inner function whose arguments are inherited from its parent, "use strict"
directives within these functions did not yield a SyntaxError.

Now, the correct syntax error is reported, fixing several test262 failures
for generators and async functions.

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseFunctionInfo):

2:14 PM Changeset in webkit [207568] by Ryan Haddad
  • 14 edits
    6 copies
    1 delete in trunk

Unreviewed, rolling out r207557.

This change caused animations/font-variations tests to time
out on pre-Sierra Macs.

Reverted changeset:

"[macOS] [iOS] Disable variation fonts on macOS El Capitan and
iOS 9"
https://bugs.webkit.org/show_bug.cgi?id=163374
http://trac.webkit.org/changeset/207557

1:45 PM Changeset in webkit [207567] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Support -webkit-border-fit
https://bugs.webkit.org/show_bug.cgi?id=163687

Reviewed by Zalan Bujtas.

Add support for -webkit-border-fit to isValidKeywordPropertyAndValue.

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):

1:39 PM BuildingOnMac edited by Simon Fraser
(diff)
1:37 PM Changeset in webkit [207566] by fpizlo@apple.com
  • 6 edits in trunk/Source

Baseline JIT should use AutomaticThread
https://bugs.webkit.org/show_bug.cgi?id=163686

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Change the JITWorklist to use AutomaticThread, so that the Baseline JIT's concurrent
compiler thread shuts down automatically after inactivity.

With this change, all of JSC's threads shut down automatically. If you run splay for a few
seconds (which fires up all threads - compiler and GC) and then go to sleep for a second,
you'll see that the only threads left are the main thread and the bmalloc thread.

  • jit/JITWorklist.cpp:

(JSC::JITWorklist::Thread::Thread):
(JSC::JITWorklist::JITWorklist):
(JSC::JITWorklist::completeAllForVM):
(JSC::JITWorklist::poll):
(JSC::JITWorklist::compileLater):
(JSC::JITWorklist::compileNow):
(JSC::JITWorklist::finalizePlans):
(JSC::JITWorklist::runThread): Deleted.

  • jit/JITWorklist.h:

Source/WTF:

Added a AutomaticThreadCondition::wait() method, so that if you really want to use one
common condition for your thread and something else, you can do it. This trivially works
if you only use notifyAll(), and behaves as you'd expect for notifyOne() (i.e. it's
dangerous, since you don't know who will wake up).

The Baseline JIT used the one-true-Condition idiom because it used notifyAll() in an
optimal way: there are just two threads talking to each other, so it wakes up at most one
thread and that thread is exactly the one you want woken up. Adding wait() means that I did
not have to change that code.

  • wtf/AutomaticThread.cpp:

(WTF::AutomaticThreadCondition::wait):

  • wtf/AutomaticThread.h:
1:34 PM Changeset in webkit [207565] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] class and id parsing need to be case-insensitive in HTML quirks mode
https://bugs.webkit.org/show_bug.cgi?id=163685

Reviewed by Zalan Bujtas.

Class and ID parsing should be case-insensitive in quirks mode. Apply the same hack
that the old parser did and lowercase the class and ids in place.

  • css/parser/CSSSelectorParser.cpp:

(WebCore::CSSSelectorParser::consumeId):
(WebCore::CSSSelectorParser::consumeClass):

1:33 PM Changeset in webkit [207564] by n_wang@apple.com
  • 3 edits
    2 adds in trunk

AX: crash: com.apple.WebCore: WebCore::AccessibilityObject::findMatchingObjects + 600
https://bugs.webkit.org/show_bug.cgi?id=163682

Reviewed by Chris Fleizach.

Source/WebCore:

There's a null pointer crash when we ask for startObject->parentObjectUnignored() in
AccessibilityObject::findMatchingObject. Added a null check for the startObject to fix that.

Test: accessibility/mac/search-predicate-crash.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::findMatchingObjects):

LayoutTests:

  • accessibility/mac/search-predicate-crash-expected.txt: Added.
  • accessibility/mac/search-predicate-crash.html: Added.
1:30 PM Changeset in webkit [207563] by aestes@apple.com
  • 5 edits
    1 add in trunk

Crash in ASCIICaseInsensitiveHash::hash() when a response has a null MIME type
https://bugs.webkit.org/show_bug.cgi?id=163476
<rdar://problem/26941395>

Reviewed by Andreas Kling.

Source/WebKit2:

When custom content providers are registered and a response has a null MIME type, WebPage
will pass a null String to HashSet::contains(). This results in a null pointer dereference,
since the String hash functions do not support null Strings and unconditionally dereference
their StringImpls. Fixed by checking that Strings are non-null before calling
HashSet::contains() on m_mimeTypesWithCustomContentProviders.

New API test: WebKit2.LoadDataWithNilMIMEType.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::shouldUseCustomContentProviderForResponse): Checked if mimeType is null
before calling m_mimeTypesWithCustomContentProviders.contains().
(WebKit::WebPage::canShowMIMEType): Ditto.

  • WebProcess/WebPage/WebPage.h: Made private the declaration of canPluginHandleResponse().

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/LoadDataWithNilMIMEType.mm: Added.

(TEST): Added an API test that passes a nil MIMEType to
-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:].

1:29 PM Changeset in webkit [207562] by Chris Dumez
  • 5 edits in trunk/Source

Move HTML Interactive Form Validation behind an experimental flag
https://bugs.webkit.org/show_bug.cgi?id=163673

Reviewed by Daniel Bates.

Source/WebKit/mac:

Re-disable HTML Interactive Form Validation by default on Mac WK1.

  • WebView/WebViewData.mm:

(-[WebViewPrivate init]):

Source/WebKit2:

Move HTML Interactive Form Validation behind an experimental feature flag
and disable by default until by have a better UI.

  • Shared/WebPreferencesDefinitions.h:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

1:10 PM Changeset in webkit [207561] by jer.noble@apple.com
  • 3 edits in trunk/Tools

Modify testrunner to mute audio during tests
https://bugs.webkit.org/show_bug.cgi?id=162582

Reviewed by Alexey Proskuryakov.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(createWebViewAndOffscreenWindow):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetStateToConsistentValues):

12:52 PM Changeset in webkit [207560] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

Bug 163670: Refine assertions in WebCore::ImageData constructors
<https://webkit.org/b/163670>
<rdar://problem/27497338>

Reviewed by Brent Fulgham.

No new tests because there is no change in nominal behavior.

  • html/ImageData.cpp:

(WebCore::ImageData::ImageData(const IntSize&)): Change to use
ASSERT() since the worst-case scenario here is a nullptr deref.
Switch to IntSize::area() to compute the area.
(WebCore::ImageData::ImageData(const IntSize&, Ref<Uint8ClampedArray>&&)):
Add ASSERT() identical to the previous constructor, and change
ASSERT_WITH_SECURITY_IMPLICATION() to only fire when m_data is
not nullptr and the length check fails. Switch to
IntSize::area() to compute the area.

12:50 PM Changeset in webkit [207559] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

check-webkit-style: fix false-positive warnings about using #pragma once header guard
https://bugs.webkit.org/show_bug.cgi?id=163575

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-10-19
Reviewed by Brady Eidson.

There were some false positive warnings about header guards
for ObjC headers that don't need guards. This changes the
style checker to no longer warn if there is no #pragma once.
It only warns if there are #ifndef that should be #pragma once.

  • Scripts/webkitpy/style/checkers/cpp.py:

(check_for_header_guard):
Change when we output an error.

  • Scripts/webkitpy/style/checkers/cpp_unittest.py:

(CppStyleTest.test_build_header_guard):
Update tests.

12:45 PM Changeset in webkit [207558] by commit-queue@webkit.org
  • 15 edits
    4 copies in trunk/Source/WebKit2

https://bugs.webkit.org/show_bug.cgi?id=163292

Patch by Damian Kaleta <dkaleta@apple.com> on 2016-10-19
Reviewed by Brady Eidson.

Added ability to display context menu asynchronously.

  • Shared/API/APIObject.h: Added ContextMenuListener.
  • Shared/API/c/WKBase.h: Added WKContextMenuListenerRef struct.
  • UIProcess/API/APIContextMenuClient.h:

(API::ContextMenuClient::getContextMenuFromProposedMenuAsync): New method that allows showing context menu asynchronously.

  • UIProcess/API/C/WKAPICast.h: Added a new mapping for WebContextMenuListenerProxy.
  • UIProcess/API/C/WKContextMenuListener.cpp: Added. New class that allow a client to return results asynchronously.

(WKContextMenuListenerGetTypeID):
(WKContextMenuListenerUseContextMenuItems):

  • UIProcess/API/C/WKContextMenuListener.h: Added.
  • UIProcess/API/C/WKPage.cpp: Added WKPageContextMenuClientV4.

(WKPageSetPageContextMenuClient):

  • UIProcess/API/C/WKPageContextMenuClient.h:
  • UIProcess/WebContextMenuListenerProxy.cpp: Copied from Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.h.

(WebKit::WebContextMenuListenerProxy::WebContextMenuListenerProxy):
(WebKit::WebContextMenuListenerProxy::~WebContextMenuListenerProxy):
(WebKit::WebContextMenuListenerProxy::useContextMenuItems): Passes items to m_contextMenuMac.
(WebKit::WebContextMenuListenerProxy::invalidate):

  • UIProcess/WebContextMenuListenerProxy.h: Copied from Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.h.

(WebKit::WebContextMenuListenerProxy::create):

  • UIProcess/mac/WebContextMenuProxyMac.h:
  • UIProcess/mac/WebContextMenuProxyMac.mm:

(WebKit::WebContextMenuProxyMac::showContextMenuWithItems): Shows context menu.
(WebKit::WebContextMenuProxyMac::showContextMenu): Extracted some logic to showContextMenuWithItems().

  • WebKit2.xcodeproj/project.pbxproj:
12:40 PM Changeset in webkit [207557] by mmaxfield@apple.com
  • 14 edits
    6 moves
    1 add in trunk

[macOS] [iOS] Disable variation fonts on macOS El Capitan and iOS 9
https://bugs.webkit.org/show_bug.cgi?id=163374

Reviewed by Darin Adler.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Because of platform lack of support for variations in in-memory fonts,
this feature should be disabled on the affected OSes.

No tests because there is no behavior change (on the relevant platforms).

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

  • Configurations/FeatureDefines.xcconfig:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

LayoutTests:

Moving animations/font-variation-settings* tests to animations/font-variations
in order to make them easier to mark as failing.

Mark the relevant tests as failing on El Capitan and iOS 9.

  • animations/font-variations/font-variation-settings-expected.html: Renamed from LayoutTests/animations/font-variation-settings-expected.html.
  • animations/font-variations/font-variation-settings-order-expected.html: Renamed from LayoutTests/animations/font-variation-settings-order-expected.html.
  • animations/font-variations/font-variation-settings-order.html: Renamed from LayoutTests/animations/font-variation-settings-order.html.
  • animations/font-variations/font-variation-settings-unlike-expected.html: Renamed from LayoutTests/animations/font-variation-settings-unlike-expected.html.
  • animations/font-variations/font-variation-settings-unlike.html: Renamed from LayoutTests/animations/font-variation-settings-unlike.html.
  • animations/font-variations/font-variation-settings.html: Renamed from LayoutTests/animations/font-variation-settings.html.
  • platform/gtk/TestExpectations:
  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
12:19 PM Changeset in webkit [207556] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Fix background-position parsing
https://bugs.webkit.org/show_bug.cgi?id=163681

Reviewed by Dean Jackson.

The new parser has a more efficient parsed representation of background positions. When
background-position is "center" or when no length unit is specified for a dimension,
then rather than creating a pair, the new parser makes a singleton primitive value.

Patch the StyleBuilder code to handle this case, resolving center to (left,50%) or
(top,50%) as appropriate and also handling top/left without any associated length.

  • css/CSSToStyleMap.cpp:

(WebCore::CSSToStyleMap::mapFillXPosition):
(WebCore::CSSToStyleMap::mapFillYPosition):

12:07 PM Changeset in webkit [207555] by Simon Fraser
  • 2 edits in trunk/Source/WebKit/mac

WebView needs to initialize the visualViewportEnabled Setting from WebKit preferences
https://bugs.webkit.org/show_bug.cgi?id=163680

Reviewed by Dean Jackson.

Add code to set the Setting from WebKit prefs. This code is a mess and needs to be autogenerated.

  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

12:04 PM Changeset in webkit [207554] by commit-queue@webkit.org
  • 6 edits
    14 copies
    2 moves
    1 add in trunk

[Modern Media Controls] Media Controller: click-to-start support
https://bugs.webkit.org/show_bug.cgi?id=163659
<rdar://problem/28845656>

Patch by Antoine Quint <Antoine Quint> on 2016-10-19
Reviewed by Dean Jackson.

Source/WebCore:

We introduce the MediaControllerSupport class which will allow a number of media controller
features to be implemented by subclasses each devoted to implementing a specific subset of
media controller features. With this bug, we add the correct behavior for click-to-start,
only showing the start button under the right circumstances.

A MediaController object indicates which media control to attach click event listeners to
through the control property, and a list of media events it should register on the media
element through the mediaEvents property. Then, as the user interacts with the specified
control and the media, the Button delegation method buttonWasClicked() and the syncControl()
methods are called to allow for the media state to be correctly set and represented in the
media controls. Custom event handling for the specified events can also be achieved by
subclassing the handleEvent() method.

Tests: media/modern-media-controls/start-support/start-support-audio.html

media/modern-media-controls/start-support/start-support-autoplay.html
media/modern-media-controls/start-support/start-support-click-to-start.html
media/modern-media-controls/start-support/start-support-error.html
media/modern-media-controls/start-support/start-support-fullscreen.html
media/modern-media-controls/start-support/start-support-manual-play.html
media/modern-media-controls/start-support/start-support-no-source.html

  • Modules/modern-media-controls/media/media-controller-support.js: Added.

(MediaControllerSupport):
(MediaControllerSupport.prototype.get control):
(MediaControllerSupport.prototype.get mediaEvents):
(MediaControllerSupport.prototype.buttonWasClicked):
(MediaControllerSupport.prototype.handleEvent):
(MediaControllerSupport.prototype.syncControl):

  • Modules/modern-media-controls/media/media-controller.js:

(MediaController):
(MediaController.prototype.buttonWasClicked): Deleted.

  • Modules/modern-media-controls/media/start-support.js: Added.

(StartSupport.prototype.get control):
(StartSupport.prototype.get mediaEvents):
(StartSupport.prototype.buttonWasClicked):
(StartSupport.prototype.handleEvent):
(StartSupport.prototype.syncControl):
(StartSupport.prototype._shouldShowStartButton):
(StartSupport):

LayoutTests:

New test coverage for the StartSupport class.

  • media/modern-media-controls/media-controller/media-controller-constructor.html:
  • media/modern-media-controls/media-controller/media-controller-resize.html:
  • media/modern-media-controls/start-support/start-support-audio-expected.txt: Added.
  • media/modern-media-controls/start-support/start-support-audio.html: Added.
  • media/modern-media-controls/start-support/start-support-autoplay-expected.txt: Added.
  • media/modern-media-controls/start-support/start-support-autoplay.html: Added.
  • media/modern-media-controls/start-support/start-support-click-to-start-expected.txt: Renamed from LayoutTests/media/modern-media-controls/media-controller/media-controller-click-to-start-expected.txt.
  • media/modern-media-controls/start-support/start-support-click-to-start.html: Renamed from LayoutTests/media/modern-media-controls/media-controller/media-controller-click-to-start.html.
  • media/modern-media-controls/start-support/start-support-error-expected.txt: Added.
  • media/modern-media-controls/start-support/start-support-error.html: Added.
  • media/modern-media-controls/start-support/start-support-fullscreen-expected.txt: Added.
  • media/modern-media-controls/start-support/start-support-fullscreen.html: Added.
  • media/modern-media-controls/start-support/start-support-manual-play-expected.txt: Added.
  • media/modern-media-controls/start-support/start-support-manual-play.html: Added.
  • media/modern-media-controls/start-support/start-support-no-source-expected.txt: Added.
  • media/modern-media-controls/start-support/start-support-no-source.html: Added.
  • platform/ios-simulator/TestExpectations:
11:59 AM Changeset in webkit [207553] by commit-queue@webkit.org
  • 11 edits in trunk

Web Inspector: AXI: expose computed tree node and heading level
https://bugs.webkit.org/show_bug.cgi?id=130825
<rdar://problem/16442349>

Patch by Aaron Chu <aaron_chu@apple.com> on 2016-10-19
Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

Exposing two new accessibility properties: Heading Level and Hierarchical Level.

  • inspector/protocol/DOM.json:

Source/WebCore:

Exposing two new accessibility properties: Heading Level and Hierarchical Level.

Updated Test: LayoutTest/inspector/dom/getAccessibilityPropertiesForNode.html

  • inspector/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):

Source/WebInspectorUI:

Updating the Web Accessibility Inspector to display Heading Level and Hierarchical Level.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Models/DOMNode.js:

(WebInspector.DOMNode.prototype.accessibilityProperties.accessibilityPropertiesCallback):
(WebInspector.DOMNode.prototype.accessibilityProperties):

  • UserInterface/Views/DOMNodeDetailsSidebarPanel.js:

(WebInspector.DOMNodeDetailsSidebarPanel):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility.accessibilityPropertiesCallback):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility):

LayoutTests:

Included logging of the two newly exposed accessibility properties:
Heading Level and Hierarchical Level.

  • inspector/dom/getAccessibilityPropertiesForNode-expected.txt:
  • inspector/dom/getAccessibilityPropertiesForNode.html:
11:56 AM Changeset in webkit [207552] by adam.bergkvist@ericsson.com
  • 2 edits in trunk/Source/WebCore

WebRTC: Implement MediaEndpointPeerConnection::stop()
https://bugs.webkit.org/show_bug.cgi?id=163660

Reviewed by Philippe Normand.

Make MediaEndpointPeerConnection::stop() stop its MediaEndpoint.

Testing: This fix deals with cleanup and tearing down resources down in the platform layer
and is not covered by automated tests. It is however observable in the manual test added
in [1] where the remote videos should stop when the connections are closed.

[1] http://webkit.org/b/163327

  • Modules/mediastream/MediaEndpointPeerConnection.cpp:

(WebCore::MediaEndpointPeerConnection::stop):

11:47 AM Changeset in webkit [207551] by bshafiei@apple.com
  • 5 edits in tags/Safari-603.1.8.1/Source

Versioning.

11:44 AM Changeset in webkit [207550] by bshafiei@apple.com
  • 1 copy in tags/Safari-603.1.8.1

New tag.

11:42 AM Changeset in webkit [207549] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Fix -webkit-mask-box-image parsing
https://bugs.webkit.org/show_bug.cgi?id=163676

Reviewed by Dean Jackson.

-webkit-mask-box-image is not a shorthand in our current code, so treat it the same as the legacy
-webkit-border-image.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::CSSPropertyParser::parseShorthand):

11:25 AM Changeset in webkit [207548] by clopez@igalia.com
  • 2 edits in trunk/Source/WebCore

[GTK][EFL] Build fix after r207543.
https://bugs.webkit.org/show_bug.cgi?id=163671

Unreviewed.

Fix typo on the filename of the included header:
Mac filesystem is case insensitive, but Linux filesystems are case sensitive.

  • css/parser/CSSPropertyParser.cpp:
11:15 AM Changeset in webkit [207547] by Alan Bujtas
  • 4 edits
    2 adds in trunk

Use anonymous table row for new child at RenderTableRow::addChild() if available.
https://bugs.webkit.org/show_bug.cgi?id=163651
<rdar://problem/28705022>

Reviewed by David Hyatt.

Source/WebCore:

We should try to prevent the continuation siblings from getting separated and inserted into
wrapper renderers. It makes finding these continuation siblings difficult.
This patch adds a checks for anonymous table rows so that we could find a closer common ancestor of
beforeChild/new child.

Test: fast/table/crash-when-table-has-continuation-and-content-inserted.html

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::showRenderObject): Add continuation information.

  • rendering/RenderTableRow.cpp:

(WebCore::RenderTableRow::addChild):

LayoutTests:

  • fast/table/crash-when-table-has-continuation-and-content-inserted-expected.txt: Added.
  • fast/table/crash-when-table-has-continuation-and-content-inserted.html: Added.
11:09 AM Changeset in webkit [207546] by commit-queue@webkit.org
  • 27 edits in trunk/Source/WebCore

Cleanup WebCore/workers
https://bugs.webkit.org/show_bug.cgi?id=163635

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-10-19
Reviewed by Chris Dumez.

  • workers/*:

Cleanup like pragma once, nullptr, remove stale includes, declarations.

10:47 AM Changeset in webkit [207545] by fpizlo@apple.com
  • 9 edits in trunk/Source

DFG worklist should use AutomaticThread
https://bugs.webkit.org/show_bug.cgi?id=163615

Reviewed by Mark Lam.

Source/JavaScriptCore:

AutomaticThread is a new feature in WTF that allows you to easily create worker threads that
shut down automatically. This changes DFG::Worklist to use AutomaticThread, so that its
threads shut down automatically, too. This has the potential to save a lot of memory.

This required some improvements to AutomaticThread: Worklist likes to be able to keep state
around for the whole lifetime of a thread, and so it likes knowing when threads are born and
when they die. I added virtual methods for that. Also, Worklist uses notifyOne() so I added
that, too.

This looks to be perf-neutral.

  • dfg/DFGThreadData.cpp:

(JSC::DFG::ThreadData::ThreadData):

  • dfg/DFGThreadData.h:
  • dfg/DFGWorklist.cpp:

(JSC::DFG::Worklist::ThreadBody::ThreadBody):
(JSC::DFG::Worklist::Worklist):
(JSC::DFG::Worklist::~Worklist):
(JSC::DFG::Worklist::finishCreation):
(JSC::DFG::Worklist::isActiveForVM):
(JSC::DFG::Worklist::enqueue):
(JSC::DFG::Worklist::compilationState):
(JSC::DFG::Worklist::waitUntilAllPlansForVMAreReady):
(JSC::DFG::Worklist::removeAllReadyPlansForVM):
(JSC::DFG::Worklist::completeAllReadyPlansForVM):
(JSC::DFG::Worklist::rememberCodeBlocks):
(JSC::DFG::Worklist::visitWeakReferences):
(JSC::DFG::Worklist::removeDeadPlans):
(JSC::DFG::Worklist::removeNonCompilingPlansForVM):
(JSC::DFG::Worklist::queueLength):
(JSC::DFG::Worklist::dump):
(JSC::DFG::Worklist::runThread): Deleted.
(JSC::DFG::Worklist::threadFunction): Deleted.

  • dfg/DFGWorklist.h:

Source/WTF:

This adds new functionality to AutomaticThread to support DFG::Worklist:

  • AutomaticThread::threadDidStart/threadWillStop virtual methods called at the start and end of a thread's lifetime. This allows Worklist to tie some resources to the life of the thread, and also means that now those resources will naturally free up when the Worklist is not in use.


  • AutomaticThreadCondition::notifyOne(). This required changes to Condition::notifyOne(). We need to know if the Condition woke up anyone. If it didn't, then we need to launch one of our threads.
  • wtf/AutomaticThread.cpp:

(WTF::AutomaticThreadCondition::notifyOne):
(WTF::AutomaticThread::ThreadScope::ThreadScope):
(WTF::AutomaticThread::ThreadScope::~ThreadScope):
(WTF::AutomaticThread::start):
(WTF::AutomaticThread::threadDidStart):
(WTF::AutomaticThread::threadWillStop):

  • wtf/AutomaticThread.h:
  • wtf/Condition.h:

(WTF::ConditionBase::notifyOne):

10:46 AM Changeset in webkit [207544] by Chris Dumez
  • 6 edits
    2 adds in trunk

MouseEvent's coordinates should be 0 for simulated clicks
https://bugs.webkit.org/show_bug.cgi?id=163648

Reviewed by Darin Adler.

Source/WebCore:

MouseEvent's coordinates should be 0 / 0 for simulated clicks triggered
by JavaScript (i.e. via element.click()). This behavior matches Chrome
and Firefox.

WebKit was computing actual coordinates for the element which was
expensive, especially because computing screenX / screenY required
a synchronous IPC with the UI process.

Test: fast/events/element-click-no-coords.html

  • dom/Element.cpp:

(WebCore::Element::dispatchSimulatedClick):

  • dom/SimulatedClick.cpp:

(WebCore::simulateMouseEvent):
(WebCore::simulateClick):

  • dom/SimulatedClick.h:
  • html/HTMLElement.cpp:

(WebCore::HTMLElement::click):

LayoutTests:

Add layout test coverage. I verified that this test is passing in
Firefox and Chrome as well.

  • fast/events/element-click-no-coords-expected.txt: Added.
  • fast/events/element-click-no-coords.html: Added.
10:40 AM Changeset in webkit [207543] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Fix transform parsing
https://bugs.webkit.org/show_bug.cgi?id=163671

Reviewed by Dean Jackson.

The new parser turned function names into CSSValueIDs and made CSSFunctionValue store them. This
meant it could be used to handle transform values, with the function name representing the
transform operation efficiently as a CSSValueID.

The old parser, however, creates WebKitCSSTransformValues. This value does not exist in the new
parser. Rather than forcing the old and new parser over to CSSFunctionValues, I opted to
just make the new parser build WebkitCSSTransformValues too.

The main reason I did this is that WebkitCSSTransformValue is actually exposed to the Web via
IDL. To be safe, I am not eliminating it (even though Blink has).

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeTranslate3d):
(WebCore::consumeNumbers):
(WebCore::consumePerspective):
(WebCore::transformOperationForCSSValueID):
(WebCore::consumeTransformValue):

10:18 AM Changeset in webkit [207542] by mitz@apple.com
  • 13 edits in trunk/Source/JavaScriptCore

[Xcode] JavaScriptCore fails to build when CLANG_WARN_DOCUMENTATION_COMMENTS is enabled
https://bugs.webkit.org/show_bug.cgi?id=163642

Reviewed by Darin Adler.

  • API/JSClassRef.cpp: Removed a bad headerdoc comment inside an implementation file.
  • API/JSContext.h: Changed @methodgroup to @functiongroup, because the compiler requires the former to be followed by a method (and we have a property), but not the latter. Changed a couple of instances of “method” to “@method”. Removed empty @param entries.
  • API/JSContextRefInternal.h: Named a parameter referenced in a @param entry.
  • API/JSContextRefPrivate.h: Ditto.
  • API/JSManagedValue.h: Removed empty @param entries.
  • API/JSObjectRef.h: Corrected parameter name in @param entry.
  • API/JSTypedArray.h: Ditto.
  • API/JSValue.h: Removed empty @param entries, changed @methodgroup to @functiongroup, and changed @method to @property where appropriate. Removed empty @param entries.
  • API/JSValueRef.h: Named a parameter referenced in a @param entry.
  • API/JSWeakObjectMapRefPrivate.h: Ditto.
  • Configurations/Base.xcconfig: Enabled CLANG_WARN_DOCUMENTATION_COMMENTS. Made the compiler treat the icu headers as system headers, to stop it from emitting warnings about headers we don’t want to change.
  • Configurations/ToolExecutable.xcconfig: Made the compiler treat the icu headers as system headers.
9:57 AM Changeset in webkit [207541] by Darin Adler
  • 28 edits in trunk/Source

Move XPath from ExceptionCode to Exception
https://bugs.webkit.org/show_bug.cgi?id=163656

Reviewed by Chris Dumez.

Source/WebCore:

  • dom/Document.cpp:

(WebCore::Document::createExpression): Use ExceptionOr.
(WebCore::Document::createNSResolver): Return Ref.
(WebCore::Document::evaluate): Use ExceptionOr.

  • dom/Document.h: Updated for above changes.
  • dom/Document.idl: Use non-legacy exceptions for the functions above.
  • inspector/InspectorNodeFinder.cpp:

(WebCore::InspectorNodeFinder::searchUsingXPath): Call XPath functions
with new interface.

  • xml/DOMParser.cpp:

(WebCore::DOMParser::DOMParser): Marked inline.
(WebCore::DOMParser::create): Moved here from header.
(WebCore::DOMParser::parseFromString): Use ExceptionOr.

  • xml/DOMParser.h: Updated for above changes.
  • xml/DOMParser.idl: Use non-legacy exception.
  • xml/XPathEvaluator.cpp:

(WebCore::XPathEvaluator::createExpression): Use ExceptionOr.
(WebCore::XPathEvaluator::evaluate): Ditto.

  • xml/XPathEvaluator.h: Updated for above changes.
  • xml/XPathEvaluator.idl: Use non-legacy exceptions.
  • xml/XPathExpression.cpp:

(WebCore::XPathExpression::createExpression): Use ExceptionOr.
(WebCore::XPathExpression::evaluate): Ditto.

  • xml/XPathExpression.h: Updated for above changes.
  • xml/XPathExpression.idl: Use non-legacy exceptions.
  • xml/XPathGrammar.y: Added include of XPathStep.h.
  • xml/XPathParser.cpp:

(WebCore::XPath::Parser::Parser): Initialize three scalar data members
in the class definition rather than here.
(WebCore::XPath::Parser::parseStatement): Use ExceptionOr.

  • xml/XPathParser.h: Updated for above changes.
  • xml/XPathResult.cpp:

(WebCore::XPathResult::XPathResult): Use a reference rather than a
pointer for the document. Alao initialize two scalar data members
in the class definition rather than here.
(WebCore::XPathResult::convertTo): Use ExceptionOr.
(WebCore::XPathResult::numberValue): Ditto.
(WebCore::XPathResult::stringValue): Ditto.
(WebCore::XPathResult::booleanValue): Ditto.
(WebCore::XPathResult::singleNodeValue): Ditto.
(WebCore::XPathResult::snapshotLength): Ditto.
(WebCore::XPathResult::iterateNext): Ditto.
(WebCore::XPathResult::snapshotItem): Ditto.

  • xml/XPathResult.h: Updated for the changes above.
  • xml/XPathResult.idl: Use non-legacy exceptions.

Source/WebKit/mac:

  • DOM/DOMDocument.mm:

(wrap): Added. Helper function for wrapping a resolver.
(-[DOMDocument createExpression:resolver:]): Use raiseOnDOMError.
(-[DOMDocument evaluate:contextNode:resolver:type:inResult:]): Ditto.

  • DOM/DOMXPathExpression.mm:

(-[DOMXPathExpression evaluate:type:inResult:]): Ditto.

  • DOM/DOMXPathResult.mm:

(-[DOMXPathResult numberValue]): Ditto.
(-[DOMXPathResult stringValue]): Ditto.
(-[DOMXPathResult booleanValue]): Ditto.
(-[DOMXPathResult singleNodeValue]): Ditto.
(-[DOMXPathResult snapshotLength]): Ditto.
(-[DOMXPathResult iterateNext]): Ditto.
(-[DOMXPathResult snapshotItem:]): Ditto.

Source/WebKit2:

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:

(webkit_dom_document_create_expression): Use ExceptionOr.
(webkit_dom_document_evaluate): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathExpression.cpp:

(webkit_dom_xpath_expression_evaluate): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMXPathResult.cpp:

(webkit_dom_xpath_result_iterate_next): Ditto.
(webkit_dom_xpath_result_snapshot_item): Ditto.
(webkit_dom_xpath_result_get_number_value): Ditto.
(webkit_dom_xpath_result_get_string_value): Ditto.
(webkit_dom_xpath_result_get_boolean_value): Ditto.
(webkit_dom_xpath_result_get_single_node_value): Ditto.
(webkit_dom_xpath_result_get_snapshot_length): Ditto.

9:48 AM Changeset in webkit [207540] by n_wang@apple.com
  • 8 edits
    2 adds in trunk

AX: [Mac] Meter element should use AXValueDescription to descrbe the status of the value
https://bugs.webkit.org/show_bug.cgi?id=163610

Reviewed by Chris Fleizach.

Source/WebCore:

Exposed the goodness of the meter value in AXValueDescription.

Test: accessibility/mac/meter-gauge-value-description.html

  • English.lproj/Localizable.strings:
  • accessibility/AccessibilityProgressIndicator.cpp:

(WebCore::AccessibilityProgressIndicator::gaugeRegionValueDescription):

  • accessibility/AccessibilityProgressIndicator.h:
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper valueDescriptionForMeter]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

  • platform/LocalizedStrings.cpp:

(WebCore::AXMeterGaugeRegionOptimumText):
(WebCore::AXMeterGaugeRegionSuboptimalText):
(WebCore::AXMeterGaugeRegionLessGoodText):

  • platform/LocalizedStrings.h:

LayoutTests:

  • accessibility/mac/meter-gauge-value-description-expected.txt: Added.
  • accessibility/mac/meter-gauge-value-description.html: Added.
9:38 AM Changeset in webkit [207539] by hyatt@apple.com
  • 4 edits in trunk/Source/WebCore

[CSS Parser] Fix named color parsing
https://bugs.webkit.org/show_bug.cgi?id=163662

Reviewed by Zalan Bujtas.

Named color parsing in the old parser for extended colors relied on constructing a Color with the
name and doing a lookup that way.

The new parser allows the back end to hold a primitive identifier value for extended colors.

StyleColor contains a helper function for looking up the correct color.

This patch switches both the old and the new parsers over to the new StyleColor function.

Also remove some asserts from the CSSSelectorList, since the new parser allows it to be empty and
detects parsing failure that way.

  • css/CSSSelectorList.cpp:

(WebCore::CSSSelectorList::CSSSelectorList):
(WebCore::CSSSelectorList::operator=):

  • css/StyleColor.cpp:

(WebCore::StyleColor::isColorKeyword):

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::colorFromPrimitiveValue):
(WebCore::colorForCSSValue): Deleted.

9:33 AM Changeset in webkit [207538] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking WPT html/webappapis/animation-frames/callback-* tests as flaky on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=163361

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
8:10 AM Changeset in webkit [207537] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

Remove SecurityOrigin::taintsCanvas
https://bugs.webkit.org/show_bug.cgi?id=163594

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

No change of behavior.

  • html/canvas/CanvasRenderingContext.cpp:

(WebCore::CanvasRenderingContext::wouldTaintOrigin):

  • page/SecurityOrigin.cpp:

(WebCore::SecurityOrigin::canReceiveDragData):
(WebCore::SecurityOrigin::taintsCanvas): Deleted.

  • page/SecurityOrigin.h:
8:07 AM Changeset in webkit [207536] by hyatt@apple.com
  • 14 edits in trunk/Source/WebCore

[CSS Parser] Fix compound selector parsing.
https://bugs.webkit.org/show_bug.cgi?id=163649

Reviewed by Darin Adler.

The new CSS parser is failing to handle compound selectors. The code has an assumption that the
first value in the RelationType enum is SubSelector. This patch changes the enum to have the same
name used in Blink, RelationType, and to make the ordering be exactly the same.

  • css/CSSSelector.h:

(WebCore::CSSSelector::relation):
(WebCore::CSSSelector::setRelation):

  • css/SelectorChecker.cpp:

(WebCore::SelectorChecker::matchRecursively):
(WebCore::canMatchHoverOrActiveInQuirksMode):
(WebCore::SelectorChecker::determineLinkMatchType):

  • css/SelectorFilter.cpp:

(WebCore::SelectorFilter::collectIdentifierHashes):

  • css/parser/CSSParserValues.cpp:

(WebCore::CSSParserSelector::insertTagHistory):
(WebCore::CSSParserSelector::appendTagHistory):

  • css/parser/CSSParserValues.h:

(WebCore::CSSParserSelector::setRelation):

  • css/parser/CSSSelectorParser.cpp:

(WebCore::CSSSelectorParser::consumeComplexSelector):
(WebCore::CSSSelectorParser::consumeCombinator):

  • css/parser/CSSSelectorParser.h:
  • cssjit/SelectorCompiler.cpp:

(WebCore::SelectorCompiler::fragmentRelationForSelectorRelation):
(WebCore::SelectorCompiler::constructFragmentsInternal):

6:42 AM Changeset in webkit [207535] by jfernandez@igalia.com
  • 5 edits
    2 adds in trunk

Web Inspector: Debugger buttons positioned incorrectly, align-content default value is unexpected
https://bugs.webkit.org/show_bug.cgi?id=163572

Reviewed by Sergio Villar Senin.

Source/WebCore:

We only allow the new CSS Box Alignment syntax when the Grid Layout
feature is enabled. Due to flexbox backward compatibility we have
implemented a different code path for the style initial/default values
assignment. However, we have incorrectly resolved both align-content
and justify-content to 'flex-start' when grid layout is disabled.

This patch changes the approach, so we set 'normal' (the value specified
by the new syntax) for both properties, but using the values defined in
the old syntax (Flexbox specification) at computed style resolution.

Since 'stretch' is the default value for the align-content property, this
issue implies that any flexbox line with an undefined height will be
laid out incorrectly, if not explicitly set via CSS, because flex items
can't use the available height, even though they use 'stretch' for their
'align-self' properties.

Test: css3/flexbox/flexbox-lines-must-be-stretched-by-default.html

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
(WebCore::ComputedStyleExtractor::propertyValue):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::initialContentAlignment):

LayoutTests:

Modified test cases for initial values.
Added regression test for the align-content issue.

  • css3/flexbox/flexbox-lines-must-be-stretched-by-default-expected.txt: Added.
  • css3/flexbox/flexbox-lines-must-be-stretched-by-default.html: Added.
  • fast/css/ensure-flexbox-compatibility-with-initial-values-expected.txt:
4:39 AM Changeset in webkit [207534] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore/platform/gtk/po

[GTK] [L10n] Updated Hungarian translation
https://bugs.webkit.org/show_bug.cgi?id=163650

Patch by Gabor Kelemen <kelemeng@ubuntu.com> on 2016-10-19
Rubber-stamped by Michael Catanzaro.

  • hu.po:
3:42 AM Changeset in webkit [207533] by clopez@igalia.com
  • 2 edits in trunk/Source/WebCore

[GTK] REGRESSION(r207396) Build broken with Clang.
https://bugs.webkit.org/show_bug.cgi?id=163599

Suggested and reviewed by Darin Adler.

  • css/CSSPrimitiveValue.cpp:

(WebCore::CSSPrimitiveValue::getStringValue):

2:20 AM Changeset in webkit [207532] by Csaba Osztrogonác
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed ARM buildfix after r207475.

  • assembler/ARMAssembler.h:

(JSC::ARMAssembler::relinkJumpToNop):

1:18 AM Changeset in webkit [207531] by Philippe Normand
  • 2 edits
    8 adds in trunk/Tools

WebRTC: [GTK] Update jhbuild environment for OpenWebRTC
https://bugs.webkit.org/show_bug.cgi?id=163330

Reviewed by Michael Catanzaro.

Bring back the openwebrtc JHBuild moduleset in the time being. It
should be removed after the bump to GStreamer 1.10 is complete and
the libnice patches have been upstreamed. The GStreamer git
snapshots used in this patch are the ones configured in Ericsson's
GStreamer Cerbero fork.

  • gtk/openwebrtc.modules: Added.
  • gtk/patches/libnice-0001-TURN-allow-REALM-to-be-empty.patch: Added.
  • gtk/patches/libnice-0001-agent-Remove-unnecessary-NULL-check.patch: Added.
  • gtk/patches/libnice-0001-nicesrc-spin-the-agent-mainloop-in-a-separate-thread.patch: Added.
  • gtk/patches/libnice-0002-Do-not-update-a-remote-candidate-s-type.patch: Added.
  • gtk/patches/libnice-0002-TURN-handle-437-Allocation-Mismatch-responses.patch: Added.
  • gtk/patches/libnice-0003-Do-not-compare-scope-for-IPv6-address-when-scope-is-.patch: Added.
  • gtk/patches/libnice-0004-Removing-no-op-assignment.patch: Added.
12:59 AM Changeset in webkit [207530] by Carlos Garcia Campos
  • 6 edits in trunk/Source/WebKit2

NetworkSession: updatedRequest parameter of NetworkProcess::findPendingDownloadLocation is unused since r206988
https://bugs.webkit.org/show_bug.cgi?id=163588

Reviewed by Alex Christensen.

The parameter was used only for the DownloadProxy::DidStart message that is no longer sent from
findPendingDownloadLocation since r206988.

  • NetworkProcess/NetworkDataTask.h:

(WebKit::NetworkDataTask::currentRequest): Removed since it's unused now.

  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::convertTaskToDownload): Update the m_currentRequest and pass it to DidStart message.
(WebKit::NetworkLoad::didReceiveResponseNetworkSession):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::findPendingDownloadLocation):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: Remove currentRequest() implementation.
12:46 AM Changeset in webkit [207529] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

Unreviewed. Fix GTK+ build after r207522.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp:

(webkit_dom_dom_window_webkit_message_handlers_post_message): Use new exceptions.

12:42 AM Changeset in webkit [207528] by Darin Adler
  • 2 edits in trunk/Source/WebCore

2016-10-19 Darin Adler <Darin Adler>

Try to fix build on some compilers.

  • page/PerformanceUserTiming.cpp: Add back class name; needed by some compiler versions.
12:40 AM Changeset in webkit [207527] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

Unreviewed. Fix the build after r207522.

  • page/PerformanceUserTiming.cpp: Include PerformanceTiming.h.
12:24 AM Changeset in webkit [207526] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

Unreviewed. Fix GTK+ build after r207497.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLSelectElement.cpp:

(webkit_dom_html_select_element_add): Update implementation since add() now takes a Variant.

12:20 AM Changeset in webkit [207525] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

Unreviewed. Fix the build after r207519.

The build error is:
IDL ATTRIBUTE CHECKER ERROR: Unknown IDL attribute [PassContext] is found at TestRunner.idl.

Because PassContext was removed from IDLAttributes.txt in rr207519, but it's implemented by
CodeGeneratorTestRunner.pm and used by TestRunner.idl.

  • bindings/scripts/IDLAttributes.txt: Bring back PassContext.
12:15 AM Changeset in webkit [207524] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

Unreviewed. Fix the build with GCC 4.9 after r207463.

Add constructors to MediaConstraintsData.

  • Modules/mediastream/MediaConstraintsImpl.h:

(WebCore::MediaConstraintsData::MediaConstraintsData):

12:07 AM Changeset in webkit [207523] by jer.noble@apple.com
  • 7 edits
    2 adds in trunk

Source/WebCore:
[Mac][MSE] Movies with a 'mehd' box have a zero-duration
https://bugs.webkit.org/show_bug.cgi?id=163641

Reviewed by Darin Adler.

Test: media/media-source/media-source-init-segment-duration.html

The canonical (ISO/IEC 14496-12:2012) way to signal the duration of a fragmented media file is to add a
'mehd' box to the 'mvex' container box specifying the duration of the fragment. Support this through the
AVAsset -overallDurationHint property.

  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:

(WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):

  • platform/spi/mac/AVFoundationSPI.h:

LayoutTests:
[Mac][MSE] Movies with a 'mvex' box have a zero-duration
https://bugs.webkit.org/show_bug.cgi?id=163641

Reviewed by Darin Adler.

  • media/media-source/content/test-fragmented-manifest.json:
  • media/media-source/content/test-fragmented.mp4:
  • platform/mac/TestExpectations:
12:00 AM Changeset in webkit [207522] by Darin Adler
  • 33 edits in trunk/Source

Move many miscellaneous classes from ExceptionCode to Exception
https://bugs.webkit.org/show_bug.cgi?id=163645

Reviewed by Ryosuke Niwa.

Source/WebCore:

  • bindings/js/JSCryptoCustom.cpp:

(WebCore::JSCrypto::getRandomValues): Use propagateException.

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::handlePostMessage): Ditto.
(WebCore::JSDOMWindow::setTimeout): Use toJSNumber.
(WebCore::JSDOMWindow::setInterval): Ditto.

  • bindings/js/JSStorageCustom.cpp:

(WebCore::JSStorage::nameGetter): Use propagateException.
(WebCore::JSStorage::deleteProperty): Ditto.
(WebCore::JSStorage::getOwnPropertyNames): Ditto.
(WebCore::JSStorage::putDelegate): Ditto.

  • loader/appcache/DOMApplicationCache.cpp:

(WebCore::DOMApplicationCache::update): Use ExceptionOr.
(WebCore::DOMApplicationCache::swapCache): Ditto.

  • loader/appcache/DOMApplicationCache.h: Update for above changes.
  • loader/appcache/DOMApplicationCache.idl: Use non-legacy exceptions.
  • page/Crypto.cpp:

(WebCore::Crypto::getRandomValues): Use ExceptionOr.
(WebCore::Crypto::webkitSubtle): Ditto.

  • page/Crypto.h: Updated for above changes.
  • page/Crypto.idl: Use non-legacy exceptions.
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::DOMWindow): Initialize many data members in
the class definition instead of here.
(WebCore::DOMWindow::page): Use nullptr.
(WebCore::DOMWindow::screen): Ditto.
(WebCore::DOMWindow::crypto): Ditto.
(WebCore::DOMWindow::locationbar): Ditto.
(WebCore::DOMWindow::menubar): Ditto.
(WebCore::DOMWindow::personalbar): Ditto.
(WebCore::DOMWindow::scrollbars): Ditto.
(WebCore::DOMWindow::statusbar): Ditto.
(WebCore::DOMWindow::toolbar): Ditto.
(WebCore::DOMWindow::applicationCache): Ditto.
(WebCore::DOMWindow::sessionStorage): Use ExceptionOr.
(WebCore::DOMWindow::localStorage): Ditto.
(WebCore::DOMWindow::postMessage): Ditto.
(WebCore::DOMWindow::frameElement): Use nullptr.
(WebCore::DOMWindow::self): Ditto.
(WebCore::DOMWindow::opener): Ditto.
(WebCore::DOMWindow::parent): Ditto.
(WebCore::DOMWindow::top): Ditto.
(WebCore::DOMWindow::getComputedStyle): Use Ref.
(WebCore::DOMWindow::setTimeout): Use ExceptionOr.
(WebCore::DOMWindow::setInterval): Ditto.
(WebCore::didAddStorageEventListener): Use a reference instead of a
pointer, and ignore return value instead of using IGNORE_EXCEPTION.
(WebCore::DOMWindow::addEventListener): Pass reference to function above.
(WebCore::DOMWindow::dispatchEvent): Use enum class version of PageStatus.

  • page/DOMWindow.h: Updated for changes above. Also changed indentatation.
  • page/DOMWindow.idl: Use non-legacy exceptions.
  • page/EventSource.cpp:

(WebCore::EventSource::create): Use ExceptionOr.

  • page/EventSource.h: Updated for change above.
  • page/EventSource.idl: Use non-legacy exception.
  • page/Location.cpp:

(WebCore::Location::setProtocol): Use ExceptionOr.

  • page/Location.h: Updated for change above.
  • page/Location.idl: Use non-legacy exception.
  • page/Performance.cpp:

(WebCore::Performance::Performance): Remove unnecessary initialization of
smart pointer to null, and moved initialization of m_resourceTimingBufferSize
to the header.
(WebCore::Performance::navigation): Made non-const and return a reference.
(WebCore::Performance::timing): Ditto.
(WebCore::Performance::addResourceTiming): Change LoadTiming argument to use
a const& instead of passing in a copy.
(WebCore::Performance::webkitMark): Use ExceptionOr and make_unique.
(WebCore::Performance::webkitClearMarks): Ditto.
(WebCore::Performance::webkitMeasure): Ditto.
(WebCore::Performance::webkitClearMeasures): Ditto.
(WebCore::Performance::reduceTimeResolution): Use std::floor.

  • page/Performance.h: Updated for above changes. Removed unneeded includes.

Made more things private. Removed unneeded reference counting of UserTiming.

  • page/Performance.idl: Use non-legacy exceptions.
  • page/PerformanceUserTiming.cpp:

(WebCore::restrictedMarkFunction): Removed unneeded class name.
(WebCore::UserTiming::UserTiming): Take a reference instead of a pointer.
(WebCore::UserTiming::mark): Use ExceptionOr.
(WebCore::UserTiming::findExistingMarkStartTime): Ditto.
(WebCore::UserTiming::measure): Ditto.
(WebCore::getEntrySequenceByName): Simplified code using HashMap::get.

  • page/PerformanceUserTiming.h: Updated for above changes. Removed reference

counting since this is a single-owner object.

  • page/UserMessageHandler.cpp:

(WebCore::UserMessageHandler::postMessage): Use ExceptionOr.

  • page/UserMessageHandler.h: Updated for above change.
  • page/UserMessageHandler.idl: Use non-legacy exception.
  • storage/Storage.cpp:

(WebCore::Storage::length): Use ExceptionOr.
(WebCore::Storage::key): Ditto.
(WebCore::Storage::getItem): Ditto.
(WebCore::Storage::setItem): Ditto.
(WebCore::Storage::removeItem): Ditto.
(WebCore::Storage::clear): Ditto.
(WebCore::Storage::contains): Ditto.

  • storage/Storage.h: Updated for above change.
  • storage/Storage.idl: Use non-legacy exceptions.
  • storage/StorageEventDispatcher.cpp:

(WebCore::StorageEventDispatcher::dispatchSessionStorageEventsToFrames):
Updated for ExceptionOr.
(WebCore::StorageEventDispatcher::dispatchLocalStorageEventsToFrames): Ditto.

Source/WebKit/win:

  • DOMCoreClasses.cpp:

(DOMDocument::getComputedStyle): Use ptr instead of get since the return
value is now Ref instead of RefPtr.

Oct 18, 2016:

10:25 PM Changeset in webkit [207521] by Darin Adler
  • 15 edits in trunk/Source/WebCore

Move internal testing classes from ExceptionCode to Exception
https://bugs.webkit.org/show_bug.cgi?id=163553

Reviewed by Ryosuke Niwa.

  • bindings/js/JSDOMBinding.h: Added toJSArray. Also exported a function that

is now needed in the testing library.

  • bindings/scripts/CodeGeneratorJS.pm:

(NativeToJSValue): Added code to handle the jsArray case with an exception.

  • css/parser/CSSPropertyParser.cpp: Fix #if to make code compile when

CSS_SCROLL_SNAP is not enabled.

  • dom/Element.cpp:

(WebCore::Element::createShadowRoot): Changed return type to a raw pointer.
There is no reason it needs to be a RefPtr.

  • dom/Element.h: Updated for above change.
  • svg/SVGPathStringBuilder.h: Exported class and made more public so it can

be used in test code.

  • svg/SVGPathUtilities.cpp:

(WebCore::pathIteratorForBuildingString): Deleted. Needed only for test code,
so moved into there.
(WebCore::buildStringFromPath): Deleted. Ditto.

  • svg/SVGPathUtilities.h: Removed buildStringFromPath.
  • testing/InternalSettings.cpp: Simplified the guard macro and used the all

capitals style that our style guide prescribes for non-function-like macros.
(WebCore::InternalSettings::create): Moved here, no longer inline Use m_page.
(WebCore::InternalSettings::resetToConsistentState): Updated since settings
returns a reference.
(WebCore::InternalSettings::settings): Changed to return a reference and
assert that m_page is not null; functions all check m_page for null first.
(WebCore::InternalSettings::setTouchEventEmulationEnabled): Updated to use
ExceptionOr, do an m_page check, and use settings that returns a reference.
(WebCore::InternalSettings::setStandardFontFamily): Ditto.
(WebCore::InternalSettings::setSerifFontFamily): Ditto.
(WebCore::InternalSettings::setSansSerifFontFamily): Ditto.
(WebCore::InternalSettings::setFixedFontFamily): Ditto.
(WebCore::InternalSettings::setCursiveFontFamily): Ditto.
(WebCore::InternalSettings::setFantasyFontFamily): Ditto.
(WebCore::InternalSettings::setPictographFontFamily): Ditto.
(WebCore::InternalSettings::setTextAutosizingEnabled): Ditto.
(WebCore::InternalSettings::setTextAutosizingWindowSizeOverride): Ditto.
(WebCore::InternalSettings::setMediaTypeOverride): Ditto.
(WebCore::InternalSettings::setCanStartMedia): Ditto.
(WebCore::InternalSettings::setAllowsAirPlayForMediaPlayback): Ditto.
(WebCore::InternalSettings::setEditingBehavior): Ditto.
(WebCore::InternalSettings::setShouldDisplayTrackKind): Ditto.
(WebCore::InternalSettings::shouldDisplayTrackKind): Ditto.
(WebCore::InternalSettings::setStorageBlockingPolicy): Ditto.
(WebCore::InternalSettings::setPreferMIMETypeForImages): Ditto.
(WebCore::InternalSettings::setImagesEnabled): Ditto.
(WebCore::InternalSettings::setPDFImageCachingPolicy): Ditto.
(WebCore::InternalSettings::setMinimumTimerInterval): Ditto.
(WebCore::InternalSettings::setDefaultVideoPosterURL): Ditto.
(WebCore::InternalSettings::setForcePendingWebGLPolicy): Ditto.
(WebCore::InternalSettings::setTimeWithoutMouseMovementBeforeHidingControls): Ditto.
(WebCore::InternalSettings::setUseLegacyBackgroundSizeShorthandBehavior): Ditto.
(WebCore::InternalSettings::setAutoscrollForDragAndDropEnabled): Ditto.
(WebCore::InternalSettings::setFontFallbackPrefersPictographs): Ditto.
(WebCore::InternalSettings::setWebFontsAlwaysFallBack): Ditto.
(WebCore::InternalSettings::setQuickTimePluginReplacementEnabled): Ditto.
(WebCore::InternalSettings::setYouTubeFlashPluginReplacementEnabled): Ditto.
(WebCore::InternalSettings::setBackgroundShouldExtendBeyondPage): Ditto.
(WebCore::InternalSettings::setShouldConvertPositionStyleOnCopy): Ditto.
(WebCore::InternalSettings::setScrollingTreeIncludesFrames): Ditto.
(WebCore::InternalSettings::setAllowsInlineMediaPlayback): Ditto.
(WebCore::InternalSettings::setAllowsInlineMediaPlaybackAfterFullscreen): Ditto.
(WebCore::InternalSettings::setInlineMediaPlaybackRequiresPlaysInlineAttribute): Ditto.
(WebCore::InternalSettings::setIndexedDBWorkersEnabled): Ditto.
(WebCore::InternalSettings::userInterfaceDirectionPolicy): Ditto.
(WebCore::InternalSettings::setUserInterfaceDirectionPolicy): Ditto.
(WebCore::InternalSettings::systemLayoutDirection): Ditto.
(WebCore::InternalSettings::setSystemLayoutDirection): Ditto.
(WebCore::InternalSettings::variationFontsEnabled): Ditto.
(WebCore::InternalSettings::setVariationFontsEnabled): Ditto.
(WebCore::InternalSettings::forcedPrefersReducedMotionValue): Ditto.
(WebCore::InternalSettings::setForcedPrefersReducedMotionValue): Ditto.

  • testing/InternalSettings.h: Updated for above changes. Also moved Backup to make

it private instead of public.

  • testing/InternalSettings.idl: Use non-legacy execption. Also removed unneeded

exception for setIndexedDBWorkersEnabled.

  • testing/Internals.cpp: Marked InspectorStubFrontend final and made everything private.

(WebCore::Internals::setCanShowModalDialogOverride): Use ExceptionOr.
(WebCore::Internals::lastSpatialNavigationCandidateCount): Ditto.
(WebCore::Internals::animationsAreSuspended): Ditto.
(WebCore::Internals::suspendAnimations): Ditto.
(WebCore::Internals::resumeAnimations): Ditto.
(WebCore::Internals::pauseAnimationAtTimeOnElement): Ditto.
(WebCore::Internals::pauseAnimationAtTimeOnPseudoElement): Ditto.
(WebCore::Internals::pauseTransitionAtTimeOnElement): Ditto.
(WebCore::Internals::pauseTransitionAtTimeOnPseudoElement): Ditto.
(WebCore::Internals::elementRenderTreeAsText): Ditto.
(WebCore::Internals::ensureShadowRoot): Ditto.
(WebCore::Internals::createShadowRoot): Ditto.
(WebCore::Internals::shadowRootType): Ditto.
(WebCore::Internals::isTimerThrottled): Ditto.
(WebCore::Internals::formControlStateOfPreviousHistoryItem): Ditto.
(WebCore::Internals::setFormControlStateOfPreviousHistoryItem): Ditto.
(WebCore::Internals::absoluteCaretBounds): Ditto.
(WebCore::Internals::inspectorHighlightRects): Ditto.
(WebCore::Internals::inspectorHighlightObject): Ditto.
(WebCore::Internals::markerCountForNode): Ditto.
(WebCore::Internals::markerAt): Ditto.
(WebCore::Internals::markerRangeForNode): Ditto.
(WebCore::Internals::markerDescriptionForNode): Ditto.
(WebCore::Internals::dumpMarkerRects): Ditto.
(WebCore::Internals::setMarkedTextMatchesAreHighlighted): Ditto.
(WebCore::Internals::setScrollViewPosition): Ditto.
(WebCore::Internals::setViewBaseBackgroundColor): Ditto.
(WebCore::Internals::setPagination): Ditto.
(WebCore::Internals::setPaginationLineGridEnabled): Ditto.
(WebCore::Internals::configurationForViewport): Ditto.
(WebCore::Internals::wasLastChangeUserEdit): Ditto.
(WebCore::Internals::scrollElementToRect): Ditto.
(WebCore::Internals::autofillFieldName): Ditto.
(WebCore::Internals::paintControlTints): Ditto.
(WebCore::Internals::rangeForDictionaryLookupAtLocation): Ditto.
(WebCore::Internals::setDelegatesScrolling): Ditto.
(WebCore::Internals::lastSpellCheckRequestSequence): Ditto.
(WebCore::Internals::lastSpellCheckProcessedSequence): Ditto.
(WebCore::Internals::wheelEventHandlerCount): Ditto.
(WebCore::Internals::touchEventHandlerCount): Ditto.
(WebCore::Internals::nodesFromRect): Ditto.
(WebCore::Internals::setBatteryStatus): Ditto.
(WebCore::Internals::setDeviceProximity): Ditto.
(WebCore::Internals::hasSpellingMarker): Ditto.
(WebCore::Internals::hasAutocorrectedMarker): Ditto.
(WebCore::Internals::handleAcceptedCandidate): Ditto.
(WebCore::Internals::isOverwriteModeEnabled): Ditto.
(WebCore::Internals::toggleOverwriteModeEnabled): Ditto.
(WebCore::Internals::countMatchesForText): Ditto.
(WebCore::Internals::countFindMatches): Ditto.
(WebCore::Internals::setInspectorIsUnderTest): Ditto.
(WebCore::Internals::hasGrammarMarker): Ditto.
(WebCore::Internals::numberOfScrollableAreas): Ditto.
(WebCore::Internals::isPageBoxVisible): Ditto.
(WebCore::Internals::layerTreeAsText): Ditto.
(WebCore::Internals::repaintRectsAsText): Ditto.
(WebCore::Internals::scrollingStateTreeAsText): Ditto.
(WebCore::Internals::mainThreadScrollingReasons): Ditto.
(WebCore::Internals::nonFastScrollableRects): Ditto.
(WebCore::Internals::setElementUsesDisplayListDrawing): Ditto.
(WebCore::Internals::setElementTracksDisplayListReplay): Ditto.
(WebCore::Internals::displayListForElement): Ditto.
(WebCore::Internals::replayDisplayListForElement): Ditto.
(WebCore::Internals::garbageCollectDocumentResources): Ditto.
(WebCore::Internals::insertAuthorCSS): Ditto.
(WebCore::Internals::insertUserCSS): Ditto.
(WebCore::Internals::pageProperty): Ditto.
(WebCore::Internals::pageSizeAndMarginsInPixels): Ditto.
(WebCore::Internals::setPageScaleFactor): Ditto.
(WebCore::Internals::setPageZoomFactor): Ditto.
(WebCore::Internals::setTextZoomFactor): Ditto.
(WebCore::Internals::setUseFixedLayout): Ditto.
(WebCore::Internals::setFixedLayoutSize): Ditto.
(WebCore::Internals::setViewExposedRect): Ditto.
(WebCore::Internals::setHeaderHeight): Ditto.
(WebCore::Internals::setFooterHeight): Ditto.
(WebCore::Internals::setTopContentInset): Ditto.
(WebCore::Internals::setApplicationCacheOriginQuota): Ditto.
(WebCore::Internals::startTrackingRepaints): Ditto.
(WebCore::Internals::stopTrackingRepaints): Ditto.
(WebCore::Internals::startTrackingLayerFlushes): Ditto.
(WebCore::Internals::layerFlushCount): Ditto.
(WebCore::Internals::startTrackingStyleRecalcs): Ditto.
(WebCore::Internals::styleRecalcCount): Ditto.
(WebCore::Internals::startTrackingCompositingUpdates): Ditto.
(WebCore::Internals::compositingUpdateCount): Ditto.
(WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks): Ditto.
(WebCore::Internals::getCurrentCursorInfo): Ditto.
(WebCore::Internals::mediaElementHasCharacteristic): Ditto.
(WebCore::Internals::captionsStyleSheetOverride): Ditto.
(WebCore::Internals::setCaptionsStyleSheetOverride): Ditto.
(WebCore::Internals::setPrimaryAudioTrackLanguageOverride): Ditto.
(WebCore::Internals::setCaptionDisplayMode): Ditto.
(WebCore::Internals::selectionBounds): Ditto.
(WebCore::Internals::isVibrating): Ditto.
(WebCore::Internals::isPluginUnavailabilityIndicatorObscured): Ditto.
(WebCore::Internals::beginMediaSessionInterruption): Ditto.
(WebCore::Internals::setMediaSessionRestrictions): Ditto.
(WebCore::Internals::postRemoteControlCommand): Ditto.
(WebCore::Internals::setMockMediaPlaybackTargetPickerState): Ditto.
(WebCore::Internals::installMockPageOverlay): Ditto.
(WebCore::Internals::pageOverlayLayerTreeAsText): Ditto.
(WebCore::Internals::scrollSnapOffsets): Ditto.
(WebCore::Internals::pathStringWithShrinkWrappedRects): Moved the code that builds
the path string in here for now since it's only used for this testing.
(WebCore::Internals::resourceLoadStatisticsForOrigin): Take a const String&.

  • testing/Internals.h: Updated for above changes.
  • testing/Internals.idl: Use non-legacy exceptions.
10:03 PM Changeset in webkit [207520] by rniwa@webkit.org
  • 15 edits
    8 adds
    2 deletes in trunk/LayoutTests

Import the latest custom elements tests from W3C
https://bugs.webkit.org/show_bug.cgi?id=163640

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Import more custom elements tests from web-platform-tests as of fbe5ac0fd8eecac67d1562032eeba5bd7ec2b735.
Most of these tests are written and fixed by me.

  • web-platform-tests/custom-elements/htmlconstructor/newtarget-expected.txt:
  • web-platform-tests/custom-elements/htmlconstructor/newtarget.html:
  • web-platform-tests/custom-elements/reactions/DOMStringMap-expected.txt: Added.
  • web-platform-tests/custom-elements/reactions/DOMStringMap.html: Added.
  • web-platform-tests/custom-elements/reactions/Document-expected.txt:
  • web-platform-tests/custom-elements/reactions/Document.html:
  • web-platform-tests/custom-elements/reactions/Element-expected.txt:
  • web-platform-tests/custom-elements/reactions/Element.html:
  • web-platform-tests/custom-elements/reactions/ElementContentEditable-expected.txt: Added.
  • web-platform-tests/custom-elements/reactions/ElementContentEditable.html: Added.
  • web-platform-tests/custom-elements/reactions/HTMLElement-expected.txt: Added.
  • web-platform-tests/custom-elements/reactions/HTMLElement.html: Added.
  • web-platform-tests/custom-elements/reactions/NamedNodeMap-expected.txt:
  • web-platform-tests/custom-elements/reactions/NamedNodeMap.html:
  • web-platform-tests/custom-elements/reactions/Range-expected.txt:
  • web-platform-tests/custom-elements/reactions/Range.html:
  • web-platform-tests/custom-elements/reactions/Selection-expected.txt: Added.
  • web-platform-tests/custom-elements/reactions/Selection.html: Added.
  • web-platform-tests/custom-elements/reactions/resources/reactions.js:
  • web-platform-tests/custom-elements/reactions/w3c-import.log:
  • web-platform-tests/custom-elements/resources/custom-elements-helpers.js:

LayoutTests:

Removed the test re-imported via web-platform-tests in r206838.

  • fast/custom-elements/lifecycle-callback-timing-expected.txt: Removed.
  • fast/custom-elements/lifecycle-callback-timing.html: Removed.
9:46 PM Changeset in webkit [207519] by Chris Dumez
  • 9 edits
    2 adds in trunk

[Web IDL] Drop webkit-specific extended attributes that are no longer useful
https://bugs.webkit.org/show_bug.cgi?id=163643

Reviewed by Ryosuke Niwa.

Source/WebCore:

Drop webkit-specific IDL extended attributes that are no longer useful:

  • [CustomReturn]: I believe this used to be for ObjC bindings. It has no impact in JS bindings.
  • [Deletable]: It only had an impact on static attributes and was only used on HTMLAllCollection.all, which is not static. I updated the bindings generator to so that static attributes are now configurable by default (unless marked as [Unforgeable], as per Web IDL [1]. This causes Notification.permission (This only static attribute we have) to become deletable. This behavior is consistent with the specification and with Chrome. I added test coverage for this.
  • [ImplementationNamespace]: Implemented but unused.
  • [PassContext]: Not implemented and unused.
  • [TypedArray=*]: Not implemented and unused.

[1] https://heycam.github.io/webidl/#es-attributes

Test: fast/notifications/notification-permisssion-deletable.html

  • bindings/scripts/CodeGeneratorJS.pm:

(GetNamespaceForInterface):
(GenerateImplementation):

  • bindings/scripts/IDLAttributes.txt:
  • bindings/scripts/test/JS/JSTestInterface.cpp:
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/JS/JSTestTypedefs.cpp:
  • dom/Node.idl:
  • html/HTMLDocument.idl:

LayoutTests:

Add layout test to check that Notification.permission is now deletable.

  • fast/notifications/notification-permisssion-deletable-expected.txt: Added.
  • fast/notifications/notification-permisssion-deletable.html: Added.
8:52 PM Changeset in webkit [207518] by mark.lam@apple.com
  • 15 edits
    1 add in trunk

Invoking Object.prototype.proto accessors directly should throw a TypeError.
https://bugs.webkit.org/show_bug.cgi?id=154377
<rdar://problem/27330808>

Reviewed by Filip Pizlo and Saam Barati.

JSTests:

  • stress/object-prototype-proto-accessors-should-throw-on-undefined-this.js: Added.

Source/JavaScriptCore:

In a scenario where we cache the proto accessors in global variables, and
later explicitly invoke those accessors as functions, the spec for Function Calls
(see https://tc39.github.io/ecma262/#sec-function-calls) states that the function
ref value is of type Reference, and base of ref is an Environment Record. Then,
it follows that the thisValue should be set to refEnv.WithBaseObject()
(see section 4.b.ii of 12.3.4.1 at
https://tc39.github.io/ecma262/#sec-function-calls-runtime-semantics-evaluation).

refEnv in this case is the environment record that the cached accessors were
found in i.e. the global object. The WithBaseObject() of the global object is
undefined (see details about WithBaseObject at
https://tc39.github.io/ecma262/#sec-environment-records).

Hence, the proto accessors should see a thisValue of undefined, and throw
TypeErrors. See https://tc39.github.io/ecma262/#sec-get-object.prototype.__proto,
https://tc39.github.io/ecma262/#sec-set-object.prototype.__proto
,
https://tc39.github.io/ecma262/#sec-toobject, and
https://tc39.github.io/ecma262/#sec-requireobjectcoercible.

In JSC's implementation, the callee needs to do a ToThis operation on the
incoming "this" argument in order to get the specified thisValue. The
implementations of the proto accessors were not doing this correctly. This
has now been fixed.

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncProtoGetter):
(JSC::globalFuncProtoSetter):

LayoutTests:

  • http/tests/security/xss-DENIED-htmlelelment-with-iframe-proto-expected.txt:
  • http/tests/security/xss-DENIED-method-with-iframe-proto-expected.txt:
  • http/tests/security/xss-DENIED-non-shadowable-propterty-with-iframe-proto-expected.txt:
  • http/tests/security/xss-DENIED-regular-propterty-with-iframe-proto-expected.txt:
  • http/tests/security/xss-DENIED-regular-propterty-with-iframe-proto.html:
  • js/dom/activation-proto-expected.txt:
  • js/dom/script-tests/activation-proto.js:
  • js/object-literal-shorthand-construction-expected.txt:
  • js/script-tests/object-literal-shorthand-construction.js:
  • js/script-tests/sloppy-getter-setter-global-object.js:
  • js/sloppy-getter-setter-global-object-expected.txt:
7:43 PM Changeset in webkit [207517] by commit-queue@webkit.org
  • 22 edits in trunk

Replace std::experimental::variant with WTF::Variant (or similar)
https://bugs.webkit.org/show_bug.cgi?id=163626

Patch by Sam Weinig <sam@webkit.org> on 2016-10-18
Reviewed by Chris Dumez.

Rename std::experimental::variant, Variant. Move helpers get/holds_alternative/etc.
into the WTF namespace.

Source/JavaScriptCore:

  • domjit/DOMJITReg.h:

(JSC::DOMJIT::Reg::gpr):
(JSC::DOMJIT::Reg::fpr):
(JSC::DOMJIT::Reg::jsValueRegs):

Source/WebCore:

  • Modules/fetch/FetchBody.h:

(WebCore::FetchBody::isBlob):
(WebCore::FetchBody::isFormData):
(WebCore::FetchBody::isArrayBuffer):
(WebCore::FetchBody::isArrayBufferView):
(WebCore::FetchBody::isURLSearchParams):
(WebCore::FetchBody::isText):
(WebCore::FetchBody::blobBody):
(WebCore::FetchBody::formDataBody):
(WebCore::FetchBody::arrayBufferBody):
(WebCore::FetchBody::arrayBufferViewBody):
(WebCore::FetchBody::textBody):
(WebCore::FetchBody::urlSearchParamsBody):

  • bindings/generic/IDLTypes.h:
  • dom/ExceptionOr.h:

(WebCore::ExceptionOr<ReturnType>::hasException):
(WebCore::ExceptionOr<ReturnType>::releaseException):
(WebCore::ExceptionOr<ReturnType>::releaseReturnValue):

  • dom/MessageEvent.cpp:

(WebCore::MessageEvent::source):

  • dom/MessageEvent.h:
  • dom/Node.cpp:

(WebCore::nodeSetPreTransformedFromNodeOrStringVector):
(WebCore::Node::convertNodesOrStringsIntoNode):

  • dom/Node.h:
  • html/HTMLOptionsCollection.h:
  • html/HTMLSelectElement.cpp:

(WebCore::HTMLSelectElement::add):

  • html/HTMLSelectElement.h:
  • html/track/TrackEvent.cpp:

(WebCore::TrackEvent::TrackEvent):

  • html/track/TrackEvent.h:

Source/WebKit/mac:

  • DOM/DOMHTMLSelectElement.mm:

(-[DOMHTMLSelectElement add:before:]):

Source/WTF:

  • wtf/Forward.h:
  • wtf/Variant.h:

Tools:

  • TestWebKitAPI/Tests/WTF/Variant.cpp:

(TestWebKitAPI::TEST):

7:33 PM Changeset in webkit [207516] by Chris Dumez
  • 6 edits in trunk/Source/WebCore

Unreviewed, rebaseline bindings tests after Sam's r207505.

  • bindings/scripts/test/JS/JSTestCallback.cpp:

(WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):

  • bindings/scripts/test/JS/JSTestCallbackFunction.cpp:

(WebCore::JSTestCallbackFunction::callbackWithSerializedScriptValueParam):

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::jsTestObjPrototypeFunctionSerializedValueCaller):

  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:

(WebCore::jsTestSerializedScriptValueInterfaceValueGetter):
(WebCore::jsTestSerializedScriptValueInterfaceReadonlyValueGetter):
(WebCore::jsTestSerializedScriptValueInterfaceCachedValueGetter):
(WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValueGetter):
(WebCore::setJSTestSerializedScriptValueInterfaceValueFunction):
(WebCore::setJSTestSerializedScriptValueInterfaceCachedValueFunction):

  • bindings/scripts/test/JS/JSTestTypedefs.cpp:

(WebCore::jsTestTypedefsImmutableSerializedScriptValueGetter):
(WebCore::setJSTestTypedefsImmutableSerializedScriptValueFunction):

7:26 PM Changeset in webkit [207515] by Chris Dumez
  • 13 edits in trunk

[Web IDL] Kill support for [LegacyConstructorTemplate=Event] / [LegacyInitializedByEventConstructor]
https://bugs.webkit.org/show_bug.cgi?id=163630

Reviewed by Darin Adler.

Source/WebCore:

Kill support for [LegacyConstructorTemplate=Event] / [LegacyInitializedByEventConstructor] in our
IDL now that all our events use proper constructors instead.

  • bindings/scripts/CodeGenerator.pm:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):
(GenerateConstructorDefinition):
(GenerateConstructorHelperMethods):
(IsConstructable):

  • bindings/scripts/IDLAttributes.txt:
  • dom/Event.h:

(WebCore::Event::create):

  • dom/Event.idl:
  • dom/UIEvent.h:

(WebCore::UIEvent::create):

  • dom/UIEvent.idl:

LayoutTests:

Update / rebaseline existing tests to reflect minor behavior changes.

  • fast/events/constructors/event-constructors-expected.txt:
  • fast/events/constructors/event-constructors.html:
  • fast/events/constructors/ui-event-constructor-expected.txt:
7:05 PM WebKitIDL edited by Chris Dumez
Drop ConstructorTemplate and TypedArray as those are no longer supported (diff)
7:03 PM Changeset in webkit [207514] by Chris Dumez
  • 12 edits
    2 adds in trunk

Changing details.open should cause a toggle event to be fired asynchronously
https://bugs.webkit.org/show_bug.cgi?id=163568

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/html/dom/interfaces-expected.txt:

Rebaseline W3C test now that more checks are passing.

  • web-platform-tests/html/semantics/interactive-elements/the-details-element/toggleEvent-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-details-element/toggleEvent.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-details-element/w3c-import.log:

Import test coverage for the toggle event.

Source/WebCore:

Changing details.open should cause a toggle event to be fired asynchronously:

Firefox and Chrome implement this, we don't.

Test: imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-details-element/toggleEvent.html

  • dom/EventNames.h:
  • dom/GlobalEventHandlers.idl:
  • html/HTMLAttributeNames.in:
  • html/HTMLDetailsElement.cpp:

(WebCore::detailToggleEventSender):
(WebCore::HTMLDetailsElement::~HTMLDetailsElement):
(WebCore::HTMLDetailsElement::dispatchPendingEvent):
(WebCore::HTMLDetailsElement::parseAttribute):

  • html/HTMLDetailsElement.h:
  • html/HTMLElement.cpp:

(WebCore::HTMLElement::createEventHandlerNameMap):

LayoutTests:

Rebaseline existing test now that a new ontoggle attribute is exposed.

  • js/dom/dom-static-property-for-in-iteration-expected.txt:
6:06 PM Changeset in webkit [207513] by hyatt@apple.com
  • 7 edits in trunk/Source/WebCore

[CSS Parser] Enable basic parser testing.
https://bugs.webkit.org/show_bug.cgi?id=163639

Reviewed by Dean Jackson.

  • css/SelectorChecker.cpp:

(WebCore::SelectorChecker::matchRecursively):
Remove the ASSERT_NOT_REACHED on the new shadow selectors. We need to implement this
eventually, but it's better to not assert on that for now.

  • css/parser/CSSParserValues.cpp:

(WebCore::CSSParserSelector::isHostPseudoSelector):
Make sure to check that we're a pseudoclass selector first, since otherwise we'll assert.

  • css/parser/CSSParserValues.h:

(WebCore::CSSParserSelector::needsImplicitShadowCombinatorForMatching):
Make sure to check that we're a pseudoelement selector first, since otherwise we'll assert.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::addExpandedPropertyForValue):
copyRef is needed here, since a singleton value is being propagated to all the expanded shorthand properties.

(WebCore::parseSingleShadow):
(WebCore::CSSPropertyParser::consumeFont):
Remove the font properties that aren't part of our shorthand. We will need to revisit this eventually as it seems
some of the font properties should be reset as part of this shorthand but aren't.

6:03 PM Changeset in webkit [207512] by Simon Fraser
  • 11 edits in trunk

Add a MiniBrowser menu item to apply page scale in WK1 and WK2
https://bugs.webkit.org/show_bug.cgi?id=163627

Reviewed by Dean Jackson.

Source/WebKit/mac:

Add an explanatory comment about viewScaleFactor not really being viewScaleFactor.

  • WebView/WebViewPrivate.h:

Source/WebKit2:

New SPI to set and retrieve page scale.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setPageScale:withOrigin:]):
(-[WKWebView _pageScale]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:

Tools:

Rename setScale: to setViewScale: and add setPageScale:, hooking it up for WK1 (via exisiting SPI)
and WK2 (via new SPI).

  • MiniBrowser/mac/BrowserWindowController.h:
  • MiniBrowser/mac/BrowserWindowController.m:

(-[BrowserWindowController pageScaleForMenuItemTag:]):
(-[BrowserWindowController setPageScale:]):
(-[BrowserWindowController setViewScale:]):
(-[BrowserWindowController setScale:]): Deleted.

  • MiniBrowser/mac/MainMenu.xib:
  • MiniBrowser/mac/WK1BrowserWindowController.m:

(-[WK1BrowserWindowController setPageScale:]):
(-[WK1BrowserWindowController setViewScale:]):
(areEssentiallyEqual):
(-[WK1BrowserWindowController validateMenuItem:]):
(-[WK1BrowserWindowController setScale:]): Deleted.

  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[WK2BrowserWindowController setPageScale:]):
(-[WK2BrowserWindowController viewScaleForMenuItemTag:]):
(-[WK2BrowserWindowController setViewScale:]):
(areEssentiallyEqual):
(-[WK2BrowserWindowController validateMenuItem:]):
(viewScaleForMenuItemTag): Deleted.
(-[WK2BrowserWindowController setScale:]): Deleted.

5:51 PM Changeset in webkit [207511] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Update the comment for HTML Imports as there is now a proposal to use ES6 Modules for this.
Also replace the contact by me since I'm most familiar with this feature.

  • features.json:
5:39 PM Changeset in webkit [207510] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Update the status of shadow DOM API to "Done" with a comment saying we're still fixing bugs.

Also update my contact information since I'm no longer on Twitter.

  • features.json:
5:27 PM Changeset in webkit [207509] by Chris Dumez
  • 10 edits in trunk

Provide better form validation messages
https://bugs.webkit.org/show_bug.cgi?id=163584

Reviewed by Darin Adler.

Source/WebCore:

Provide better form validation messages that match more closely the ones
from Chrome and Firefox.

No new tests, updated existing tests.

  • English.lproj/Localizable.strings:
  • platform/LocalizedStrings.cpp:

(WebCore::validationMessageValueMissingText):
(WebCore::validationMessageValueMissingForCheckboxText):
(WebCore::validationMessageValueMissingForFileText):
(WebCore::validationMessageValueMissingForMultipleFileText):
(WebCore::validationMessageValueMissingForRadioText):
(WebCore::validationMessageValueMissingForSelectText):
(WebCore::validationMessageTypeMismatchText):
(WebCore::validationMessageTypeMismatchForEmailText):
(WebCore::validationMessageTypeMismatchForMultipleEmailText):
(WebCore::validationMessageTypeMismatchForURLText):
(WebCore::validationMessagePatternMismatchText):
(WebCore::validationMessageTooShortText):
(WebCore::validationMessageTooLongText):
(WebCore::validationMessageRangeUnderflowText):
(WebCore::validationMessageRangeOverflowText):
(WebCore::validationMessageStepMismatchText):
(WebCore::validationMessageBadInputForNumberText):

LayoutTests:

Update existing tests now that form validation messages differ.

  • fast/forms/number/number-validation-message-expected.txt:
  • fast/forms/number/number-validation-message.html:
  • fast/forms/validationMessage-expected.txt:
  • platform/mac/fast/forms/validation-message-appearance-expected.txt:
5:21 PM Changeset in webkit [207508] by andersca@apple.com
  • 2 edits in trunk/Tools

Add an beforeunload alert to the WebKitLegacy MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=163634

Reviewed by Sam Weinig.

  • MiniBrowser/mac/WK1BrowserWindowController.m:

(-[WK1BrowserWindowController webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:]):

5:20 PM Changeset in webkit [207507] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

Fix GTK build.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseSingleValue):

5:12 PM Changeset in webkit [207506] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/basic-upgrade-cors.https.html as flaky on Sierra.
https://bugs.webkit.org/show_bug.cgi?id=163453

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
5:05 PM Changeset in webkit [207505] by weinig@apple.com
  • 30 edits in trunk/Source/WebCore

Simplify SerializedScriptValue, MessagePortArray and ArrayBufferArray to ease generation
https://bugs.webkit.org/show_bug.cgi?id=163625

Reviewed by Chris Dumez.

  • Replace uses of MessagePortArray (a.k.a. Vector<RefPtr<MessagePort>, 1>) with Vector<RefPtr<MessagePort>>.
  • Replace uses of ArrayBufferArray (a.k.a. Vector<RefPtr<ArrayBuffer>, 1>) with Vector<RefPtr<ArrayBuffer>>.
  • Add convenience functions to SerializedScriptValue to allow calling with fewer parameters.
  • Move MessagePorts and ArrayBuffers more where possible.
  • Modules/indexeddb/IDBObjectStore.cpp:

(WebCore::IDBObjectStore::putOrAdd):

  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):

  • bindings/js/IDBBindingUtilities.cpp:

(WebCore::deserializeIDBValueToJSValue):

  • bindings/js/JSCustomEventCustom.cpp:

(WebCore::JSCustomEvent::detail):

  • bindings/js/JSHistoryCustom.cpp:

(WebCore::JSHistory::state):
(WebCore::JSHistory::pushState):
(WebCore::JSHistory::replaceState):

  • bindings/js/JSPopStateEventCustom.cpp:

(WebCore::JSPopStateEvent::state):

  • dom/CustomEvent.cpp:

(WebCore::CustomEvent::trySerializeDetail):

  • dom/ErrorEvent.cpp:

(WebCore::ErrorEvent::sanitizedErrorValue):
(WebCore::ErrorEvent::trySerializeError):

  • dom/PopStateEvent.cpp:

(WebCore::PopStateEvent::trySerializeState):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::postMessage):

  • page/DOMWindow.h:
  • workers/DedicatedWorkerGlobalScope.cpp:

(WebCore::DedicatedWorkerGlobalScope::postMessage):

  • workers/DedicatedWorkerGlobalScope.h:
  • workers/Worker.cpp:

(WebCore::Worker::postMessage):

  • workers/Worker.h:
  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::handlePostMessage):

  • bindings/js/JSDictionary.cpp:

(WebCore::JSDictionary::convertValue):

  • bindings/js/JSDictionary.h:

Updated for new SerializedScriptValue interface/vector naming.

  • bindings/js/JSMessageEventCustom.cpp:

(WebCore::handleInitMessageEvent):
Update handleInitMessageEvent to check for exceptions and use convert for the MessagePort sequence.

  • bindings/js/JSMessagePortCustom.cpp:

(WebCore::extractTransferables):
(WebCore::fillMessagePortArray): Deleted.

  • bindings/js/JSMessagePortCustom.h:

(WebCore::handlePostMessage):
Rename fillMessagePortArray to extractTransferables to better express what it does.

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneSerializer::serialize):
(WebCore::CloneSerializer::CloneSerializer):
(WebCore::CloneSerializer::fillTransferMap):
(WebCore::CloneSerializer::dumpIfTerminal):
(WebCore::CloneDeserializer::deserialize):
(WebCore::CloneDeserializer::CloneDeserializer):
(WebCore::CloneDeserializer::readTerminal):
(WebCore::SerializedScriptValue::transferArrayBuffers):
(WebCore::SerializedScriptValue::create):
(WebCore::SerializedScriptValue::deserialize):

  • bindings/js/SerializedScriptValue.h:

Simplify interface to allow more callers to avoid passing default arguments. Use ExecState& more.

  • bindings/scripts/CodeGeneratorJS.pm:

(GetNativeVectorType):
Remove special case for MessagePort.
(JSValueToNative):
(NativeToJSValue):
Updated for new SerializedScriptValue interface.

  • dom/MessageEvent.cpp:

(WebCore::MessageEvent::MessageEvent):
(WebCore::MessageEvent::create):
(WebCore::MessageEvent::initMessageEvent):
(WebCore::MessageEvent::trySerializeData):

  • dom/MessageEvent.h:

Store the MessagePort sequence as a Vector<RefPtr<MessagePort>> rather than in a unique_ptr.

  • dom/MessageEvent.idl:

Update last type in init functions to be sequence<MessagePort> rather than Array. They are still
custom, as we don't quite generate these correctly yet.

  • dom/MessagePort.cpp:

(WebCore::MessagePort::postMessage):
(WebCore::MessagePort::dispatchMessages):
(WebCore::MessagePort::disentanglePorts):
(WebCore::MessagePort::entanglePorts):

  • dom/MessagePort.h:

Update interface to take MessagePort vectors by rvalue reference.

4:55 PM Changeset in webkit [207504] by bshafiei@apple.com
  • 2 edits in tags/Safari-603.1.9.0.2/Source/WebCore

Merged r207474. rdar://problem/28786160

4:54 PM Changeset in webkit [207503] by bshafiei@apple.com
  • 5 edits in tags/Safari-603.1.9.0.2/Source

Versioning.

4:52 PM Changeset in webkit [207502] by bshafiei@apple.com
  • 1 copy in tags/Safari-603.1.9.0.2

New tag.

4:40 PM Changeset in webkit [207501] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

[iOS] Drop JSDictionary::convertValue() overload taking a TouchList
https://bugs.webkit.org/show_bug.cgi?id=163620

Reviewed by Sam Weinig.

Drop JSDictionary::convertValue() overload taking a TouchList now that
TouchEvent is using a proper constructor with a TouchEventInit
dictionary on iOS.

  • bindings/js/JSDictionary.cpp:
4:40 PM Changeset in webkit [207500] by keith_miller@apple.com
  • 3 edits
    1 add in trunk

GetByVal to GetById conversion in the DFG is incorrect for getters with control flow
https://bugs.webkit.org/show_bug.cgi?id=163629

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/get-by-val-to-id-with-getter.js: Added.

(foo):
(o.get hello):

Source/JavaScriptCore:

This patch fixes a bug in the DFG when attempt to convert a
GetByVal into a GetById. While converting the GetByVal, during
handleGetById in the Bytecode parser, we would mistakenly use the
opcode length of op_get_by_id rather than op_get_by_val. This causes
the new basic block we create to point to the wrong offset. In the
added test this will cause us to infinite loop.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleGetById):
(JSC::DFG::ByteCodeParser::parseBlock):

4:33 PM Changeset in webkit [207499] by dino@apple.com
  • 42 edits in trunk

Remove CSS_SHAPES feature definition. This should always be on.
https://bugs.webkit.org/show_bug.cgi?id=163628
<rdar://problem/28834613>
.:

Reviewed by Tim Horton.

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

Source/JavaScriptCore:

Reviewed by Tim Horton.

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Reviewed by Tim Horton.

CSS Shapes is in Candidate Recommendation. It's a core part
of CSS. It should always be enabled.

  • Configurations/FeatureDefines.xcconfig:
  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::shapePropertyValue):
(WebCore::ComputedStyleExtractor::propertyValue):

  • css/CSSPropertyNames.in:
  • css/CSSValueKeywords.in:
  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertShapeValue):

  • css/parser/CSSParser.cpp:

(WebCore::isSimpleLengthPropertyID):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseShapeProperty):

  • css/parser/CSSParser.h:
  • inspector/InspectorOverlay.cpp:

(WebCore::buildObjectForShapeOutside):
(WebCore::buildObjectForElementData):

  • page/animation/CSSPropertyAnimation.cpp:

(WebCore::blendFunc):
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

  • rendering/FloatingObjects.cpp:

(WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):
(WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatLeft>::updateOffsetIfNeeded):
(WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatRight>::updateOffsetIfNeeded):

  • rendering/RenderBlock.cpp:
  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::positionNewFloats):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::~RenderBox):
(WebCore::RenderBox::styleDidChange):
(WebCore::RenderBox::updateShapeOutsideInfoAfterStyleChange):
(WebCore::isCandidateForOpaquenessTest):
(WebCore::RenderBox::imageChanged):

  • rendering/RenderBox.h:

(WebCore::RenderBox::markShapeOutsideDependentsForLayout):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::~RenderElement):
(WebCore::RenderElement::updateShapeImage):
(WebCore::RenderElement::initializeStyle):
(WebCore::RenderElement::setStyle):

  • rendering/RenderElement.h:

(WebCore::RenderElement::hasShapeOutside):

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::canUseForWithReason):

  • rendering/line/LineWidth.cpp:

(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
(WebCore::LineWidth::wrapNextToShapeOutside):
(WebCore::LineWidth::fitBelowFloats):

  • rendering/line/LineWidth.h:
  • rendering/shapes/ShapeOutsideInfo.cpp:
  • rendering/shapes/ShapeOutsideInfo.h:
  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::changeRequiresLayout):
(WebCore::RenderStyle::changeRequiresRepaint):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::initialShapeImageThreshold):

  • rendering/style/ShapeValue.cpp:
  • rendering/style/ShapeValue.h:
  • rendering/style/StyleRareNonInheritedData.cpp:

(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):

  • rendering/style/StyleRareNonInheritedData.h:
  • style/StylePendingResources.cpp:

(WebCore::Style::loadPendingResources):

Source/WebKit/mac:

Reviewed by Tim Horton.

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

Reviewed by Tim Horton.

  • Configurations/FeatureDefines.xcconfig:
4:18 PM Changeset in webkit [207498] by Chris Dumez
  • 9 edits in trunk/Source/WebCore

convertDictionary<>() no longer needs to return an Optional<> type
https://bugs.webkit.org/show_bug.cgi?id=163624

Reviewed by Sam Weinig.

convertDictionary<>() no longer needs to return an Optional<> type now
that our dictionary structures are all default constructible after
<https://trac.webkit.org/changeset/206974>.

  • bindings/js/JSDOMConvert.h:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateDictionaryHeaderContent):
(GenerateDictionaryImplementationContent):

  • bindings/scripts/test/JS/JSTestEventConstructor.cpp:

(WebCore::convertDictionary<TestEventConstructor::Init>):

  • bindings/scripts/test/JS/JSTestEventConstructor.h:
  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::convertDictionary<TestObj::Dictionary>):
(WebCore::convertDictionary<TestObj::DictionaryThatShouldNotTolerateNull>):
(WebCore::convertDictionary<TestObj::DictionaryThatShouldTolerateNull>):
(WebCore::convertDictionary<AlternateDictionaryName>):
(WebCore::convertDictionary<TestObj::ParentDictionary>):
(WebCore::convertDictionary<TestObj::ChildDictionary>):

  • bindings/scripts/test/JS/JSTestObj.h:
  • bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:

(WebCore::convertDictionary<DictionaryImplName>):

  • bindings/scripts/test/JS/JSTestStandaloneDictionary.h:
4:18 PM Changeset in webkit [207497] by Chris Dumez
  • 20 edits in trunk

Leverage new union type support for HTMLSelectElement.add() / HTMLOptionsCollection.add()
https://bugs.webkit.org/show_bug.cgi?id=163608

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline W3C test now that one more check is passing. This is because we are now
correctly throwing a TypeError when calling add() with an unexpected HTMLElement type.

  • web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmloptionscollection-expected.txt:

Source/WebCore:

Leverage new union type support for HTMLSelectElement.add() / HTMLOptionsCollection.add():

No new tests, rebaseline existing test.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateDefaultValue):
(GenerateParametersCheck):

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceIsEmptyCaller):

  • bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:

(WebCore::constructJSTestOverloadedConstructorsWithSequence1):

  • bindings/scripts/test/JS/JSTestTypedefs.cpp:

(WebCore::jsTestTypedefsPrototypeFunctionFuncCaller):

  • html/HTMLOptGroupElement.idl:
  • html/HTMLOptionsCollection.cpp:

(WebCore::HTMLOptionsCollection::add):

  • html/HTMLOptionsCollection.h:
  • html/HTMLOptionsCollection.idl:
  • html/HTMLSelectElement.cpp:

(WebCore::HTMLSelectElement::add):
(WebCore::HTMLSelectElement::setOption):
(WebCore::HTMLSelectElement::setLength):

  • html/HTMLSelectElement.h:
  • html/HTMLSelectElement.idl:

Source/WebKit/mac:

Update add() call sites now that it takes std::variant types in.

  • DOM/DOMHTMLOptionsCollection.mm:

(-[DOMHTMLOptionsCollection add:index:]):

  • DOM/DOMHTMLSelectElement.mm:

(-[DOMHTMLSelectElement add:before:]):

LayoutTests:

Rebaseline existing tests now that exception messages are different.

  • fast/dom/HTMLSelectElement/add-expected.txt:
  • fast/dom/HTMLSelectElement/options-collection-add-expected.txt:
  • fast/dom/incompatible-operations-expected.txt:
4:04 PM Changeset in webkit [207496] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Web Inspector: AXI: focused/focusable state should be based on Accessibility Object instead of Element
https://bugs.webkit.org/show_bug.cgi?id=163088
<rdar://problem/16421985>

Patch by Aaron Chu <aaron_chu@apple.com> on 2016-10-18
Reviewed by Darin Adler.

Changed code in InspectDOMAgent so that it determines the focusability of a Node based
on the AccessibilityNodeObject and not the Element class.

Covered by existing tests:
LayoutTests/inspector/dom/getAccessibilityPropertiesForNode.html

  • inspector/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):

3:57 PM Changeset in webkit [207495] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit/win

Try to fix the Windows build.

  • WebHistoryItem.cpp:

(WebHistoryItem::redirectURLs):

3:33 PM Changeset in webkit [207494] by Ryan Haddad
  • 3 edits in trunk/Source/WebKit2

Unreviewed, rolling out r207413.

This change broke iOS builds.

Reverted changeset:

"[iOS] Hook up WebPlatformTouchPoint's radiusX / radiusY to
_UIWebTouchPoint.majorRadiusInScreenCoordinates"
https://bugs.webkit.org/show_bug.cgi?id=163547
http://trac.webkit.org/changeset/207413

3:28 PM Changeset in webkit [207493] by andersca@apple.com
  • 6 edits in trunk/Source

Get rid of more WebHistoryItem cruft
https://bugs.webkit.org/show_bug.cgi?id=163623

Reviewed by Tim Horton.

Source/WebCore:

  • history/HistoryItem.cpp:

(WebCore::HistoryItem::HistoryItem):

  • history/HistoryItem.h:

(WebCore::HistoryItem::setViewportArguments):
(WebCore::HistoryItem::bookmarkID): Deleted.
(WebCore::HistoryItem::setBookmarkID): Deleted.
(WebCore::HistoryItem::sharedLinkUniqueIdentifier): Deleted.
(WebCore::HistoryItem::setSharedLinkUniqueIdentifier): Deleted.

Source/WebKit/mac:

  • History/WebHistoryItem.mm:

(-[WebHistoryItem initFromDictionaryRepresentation:]):

  • History/WebHistoryItemPrivate.h:
3:22 PM Changeset in webkit [207492] by Dewei Zhu
  • 5 edits in trunk/Websites/perf.webkit.org

Update test cases for change r206465.
https://bugs.webkit.org/show_bug.cgi?id=163618

Reviewed by Ryosuke Niwa.

Update test case for change r206465 which added support for multiple summary pages.
Use deepStrictEqual instead of deepEqual as deepEqual will not complain in the case like 'deepEqual([],{})'.
Fix a test failure in tools-buildbot-triggerable-tests.js.
Fix a bug in generating manifest.

  • config.json:
  • public/include/manifest.php:
  • server-tests/api-manifest.js:

(TestServer.remoteAPI.getJSON.string_appeared_here.then):

  • server-tests/tools-buildbot-triggerable-tests.js:

(then):

2:28 PM Changeset in webkit [207491] by msaboff@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

Add JSC option to show time spent in each optimization phase
https://bugs.webkit.org/show_bug.cgi?id=163617

Reviewed by Saam Barati.

Added reportDFGPhaseTimes option. This outputs one line per phase similar to

Phase CPS rethreading took 0.2661 ms

One line is output for each phase run.

  • dfg/DFGPhase.h:

(JSC::DFG::runAndLog):

  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::compileInThread):

  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

  • runtime/Options.h:
2:26 PM Changeset in webkit [207490] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

Fix Windows build.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseSingleValue):

2:07 PM Changeset in webkit [207489] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Styles Sidebar highlights "translate" but not "translateX"
https://bugs.webkit.org/show_bug.cgi?id=163613
<rdar://problem/28829610>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-10-18
Reviewed by Timothy Hatcher.

  • UserInterface/Models/CSSCompletions.js:

(WebInspector.CSSCompletions.requestCSSCompletions):
The hash table objects we pass to CodeMirror expects keys to be lowercased.

2:03 PM Changeset in webkit [207488] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Modern media controls don't update their rendering correctly
https://bugs.webkit.org/show_bug.cgi?id=163603
<rdar://problem/28826022>

Patch by Antoine Quint <Antoine Quint> on 2016-10-18
Reviewed by Dean Jackson.

There are rendering issues when we use an absolutely-positioned element
as the top-most element in a media element's shadow root (webkit.org/b/163592).
Since we only need for that element to be positioned, we can use "position: relative"
instead, which removes the rendering issues.

  • Modules/modern-media-controls/controls/media-controls.css:

(.media-controls):
(.media-controls,): Deleted.

1:55 PM Changeset in webkit [207487] by dino@apple.com
  • 5 edits in trunk/Source/WebCore

Add preliminary support for extended colors to WebCore::Color
https://bugs.webkit.org/show_bug.cgi?id=162878
<rdar://problem/28596413>

Follow-up review comments from Darin Adler.

  • html/canvas/CanvasGradient.cpp:

(WebCore::CanvasGradient::addColorStop): Use nullptr.

  • platform/graphics/Color.cpp:

(WebCore::Color::Color): Explicitly zero before assigning the pointer.

  • platform/graphics/Color.h: Add some comments about the failings of operator== and hash.

(WebCore::Color::Color): Add some static_asserts to the constructors. Move the empty and deleted values
to static constants.
(WebCore::Color::isHashTableDeletedValue):
(WebCore::Color::hash): Replacement for asUint64, which was only being used for a hash.
(WebCore::Color::asUint64): Deleted.

  • platform/graphics/ColorHash.h: Use new hash functions. Use "using" instead of typedef.

(WTF::ColorHash::hash):

1:40 PM Changeset in webkit [207486] by rniwa@webkit.org
  • 4 edits
    2 adds in trunk

REGRESSION (r201471): Keyboard remains visible when swiping back on twitter.com
https://bugs.webkit.org/show_bug.cgi?id=163581
<rdar://problem/27739558>

Reviewed by Simon Fraser.

Source/WebCore:

The bug was caused by Chrome::elementDidBlur not getting called, which resulted in
StopAssistingNode not getting sent to the UI process.

Test: fast/forms/ios/hide-keyboard-on-node-removal.html

  • dom/Document.cpp:

(WebCore::Document::setFocusedElement): Restore the behavior prior to r201471 by calling
Chrome::elementDidBlur explicitly.

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::dispatchBlurEvent): Added a comment about ordering.

LayoutTests:

Added a regression test for hiding a keyboard when the focused element is removed from the DOM.

  • fast/forms/ios/hide-keyboard-on-node-removal-expected.txt: Added.
  • fast/forms/ios/hide-keyboard-on-node-removal.html: Added.
1:36 PM Changeset in webkit [207485] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-buttons-styles.html as flaky on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=163598

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
1:31 PM Changeset in webkit [207484] by commit-queue@webkit.org
  • 6 edits
    1 delete in trunk

Unreviewed, rolling out r207443.
https://bugs.webkit.org/show_bug.cgi?id=163616

"Caused 5% PLT regression" (Requested by krollin on #webkit).

Reverted changeset:

"Crash in ASCIICaseInsensitiveHash::hash() when a response has
a null MIME type"
https://bugs.webkit.org/show_bug.cgi?id=163476
http://trac.webkit.org/changeset/207443

1:30 PM Changeset in webkit [207483] by Wenson Hsieh
  • 4 edits in trunk/Source/WebKit/mac

Showing and hiding candidates list is very distracting after selecting word
https://bugs.webkit.org/show_bug.cgi?id=163609
<rdar://problem/28747712>

Reviewed by Tim Horton.

Introduce WebView hooks for mousedown and mouseup. See radar for more details.

  • WebView/WebHTMLView.mm:

(-[WebHTMLView mouseDown:mouseDown:]):
(-[WebHTMLView mouseUp:mouseUp:]):

  • WebView/WebView.mm:

(-[WebView prepareForMouseDown]):
(-[WebView prepareForMouseUp]):

  • WebView/WebViewInternal.h:
1:22 PM Changeset in webkit [207482] by andersca@apple.com
  • 13 edits in trunk/Source

Move some history specific HistoryItem code to WebHistoryItem
https://bugs.webkit.org/show_bug.cgi?id=163567

Reviewed by Tim Horton.

Source/WebCore:

  • history/HistoryItem.cpp:

(WebCore::HistoryItem::addRedirectURL): Deleted.
(WebCore::HistoryItem::redirectURLs): Deleted.
(WebCore::HistoryItem::setRedirectURLs): Deleted.

  • history/HistoryItem.h:

Source/WebKit/mac:

  • History/HistoryPropertyList.mm:

(HistoryPropertyListWriter::writeHistoryItem):

  • History/WebHistory.mm:

(-[WebHistory _visitedURL:withTitle:method:wasFailure:]):

  • History/WebHistoryItem.mm:

(-[WebHistoryItem initFromDictionaryRepresentation:]):

  • History/WebHistoryItemInternal.h:
  • WebCoreSupport/WebFrameLoaderClient.mm:

(addRedirectURL):
(WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):

Source/WebKit/win:

Remove these, they aren't used.

  • WebCoreSupport/WebFrameLoaderClient.cpp:

(WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):

  • WebHistory.cpp:

(WebHistory::visitedURL):

  • WebHistoryItem.cpp:

(WebHistoryItem::initFromDictionaryRepresentation):
(WebHistoryItem::dictionaryRepresentation):

1:21 PM Changeset in webkit [207481] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: CSS Autocompletion sometimes adds extra unexpected characters
https://bugs.webkit.org/show_bug.cgi?id=163612
<rdar://problem/28829557>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-10-18
Reviewed by Timothy Hatcher.

  • UserInterface/Controllers/CodeMirrorCompletionController.js:

(WebInspector.CodeMirrorCompletionController.prototype._generateCSSCompletions):
Better handle completions in cases where we are in the middle of a property
to avoid orphaned characters, or at the end of a function name to avoid creating
duplicate parenthesis.

1:17 PM Changeset in webkit [207480] by fpizlo@apple.com
  • 7 edits
    2 adds in trunk/Source

WTF should make it easier to create threads that die automatically after inactivity
https://bugs.webkit.org/show_bug.cgi?id=163576

Reviewed by Andreas Kling.

Source/JavaScriptCore:

Added a sleepSeconds() function, which made it easier for me to test this change.

The WTF changes in this patch change how the JSC GC manages threads: the GC threads will now
shut down automatically after 1 second of inactivity. Maybe this will save some memory.

  • jsc.cpp:

(GlobalObject::finishCreation):
(functionSleepSeconds):

Source/WTF:

For a long time now, I've been adding threads to WTF/JSC and each time I do this, I feel
guilty because those threads don't shut down when they are inactive. For example, in bug
163562, I need to add a new GC thread. There will be one of them per VM. This means that a
JSC API client that starts a lot of VMs will have a lot of threads. I don't think that's
good.

A common pattern for all of these threads is that they have some well-defined trigger that
causes them to run. This trigger has a lock, a condition variable, some logic that determines
if there is work to do, and then of course the logic for the thread's actual work. The thread
bodies usually look like this:

void Thingy::runThread()
{

for (;;) {

Work work;
{

LockHolder locker(m_lock);
while (!hasWork())

m_cond.wait(m_lock);

work = takeWork();

}
doWork(work);

}

}

If you look at ParallelHelperPool (the GC's threads) and DFG::Worklist (some of the JIT's
threads), you will see this pattern.

This change adds a new kind of thread, called AutomaticThread, that lets you write threads to
this pattern while getting automatic thread shutdown for free: instead of just waiting on a
condition variable, AutomaticThread will have a timeout that causes the thread to die. The
condition variable associated with AutomaticThread, called AutomaticThreadCondition, is smart
enough to restart any threads that have decided to stop due to inactivity. The inactivity
threshold is current just 1 second.

In this patch I only adopt AutomaticThread for ParallelHelperPool. I plan to adopt it in more
places soon.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/AutomaticThread.cpp: Added.

(WTF::AutomaticThreadCondition::create):
(WTF::AutomaticThreadCondition::AutomaticThreadCondition):
(WTF::AutomaticThreadCondition::~AutomaticThreadCondition):
(WTF::AutomaticThreadCondition::notifyAll):
(WTF::AutomaticThreadCondition::add):
(WTF::AutomaticThreadCondition::remove):
(WTF::AutomaticThreadCondition::contains):
(WTF::AutomaticThread::AutomaticThread):
(WTF::AutomaticThread::~AutomaticThread):
(WTF::AutomaticThread::join):
(WTF::AutomaticThread::start):

  • wtf/AutomaticThread.h: Added.
  • wtf/CMakeLists.txt:
  • wtf/ParallelHelperPool.cpp:

(WTF::ParallelHelperClient::ParallelHelperClient):
(WTF::ParallelHelperClient::~ParallelHelperClient):
(WTF::ParallelHelperClient::setTask):
(WTF::ParallelHelperClient::finish):
(WTF::ParallelHelperClient::doSomeHelping):
(WTF::ParallelHelperClient::runTask):
(WTF::ParallelHelperPool::ParallelHelperPool):
(WTF::ParallelHelperPool::~ParallelHelperPool):
(WTF::ParallelHelperPool::ensureThreads):
(WTF::ParallelHelperPool::doSomeHelping):
(WTF::ParallelHelperPool::Thread::Thread):
(WTF::ParallelHelperPool::didMakeWorkAvailable):
(WTF::ParallelHelperPool::helperThreadBody): Deleted.
(WTF::ParallelHelperPool::waitForClientWithTask): Deleted.

  • wtf/ParallelHelperPool.h:
1:03 PM Changeset in webkit [207479] by hyatt@apple.com
  • 18 edits
    2 adds in trunk/Source/WebCore

[CSS Parser] Get all the properties turned on
https://bugs.webkit.org/show_bug.cgi?id=163605

Reviewed by Dean Jackson.

  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSFunctionValue.h:
  • css/CSSPendingSubstitutionValue.cpp: Added.

(WebCore::CSSPendingSubstitutionValue::customCSSText):

  • css/CSSPendingSubstitutionValue.h: Added.

(WebCore::CSSPendingSubstitutionValue::create):
(WebCore::CSSPendingSubstitutionValue::shorthandValue):
(WebCore::CSSPendingSubstitutionValue::shorthandPropertyId):
(WebCore::CSSPendingSubstitutionValue::equals):
(WebCore::CSSPendingSubstitutionValue::CSSPendingSubstitutionValue):

  • css/CSSValue.cpp:

(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):

  • css/CSSValue.h:

(WebCore::CSSValue::isPendingSubstitutionValue):

  • css/CSSValueKeywords.in:
  • css/StylePropertyShorthand.cpp:

(WebCore::transitionShorthandForParsing):

  • css/StylePropertyShorthand.h:
  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::completeURL):

  • css/parser/CSSParserImpl.cpp:

(WebCore::CSSParserImpl::parseValue):
(WebCore::CSSParserImpl::consumeDeclaration):
(WebCore::CSSParserImpl::consumeDeclarationValue):

  • css/parser/CSSParserMode.h:

(WebCore::CSSParserContext::completeURL):

  • css/parser/CSSParserToken.cpp:

(WebCore::CSSParserToken::parseAsCSSPropertyID):
(WebCore::CSSParserToken::parseAsUnresolvedCSSPropertyID): Deleted.

  • css/parser/CSSParserToken.h:
  • css/parser/CSSPropertyParser.cpp:

(WebCore::cssPropertyID):
(WebCore::CSSPropertyParser::addProperty):
(WebCore::CSSPropertyParser::addExpandedPropertyForValue):
(WebCore::CSSPropertyParser::parseValue):
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::CSSPropertyParser::parseValueStart):
(WebCore::CSSPropertyParser::consumeCSSWideKeyword):
(WebCore::consumeTransformOrigin):
(WebCore::consumeWillChange):
(WebCore::consumeFontFeatureTag):
(WebCore::consumeFontFeatureSettings):
(WebCore::consumePage):
(WebCore::consumeQuotes):
(WebCore::FontVariantLigaturesParser::consumeLigature):
(WebCore::FontVariantLigaturesParser::finalizeValue):
(WebCore::consumeFontVariantLigatures):
(WebCore::consumeFontVariantCaps):
(WebCore::FontVariantNumericParser::consumeNumeric):
(WebCore::FontVariantNumericParser::finalizeValue):
(WebCore::consumeFontVariantNumeric):
(WebCore::consumeFontVariantCSS21):
(WebCore::consumeFontVariantList):
(WebCore::consumeFontWeight):
(WebCore::consumeFamilyName):
(WebCore::consumeGenericFamily):
(WebCore::consumeFontFamily):
(WebCore::consumeSpacing):
(WebCore::consumeTabSize):
(WebCore::consumeTextSizeAdjust):
(WebCore::consumeFontSize):
(WebCore::consumeLineHeight):
(WebCore::createPrimitiveValuePair):
(WebCore::consumeCounter):
(WebCore::consumePageSize):
(WebCore::consumeSize):
(WebCore::consumeTextIndent):
(WebCore::validWidthOrHeightKeyword):
(WebCore::consumeMaxWidthOrHeight):
(WebCore::consumeWidthOrHeight):
(WebCore::consumeMarginOrOffset):
(WebCore::consumeClipComponent):
(WebCore::consumeClip):
(WebCore::consumeTouchAction):
(WebCore::consumeLineClamp):
(WebCore::consumeLocale):
(WebCore::consumeColumnWidth):
(WebCore::consumeColumnCount):
(WebCore::consumeColumnGap):
(WebCore::consumeColumnSpan):
(WebCore::consumeZoom):
(WebCore::consumeAnimationIterationCount):
(WebCore::consumeAnimationName):
(WebCore::consumeTransitionProperty):
(WebCore::consumeCubicBezier):
(WebCore::consumeAnimationTimingFunction):
(WebCore::consumeAnimationValue):
(WebCore::isValidAnimationPropertyList):
(WebCore::consumeAnimationPropertyList):
(WebCore::CSSPropertyParser::consumeAnimationShorthand):
(WebCore::consumeZIndex):
(WebCore::parseSingleShadow):
(WebCore::consumeShadow):
(WebCore::consumeFilterFunction):
(WebCore::consumeFilter):
(WebCore::consumeTextDecorationLine):
(WebCore::consumeTextEmphasisStyle):
(WebCore::consumeOutlineColor):
(WebCore::consumeLineWidth):
(WebCore::consumeBorderWidth):
(WebCore::consumeTextStrokeWidth):
(WebCore::consumeColumnRuleWidth):
(WebCore::consumeTranslate3d):
(WebCore::consumeNumbers):
(WebCore::consumePerspective):
(WebCore::consumeTransformValue):
(WebCore::consumeTransform):
(WebCore::consumePositionLonghand):
(WebCore::consumePositionX):
(WebCore::consumePositionY):
(WebCore::consumePaintStroke):
(WebCore::consumePaintOrder):
(WebCore::consumeNoneOrURI):
(WebCore::consumeFlexBasis):
(WebCore::consumeStrokeDasharray):
(WebCore::consumeBaselineShift):
(WebCore::consumeRxOrRy):
(WebCore::consumeCursor):
(WebCore::consumeAttr):
(WebCore::consumeCounterContent):
(WebCore::consumeContent):
(WebCore::consumePositionList):
(WebCore::consumeScrollSnapCoordinate):
(WebCore::consumeScrollSnapPoints):
(WebCore::consumeBorderRadiusCorner):
(WebCore::consumeVerticalAlign):
(WebCore::consumeShapeRadius):
(WebCore::consumeBasicShapeCircle):
(WebCore::consumeBasicShapeEllipse):
(WebCore::consumeBasicShapePolygon):
(WebCore::complete4Sides):
(WebCore::consumeRadii):
(WebCore::consumeBasicShapeInset):
(WebCore::consumeBasicShape):
(WebCore::consumeWebkitClipPath):
(WebCore::consumeShapeOutside):
(WebCore::consumeContentDistributionOverflowPosition):
(WebCore::consumeBorderImageRepeatKeyword):
(WebCore::consumeBorderImageRepeat):
(WebCore::consumeBorderImageSlice):
(WebCore::consumeBorderImageOutset):
(WebCore::consumeBorderImageWidth):
(WebCore::consumeBorderImageComponents):
(WebCore::consumeWebkitBorderImage):
(WebCore::consumeReflect):
(WebCore::consumeImageOrientation):
(WebCore::consumeBackgroundBlendMode):
(WebCore::consumeBackgroundAttachment):
(WebCore::consumeBackgroundBox):
(WebCore::consumeBackgroundComposite):
(WebCore::consumePrefixedBackgroundBox):
(WebCore::consumeBackgroundSize):
(WebCore::consumeGridAutoFlow):
(WebCore::consumeBackgroundComponent):
(WebCore::addBackgroundValue):
(WebCore::consumeCommaSeparatedBackgroundComponent):
(WebCore::consumeSelfPositionKeyword):
(WebCore::consumeSelfPositionOverflowPosition):
(WebCore::consumeAlignItems):
(WebCore::consumeJustifyItems):
(WebCore::consumeFitContent):
(WebCore::consumeCustomIdentForGridLine):
(WebCore::consumeGridLine):
(WebCore::isGridTrackFixedSized):
(WebCore::consumeGridBreadth):
(WebCore::consumeGridTrackSize):
(WebCore::consumeGridLineNames):
(WebCore::consumeGridTrackRepeatFunction):
(WebCore::consumeGridTrackList):
(WebCore::consumeGridTemplatesRowsOrColumns):
(WebCore::consumeGridTemplateAreas):
(WebCore::consumeFontFaceUnicodeRange):
(WebCore::consumeFontFaceSrcURI):
(WebCore::consumeFontFaceSrcLocal):
(WebCore::consumeFontFaceSrc):
(WebCore::CSSPropertyParser::parseFontFaceDescriptor):
(WebCore::CSSPropertyParser::consumeSystemFont):
(WebCore::CSSPropertyParser::consumeFont):
(WebCore::CSSPropertyParser::consumeFontVariantShorthand):
(WebCore::CSSPropertyParser::consumeBorderSpacing):
(WebCore::consumeSingleViewportDescriptor):
(WebCore::CSSPropertyParser::parseViewportDescriptor):
(WebCore::consumeColumnWidthOrCount):
(WebCore::CSSPropertyParser::consumeColumns):
(WebCore::CSSPropertyParser::consumeShorthandGreedily):
(WebCore::CSSPropertyParser::consumeFlex):
(WebCore::CSSPropertyParser::consumeBorder):
(WebCore::CSSPropertyParser::consume4Values):
(WebCore::CSSPropertyParser::consumeBorderImage):
(WebCore::CSSPropertyParser::consumeLegacyBreakProperty):
(WebCore::consumeBackgroundPosition):
(WebCore::consumeRepeatStyleComponent):
(WebCore::consumeRepeatStyle):
(WebCore::CSSPropertyParser::consumeBackgroundShorthand):
(WebCore::CSSPropertyParser::consumeGridItemPositionShorthand):
(WebCore::CSSPropertyParser::consumeGridAreaShorthand):
(WebCore::CSSPropertyParser::consumeGridTemplateRowsAndAreasAndColumns):
(WebCore::CSSPropertyParser::consumeGridTemplateShorthand):
(WebCore::CSSPropertyParser::consumeGridShorthand):
(WebCore::CSSPropertyParser::parseShorthand):
(WebCore::unresolvedCSSPropertyID): Deleted.

  • css/parser/CSSPropertyParser.h:
  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::consumeIdent):
(WebCore::CSSPropertyParserHelpers::consumeCustomIdent):
(WebCore::CSSPropertyParserHelpers::consumeString):
(WebCore::CSSPropertyParserHelpers::consumeImageSet):

  • css/parser/CSSPropertyParserHelpers.h:
12:22 PM Changeset in webkit [207478] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

Fix build for platforms where HAVE(LINK_PREVIEW) is false
https://bugs.webkit.org/show_bug.cgi?id=163607

Patch by Megan Gardner <Megan Gardner> on 2016-10-18
Reviewed by Tim Horton.

Added needed # for link preview

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _contentsOfUserInterfaceItem:]):

12:19 PM Changeset in webkit [207477] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

Correct Document::removeAllEventListeners
https://bugs.webkit.org/show_bug.cgi?id=163558
<rdar://problem/28716840>

Reviewed by Chris Dumez.

Tested by fast/dom/node-move-to-new-document-crash-main.html.

  • dom/Document.cpp:

(WebCore::Document::removeAllEventListeners): Clear out the wheel and
touch event targets when clearing all data.

12:03 PM Changeset in webkit [207476] by keith_miller@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Cleanup Wasm memory.
https://bugs.webkit.org/show_bug.cgi?id=163601

Reviewed by Saam Barati.

There were a couple of issues with the original Wasm memory patch.
This is a follow-up patch to fix those issues.

  • wasm/WASMMemory.cpp:

(JSC::WASM::Memory::Memory):

  • wasm/WASMMemory.h:
11:30 AM Changeset in webkit [207475] by fpizlo@apple.com
  • 46 edits
    8 adds in trunk

DFG and FTL should be able to use DirectCall ICs when they proved the callee or its executable
https://bugs.webkit.org/show_bug.cgi?id=163371

Reviewed by Geoffrey Garen and Saam Barati.

JSTests:

Add microbenchmarks for all of the cases that this patch optimizes.

  • microbenchmarks/direct-call-arity-mismatch.js: Added.

(foo):
(bar):

  • microbenchmarks/direct-call.js: Added.

(foo):
(bar):

  • microbenchmarks/direct-construct-arity-mismatch.js: Added.

(Foo):
(bar):

  • microbenchmarks/direct-construct.js: Added.

(Foo):
(bar):

  • microbenchmarks/direct-tail-call-arity-mismatch.js: Added.

(foo):
(bar):

  • microbenchmarks/direct-tail-call-inlined-caller-arity-mismatch.js: Added.

(foo):
(bar):
(baz):

  • microbenchmarks/direct-tail-call-inlined-caller.js: Added.

(foo):
(bar):
(baz):

  • microbenchmarks/direct-tail-call.js: Added.

(foo):
(bar):

Source/JavaScriptCore:

This adds a new kind of call inline cache for when the DFG can prove what the callee
executable is. In those cases, we can skip some of the things that the traditional call IC
would do:

  • No need to check who the callee is.
  • No need to do arity checks.


This case isn't as simple as just emitting a call instruction since the callee may not be
compiled at the time that the caller is compiled. So, we need lazy resolution. Also, the
callee may be jettisoned independently of the caller, so we need to be able to revert the
call to an unlinked state. This means that we need almost all of the things that
CallLinkInfo has. CallLinkInfo already knows about different kinds of calls. This patch
teaches it about new "Direct" call types.

The direct non-tail call IC looks like this:

set up arguments

FastPath:

call _SlowPath
lea -FrameSize(%rbp), %rsp


SlowPath:

pop
call operationLinkDirectCall
check exception
jmp FastPath


The job of operationLinkDirectCall is to link the fast path's call entrypoint of the callee.
This means that in steady state, a call is just that: a call. There are no extra branches or
checks.

The direct tail call IC is a bit more complicated because the act of setting up arguments
destroys our frame, which would prevent us from being able to throw an exception if we
failed to compile the callee. So, direct tail call ICs look like this:

jmp _SlowPath

FastPath:

set up arguments
jmp 0 patch to jump to callee


SlowPath:

silent spill
call operationLinkDirectCall
silent fill
check exception
jmp FastPath


The jmp to the slow path is patched to be a fall-through jmp when we link the call.

Direct calls mean less code at call sites, fewer checks on the steady state call fast path,
and no need for arity fixup. This looks like a slight speed-up (~0.8%) on both Octane and
AsmBench.

  • assembler/ARM64Assembler.h:

(JSC::ARM64Assembler::relinkJumpToNop):

  • assembler/ARMv7Assembler.h:

(JSC::ARMv7Assembler::relinkJumpToNop):
(JSC::ARMv7Assembler::relinkJump): Deleted.

  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssembler::repatchJumpToNop):
(JSC::AbstractMacroAssembler::repatchJump): Deleted.

  • assembler/X86Assembler.h:

(JSC::X86Assembler::relinkJumpToNop):

  • bytecode/CallLinkInfo.cpp:

(JSC::CallLinkInfo::CallLinkInfo):
(JSC::CallLinkInfo::callReturnLocation):
(JSC::CallLinkInfo::patchableJump):
(JSC::CallLinkInfo::hotPathBegin):
(JSC::CallLinkInfo::slowPathStart):
(JSC::CallLinkInfo::setCallee):
(JSC::CallLinkInfo::clearCallee):
(JSC::CallLinkInfo::callee):
(JSC::CallLinkInfo::setCodeBlock):
(JSC::CallLinkInfo::clearCodeBlock):
(JSC::CallLinkInfo::codeBlock):
(JSC::CallLinkInfo::setLastSeenCallee):
(JSC::CallLinkInfo::clearLastSeenCallee):
(JSC::CallLinkInfo::lastSeenCallee):
(JSC::CallLinkInfo::haveLastSeenCallee):
(JSC::CallLinkInfo::setExecutableDuringCompilation):
(JSC::CallLinkInfo::executable):
(JSC::CallLinkInfo::setMaxNumArguments):
(JSC::CallLinkInfo::visitWeak):

  • bytecode/CallLinkInfo.h:

(JSC::CallLinkInfo::specializationKindFor):
(JSC::CallLinkInfo::callModeFor):
(JSC::CallLinkInfo::isDirect):
(JSC::CallLinkInfo::nearCallMode):
(JSC::CallLinkInfo::isLinked):
(JSC::CallLinkInfo::setCallLocations):
(JSC::CallLinkInfo::addressOfMaxNumArguments):
(JSC::CallLinkInfo::maxNumArguments):
(JSC::CallLinkInfo::isTailCall): Deleted.
(JSC::CallLinkInfo::setUpCallFromFTL): Deleted.
(JSC::CallLinkInfo::callReturnLocation): Deleted.
(JSC::CallLinkInfo::hotPathBegin): Deleted.
(JSC::CallLinkInfo::callee): Deleted.
(JSC::CallLinkInfo::setLastSeenCallee): Deleted.
(JSC::CallLinkInfo::clearLastSeenCallee): Deleted.
(JSC::CallLinkInfo::lastSeenCallee): Deleted.
(JSC::CallLinkInfo::haveLastSeenCallee): Deleted.

  • bytecode/CallLinkStatus.cpp:

(JSC::CallLinkStatus::computeDFGStatuses):

  • bytecode/PolymorphicAccess.cpp:

(JSC::AccessCase::generateImpl):

  • bytecode/UnlinkedFunctionExecutable.h:
  • bytecode/ValueRecovery.h:

(JSC::ValueRecovery::forEachReg):

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGBasicBlock.h:

(JSC::DFG::BasicBlock::findTerminal):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::addCallWithoutSettingResult):
(JSC::DFG::ByteCodeParser::handleCall):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::parameterSlotsForArgCount):

  • dfg/DFGGraph.h:
  • dfg/DFGInPlaceAbstractState.cpp:

(JSC::DFG::InPlaceAbstractState::mergeToSuccessors):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::link):

  • dfg/DFGJITCompiler.h:

(JSC::DFG::JITCompiler::addJSDirectCall):
(JSC::DFG::JITCompiler::addJSDirectTailCall):
(JSC::DFG::JITCompiler::JSCallRecord::JSCallRecord):
(JSC::DFG::JITCompiler::JSDirectCallRecord::JSDirectCallRecord):
(JSC::DFG::JITCompiler::JSDirectTailCallRecord::JSDirectTailCallRecord):
(JSC::DFG::JITCompiler::currentJSCallIndex): Deleted.

  • dfg/DFGNode.cpp:

(JSC::DFG::Node::convertToDirectCall):

  • dfg/DFGNode.h:

(JSC::DFG::Node::isTerminal):
(JSC::DFG::Node::hasHeapPrediction):
(JSC::DFG::Node::hasCellOperand):

  • dfg/DFGNodeType.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::callOperation):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGStrengthReductionPhase.cpp:

(JSC::DFG::StrengthReductionPhase::handleNode):

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToB3::compileDirectCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToB3::compileTailCall):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargs):

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall):

  • jit/JIT.cpp:

(JSC::JIT::link):

  • jit/JITCall.cpp:

(JSC::JIT::compileSetupVarargsFrame):

  • jit/JITCall32_64.cpp:

(JSC::JIT::compileSetupVarargsFrame):

  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
  • jit/Repatch.cpp:

(JSC::linkDirectFor):
(JSC::revertCall):

  • jit/Repatch.h:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::setUpCall):

  • runtime/Executable.cpp:

(JSC::ScriptExecutable::prepareForExecutionImpl):

  • runtime/Executable.h:

(JSC::ScriptExecutable::prepareForExecution):

  • runtime/Options.h:
11:23 AM Changeset in webkit [207474] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

Remove dependency cycle with UIKit
https://bugs.webkit.org/show_bug.cgi?id=163577
<rdar://problem/28786160>

Reviewed by Tim Horton.

Soft link against UIKit. Followup patch because
I screwed up and forgot to edit the simulator
configuration.

  • Configurations/WebCoreTestSupport.xcconfig:
11:08 AM Changeset in webkit [207473] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

REGRESSION(r201171): Web Inspector: Timeline Recording playhead should always start immediately, not wait until first event
https://bugs.webkit.org/show_bug.cgi?id=163583
<rdar://problem/28815882>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-10-18
Reviewed by Timothy Hatcher.

  • UserInterface/Views/TimelineRecordingContentView.js:

(WebInspector.TimelineRecordingContentView.prototype._startUpdatingCurrentTime):
Revert logic change introduced by r201171 with no explanation.
Whenever we get a start time we should use it, regardless of
of what the current time is, precisely because the backend is
informing us of the start time to use.

10:43 AM Changeset in webkit [207472] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Add flaky expectation for tiled-drawing/scrolling/latched-div-with-scroll-snap.html that was errantly removed.

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
10:41 AM Changeset in webkit [207471] by Said Abou-Hallawa
  • 7 edits
    2 adds in trunk

SVGCSSParser: m_implicitShorthand value is not reset after adding the shorthand property
https://bugs.webkit.org/show_bug.cgi?id=116470

Reviewed by Simon Fraser.

Source/WebCore:

When we encounter a shorthand css property, we set m_implicitShorthand
to true to tell addProperty() later that the individual properties are
all set through a short hand one. We need to make sure that setting
m_implicitShorthand to true will not be leaked after finishing parsing
the short hand property.

Test: fast/css/implicit-property-restore.html

  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseFillShorthand):
(WebCore::CSSParser::parseShorthand):
(WebCore::CSSParser::parse4Values):
(WebCore::CSSParser::parseBorderRadius):
(WTF::ImplicitScope::ImplicitScope): Deleted.
(WTF::ImplicitScope::~ImplicitScope): Deleted.
Get rid of ImplicitScope and replace its calls by TemporaryChange<bool>.

  • css/parser/SVGCSSParser.cpp:

(WebCore::CSSParser::parseSVGValue):
Restore m_implicitShorthand value after setting it temporarily to true.

Source/WTF:

  • wtf/TemporaryChange.h:

(WTF::TemporaryChange::TemporaryChange):
Add a new constructor to make TemporaryChange work as a restorer. The
temporary change will happen after we construct the object.

LayoutTests:

  • fast/css/implicit-property-restore-expected.txt: Added.
  • fast/css/implicit-property-restore.html: Added.
  • fast/css/remove-shorthand-expected.txt:

Rebase-line the test expected results because of fixing the leak of
m_implicitShorthand. The bug was happening because "background: ..." property
comes immediately before the "list-style: ...." property.

10:39 AM Changeset in webkit [207470] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking inspector/debugger/breakpoint-action-eval.html as a flaky timeout on mac-wk2.
https://bugs.webkit.org/show_bug.cgi?id=163604

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
10:28 AM Changeset in webkit [207469] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking scroll-restoration-fragment-scrolling-cross-origin.html as flaky on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=161360

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
10:13 AM Changeset in webkit [207468] by Chris Dumez
  • 10 edits in trunk

Update TrackEvent to stop using legacy [ConstructorTemplate=Event]
https://bugs.webkit.org/show_bug.cgi?id=163580

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Incorporate https://github.com/w3c/web-platform-tests/pull/3999 as the
test was incorrect. Rebaseline now that we are passing the test.

  • web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TrackEvent/constructor-expected.txt:
  • web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TrackEvent/constructor.html:

Source/WebCore:

Update TrackEvent to stop using legacy [ConstructorTemplate=Event]
and use a regular constructor as in the specification:

No new tests, updated existing tests.

  • html/track/TrackEvent.cpp:

(WebCore::TrackEvent::TrackEvent):

  • html/track/TrackEvent.h:
  • html/track/TrackEvent.idl:

LayoutTests:

Update existing test to reflect behavior change. We now correctly throw a TypeError
when passing an unexpected track object type to the TrackEvent constructor.

  • fast/events/constructors/track-event-constructor-expected.txt:
  • fast/events/constructors/track-event-constructor.html:
10:10 AM Changeset in webkit [207467] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Unreviewed, rolling out r207409.
https://bugs.webkit.org/show_bug.cgi?id=163602

Introduced many test failures and timeouts, causing release
bot to exit early (Requested by mcatanzaro on #webkit).

Reverted changeset:

"[GTK] Several tests crashing on debug bot in (anonymous
namespace)::MediaPlayerPrivateGStreamerBase::repaint"
https://bugs.webkit.org/show_bug.cgi?id=163511
http://trac.webkit.org/changeset/207409

10:07 AM Changeset in webkit [207466] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

Remote Web Inspector: Timeline UI not updating while recording
https://bugs.webkit.org/show_bug.cgi?id=163582
<rdar://problem/28766837>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-10-18
Reviewed by Timothy Hatcher.

  • WebProcess/WebPage/RemoteWebInspectorUI.cpp:

(WebKit::RemoteWebInspectorUI::frontendLoaded):
Local inspector windows keep the web view alive and toggle the
WebInspector.visible state depending on whether or not an inspector is
open. Remote Inspector windows go away when closed, so they can always
be marked as open. This matches earlier remote inspector behavior.

9:26 AM Changeset in webkit [207465] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

[DOMJIT] Not emit exception case if it is not necessary
https://bugs.webkit.org/show_bug.cgi?id=163589

Reviewed by Sam Weinig.

We should not emit exception case if we do not use the slow path calls.
For example, nodeType accessor does not use the slow path calls.

  • bytecode/PolymorphicAccess.cpp:

(JSC::AccessCase::emitDOMJITGetter):

8:09 AM Changeset in webkit [207464] by nael.ouedraogo@crf.canon.fr
  • 2 edits in trunk/LayoutTests

Rebase test in fast/mediastream

[GTK] Test gardening after r206956
https://bugs.webkit.org/show_bug.cgi?id=163596

Unreviewed.

  • fast/mediastream/RTCPeerConnection-add-removeTrack-expected.txt:
7:53 AM Changeset in webkit [207463] by eric.carlson@apple.com
  • 54 edits
    2 adds
    3 deletes in trunk

Source/WebCore:
[MediaStream] Resolve constraints and enumerate devices in the UI process
https://bugs.webkit.org/show_bug.cgi?id=162147
<rdar://problem/28803569>

Reviewed by Darin Adler.

Restructure gUM constraint validation and MediaDevices.enumerateDevices so all media device
access happens in the UI process.

No new tests, updated results of existing tests.

  • CMakeLists.txt: Add MediaDevicesEnumerationRequest.cpp, delete UserMediaPermissionCheck.cpp.
  • Modules/mediastream/MediaConstraintsImpl.cpp:

(WebCore::MediaConstraintsImpl::create): Only create from MediaConstraintsData.
(WebCore::MediaConstraintsImpl::initialize): Deleted.

  • Modules/mediastream/MediaConstraintsImpl.h:
  • Modules/mediastream/MediaDevicesEnumerationRequest.cpp: Added.

(WebCore::MediaDevicesEnumerationRequest::create):
(WebCore::MediaDevicesEnumerationRequest::MediaDevicesEnumerationRequest):
(WebCore::MediaDevicesEnumerationRequest::~MediaDevicesEnumerationRequest):
(WebCore::MediaDevicesEnumerationRequest::userMediaDocumentOrigin):
(WebCore::MediaDevicesEnumerationRequest::topLevelDocumentOrigin):
(WebCore::MediaDevicesEnumerationRequest::contextDestroyed):
(WebCore::MediaDevicesEnumerationRequest::start):
(WebCore::MediaDevicesEnumerationRequest::cancel):
(WebCore::MediaDevicesEnumerationRequest::setDeviceInfo):
(WebCore::MediaDevicesEnumerationRequest::finish):

  • Modules/mediastream/MediaDevicesEnumerationRequest.h: Added.
  • Modules/mediastream/MediaDevicesRequest.cpp:

(WebCore::MediaDevicesRequest::~MediaDevicesRequest): Clear the enumeration request.
(WebCore::MediaDevicesRequest::contextDestroyed): Ditto.
(WebCore::MediaDevicesRequest::start): Create and use a MediaDevicesEnumerationRequest.
(WebCore::MediaDevicesRequest::didCompletePermissionCheck): Deleted.

  • Modules/mediastream/MediaDevicesRequest.h:
  • Modules/mediastream/UserMediaClient.h:
  • Modules/mediastream/UserMediaController.h:

(WebCore::UserMediaController::enumerateMediaDevices): New.
(WebCore::UserMediaController::cancelMediaDevicesEnumerationRequest): New.
(WebCore::UserMediaController::checkUserMediaPermission): Deleted.
(WebCore::UserMediaController::cancelUserMediaPermissionCheck): Deleted.

  • Modules/mediastream/UserMediaPermissionCheck.h: Deleted.
  • Modules/mediastream/UserMediaPermissionCheck.cpp: Deleted.
  • Modules/mediastream/UserMediaRequest.cpp:

(WebCore::UserMediaRequest::UserMediaRequest):
(WebCore::UserMediaRequest::start):
(WebCore::UserMediaRequest::allow):
(WebCore::UserMediaRequest::deny):
(WebCore::UserMediaRequest::constraintsValidated): Deleted.
(WebCore::UserMediaRequest::userMediaAccessGranted): Deleted.
(WebCore::UserMediaRequest::userMediaAccessDenied): Deleted.
(WebCore::UserMediaRequest::constraintsInvalid): Deleted.
(WebCore::UserMediaRequest::didCreateStream): Deleted.
(WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError): Deleted.
(WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError): Deleted.

  • Modules/mediastream/UserMediaRequest.h:
  • WebCore.xcodeproj/project.pbxproj: Add MediaDevicesEnumerationRequest.*.
  • platform/mediastream/CaptureDevice.h:

(WebCore::CaptureDevice::CaptureDevice):
(WebCore::CaptureDevice::setPersistentId): Add setter for argument decoder.
(WebCore::CaptureDevice::setLabel): Ditto.
(WebCore::CaptureDevice::setGroupId): Ditto.
(WebCore::CaptureDevice::setKind): Ditto.

  • platform/mediastream/CaptureDeviceManager.h: Remove unnecessary include.
  • platform/mediastream/MediaConstraints.h:

(WebCore::MediaConstraint::encode): New.
(WebCore::MediaConstraint::decode): Ditto.
(WebCore::NumericConstraint::encode): Ditto.
(WebCore::NumericConstraint::decode): Ditto.

  • platform/mediastream/MediaStreamCreationClient.h: Deleted.
  • platform/mediastream/RealtimeMediaSourceCenter.h: Use completion handlers instead of client interface.
  • platform/mediastream/mac/AVCaptureDeviceManager.mm:

(WebCore::AVCaptureDeviceManager::refreshCaptureDeviceList): Drive-by fix: don't initialize
group id, we don't support it.

  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:

(WebCore::RealtimeMediaSourceCenterMac::validateRequestConstraints): Update for interface change.
(WebCore::RealtimeMediaSourceCenterMac::createMediaStream): Ditto.

  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:
  • platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:

(WebCore::RealtimeMediaSourceCenterOwr::validateRequestConstraints): Ditto.
(WebCore::RealtimeMediaSourceCenterOwr::createMediaStream): Ditto.
(WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable): Ditto.

  • platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h:
  • platform/mock/MockRealtimeMediaSourceCenter.cpp:

(WebCore::MockRealtimeMediaSourceCenter::validateRequestConstraints): Ditto.
(WebCore::MockRealtimeMediaSourceCenter::createMediaStream): Ditto.

  • platform/mock/MockRealtimeMediaSourceCenter.h:

Source/WebKit:
Fix CMake build.

Patch by Alex Christensen <achristensen@webkit.org> on 2016-10-14

  • PlatformMac.cmake:

Source/WebKit2:
[MediaStream] Resolve constraints and enumerate devices in the UI process
https://bugs.webkit.org/show_bug.cgi?id=162147
<rdar://problem/28803569>

Reviewed by Darin Adler.

Restructure gUM constraint validation and MediaDevices.enumerateDevices so all media device
access happens in the UI process.

  • Scripts/webkit/messages.py:

(headers_for_type): Special case MediaConstraintsData.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::encodeMediaTrackConstraintSetMap): MediaTrackConstraintSetMap encoder.
(IPC::ArgumentCoder<MediaConstraintsData>::encode): MediaConstraintsData encoder.
(IPC::decodeMediaTrackConstraintSetMap): MediaTrackConstraintSetMap decoder.
(IPC::ArgumentCoder<MediaConstraintsData>::decode): MediaConstraintsData decoder.
(IPC::ArgumentCoder<CaptureDevice>::encode): CaptureDevice enoder.
(IPC::ArgumentCoder<CaptureDevice>::decode): CaptureDevice decoder.

  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/API/APIUIClient.h: Remove UserMediaPermissionCheckProxy forward declaration.
  • UIProcess/API/C/WKUserMediaPermissionRequest.cpp:

(toWK): Translate UserMediaPermissionRequestDenialReason to UserMediaAccessDenialReason.
(WKUserMediaPermissionRequestDeny): Add "reason" parameter.

  • UIProcess/API/C/WKUserMediaPermissionRequest.h:
  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::invalidateRequests): Invalidate pending device requests.
(WebKit::UserMediaPermissionRequestManagerProxy::createRequest): Make private.
(WebKit::toWebCore): Map from UserMediaAccessDenialReason to MediaAccessDenialReason, cast to

uint64_t to pass to web process.

(WebKit::UserMediaPermissionRequestManagerProxy::denyRequest): Send to web process.
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted): Ditto.
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): Validate

constraints and make sure gUM is enabled before prompting user.

(WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): New.
(WebKit::UserMediaPermissionRequestManagerProxy::didCompleteUserMediaPermissionCheck): Send

results of device enumeration to web process.

(WebKit::UserMediaPermissionRequestManagerProxy::didReceiveUserMediaPermissionDecision): Deleted.
(WebKit::UserMediaPermissionRequestManagerProxy::createUserMediaPermissionCheck): Deleted.

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
  • UIProcess/UserMediaPermissionRequestProxy.cpp:

(WebKit::UserMediaPermissionRequestProxy::allow):
(WebKit::UserMediaPermissionRequestProxy::deny): Take "reason" parameter.

  • UIProcess/UserMediaPermissionRequestProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::requestUserMediaPermissionForFrame):
(WebKit::WebPageProxy::enumerateMediaDevicesForFrame):
(WebKit::WebPageProxy::checkUserMediaPermissionForFrame): Deleted.

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:

(WebKit::UserMediaPermissionRequestManager::startUserMediaRequest): userMediaAccessDenied -> deny.

Pass the audio and video constraints to the UI process.

(WebKit::UserMediaPermissionRequestManager::userMediaAccessWasGranted):
(WebKit::UserMediaPermissionRequestManager::userMediaAccessWasDenied):
(WebKit::UserMediaPermissionRequestManager::enumerateMediaDevices): Send the enumeration request

to the UI process.

(WebKit::UserMediaPermissionRequestManager::cancelMediaDevicesEnumeration):
(WebKit::UserMediaPermissionRequestManager::didCompleteMediaDeviceEnumeration):
(WebKit::UserMediaPermissionRequestManager::didReceiveUserMediaPermissionDecision): Deleted.
(WebKit::UserMediaPermissionRequestManager::startUserMediaPermissionCheck): Deleted.
(WebKit::UserMediaPermissionRequestManager::cancelUserMediaPermissionCheck): Deleted.
(WebKit::UserMediaPermissionRequestManager::didCompleteUserMediaPermissionCheck): Deleted.

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
  • WebProcess/WebCoreSupport/WebUserMediaClient.cpp:

(WebKit::WebUserMediaClient::enumerateMediaDevices): New.
(WebKit::WebUserMediaClient::cancelMediaDevicesEnumerationRequest): New.
(WebKit::WebUserMediaClient::checkUserMediaPermission): Deleted.
(WebKit::WebUserMediaClient::cancelUserMediaPermissionCheck): Deleted.

  • WebProcess/WebCoreSupport/WebUserMediaClient.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::userMediaAccessWasGranted): New.
(WebKit::WebPage::userMediaAccessWasDenied): Ditto.
(WebKit::WebPage::didCompleteMediaDeviceEnumeration):
(WebKit::WebPage::didReceiveUserMediaPermissionDecision): Deleted.
(WebKit::WebPage::didCompleteUserMediaPermissionCheck): Deleted.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Tools:
[MediaStream] Resolve constraints and enumerate devices in the UI process
https://bugs.webkit.org/show_bug.cgi?id=162147
<rdar://problem/28803569>

Reviewed by Darin Adler.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetPreferencesToConsistentValues): Enable mock capture devices.
(WTR::TestController::decidePolicyForUserMediaPermissionRequestIfPossible): Update for API changes.

LayoutTests:
[MediaStream] Resolve constraints and enumerate devices in the UI process
https://bugs.webkit.org/show_bug.cgi?id=162147
<rdar://problem/28803569>

Reviewed by Darin Adler.

  • fast/mediastream/getusermedia-expected.txt: Updated.
  • fast/mediastream/getusermedia.html: Ditto.
  • fast/mediastream/mock-media-source-expected.txt: Ditto.
6:15 AM Changeset in webkit [207462] by zandobersek@gmail.com
  • 11 edits
    1 add in trunk/Source/WebCore

[WebIDL] Support BufferSource
https://bugs.webkit.org/show_bug.cgi?id=163541

Reviewed by Youenn Fablet.

Add support for the BufferSource typedef in WebIDL. The implementation
adds the necessary handling for this type in the generator scripts and
the specialization of the Converter<> template for the IDLBufferSource
struct that enables exposing ArrayBuffer or ArrayBufferView objects by
having WebCore::BufferSource objects pointing to their data.

The SourceBuffer interface in the MSE module has the appendBuffer()
operation modified to accept a BufferSource parameter, instead of
overloading it for ArrayBuffer and ArrayBufferView parameters.

The bindings generator tests cover BufferSource as both an operation
parameter and as a dictionary member.

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::appendBuffer):
(WebCore::SourceBuffer::appendBufferInternal):

  • Modules/mediasource/SourceBuffer.h:
  • Modules/mediasource/SourceBuffer.idl:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/generic/IDLTypes.h:
  • bindings/js/BufferSource.h: Added.
  • bindings/js/JSDOMConvert.h:

(WebCore::Converter<IDLBufferSource>::convert):

  • bindings/scripts/CodeGenerator.pm:

(SkipIncludeHeader):
(IsWrapperType):

  • bindings/scripts/CodeGeneratorJS.pm:

(AddClassForwardIfNeeded):
(GetBaseIDLType):
(IsHandledByDOMConvert):

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::convertDictionary<TestObj::Dictionary>):
(WebCore::jsTestObjPrototypeFunctionBufferSourceParameter):
(WebCore::jsTestObjPrototypeFunctionBufferSourceParameterCaller):

  • bindings/scripts/test/TestObj.idl:
5:51 AM Changeset in webkit [207461] by caitp@igalia.com
  • 19 edits in trunk

[JSC] ES6 Method functions should not have prototype
https://bugs.webkit.org/show_bug.cgi?id=162530

Reviewed by Saam Barati.

JSTests:

Fix test262 expectations about MethodDefinitions

  • ChakraCore/test/strict/05.arguments_sm.baseline-jsc:
  • stress/reflect-set.js:
  • test262.yaml:

Source/JavaScriptCore:

ECMA-262 only adds "prototype" properties to specific syntactic function forms.
Specific items which do not contain "prototype" include (most) built-in functions (such as Math.pow),
MethodDefinitions which are not either class "constructor" methods or GeneratorMethods, AsyncFunctions,
and ArrowFunctions.

For details, see the following spec text, and the difference between GeneratorMethod evaluation and
the evaluation of other MethodDefinition forms.

  • runtime/Executable.h:
  • runtime/JSFunction.cpp:

(JSC::JSFunction::callerGetter):
(JSC::JSFunction::getOwnPropertySlot):
(JSC::JSFunction::deleteProperty):

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::makeFunction):

  • runtime/Executable.h:
  • runtime/JSFunction.cpp:

(JSC::JSFunction::getOwnPropertySlot):
(JSC::JSFunction::getOwnNonIndexPropertyNames):
(JSC::JSFunction::put):
(JSC::JSFunction::deleteProperty):
(JSC::JSFunction::defineOwnProperty):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncThrowTypeErrorArgumentsCalleeAndCaller):

LayoutTests:

Update expected error message to no longer indicate "strict mode"
(which is not always true), and add additional tests for the presence
of "caller" and "arguments" on accessor MethodDefinitions.

  • js/basic-strict-mode-expected.txt:
  • js/caller-property-expected.txt:
  • js/class-syntax-method-names-expected.txt:
  • js/es6-function-properties-expected.txt:
  • js/non-strict-function-properties-expected.txt:
  • js/script-tests/caller-property.js:
  • js/script-tests/class-syntax-method-names.js:
  • js/script-tests/es6-function-properties.js:

(k.get getter):
(k.set setter):
(get checkProperties):

  • js/script-tests/non-strict-function-properties.js:
5:33 AM Changeset in webkit [207460] by jfernandez@igalia.com
  • 5 edits
    2 adds in trunk

[css-grid] Different width of grid container between initial load and refresh
https://bugs.webkit.org/show_bug.cgi?id=163535

Reviewed by Manuel Rego Casasnovas.

Source/WebCore:

Grid's layout logic manages two different override sizes; one it's
designed to implement the grid item's stretching behavior, identified
with the concept of 'overrideContentLogicalSize'; there is another
override size, known as overrideContainingBlockContentLogicalSize,
used to implement the Grid Area abstraction, which will behave as
the actual containing block of any grid item.

During grid's layout logic these override sizes are set according
to the CSS style rules. This affects how the grid container and its
children are going to be sized during layout. Grid Tracks sizing
algorithm depends on these override sizes.

In order to ensure that the tracks sizing algorithm produces the
same results when it's run consecutively several times, we need to
clear these override sizes and perform a layout of the affected grid
items. Otherwise, the affected items will return sizing values which
depend on the override values set in the previous layout, which in
some cases, like orthogonal flows, may change through different runs
of the sizing algorithm.

Test: fast/css-grid-layout/repeating-layout-must-produce-the-same-results.html

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::layoutBlock):

LayoutTests:

Tests to ensure repeated layouts on grid elements produce the same results when using
orthogonal grid items.

  • fast/css-grid-layout/repeating-layout-must-produce-the-same-results-expected.txt: Added.
  • fast/css-grid-layout/repeating-layout-must-produce-the-same-results.html: Added.
5:30 AM Changeset in webkit [207459] by commit-queue@webkit.org
  • 8 edits in trunk/Source/WebCore

CachedResourceLoader should not need to remove fragment identifier
https://bugs.webkit.org/show_bug.cgi?id=163015

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

No expected change for non-window port.
For window port, CachedResourceLoader will strip the fragment identifier of the URL passed to subresourceForURL
before querying the memory cache.

Removing the fragment identifier from the request stored in CachedResourceRequest.
The fragment identifier is stored in a separate field.

This allows CachedResourceLoader to not care about fragment identifier.
CachedResource can then get access to it.

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::CachedResource):
(WebCore::CachedResource::finishRequestInitialization): Deleted.

  • loader/cache/CachedResource.h:
  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::cachedResource):
Updated the method taking a const String& to strip the fragment identifier if needed.
Updated the method taking a const URL& to assert if the fragment identifier is present.
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::requestResource):

  • loader/cache/CachedResourceRequest.cpp:

(WebCore::CachedResourceRequest::CachedResourceRequest):
(WebCore::CachedResourceRequest::splitFragmentIdentifierFromRequestURL):

  • loader/cache/CachedResourceRequest.h:

(WebCore::CachedResourceRequest::releaseFragmentIdentifier):
(WebCore::CachedResourceRequest::clearFragmentIdentifier):

  • loader/cache/MemoryCache.cpp:

(WebCore::MemoryCache::shouldRemoveFragmentIdentifier):
(WebCore::MemoryCache::removeFragmentIdentifierIfNeeded):
(WebCore::MemoryCache::revalidationSucceeded):
(WebCore::MemoryCache::resourceForRequest):

  • loader/cache/MemoryCache.h:
5:28 AM Changeset in webkit [207458] by Antti Koivisto
  • 72 edits
    1 add in trunk/Source

Rename setNeedsStyleRecalc to invalidateStyle
https://bugs.webkit.org/show_bug.cgi?id=163542

Reviewed by Darin Adler.

Source/WebCore:

Also rename StyleChangeType enum and some related functions for clarity. For example

element.setNeedsStyleRecalc(SyntheticStyleChange);

becomes

element.invalidateStyleAndLayerComposition();

  • WebCore.xcodeproj/project.pbxproj:
  • css/StyleInvalidationAnalysis.cpp:

(WebCore::StyleInvalidationAnalysis::invalidateIfNeeded):

  • dom/Document.cpp:

(WebCore::Document::recalcStyle):
(WebCore::Document::updateViewportUnitsOnResize):
(WebCore::Document::setCSSTarget):
(WebCore::unwrapFullScreenRenderer):
(WebCore::Document::setAnimatingFullScreen):

  • dom/Element.cpp:

(WebCore::Element::setActive):
(WebCore::Element::setFocus):
(WebCore::Element::setHovered):
(WebCore::Element::attributeChanged):
(WebCore::Element::invalidateStyle):
(WebCore::Element::invalidateStyleAndLayerComposition):
(WebCore::Element::invalidateStyleForSubtree):
(WebCore::Element::invalidateStyleAndRenderersForSubtree):

Move public invalidation functions to Element tightening typing.
Use separate functions instead of enum values.
This way the call sites look nicer and only useful combinations are exposed.

(WebCore::Element::addShadowRoot):
(WebCore::checkForEmptyStyleChange):
(WebCore::checkForSiblingStyleChanges):
(WebCore::Element::needsStyleInvalidation):
(WebCore::Element::setContainsFullScreenElement):

  • dom/Element.h:

(WebCore::Element::setHasFocusWithin):

  • dom/Node.cpp:

(WebCore::computeEditabilityFromComputedStyle):
(WebCore::Node::adjustStyleValidity):

Update validity and mode separately. There was a potential bug here where
SyntheticStyleChange could overwrite FullStyleChange (no known repro).

(WebCore::Node::updateAncestorsForStyleRecalc):
(WebCore::Node::invalidateStyle):
(WebCore::Node::insertedInto):
(WebCore::Node::setNeedsStyleRecalc): Deleted.

  • dom/Node.h:

(WebCore::Node::needsStyleRecalc):
(WebCore::Node::styleValidity):
(WebCore::Node::styleResolutionShouldRecompositeLayer):
(WebCore::Node::setHasValidStyle):
(WebCore::Node::styleChangeType): Deleted.
(WebCore::Node::clearNeedsStyleRecalc): Deleted.
(WebCore::Node::setStyleChange): Deleted.

  • dom/RadioButtonGroups.cpp:

(WebCore::RadioButtonGroup::remove):
(WebCore::RadioButtonGroup::setNeedsStyleRecalcForAllButtons):

  • dom/ShadowRoot.cpp:

(WebCore::ShadowRoot::setResetStyleInheritance):

  • dom/SlotAssignment.cpp:

(WebCore::SlotAssignment::addSlotElementByName):
(WebCore::SlotAssignment::removeSlotElementByName):
(WebCore::SlotAssignment::didChangeSlot):

  • dom/StyledElement.cpp:

(WebCore::StyledElement::attributeChanged):
(WebCore::StyledElement::styleAttributeChanged):
(WebCore::StyledElement::invalidateStyleAttribute):

  • dom/Text.cpp:

(WebCore::Text::updateRendererAfterContentChange):

  • dom/VisitedLinkState.cpp:

(WebCore::VisitedLinkState::invalidateStyleForAllLinks):
(WebCore::VisitedLinkState::invalidateStyleForLink):

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::focusedOrActiveStateChanged):

  • html/BaseDateAndTimeInputType.cpp:

(WebCore::BaseDateAndTimeInputType::minOrMaxAttributeChanged):

  • html/FileInputType.cpp:

(WebCore::FileInputType::setValue):

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::parseAttribute):

  • html/HTMLBodyElement.cpp:

(WebCore::HTMLBodyElement::parseAttribute):

  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::getContext):
(WebCore::HTMLCanvasElement::createImageBuffer):

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged):
(WebCore::HTMLElement::calculateAndAdjustDirectionality):

  • html/HTMLFieldSetElement.cpp:

(WebCore::HTMLFieldSetElement::addInvalidDescendant):
(WebCore::HTMLFieldSetElement::removeInvalidDescendant):

  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::disabledStateChanged):
(WebCore::HTMLFormControlElement::readOnlyAttributeChanged):
(WebCore::HTMLFormControlElement::requiredAttributeChanged):
(WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
(WebCore::HTMLFormControlElement::updateValidity):

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::registerFormElement):
(WebCore::HTMLFormElement::registerInvalidAssociatedFormControl):
(WebCore::HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded):
(WebCore::HTMLFormElement::resetDefaultButton):

  • html/HTMLFrameElementBase.cpp:

(WebCore::HTMLFrameElementBase::finishedInsertingSubtree):

  • html/HTMLFrameOwnerElement.cpp:

(WebCore::HTMLFrameOwnerElement::scheduleinvalidateStyleAndLayerComposition):
(WebCore::HTMLFrameOwnerElement::scheduleSetNeedsStyleRecalc): Deleted.

  • html/HTMLFrameOwnerElement.h:
  • html/HTMLFrameSetElement.cpp:

(WebCore::HTMLFrameSetElement::parseAttribute):
(WebCore::HTMLFrameSetElement::willRecalcStyle):

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::runPostTypeUpdateTasks):
(WebCore::HTMLInputElement::parseAttribute):
(WebCore::HTMLInputElement::setChecked):
(WebCore::HTMLInputElement::setIndeterminate):
(WebCore::HTMLInputElement::setAutoFilled):
(WebCore::HTMLInputElement::maxLengthAttributeChanged):
(WebCore::HTMLInputElement::minLengthAttributeChanged):

  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::parseAttribute):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaPlayerRenderingModeChanged):
(WebCore::HTMLMediaElement::setVideoFullscreenLayer):

  • html/HTMLObjectElement.cpp:

(WebCore::HTMLObjectElement::parseAttribute):
(WebCore::HTMLObjectElement::childrenChanged):
(WebCore::HTMLObjectElement::renderFallbackContent):

  • html/HTMLOptGroupElement.cpp:

(WebCore::HTMLOptGroupElement::parseAttribute):

  • html/HTMLOptionElement.cpp:

(WebCore::HTMLOptionElement::parseAttribute):
(WebCore::HTMLOptionElement::setSelectedState):

  • html/HTMLPlugInElement.cpp:

(WebCore::HTMLPlugInElement::didAddUserAgentShadowRoot):

  • html/HTMLPlugInImageElement.cpp:

(WebCore::HTMLPlugInImageElement::setDisplayState):
(WebCore::HTMLPlugInImageElement::willRecalcStyle):
(WebCore::HTMLPlugInImageElement::finishParsingChildren):
(WebCore::HTMLPlugInImageElement::resumeFromDocumentSuspension):
(WebCore::HTMLPlugInImageElement::removeSnapshotTimerFired):
(WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn):

  • html/HTMLProgressElement.cpp:

(WebCore::HTMLProgressElement::didElementStateChange):

  • html/HTMLSelectElement.cpp:

(WebCore::HTMLSelectElement::parseAttribute):
(WebCore::HTMLSelectElement::setRecalcListItems):
(WebCore::HTMLSelectElement::parseMultipleAttribute):
(WebCore::HTMLSelectElement::reset):

  • html/HTMLTableElement.cpp:

(WebCore::isTableCellAncestor):
(WebCore::setTableCellsChanged):
(WebCore::HTMLTableElement::parseAttribute):

  • html/HTMLTextAreaElement.cpp:

(WebCore::HTMLTextAreaElement::setValueCommon):

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):

  • html/InputType.cpp:

(WebCore::InputType::setValue):

  • html/NumberInputType.cpp:

(WebCore::NumberInputType::minOrMaxAttributeChanged):

  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::subtreeHasChanged):

  • mathml/MathMLElement.cpp:

(WebCore::MathMLElement::parseAttribute):

  • mathml/MathMLSelectElement.cpp:

(WebCore::MathMLSelectElement::updateSelectedChild):

  • page/animation/AnimationBase.cpp:

(WebCore::AnimationBase::setNeedsStyleRecalc):

  • page/animation/AnimationController.cpp:

(WebCore::AnimationControllerPrivate::clear):
(WebCore::AnimationControllerPrivate::updateAnimations):
(WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle):
(WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
(WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
(WebCore::AnimationController::cancelAnimations):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::imageChanged):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::calculateClipRects):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::attachRootLayer):
(WebCore::RenderLayerCompositor::detachRootLayer):
(WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange):

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::updateDragState):

  • rendering/svg/SVGResourcesCache.cpp:

(WebCore::SVGResourcesCache::clientStyleChanged):

  • style/AttributeChangeInvalidation.cpp:

(WebCore::Style::AttributeChangeInvalidation::invalidateStyle):

  • style/ClassChangeInvalidation.cpp:

(WebCore::Style::ClassChangeInvalidation::invalidateStyle):

  • style/IdChangeInvalidation.cpp:

(WebCore::Style::IdChangeInvalidation::invalidateStyle):

  • style/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::updateElementRenderer):

  • style/StyleScope.cpp:

(WebCore::Style::Scope::updateActiveStyleSheets):

  • style/StyleTreeResolver.cpp:

(WebCore::Style::resetStyleForNonRenderedDescendants):
(WebCore::Style::TreeResolver::resolveElement):
(WebCore::Style::TreeResolver::createAnimatedElementUpdate):
(WebCore::Style::TreeResolver::popParent):
(WebCore::Style::clearNeedsStyleResolution):
(WebCore::Style::TreeResolver::resolveComposedTree):

  • style/StyleUpdate.h:
  • style/StyleValidity.h: Added.

StyleChangeType enum splits into Style::Validity and Style::InvalidationMode.
Move to a file of its own.

  • svg/SVGAElement.cpp:

(WebCore::SVGAElement::svgAttributeChanged):

  • svg/SVGAnimateElementBase.cpp:

(WebCore::applyCSSPropertyToTarget):
(WebCore::removeCSSPropertyFromTarget):

  • svg/SVGElement.cpp:

(WebCore::SVGElement::willRecalcStyle):

  • svg/SVGElement.h:

(WebCore::SVGElement::invalidateSVGPresentationAttributeStyle):

  • svg/SVGTests.cpp:

(WebCore::SVGTests::handleAttributeChange):

  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::invalidateShadowTree):

  • testing/Internals.cpp:

(WebCore::styleValidityToToString):
(WebCore::Internals::styleChangeType):
(WebCore::styleChangeTypeToString): Deleted.

Source/WebKit/mac:

  • Plugins/Hosted/WebHostedNetscapePluginView.mm:

(-[WebHostedNetscapePluginView createPluginLayer]):

  • Plugins/WebNetscapePluginView.mm:

(-[WebNetscapePluginView createPlugin]):

Source/WebKit2:

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::didInitializePlugin):
(WebKit::PluginView::pluginProcessCrashed):

2:21 AM Changeset in webkit [207457] by svillar@igalia.com
  • 7 edits in trunk

[css-grid] Constrain by min|max-height on auto repeat computation
https://bugs.webkit.org/show_bug.cgi?id=163540

Reviewed by Darin Adler.

Source/WebCore:

The max-height (if definite) is used to compute the number of auto repeat rows whenever the
height is indefinite. We were using the min-height only in case both values were indefinite.

Although not explicitly mentioned by grid specs, it's reasonable to assume that
the min-height trumps the used value of height/max-height like it always does, per CSS
2.2. Note that the number of rows still needs to fit within that size even if using
min-height, because we're just using min-height to compute the used value of the height
property. If both height and max-height are indefinite we keep doing the same, i.e., compute
the minimum number of rows that fulfill min-height (if definite).

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::computeAutoRepeatTracksCount):

LayoutTests:

Some new test cases to verify that min-height is used on the auto repeat tracks computation
whenever the height is indefinite and max-height is not.

  • fast/css-grid-layout/grid-auto-fill-rows-expected.txt:
  • fast/css-grid-layout/grid-auto-fill-rows.html:
  • fast/css-grid-layout/grid-indefinite-size-auto-repeat-crash-expected.txt:
  • fast/css-grid-layout/grid-indefinite-size-auto-repeat-crash.html:
1:13 AM Changeset in webkit [207456] by Yusuke Suzuki
  • 9 edits
    1 copy
    1 add in trunk/Source

[DOMJIT] Use NativeCallFrameTracer for operations used for DOMJIT slow calls
https://bugs.webkit.org/show_bug.cgi?id=163586

Reviewed by Saam Barati.

Source/JavaScriptCore:

C functions called from the DOMJIT slow path calls should use NativeCallFrameTracer.
This fixes the debug assertion caused in r207427.

  • bytecode/DOMJITAccessCasePatchpointParams.cpp:

(JSC::SlowPathCallGeneratorWithArguments::generateImpl):
(JSC::DOMJITAccessCasePatchpointParams::emitSlowPathCalls):

  • bytecode/DOMJITAccessCasePatchpointParams.h:
  • bytecode/PolymorphicAccess.cpp:

(JSC::AccessCase::emitDOMJITGetter):

  • jsc.cpp:

(WTF::DOMJITGetter::DOMJITNodeDOMJIT::slowCall):
(WTF::DOMJITGetterComplex::DOMJITNodeDOMJIT::slowCall):

Source/WebCore:

  • domjit/JSNodeDOMJIT.cpp:

(WebCore::toWrapperSlow):

12:11 AM Changeset in webkit [207455] by ryuan.choi@navercorp.com
  • 2 edits in trunk/Source/WebCore

[EFL] Build break since r207442
https://bugs.webkit.org/show_bug.cgi?id=163587

Unreviewed.

Since r207442, setRGB is moved to private.

  • rendering/RenderThemeEfl.cpp:

(WebCore::fillColorsFromEdjeClass):

Oct 17, 2016:

11:03 PM Changeset in webkit [207454] by Carlos Garcia Campos
  • 4 edits in trunk/Source/WebKit2

NetworkSession: PendingDownload is leaked if canceled before willDecidePendingDownloadDestination
https://bugs.webkit.org/show_bug.cgi?id=163545

Reviewed by Alex Christensen.

If a download started by DownloadManager::startDownload() is cancelled before
DownloadManager::willDecidePendingDownloadDestination() is called, DownloadManager::cancelDownload() does
nothing, because the Download hasn't been created yet and m_downloadsWaitingForDestination map doesn't contain
the download ID, and the PendingDownload is never removed from the m_pendingDownloads map.

  • NetworkProcess/Downloads/DownloadManager.cpp:

(WebKit::DownloadManager::cancelDownload): Always take the PendingDownload from m_pendingDownloads map. Then, if
the download was already in m_downloadsWaitingForDestination map, get the network data task to properly cancel
it and then call the completion handler to ignore the request. Otherwise cancel the pending download if exists.

  • NetworkProcess/Downloads/PendingDownload.cpp:

(WebKit::PendingDownload::cancel): Cancel the network load and notify the UI process that the download was canceled.

  • NetworkProcess/Downloads/PendingDownload.h:
7:02 PM Changeset in webkit [207453] by keith_miller@apple.com
  • 18 edits
    2 adds in trunk

Add support for WASM Memory.
https://bugs.webkit.org/show_bug.cgi?id=161710

Reviewed by Geoffrey Garen.

JSTests:

Add store and load opcodes to wasm.json. Additionally, add new
enums for those opcodes in the generator.

  • stress/wasm/generate-wasmops-header.js:

(const.template.pragma.once.ENABLE.WEBASSEMBLY.include.cstdint.namespace.JSC.namespace.WASM.enum.LoadOpType):
(const.template.pragma.once.ENABLE.WEBASSEMBLY.include.cstdint.namespace.JSC.namespace.WASM.enum.StoreOpType):

Source/JavaScriptCore:

This patch add initial support for WASM memory operations. First,
it adds the concept of a WASM Module memory management object.
This object currently mmaps a 32-bit address space for WASM use,
although it marks all the memory outside the current breakpoint as
PROT_NONE. For now, we do a range check on each store and load. In
the future, we should change this to be an signal handler that
checks what module the program trapped in.

Additionally, this patch changes the way that our temporary tests
call into WASM code. There is now a true "thunk" that relocates
arguments and calls into WASM. This thunk does not tail call
because we use pinned values to memory base-pointer and
size. We use the new B3 pinned register api to pin the values.

  • CMakeLists.txt:
  • Configurations/ToolExecutable.xcconfig:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • testWASM.cpp:

(runWASMTests):
(main):

  • wasm/WASMB3IRGenerator.cpp:

(JSC::WASM::createJSWrapper):
(JSC::WASM::parseAndCompile):

  • wasm/WASMB3IRGenerator.h:
  • wasm/WASMCallingConvention.h:

(JSC::WASM::CallingConvention::iterate):
(JSC::WASM::CallingConvention::setupCall):
(JSC::WASM::nextJSCOffset):

  • wasm/WASMFormat.h:
  • wasm/WASMFunctionParser.h:

(JSC::WASM::FunctionParser<Context>::parseExpression):

  • wasm/WASMMemory.cpp: Copied from Source/JavaScriptCore/wasm/WASMPlan.cpp.

(JSC::WASM::Memory::Memory):

  • wasm/WASMMemory.h: Copied from Source/JavaScriptCore/wasm/WASMModuleParser.h.

(JSC::WASM::Memory::~Memory):
(JSC::WASM::Memory::memory):
(JSC::WASM::Memory::size):
(JSC::WASM::Memory::pinnedRegisters):
(JSC::WASM::Memory::mode):
(JSC::WASM::Memory::growMemory):
(JSC::WASM::Memory::offsetOfSize):

  • wasm/WASMModuleParser.cpp:

(JSC::WASM::ModuleParser::parse):
(JSC::WASM::ModuleParser::parseMemory):

  • wasm/WASMModuleParser.h:

(JSC::WASM::ModuleParser::functionInformation):
(JSC::WASM::ModuleParser::memory):

  • wasm/WASMOps.h:
  • wasm/WASMPlan.cpp:

(JSC::WASM::Plan::Plan):

  • wasm/WASMPlan.h:
  • wasm/WASMSections.h:
6:25 PM Changeset in webkit [207452] by bshafiei@apple.com
  • 3 edits in tags/Safari-603.1.9.0.1/Source/WebCore

Merged r207446. rdar://problem/28786160

6:22 PM Changeset in webkit [207451] by bshafiei@apple.com
  • 5 edits in tags/Safari-603.1.9.0.1/Source

Versioning.

6:17 PM Changeset in webkit [207450] by bshafiei@apple.com
  • 1 copy in tags/Safari-603.1.9.0.1

New tag.

6:17 PM Changeset in webkit [207449] by bshafiei@apple.com
  • 1 delete in tags/Safari-603.1.9.1

Delete tag.

6:14 PM Changeset in webkit [207448] by bshafiei@apple.com
  • 1 copy in tags/Safari-603.1.9.1

New tag.

6:08 PM Changeset in webkit [207447] by commit-queue@webkit.org
  • 14 edits
    2 adds in trunk

Add test and infrastructure for link popover
https://bugs.webkit.org/show_bug.cgi?id=163406

Patch by Megan Gardner <Megan Gardner> on 2016-10-17
Reviewed by Simon Fraser.

Source/WebKit2:

Add infrastructure to see when a link popover appears, and what URL it has loaded.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView didShowForcePressPreview]):
(-[WKWebView didDismissForcePressPreview]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _contentsOfUserInterfaceItem:]):
(-[WKContentView _presentedViewControllerForPreviewItemController:]):
(-[WKContentView _previewItemController:didDismissPreview:committing:]):
(-[WKContentView _previewItemControllerDidCancelPreview:]):

Tools:

Added functionality test for link popovers.
Can query for what URL is loaded, and that the popover has appeared or has
been dismissed.
Added a link popover test.

  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::platformSetDidShowForcePressPreviewCallback):
(WTR::UIScriptController::platformSetDidDismissForcePressPreviewCallback):
(WTR::UIScriptController::platformSetDidEndFormControlInteractionCallback): Deleted.

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptContext.h:
  • TestRunnerShared/UIScriptContext/UIScriptController.cpp:

(WTR::UIScriptController::setDidShowForcePressPreviewCallback):
(WTR::UIScriptController::didShowForcePressPreviewCallback):
(WTR::UIScriptController::setDidDismissForcePressPreviewCallback):
(WTR::UIScriptController::didDismissForcePressPreviewCallback):
(WTR::UIScriptController::platformSetDidShowForcePressPreviewCallback):
(WTR::UIScriptController::platformSetDidDismissForcePressPreviewCallback):
(WTR::UIScriptController::didEndFormControlInteractionCallback): Deleted.
(WTR::UIScriptController::platformSetDidEndFormControlInteractionCallback): Deleted.

  • TestRunnerShared/UIScriptContext/UIScriptController.h:
  • WebKitTestRunner/cocoa/TestRunnerWKWebView.h:
  • WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:

(-[TestRunnerWKWebView dealloc]):
(-[TestRunnerWKWebView didShowForcePressPreview]):
(-[TestRunnerWKWebView didDismissForcePressPreview]):

  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::platformSetDidShowForcePressPreviewCallback):
(WTR::UIScriptController::platformSetDidDismissForcePressPreviewCallback):
(WTR::UIScriptController::platformSetDidEndFormControlInteractionCallback): Deleted.

LayoutTests:

  • fast/events/touch/ios/iphone7/force-press-on-link-expected.txt: Added.
  • fast/events/touch/ios/iphone7/force-press-on-link.html: Added.
6:00 PM Changeset in webkit [207446] by dino@apple.com
  • 3 edits in trunk/Source/WebCore

Remove dependency cycle with UIKit
https://bugs.webkit.org/show_bug.cgi?id=163577
<rdar://problem/28786160>

Reviewed by Tim Horton.

Soft link against UIKit.

  • Configurations/WebCoreTestSupport.xcconfig:
  • testing/Internals.mm:
5:45 PM Changeset in webkit [207445] by timothy_horton@apple.com
  • 4 edits in trunk

REGRESSION (r169805): WKWebView canGoBack returning YES when nothing is in the back-forward list after restoring session state
https://bugs.webkit.org/show_bug.cgi?id=163573
<rdar://problem/28744549>

Reviewed by Dan Bernstein.

Source/WebKit2:

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::restoreFromSessionState):
Update PageLoadState's canGoBack/canGoForward bits when restoring from
session state, because in the don't-navigate case, nothing else will make this happen,
and it will remain stale.

Tools:

  • TestWebKitAPI/Tests/WebKit2/WKBackForwardList.mm:

(TEST):
Add a test ensuring that canGoBack returns NO after restoring session state without navigating.

5:36 PM Changeset in webkit [207444] by Joseph Pecoraro
  • 12 edits
    4 adds in trunk

Web Inspector: Add toggles for debugger pauses at console.assert failures
https://bugs.webkit.org/show_bug.cgi?id=139542
<rdar://problem/19281600>

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

  • inspector/agents/InspectorDebuggerAgent.h:
  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::InspectorDebuggerAgent::disable):
(Inspector::InspectorDebuggerAgent::setPauseOnAssertions):
Toggle pause on assertions state. Default is disabled,
and disable it when frontends disconnect.

(Inspector::InspectorDebuggerAgent::handleConsoleAssert):
Instead of using the PauseOnAllExceptions state, use this
new state specific to assertions.

  • inspector/protocol/Debugger.json:

New protocol method to toggle pausing on assertions.

Source/WebInspectorUI:

  • UserInterface/Controllers/DebuggerManager.js:

(WebInspector.DebuggerManager.prototype.get assertionsBreakpoint):
(WebInspector.DebuggerManager.prototype.isBreakpointRemovable):
(WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange):
New breakpoint and toggling behavior.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Views/DebuggerSidebarPanel.js:

(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineDeleteTreeElement):
(WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements.isSpecialBreakpoint):
(WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements):
New breakpoint tree element behavior.

(WebInspector.DebuggerSidebarPanel.prototype.saveStateToCookie):
(WebInspector.DebuggerSidebarPanel.prototype.restoreStateFromCookie):
Sidebar restoration if it was selected.

  • UserInterface/Images/Assertion.svg: Added.
  • UserInterface/Images/gtk/Assertion.svg: Added.
  • UserInterface/Views/BreakpointTreeElement.css:

(.breakpoint-assertion-icon .icon):
New sidebar icon for the global breakpoint.

LayoutTests:

  • inspector/debugger/pause-on-assert.html:
  • inspector/debugger/pause-reason.html:

These tests need to enable pause on assertions.

  • inspector/debugger/setPauseOnAssertions-expected.txt: Added.
  • inspector/debugger/setPauseOnAssertions.html: Added.

Specific tests for the new protocol method.

5:28 PM Changeset in webkit [207443] by aestes@apple.com
  • 6 edits
    1 add in trunk

Crash in ASCIICaseInsensitiveHash::hash() when a response has a null MIME type
https://bugs.webkit.org/show_bug.cgi?id=163476
<rdar://problem/26941395>

Reviewed by Tim Horton.

Source/WebKit2:

When custom content providers are registered and a response has a null MIME type, WebPage
will pass a null String to HashSet::contains(). This results in a null pointer dereference,
since the String hash functions do not support null Strings and unconditionally dereference
their StringImpls. Fixed by checking that Strings are non-null before calling
HashSet::contains() on m_mimeTypesWithCustomContentProviders.

Rearranging WebPage::shouldUseCustomContentProviderForResponse() to call
canPluginHandleResponse() before checking m_mimeTypesWithCustomContentProviders uncovered a
crash in existing layout tests where WebPage::m_mainFrame can be NULL during WebPage
construction (m_mainFrame isn't yet initialized). Fixed this by passing the main Frame to
canPluginHandleResponseInFrame() instead of relying on m_mainFrame.

New API test: WebKit2.LoadDataWithNilMIMEType.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame): Passed
m_frame->coreFrame() to shouldUseCustomContentProviderForResponse().
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): Ditto.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::canPluginHandleResponse): Added a mainFrame parameter and used it instead
of m_mainFrame->coreFrame().
(WebKit::WebPage::shouldUseCustomContentProviderForResponse): Passed mainFrame to
canPluginHandleResponse(), and checked if mimeType is null before calling
m_mimeTypesWithCustomContentProviders.contains().
(WebKit::WebPage::canShowMIMEType): Checked if MIMEType is null before calling
m_mimeTypesWithCustomContentProviders.contains().

  • WebProcess/WebPage/WebPage.h: Made canPluginHandleResponse() a private declaration.

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/LoadDataWithNilMIMEType.mm: Added.

(TEST): Added an API test that passes a nil MIMEType to
-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:].

5:12 PM Changeset in webkit [207442] by dino@apple.com
  • 14 edits
    1 add in trunk

Allow creation of ExtendedColors and make Color immutable
https://bugs.webkit.org/show_bug.cgi?id=163557
<rdar://problem/28805360>

Reviewed by Darin Adler and Dave Hyatt.

Source/WebCore:

  1. Support the creation of ExtendedColor objects via the

Color class.

  1. Fix the remaining few places where a Color object is

modified after creation, instead creating a new Color.
Move all the mutation methods into the private section,
making Color now immutable.

Changes to Color are covered by existing tests. Changes
to ExtendedColor are covered by the ExtendedColor API test.

  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::fastParseColor): Return a new named Color.

  • dom/Document.cpp:

(WebCore::Document::resetActiveLinkColor): Set to be the named "red" color.

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::addHTMLColorToStyle): Use the string-based constructor
where possible.

  • page/CaptionUserPreferencesMediaAF.cpp:

(WebCore::CaptionUserPreferencesMediaAF::captionsTextEdgeCSS): No need to
use the string "black" here - we have a constant value.

  • platform/graphics/cairo/GraphicsContextCairo.cpp: Don't use setRGB.
  • platform/graphics/Color.cpp:

(WebCore::findNamedColor): Move this up in the file.
(WebCore::Color::Color): Copy in the code from setNamedColor. Also
add a constructor for ExtendedColor.
(WebCore::Color::serialized): Call ExtendedColor's serializer if necessary.
(WebCore::Color::cssText): Ditto.
(WebCore::Color::setNamedColor): Deleted.
(WebCore::Color::tagAsExtended): Deleted.

  • platform/graphics/Color.h: Add a new constructor.

(WebCore::Color::setRGB): Move to private.

  • platform/graphics/ExtendedColor.cpp:

(WebCore::ExtendedColor::cssText): Implement serializer.

  • platform/graphics/ExtendedColor.h:
  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::colorIncludingFallback): Construct a new Color rather than changing an existing object.

Tools:

API tests for ExtendedColor.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/ExtendedColor.cpp: Added.

(TestWebKitAPI::TEST):
(TestWebKitAPI::makeColor):

4:27 PM Changeset in webkit [207441] by Chris Dumez
  • 2 edits in trunk/Source/WebKit2

[WK2][NetworkCache] PendingFrameLoad objects are sometimes leaked
https://bugs.webkit.org/show_bug.cgi?id=163569
<rdar://problem/28810836>

Reviewed by Antti Koivisto.

PendingFrameLoad objects are created to track frame loads and added to
the m_pendingFrameLoads hash map. These objects are supposed to remove
themselves from the hash map once they detect that the page load has
finished by calling PendingFrameLoad::m_loadCompletionHandler().

PendingFrameLoad::m_loadCompletionHandler() is called from
markLoadAsCompleted() when we detect that the page load has finished
via the m_loadHysteresisActivity HysteresisActivity. We call impulse()
on the HysteresisActivity every time a subresource is loaded in the
frame. The issue is that if no subresource is ever loaded, then we
never call impulse() on the HysteresisActivity, which is therefore
never started. If it nevers starts, then it nevers stops and never
calls markLoadAsCompleted(). To address the problem, we now call
impulse() on the HysteresisActivity as soon as we construct it.

  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
4:00 PM Changeset in webkit [207440] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe.html as flaky on ios-simulator debug.
https://bugs.webkit.org/show_bug.cgi?id=163362

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
3:56 PM Changeset in webkit [207439] by commit-queue@webkit.org
  • 4 edits in trunk/Source

Enable keyboard in fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=163146

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

Allow keyboard in fullscreen.

Source/WebKit/mac:

  • WebView/WebView.mm:

(-[WebView _supportsFullScreenForElement:withKeyboard:]):

Source/WebKit2:

  • UIProcess/WebFullScreenManagerProxy.cpp:

(WebKit::WebFullScreenManagerProxy::supportsFullScreen):

3:30 PM Changeset in webkit [207438] by Simon Fraser
  • 15 edits
    8 adds in trunk

Implement DOMRect/DOMRectReadOnly
https://bugs.webkit.org/show_bug.cgi?id=163464

Reviewed by Darin Adler.

Source/WebCore:

Implement the DOMRectInit/DOMRectReadOnly/DOMRect interfaces specified in
https://dev.w3.org/fxtf/geometry/

DOMRects allow negative height/width and require double storage, so we can't just
use FloatRect for storage. They also require handling of NaN and Infinity.

To have the left/right/top/bottom accessors follow IEEE NaN rules, we need to use
custom min/max functions that return NaN if either argument is NaN, so add
nanPropagatingMin/nanPropagatingMax helpers to MathExtras.h.

Test: fast/dom/domrect.html

  • CMakeLists.txt:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/DOMRect.h: Added.

(WebCore::DOMRect::create):
(WebCore::DOMRect::fromRect):
(WebCore::DOMRect::setX):
(WebCore::DOMRect::setY):
(WebCore::DOMRect::setWidth):
(WebCore::DOMRect::setHeight):
(WebCore::DOMRect::DOMRect):

  • dom/DOMRect.idl: Added.
  • dom/DOMRectInit.h: Added.
  • dom/DOMRectInit.idl: Added.
  • dom/DOMRectReadOnly.h: Added.

(WebCore::DOMRectReadOnly::create):
(WebCore::DOMRectReadOnly::fromRect):
(WebCore::DOMRectReadOnly::x):
(WebCore::DOMRectReadOnly::y):
(WebCore::DOMRectReadOnly::width):
(WebCore::DOMRectReadOnly::height):
(WebCore::DOMRectReadOnly::top):
(WebCore::DOMRectReadOnly::right):
(WebCore::DOMRectReadOnly::bottom):
(WebCore::DOMRectReadOnly::left):
(WebCore::DOMRectReadOnly::DOMRectReadOnly):

  • dom/DOMRectReadOnly.idl: Added.

Source/WTF:

Implement min()/max() in a way that follows Math.min/Math.max, which return
NaN if either argument is NaN.

  • wtf/MathExtras.h:

(WTF::nanPropagatingMin):
(WTF::nanPropagatingMax):

LayoutTests:

New test and new results for global constructor tests.

  • geometry/DOMRect-001-expected.txt: Added.
  • geometry/DOMRect-001.html: Added.
  • js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
  • js/dom/global-constructors-attributes-expected.txt:
  • platform/efl/js/dom/global-constructors-attributes-expected.txt:
  • platform/gtk/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
  • platform/win/js/dom/global-constructors-attributes-expected.txt:
3:09 PM Changeset in webkit [207437] by Yusuke Suzuki
  • 5 edits in trunk/Source/JavaScriptCore

[DOMJIT][JSC] Add Option::useDOMJIT
https://bugs.webkit.org/show_bug.cgi?id=163457

Reviewed by Saam Barati.

Add an option to switch the DOMJIT optimization.

  • bytecode/PolymorphicAccess.cpp:

(JSC::AccessCase::generateImpl):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleGetById):

  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

  • runtime/Options.h:
3:03 PM Changeset in webkit [207436] by commit-queue@webkit.org
  • 4 edits
    10 adds in trunk

[Modern Media Controls] Basic MediaController
https://bugs.webkit.org/show_bug.cgi?id=163539
<rdar://problem/28797542>

Patch by Antoine Quint <Antoine Quint> on 2016-10-17
Reviewed by Darin Adler.

Source/WebCore:

We add a new main.js file which acts as the entry point by implementing the createControls()
function that HTMLMediaElement::ensureMediaControlsInjectedScript() once the shadow root has
been created. That functions creates an instance of the new MediaController class, which is
the controller object that will handle communication between the media controls and the media
element. At first, this MediaController class is very limited and assumes macOS inline
layout traits and forces a start button to be shown over the media, which can be played
to start the media and show the full controls. More functionality will be added by future patches.

Tests: media/modern-media-controls/media-controller/media-controller-click-to-start.html

media/modern-media-controls/media-controller/media-controller-constructor.html
media/modern-media-controls/media-controller/media-controller-resize.html

  • Modules/modern-media-controls/main.js: Added.

(createControls):

  • Modules/modern-media-controls/media/media-controller.js: Added.

(MediaController):
(MediaController.prototype.set pageScaleFactor):
(MediaController.prototype.set usesLTRUserInterfaceLayoutDirection):
(MediaController.prototype.handleEvent):
(MediaController.prototype.buttonWasClicked):
(MediaController.prototype._updateControlsSize):

  • WebCore.xcodeproj/project.pbxproj:
  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::mediaControlsStyleSheet):
(WebCore::RenderThemeMac::mediaControlsScript):

LayoutTests:

Testing the properties of the new MediaController class and the availability and behavior of the
createControls() global function.

  • media/modern-media-controls/media-controller/media-controller-click-to-start-expected.txt: Added.
  • media/modern-media-controls/media-controller/media-controller-click-to-start.html: Added.
  • media/modern-media-controls/media-controller/media-controller-constructor-expected.txt: Added.
  • media/modern-media-controls/media-controller/media-controller-constructor.html: Added.
  • media/modern-media-controls/media-controller/media-controller-resize-expected.txt: Added.
  • media/modern-media-controls/media-controller/media-controller-resize.html: Added.
2:51 PM Changeset in webkit [207435] by Michael Catanzaro
  • 2 edits in trunk/LayoutTests

[GTK] Skip layout tests under crypto/workers/subtle

  • platform/gtk/TestExpectations:
2:45 PM Changeset in webkit [207434] by fpizlo@apple.com
  • 13 edits
    2 adds in trunk/Source/JavaScriptCore

Air::IRC doesn't need to have a special-case for uncolored Tmps since they all get colored
https://bugs.webkit.org/show_bug.cgi?id=163548
<rdar://problem/28804381>

Reviewed by Geoffrey Garen.

Before r207408, IRC had a mode where it would silently assign the first assignable register (so
%rax, %xmm0, etc) to any tmp that was not colorable due to a pathological interference fencepost.
We reason about interference at instruction boundaries. This means that if you have, for example,
an instruction that clobbers all registers late followed by an instruction that has an early def
in the same register file, then the early def will not be colorable because it interferes with
all registers. This already happens in our tests, but IRC silently returns the first assignable
register to such tmps. For some reason the resulting code works OK - probably because this tends
to only be hit by fuzzing, which may not then stress that code enough to shake out the register
corruption. Also, this can only happen for floating point registers, so it's hard to get an
exciting crash. The worst case is that your numbers get all messed up.

This change fixes the issue:

  • IRC will now crash if it can't color a tmp.


  • IRC doesn't crash on our tests anymore because I added a padInterference() utility that works around the interference problem by inserting Nops to pad between those instructions where conflating their early and late actions into one interference fencepost could create an uncolorable graph.


See https://bugs.webkit.org/show_bug.cgi?id=163548#c2 for a detailed discussion of how the
problem can arise.

This problem almost made me want to abandon our use of interference at instruction boundaries,
and introduce something more comprehensive, like interference at various stages of an
instruction's execution. The reason why I didn't do this is that this problem only arises in well
confined corner cases: you need an instruction that does a late use or def followed by an
instruction that does an early def. Register clobbers count as defs for this equation.
Fortunately, early defs are rare, and even when they do happen, you still need the previous
instruction to have a late something. Late uses are rare and many instructions don't have defs at
all, which means that it's actually pretty common for an instruction to not have anything late.
This means that the padInterference() strategy is ideal: our algorithms stay simple because they
only have to worry about interference at boundaries, and we rarely insert any Nops in
padInterference() so the IR stays nice and compact. Those Nops get removed by any phase that does
DCE, which includes eliminateDeadCode(), allocateStack(), and reportUsedRegisters(). In practice
allocateStack() kills them.

This also finally refactors our passing of RegisterSet to pass it by value, since it's small
enough that we're not gaining anything by using references. On x86, RegisterSet ought to be
smaller than a pointer.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • b3/B3StackmapSpecial.cpp:

(JSC::B3::StackmapSpecial::extraClobberedRegs):
(JSC::B3::StackmapSpecial::extraEarlyClobberedRegs):

  • b3/B3StackmapSpecial.h:
  • b3/air/AirCCallSpecial.cpp:

(JSC::B3::Air::CCallSpecial::extraEarlyClobberedRegs):
(JSC::B3::Air::CCallSpecial::extraClobberedRegs):

  • b3/air/AirCCallSpecial.h:
  • b3/air/AirInst.h:
  • b3/air/AirInstInlines.h:

(JSC::B3::Air::Inst::extraClobberedRegs):
(JSC::B3::Air::Inst::extraEarlyClobberedRegs):

  • b3/air/AirIteratedRegisterCoalescing.cpp:

(JSC::B3::Air::iteratedRegisterCoalescing):

  • b3/air/AirPadInterference.cpp: Added.

(JSC::B3::Air::padInterference):

  • b3/air/AirPadInterference.h: Added.
  • b3/air/AirSpecial.h:
  • b3/air/AirSpillEverything.cpp:

(JSC::B3::Air::spillEverything):

  • jit/RegisterSet.h:

(JSC::RegisterSet::isEmpty):

2:44 PM Changeset in webkit [207433] by sbarati@apple.com
  • 2 edits in trunk/JSTests

Add more tests for the double->String conversion in ValueAdd constant folding
https://bugs.webkit.org/show_bug.cgi?id=163517

Reviewed by Yusuke Suzuki.

  • microbenchmarks/string-add-constant-folding.js:

(test):

2:36 PM Changeset in webkit [207432] by jfbastien@apple.com
  • 11 edits
    4 adds in trunk

WebAssembly JS API: implement basic stub

Implement the global WebAssembly JavaScript object, and its constructor +
function properties as described in:

https://github.com/WebAssembly/design/blob/master/JS.md

These don't do anything at the moment, the parent bug will take care of adding
more functionality and associated tests.

WebAssembly JS API: implement basic stub
https://bugs.webkit.org/show_bug.cgi?id=163404

Reviewed by Keith Miller.

JSTests:

  • wasm.yaml:
  • wasm/js-api/test_basic_api.js: Added.

(const.f.of.functionProperties.WebAssembly.f.undefined.throw.new.Error.Couldn.const.c.of.constructorProperties.WebAssembly.c.undefined.throw.new.Error.Couldn):
(const.c.of.constructorProperties.catch):

Source/JavaScriptCore:

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • builtins/BuiltinNames.h: register the new WebAssembly object's name and its constructor properties
  • jsc.cpp: remove useless include
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init): add the WebAssembly global object and its constructor properties, but only if the JSC option enables it

  • runtime/Options.h: add the useWebAssembly (alias: enableWebAssembly) option, defaulting to false
  • wasm/WebAssemblyObject.cpp: Added.

(JSC::WebAssemblyObject::create): boilerplate
(JSC::WebAssemblyObject::createStructure): boilerplate
(JSC::WebAssemblyObject::finishCreation): boilerplate
(JSC::WebAssemblyObject::WebAssemblyObject): boilerplate
(JSC::wasmObjectFuncvalidate): auto-throws for now
(JSC::wasmObjectFunccompile): auto-throws for now

  • wasm/WebAssemblyObject.h: Added.

Tools:

  • Scripts/run-jsc-stress-tests: use the new JSC option which exposes the WebAssembly object.
2:17 PM Changeset in webkit [207431] by andersca@apple.com
  • 3 edits in trunk/Source/WebCore

Remove an unused HistoryItem function
https://bugs.webkit.org/show_bug.cgi?id=163565

Reviewed by Tim Horton.

  • history/HistoryItem.cpp:

(WebCore::HistoryItem::isAncestorOf): Deleted.

  • history/HistoryItem.h:
2:10 PM Changeset in webkit [207430] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, build fix after r207428
https://bugs.webkit.org/show_bug.cgi?id=163223

Previous build fix r207428 broke all the builds.

  • bytecode/PolymorphicAccess.h:
2:00 PM Changeset in webkit [207429] by n_wang@apple.com
  • 12 edits
    2 adds in trunk

AX: [Mac] mapping for output elements
https://bugs.webkit.org/show_bug.cgi?id=163471

Reviewed by Chris Fleizach.

Source/WebCore:

Mapped the output element to status role and exposed its text content
as AXTitle.

Test: accessibility/mac/output-element.html

  • English.lproj/Localizable.strings:
  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::visibleText):

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::isOutput):

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::determineAccessibilityRole):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper roleDescription]):

  • platform/LocalizedStrings.cpp:

(WebCore::AXOutputText):

  • platform/LocalizedStrings.h:
  • platform/efl/LocalizedStringsEfl.cpp:

(WebCore::AXOutputText):

  • platform/gtk/LocalizedStringsGtk.cpp:

(WebCore::AXOutputText):

LayoutTests:

  • accessibility/mac/output-element-expected.txt: Added.
  • accessibility/mac/output-element.html: Added.
1:57 PM Changeset in webkit [207428] by Yusuke Suzuki
  • 3 edits in trunk/Source/JavaScriptCore

Unreviewed, build fix for GTK and Windows
https://bugs.webkit.org/show_bug.cgi?id=163223

Attempt to fix build failures in GTK port and Windows port.

  • bytecode/PolymorphicAccess.cpp:
  • bytecode/PolymorphicAccess.h:

(JSC::AccessGenerationState::SpillState::SpillState):

1:43 PM Changeset in webkit [207427] by Yusuke Suzuki
  • 16 edits
    1 copy
    6 adds in trunk

[DOMJIT] Use DOMJIT::Patchpoint in IC
https://bugs.webkit.org/show_bug.cgi?id=163223

Reviewed by Saam Barati.

JSTests:

  • stress/domjit-exception-ic.js: Added.

(shouldBe):
(access):

  • stress/domjit-exception.js: Added.

(shouldBe):
(access):

  • stress/domjit-getter-complex-with-incorrect-object.js: Added.

(shouldThrow):
(access):
(i.shouldThrow):

  • stress/domjit-getter-complex.js: Added.

(shouldBe):
(access):

  • stress/domjit-getter-try-catch-getter-as-get-by-id-register-restoration.js: Added.

(assert):
(bar):
(foo):

Source/JavaScriptCore:

This patch uses DOMJIT::Patchpoint to inline DOM accesses even in IC!
It is useful for Baseline JIT cases and GetById cases in DFG and FTL.
In AccessCase, we construct the environment that allows DOMJIT::Patchpoint
to emit code and make DOMJIT accessors inlined in IC.

To allow DOMJIT::Patchpoint to emit code, we create a mechanism to emit calls
required in DOMJIT::Patchpoint. This system is useful when we create the super-
polymorphic support[1] later. And inlining mechanism is useful even after
introducing super-polymorphic support since it can work even after we fire the
watchpoint for super-polymorphic handling.

This patch improves Dromaeo dom-traverse 8% (263.95 runs/s v.s. 244.07 runs/s).

[1]: https://bugs.webkit.org/show_bug.cgi?id=163226

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • bytecode/DOMJITAccessCasePatchpointParams.cpp: Added.

(JSC::SlowPathCallGeneratorWithArguments::SlowPathCallGeneratorWithArguments):
(JSC::SlowPathCallGeneratorWithArguments::generateImpl):
(JSC::DOMJITAccessCasePatchpointParams::emitSlowPathCalls):

  • bytecode/DOMJITAccessCasePatchpointParams.h: Copied from Source/JavaScriptCore/ftl/FTLDOMJITPatchpointParams.h.

(JSC::DOMJITAccessCasePatchpointParams::DOMJITAccessCasePatchpointParams):
(JSC::DOMJITAccessCasePatchpointParams::SlowPathCallGenerator::~SlowPathCallGenerator):

  • bytecode/PolymorphicAccess.cpp:

(JSC::AccessGenerationState::liveRegistersForCall):
(JSC::AccessGenerationState::liveRegistersToPreserveAtExceptionHandlingCallSite):
(JSC::calleeSaveRegisters):
(JSC::AccessGenerationState::calculateLiveRegistersForCallAndExceptionHandling):
(JSC::AccessGenerationState::restoreLiveRegistersFromStackForCallWithThrownException):
(JSC::AccessGenerationState::restoreLiveRegistersFromStackForCall):
(JSC::AccessGenerationState::callSiteIndexForExceptionHandlingOrOriginal):
(JSC::AccessGenerationState::originalExceptionHandler):
(JSC::AccessCase::generateImpl):
(JSC::AccessCase::emitDOMJITGetter):
(JSC::PolymorphicAccess::regenerate):
(JSC::AccessGenerationState::preserveLiveRegistersToStackForCall): Deleted.

  • bytecode/PolymorphicAccess.h:

(JSC::AccessGenerationState::SpillState::isEmpty):
(JSC::AccessGenerationState::setSpillStateForJSGetterSetter):
(JSC::AccessGenerationState::spillStateForJSGetterSetter):
(JSC::AccessGenerationState::liveRegistersForCall): Deleted.
(JSC::AccessGenerationState::numberOfStackBytesUsedForRegisterPreservation): Deleted.
(JSC::AccessGenerationState::liveRegistersToPreserveAtExceptionHandlingCallSite): Deleted.

  • dfg/DFGDOMJITPatchpointParams.cpp:
  • dfg/DFGDOMJITPatchpointParams.h:
  • domjit/DOMJITPatchpoint.h:
  • domjit/DOMJITPatchpointParams.h:

(JSC::DOMJIT::PatchpointParams::addSlowPathCall):

  • ftl/FTLDOMJITPatchpointParams.cpp:
  • ftl/FTLDOMJITPatchpointParams.h:
  • jsc.cpp:

(WTF::DOMJITNode::checkDOMJITNode):
(WTF::DOMJITGetterComplex::DOMJITGetterComplex):
(WTF::DOMJITGetterComplex::createStructure):
(WTF::DOMJITGetterComplex::create):
(WTF::DOMJITGetterComplex::DOMJITNodeDOMJIT::DOMJITNodeDOMJIT):
(WTF::DOMJITGetterComplex::domJITNodeGetterSetter):
(WTF::DOMJITGetterComplex::finishCreation):
(WTF::DOMJITGetterComplex::functionEnableException):
(WTF::DOMJITGetterComplex::customGetter):
(GlobalObject::finishCreation):
(functionCreateDOMJITGetterComplexObject):

Source/WebCore:

Make DOMJITPatchpointParams non-const.

  • domjit/DOMJITHelpers.h:

(WebCore::DOMJITHelpers::toWrapper):

  • domjit/JSNodeDOMJIT.cpp:

(WebCore::createCallDOMForOffsetAccess):
(WebCore::checkNode):
(WebCore::NodeNodeTypeDOMJIT::callDOM):

1:38 PM Changeset in webkit [207426] by Chris Dumez
  • 18 edits in trunk/Source

Move form.reportValidity() behind InteractiveFormValidation setting
https://bugs.webkit.org/show_bug.cgi?id=163550

Reviewed by Darin Adler.

Source/WebCore:

Move form.reportValidity() behind InteractiveFormValidation setting for consistency
given that the two features are strongly related.

Also enable the setting by default so we can get feedback on the implementation.

Demos:

  • bindings/generic/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setInteractiveFormValidationEnabled):
(WebCore::RuntimeEnabledFeatures::interactiveFormValidationEnabled):

  • 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:

Source/WebKit/mac:

Enable InteractiveFormValidation setting by default and link it to
RuntimeEnabledFeatures so we can use it in the IDL.

  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

  • WebView/WebViewData.mm:

(-[WebViewPrivate init]):

Source/WebKit2:

Enable InteractiveFormValidation setting by default and link it to
RuntimeEnabledFeatures so we can use it in the IDL.

  • UIProcess/API/C/WKPreferencesRefPrivate.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

1:34 PM Changeset in webkit [207425] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Build fix for HasOwnPropertyCache::Entry caused slowdown by introducing a constructor that doesn't use move semantics for the RefPtr<UniquedStringImpl> parameter
https://bugs.webkit.org/show_bug.cgi?id=163490

Reviewed by Darin Adler.

  • runtime/HasOwnPropertyCache.h:

(JSC::HasOwnPropertyCache::Entry::Entry):
(JSC::HasOwnPropertyCache::tryAdd):

1:18 PM Changeset in webkit [207424] by barraclough@apple.com
  • 7 edits in trunk/Source/WebKit2

UIProcess should determine throttle state for WebContent process
https://bugs.webkit.org/show_bug.cgi?id=163556

Reviewed by Anders Carlsson.

This is a step towards merging page/process throttling code for mac & iOS.

Previously WebPage determined whether to start a UserActivity based on page activity,
visibility and the preference to disable. Now WebPage passes the activity state across
to WebPageProxy, which makes the decision & explicitly instructs WebPage to start/stop
the UserActivity.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::WebPageProxy):

  • updateActivityToken + updateProccessSuppressionState -> updateThrottleState

(WebKit::WebPageProxy::reattachToWebProcess):

  • updateActivityToken -> updateThrottleState

(WebKit::WebPageProxy::dispatchViewStateChange):

  • updateActivityToken -> updateThrottleState

(WebKit::WebPageProxy::setPageActivityState):

  • Record activity state passed from WebPage, and update.

(WebKit::WebPageProxy::preferencesDidChange):

  • updateProccessSuppressionState -> updateThrottleState

(WebKit::WebPageProxy::updateActivityToken): Deleted.
(WebKit::WebPageProxy::updateProccessSuppressionState): Deleted.
(WebKit::WebPageProxy::updateThrottleState):

  • Merged existing updateActivityToken/updateProccessSuppressionState to unified updateThrottleState.
  • Compute whether page should be suppressed, and send SetPageSuppressed message accordingly.
  • UIProcess/WebPageProxy.h:
    • Merged existing updateActivityToken/updateProccessSuppressionState to unified updateThrottleState.
    • Added setPageActivityState/m_activityState to report/record page activity.
    • Added m_pageSuppressed to prevent redundant message sends.
  • UIProcess/WebPageProxy.messages.in:
    • Expose SetPageActivityState message (called by WebPage).
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::WebPage):

  • removed m_processSuppressionEnabled
  • updateUserActivity -> setPageSuppressed - explicitly set the page to not be suppressed, until WebPageProxy tells us to do so.

(WebKit::WebPage::setPageActivityState):

  • post activity state on to WebPageProxy.

(WebKit::WebPage::setPageSuppressed):

  • Start/stop USerActivity accordingly.

(WebKit::WebPage::setViewState):

  • No longer need to monitor ViewState changes on the WebProcess side.

(WebKit::WebPage::updatePreferences):

  • No longer need to monitor preference changes on the WebProcess side.

(WebKit::WebPage::updateUserActivity): Deleted.

  • Only updated on reciept of setPageSuppressed message.
  • WebProcess/WebPage/WebPage.h:
    • Removed m_activityState, m_processSuppressionEnabled, updateUserActivity.
    • Added setPageSuppressed message.
  • WebProcess/WebPage/WebPage.messages.in:
    • Added SetPageSuppressed message.
12:54 PM Changeset in webkit [207423] by commit-queue@webkit.org
  • 11 edits in trunk

[Modern Media Controls] Add a MediaControlsHost API to retrieve images as base64
https://bugs.webkit.org/show_bug.cgi?id=163502
<rdar://problem/28792017>

Patch by Antoine Quint <Antoine Quint> on 2016-10-17
Reviewed by Darin Adler.

Add a new base64StringForIconAndPlatform() method to MediaControlsHost such that we
may load images from the modern-media-controls directory in the WebCore.framework bundle.
We use this new method in the iconService singleton when a mediaControlsHost is set,
which will be set in a later patch.

  • Modules/mediacontrols/MediaControlsHost.cpp:

(WebCore::MediaControlsHost::base64StringForIconAndPlatform):

  • Modules/mediacontrols/MediaControlsHost.h:
  • Modules/mediacontrols/MediaControlsHost.idl:
  • Modules/modern-media-controls/controls/icon-service.js:

(const.iconService.new.IconService.prototype.urlForIconNameAndLayoutTraits):
(const.iconService.new.IconService):

  • rendering/RenderTheme.h:

(WebCore::RenderTheme::mediaControlsBase64StringForIconAndPlatform):
(WebCore::RenderTheme::mediaControlsScript): Deleted.

  • rendering/RenderThemeMac.h:
  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::mediaControlsBase64StringForIconAndPlatform):

12:17 PM Changeset in webkit [207422] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit/mac

Fix iOS build.

  • History/WebBackForwardList.mm:

(-[WebBackForwardList dictionaryRepresentation]):

12:11 PM Changeset in webkit [207421] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

[Modern Media Controls] Add a MediaControlsHost API to retrieve the shadow root CSS
https://bugs.webkit.org/show_bug.cgi?id=163501
<rdar://problem/28792014>

Patch by Antoine Quint <Antoine Quint> on 2016-10-17
Reviewed by Darin Adler.

Add a new shadowRootCSSText property to MediaControlsHost so that we may obtain the
concatenated CSS sources for the media controls shadow root via JS. Actually using this
API will be done in a later patch. We also no longer inject those styles as a user-agent
stylesheet when the runtime flag is on since it will no longer be necessary.

  • Modules/mediacontrols/MediaControlsHost.cpp:

(WebCore::MediaControlsHost::shadowRootCSSText):

  • Modules/mediacontrols/MediaControlsHost.h:
  • Modules/mediacontrols/MediaControlsHost.idl:
  • css/CSSDefaultStyleSheets.cpp:

(WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):

12:06 PM Changeset in webkit [207420] by Simon Fraser
  • 13 edits
    9 adds in trunk

Implement DOMPoint/DOMPointReadOnly
https://bugs.webkit.org/show_bug.cgi?id=133916

Reviewed by Darin Adler.
Source/WebCore:

Patch mostly by Dirk Schultz <krit@webkit.org>.

Implement DOMPoint/DOMPointReadOnly following https://drafts.fxtf.org/geometry/
(although we may need to match https://www.w3.org/TR/geometry-1/ to be compatible
with Chrome).

Test: geometry/DOMPoint-001.html

  • CMakeLists.txt:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/DOMPoint.h: Added.
  • dom/DOMPoint.idl: Added.
  • dom/DOMPointInit.h: Added.
  • dom/DOMPointInit.idl: Added.
  • dom/DOMPointReadOnly.h: Added.

(WebCore::DOMPointReadOnly::create):
(WebCore::DOMPointReadOnly::fromPoint):
(WebCore::DOMPointReadOnly::x):
(WebCore::DOMPointReadOnly::y):
(WebCore::DOMPointReadOnly::z):
(WebCore::DOMPointReadOnly::w):
(WebCore::DOMPointReadOnly::DOMPointReadOnly):

  • dom/DOMPointReadOnly.idl: Added.

LayoutTests:

New Web Platform-style test, and rebaselines.

  • geometry/DOMPoint-001-expected.txt: Added.
  • geometry/DOMPoint-001.html: Added.
  • js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
  • js/dom/global-constructors-attributes-expected.txt:
  • platform/efl/js/dom/global-constructors-attributes-expected.txt:
  • platform/gtk/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
  • platform/win/js/dom/global-constructors-attributes-expected.txt:
11:35 AM Changeset in webkit [207419] by andersca@apple.com
  • 4 edits in trunk/Source/WebKit/mac

CTTE some of the BackForwardList member functions
https://bugs.webkit.org/show_bug.cgi?id=163555

Reviewed by Dan Bernstein.

  • History/BackForwardList.h:

(BackForwardList::entries):

  • History/BackForwardList.mm:

(BackForwardList::removeItem):
(BackForwardList::containsItem):
(BackForwardList::entries): Deleted.

  • History/WebBackForwardList.mm:

(-[WebBackForwardList removeItem:]):
(-[WebBackForwardList containsItem:]):
(-[WebBackForwardList description]):

11:26 AM Changeset in webkit [207418] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[Modern Media Controls] Use modern-media-controls module sources for media controls stylesheet and script injection
https://bugs.webkit.org/show_bug.cgi?id=163500
<rdar://problem/28792010>

Patch by Antoine Quint <Antoine Quint> on 2016-10-17
Reviewed by Darin Adler.

Add files from the Modules/modern-media-controls directory to the Xcode project and add a copy phase
to copy those files with their directory stucture as a subdirectory of the WebCore.framework Resources
directory.

Additionally, use the modern-media-controls Module CSS and JS files when concatenating the media controls
scripts and styles in RenderTheme when the runtime flag is on.

  • WebCore.xcodeproj/project.pbxproj:
  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::mediaControlsStyleSheet):
(WebCore::RenderThemeMac::mediaControlsScript):

11:14 AM Changeset in webkit [207417] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Fix typo in error message.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateSerializerFunction):

10:59 AM Changeset in webkit [207416] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

resolve-ChangeLogs: Specify --no-page to git diff
https://bugs.webkit.org/show_bug.cgi?id=163441

Patch by Fujii Hironori <Fujii Hironori> on 2016-10-17
Reviewed by Darin Adler.

resolve-ChangeLogs shows the result after resolving by invoking
'git diff'. It runs a pager for every ChangeLog if it is under
TTY.

  • Scripts/resolve-ChangeLogs:

(showStatus): Specify '--no-page' to git diff.

10:59 AM Changeset in webkit [207415] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit/mac

Remove WEBCORE_EXPORT from BackForwardList, it lives in WebKit now
https://bugs.webkit.org/show_bug.cgi?id=163551

Reviewed by Tim Horton.

  • History/BackForwardList.h:
10:49 AM Changeset in webkit [207414] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit2

REGRESSION(r206189): logs error statements when API::URLRequest is canceled
https://bugs.webkit.org/show_bug.cgi?id=163393

Reviewed by Antti Koivisto.

Print this case at normal logging level, not as an error.

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::loadResource):

10:48 AM Changeset in webkit [207413] by Chris Dumez
  • 3 edits in trunk/Source/WebKit2

[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):

10:32 AM Changeset in webkit [207412] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

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 <Fujii Hironori> 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.

9:59 AM Changeset in webkit [207411] by mark.lam@apple.com
  • 31 edits in trunk/Source

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):

9:56 AM Changeset in webkit [207410] by Ryan Haddad
  • 1 edit
    1 add in trunk/LayoutTests

Rebaseline mathml/mathml-in-dashboard.html for mac.

Unreviewed test gardening.

  • platform/mac/mathml/mathml-in-dashboard-expected.txt: Added.
9:56 AM Changeset in webkit [207409] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[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:
9:19 AM Changeset in webkit [207408] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

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:
4:59 AM Changeset in webkit [207407] by Konstantin Tokarev
  • 5 edits in trunk/Source

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):

4:30 AM Changeset in webkit [207406] by Michael Catanzaro
  • 11 edits
    1 copy
    2 moves
    1 add
    1 delete in trunk

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):

3:52 AM Changeset in webkit [207405] by Carlos Garcia Campos
  • 4 edits in trunk

[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.

3:45 AM Changeset in webkit [207404] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

[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):

2:07 AM WebKitGTK/2.14.x edited by berto@igalia.com
(diff)
2:07 AM WebKitGTK/2.14.x edited by berto@igalia.com
(diff)
2:06 AM Changeset in webkit [207403] by berto@igalia.com
  • 2 edits in trunk/Source/WebCore

[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):

12:40 AM WebKitGTK/2.14.x edited by Manuel Rego Casasnovas
(diff)
12:23 AM Changeset in webkit [207402] by Manuel Rego Casasnovas
  • 2 edits in trunk/Source/WebKit2

[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.

Note: See TracTimeline for information about the timeline view.