Timeline



Dec 27, 2019:

9:58 AM Changeset in webkit [253923] by Darin Adler
  • 32 edits
    1 delete in trunk/Source

Refactor to simplify broadcasting to all media elements
https://bugs.webkit.org/show_bug.cgi?id=205567

Reviewed by Eric Carlson.

Source/WebCore:

Over time, we have accumulated many different sets of all the media elements.
With the goal of being a bit abstract and not building too much behavior into
the Document object, we ended up with unnecessary complexity, and many sets
of all the HTMLMediaElement objects. This is a first cut at reducing that complexity.
At the same time, the refactoring makes all the iteration use a safe algorithm that
builds a vector of Ref<HTMLMediaElement>, safe even if the work done for each
media element calls out to arbitrary DOM operations.

Separately, this patch also includes some name changes that still say "atomic"
instead of "atom" left over from our renaming of AtomicString to AtomString.

  • Headers.cmake: Removed ApplicationStateChangeListener.h.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • css/StyleSheetContents.cpp:

(WebCore::StyleSheetContents::estimatedSizeInBytes const): Reworded comment to
say "atom".

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::getElementsByName): Updated for "atomic" -> "atom".
(WebCore::ContainerNode::radioNodeList): Ditto.

  • dom/Document.cpp:

(WebCore::Document::visibilityStateChanged): Moved the code from
the notifyMediaCaptureOfVisibilityChanged in here. No need for a separate
function for the two lines of code.
(WebCore::Document::registerMediaElement): Added. Replaces the multiple registrations
that each media element would do.
(WebCore::Document::unregisterMediaElement): Ditto.
(WebCore::Document::forEachMediaElement): Added. Safely iterates the media elements
and calls a function on each of them.
(WebCore::Document::registerForAllowsMediaDocumentInlinePlaybackChangedCallbacks): Deleted.
(WebCore::Document::unregisterForAllowsMediaDocumentInlinePlaybackChangedCallbacks): Deleted.
(WebCore::Document::allowsMediaDocumentInlinePlaybackChanged): Deleted.
(WebCore::Document::mediaVolumeDidChange): Deleted.
(WebCore::Document::registerForMediaVolumeCallbacks): Deleted.
(WebCore::Document::unregisterForMediaVolumeCallbacks): Deleted.
(WebCore::Document::privateBrowsingStateDidChange): Use forEachMediaElement to call
privateBrowsingStateDidChange on each media element rather than keeping a separate registry.
(WebCore::Document::registerForPrivateBrowsingStateChangedCallbacks): Deleted.
(WebCore::Document::unregisterForPrivateBrowsingStateChangedCallbacks): Deleted.
(WebCore::Document::registerForCaptionPreferencesChangedCallbacks): Updated the type
to be HTMLMediaElement rather than just Element.
(WebCore::Document::unregisterForCaptionPreferencesChangedCallbacks): Ditto.
(WebCore::Document::registerForPageScaleFactorChangedCallbacks): Deleted.
(WebCore::Document::unregisterForPageScaleFactorChangedCallbacks): Deleted.
(WebCore::Document::pageScaleFactorChangedAndStable): Deleted.
(WebCore::Document::registerForUserInterfaceLayoutDirectionChangedCallbacks): Deleted.
(WebCore::Document::unregisterForUserInterfaceLayoutDirectionChangedCallbacks): Deleted.
(WebCore::Document::userInterfaceLayoutDirectionChanged): Deleted.
(WebCore::Document::notifyMediaCaptureOfVisibilityChanged): Deleted.
(WebCore::Document::registerForMediaStreamStateChangeCallbacks): Deleted.
(WebCore::Document::unregisterForMediaStreamStateChangeCallbacks): Deleted.
(WebCore::Document::mediaStreamCaptureStateChanged): Use forEachMediaElement to call
mediaStreamCaptureStarted on each media element rather than keeping a separate registry.
(WebCore::Document::addApplicationStateChangeListener): Deleted.
(WebCore::Document::removeApplicationStateChangeListener): Deleted.
(WebCore::Document::forEachApplicationStateChangeListener): Deleted.

  • dom/Document.h: Clean up forward declarations a bit. Updated for above changes,

removing many function and data members.

  • dom/Element.cpp:

(WebCore::Element::spellcheckAttributeState const): Deleted.
(WebCore::Element::isSpellCheckingEnabled const): Refactored to merge in the logic
from the spellcheckAttributeState function. The combined function is both a bit easier
to understand and smaller than the two functions were.

  • dom/Element.h: Removed some unneeded includes. Removed SpellcheckAttributeState.

Made fastAttributeLookupAllowed private. Removed mediaVolumeDidChange,
privateBrowsingStateDidChange, captionPreferencesChanged, and spellcheckAttributeState.

  • dom/FullscreenManager.cpp: Removed unneeded includes.

(WebCore::FullscreenManager::willEnterFullscreen): Use is<HTMLMediaElement> instead of
calling isMediaElement directly.

  • dom/NameNodeList.cpp:

(WebCore::NameNodeList::~NameNodeList): Updated for "atomic" -> "atom".

  • dom/Node.cpp:

(WebCore::NodeListsNodeData::invalidateCaches): Ditto.
(WebCore::NodeListsNodeData::invalidateCachesForAttribute): Ditto.

  • dom/NodeRareData.h: Removed unneeded includes. Updated for "atomic" -> "atom".

Made a few coding style tweaks.

  • dom/TreeScope.cpp:

(WebCore::TreeScope::getElementById const): Updated for "atomic" -> "atom".

  • html/HTMLMediaElement.cpp:

(WebCore::documentToElementSetMap): Deleted.
(WebCore::addElementToDocumentMap): Deleted.
(WebCore::removeElementFromDocumentMap): Deleted.
(WebCore::HTMLMediaElement::registerWithDocument): Added call to registerMediaElement,
removed eight now-obsolete registrations.
(WebCore::HTMLMediaElement::unregisterWithDocument): Ditto.
(WebCore::HTMLMediaElement::mediaVolumeDidChange): Added an #if !PLATFORM(IOS_FAMILY)
to preserve the current behavior, since this was not registered for PLATFORM(IOS_FAMILY)
before. This should be revisited because it's not clear this platform difference is needed.
(WebCore::HTMLMediaElement::privateBrowsingStateDidChange): Ditto.
(WebCore::HTMLMediaElement::setMediaGroup): Change to use Document::forEachMediaElement
so we don't need to keep our own global set of media elements for each document. Required
a little bit of code structure change. Added a FIXME because the decision about which
media element is selected depends on hash table order as it always has; seems inappropriate.
(WebCore::HTMLMediaElement::setMediaControlsDependOnPageScaleFactor): Removed the code
to register/unregister.
(WebCore::HTMLMediaElement::pageScaleFactorChanged): Only do the work if it's needed;
this replicates the old behavior which was accomplished by registering/unregistering.

  • html/HTMLMediaElement.h: Removed the overrides for various virtual member functions.

Instead these are now public functions. Also removed ApplicationStateChangeListener.

  • html/LabelableElement.cpp:

(WebCore::LabelableElement::labels): Updated for "atomic" -> "atom".

  • html/LabelsNodeList.cpp:

(WebCore::LabelsNodeList::~LabelsNodeList): Ditto.

  • html/RadioNodeList.cpp:

(WebCore::RadioNodeList::~RadioNodeList): Ditto.

  • html/parser/HTMLDocumentParser.cpp:

(WebCore::HTMLDocumentParser::constructTreeFromHTMLToken): Ditto.

  • loader/appcache/ApplicationCacheStorage.cpp:

(WebCore::parseHeader): Ditto.

  • page/ApplicationStateChangeListener.h: Removed.
  • page/Page.cpp:

(WebCore::Page::renderTreeSize const): Use forEachDocument.
(WebCore::Page::setNeedsRecalcStyleInAllFrames): Ditto.
(WebCore::Page::unmarkAllTextMatches): Ditto.
(WebCore::Page::editableElementsInRect const): Ditto.
(WebCore::Page::setMediaVolume): Tweaked range check so it will reject
NaN values. Use forEachMediaElement to call mediaVolumeDidChange,
eliminating the need for Document::mediaVolumeDidChange.
(WebCore::Page::setPageScaleFactor): Refactored to eliminate large blocks
of repeated code. Use forEachMediaElement to call pageScaleFactorChanged,
eliminating the need for Document::pageScaleFactorChangedAndStable.
(WebCore::Page::setUserInterfaceLayoutDirection): Use forEachMediaElement
to call userInterfaceLayoutDirectionChanged, eliminating the need for
Document::userInterfaceLayoutDirectionChanged.
(WebCore::Page::updateMediaElementRateChangeRestrictions): Use
forEachMediaElement to call updateRateChangeRestrictionas. The old code
would call this on all media elements in the current web process, which
means the functions would be called many times for the same media element.
(WebCore::Page::updateRendering): Use forEachDocument consistently for
all the document iteration. Before it was used for half the function and not
used for the other half; no obvious reason for the differece.
(WebCore::Page::suspendScriptedAnimations): Use forEachDocument.
(WebCore::Page::resumeScriptedAnimations): Ditto.
(WebCore::updateScriptedAnimationsThrottlingReason): Ditto.
(WebCore::Page::userStyleSheetLocationChanged): Ditto.
(WebCore::Page::invalidateStylesForAllLinks): Ditto.
(WebCore::Page::invalidateStylesForLink): Ditto.
(WebCore::Page::invalidateInjectedStyleSheetCacheInAllFrames): Ditto.
(WebCore::Page::setTimerThrottlingState): Ditto.
(WebCore::Page::dnsPrefetchingStateChanged): Ditto.
(WebCore::Page::storageBlockingStateChanged): Ditto.
(WebCore::Page::updateIsPlayingMedia): Ditto.
(WebCore::Page::setMuted): Ditto.
(WebCore::Page::stopMediaCapture): Ditto.
(WebCore::Page::stopAllMediaPlayback): Ditto.
(WebCore::Page::suspendAllMediaPlayback): Ditto.
(WebCore::Page::resumeAllMediaPlayback): Ditto.
(WebCore::Page::suspendAllMediaBuffering): Ditto.
(WebCore::Page::resumeAllMediaBuffering): Ditto.
(WebCore::setSVGAnimationsState): Deleted.
(WebCore::Page::setIsVisibleInternal): Use forEachDocument to call
suspend/resumeDeviceMotionAndOrientationUpdates, obviating the need for
Page::suspend/resumeDeviceMotionAndOrientationUpdates. Use
forEachDocument to call pause/unpauseAnimations, obviating the need for
WebCore::setSVGAnimationsState. Use forEachDocument to call
visibilityStateChanged, removing the need to write out a loop that
gathers the documents into a vector.
(WebCore::Page::suspendDeviceMotionAndOrientationUpdates): Deleted.
(WebCore::Page::resumeDeviceMotionAndOrientationUpdates): Deleted.
(WebCore::Page::captionPreferencesChanged): Use forEachDocument.
(WebCore::Page::setSessionID): Ditto.
(WebCore::Page::setPlaybackTarget): Ditto.
(WebCore::Page::playbackTargetAvailabilityDidChange): Ditto.
(WebCore::Page::setShouldPlayToPlaybackTarget): Ditto.
(WebCore::Page::playbackTargetPickerWasDismissed): Ditto.
(WebCore::Page::setAllowsMediaDocumentInlinePlayback): Use
forEachMediaElement to call allowsMediaDocumentInlinePlaybackChanged,
obviating the need for Document::allowsMediaDocumentInlinePlaybackChanged.
(WebCore::Page::setUnobscuredSafeAreaInsets): Use forEachDocument.
(WebCore::Page::setUseSystemAppearance): Ditto.
(WebCore::Page::setFullscreenInsets): Ditto.
(WebCore::Page::setFullscreenAutoHideDuration): Ditto.
(WebCore::Page::setFullscreenControlsHidden): Ditto.
(WebCore::Page::forEachDocument): Merged the collectDocuments function
in since it's only used here.
(WebCore::Page::collectDocuments): Deleted.
(WebCore::Page::forEachMediaElement): Added.
(WebCore::Page::applicationWillResignActive): Use forEachMediaElement,
eliminating the need for forEachApplicationStateChangeListener.
(WebCore::Page::applicationDidBecomeActive): Ditto.
(WebCore::Page::recomputeTextAutoSizingInAllFrames): Use forEachDocument.

  • page/Page.h: Removed unneeded forward declarations. Removed unused

FindDirection enum. Tweaked formatting. Use bool instead of uint8_t as
underlying type for enum class with only two values. Updated for changes above.

  • platform/text/TextEncoding.cpp:

(WebCore::TextEncoding::TextEncoding): Updated for "atomic" -> "atom".
(WebCore::TextEncoding::domName const): Ditto.
(WebCore::TextEncoding::usesVisualOrdering const): Ditto.

  • platform/text/TextEncodingRegistry.cpp:

(WebCore::addToTextEncodingNameMap): Ditto.
(WebCore::addToTextCodecMap): Ditto.
(WebCore::pruneBlacklistedCodecs): Ditto.
(WebCore::addEncodingName): Ditto.
(WebCore::atomCanonicalTextEncodingName): Ditto.

  • platform/text/TextEncodingRegistry.h: Ditto.
  • xml/XPathFunctions.cpp:

(WebCore::XPath::atomicSubstring): Deleted.
(WebCore::XPath::toStringView): Added. Later could make a StringBuilder member
function instead.
(WebCore::XPath::FunId::evaluate const): Use toStringView and StringView::substring
instead of "atomicSubstring", since getElementById can be called on a StringView
and there's no need to allocate/deallocate an AtomString just to check if it exists.

Source/WebKit:

  • WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:

(WebKit::InjectedBundleHitTestResult::mediaType const): Use is<HTMLMediaElement>.

Source/WebKitLegacy/win:

  • AccessibleBase.cpp:

(AccessibleBase::get_attribute): Updated for "atomic" -> "atom".

8:09 AM Changeset in webkit [253922] by commit-queue@webkit.org
  • 5 edits
    11 moves
    6 adds
    5 deletes in trunk/LayoutTests

LayoutTests/imported/w3c:
[css-grid] Move some alignment tests to the WPT folder and add width-keyword-classes.css
https://bugs.webkit.org/show_bug.cgi?id=204407

Patch by Rossana Monteriso <rmonteriso@igalia.com> on 2019-12-27
Reviewed by Javier Fernandez.

Add some css alignment tests from WebKit, checked and adapted to WPT, in the corresponding css-grid/alignment folder.
Add width-keyword-classes.css support file to css/support, to make it easily available to all css tests.

  • resources/import-expectations.json:
  • web-platform-tests/css/css-grid/alignment/grid-align-content.html:
  • web-platform-tests/css/css-grid/alignment/grid-align-content-expected.txt:
  • web-platform-tests/css/css-grid/alignment/grid-align-justify-margin-border-padding-vertical-lr.html:
  • web-platform-tests/css/css-grid/alignment/grid-align-justify-margin-border-padding-vertical-lr-expected.txt:
  • web-platform-tests/css/css-grid/alignment/grid-align-justify-margin-border-padding-vertical-rl.html:
  • web-platform-tests/css/css-grid/alignment/grid-align-justify-margin-border-padding-vertical-rl-expected.txt:
  • web-platform-tests/css/css-grid/alignment/grid-align-justify-margin-border-padding.html:
  • web-platform-tests/css/css-grid/alignment/grid-align-justify-margin-border-padding-expected.txt:
  • web-platform-tests/css/css-grid/alignment/grid-align-justify-overflow.html:
  • web-platform-tests/css/css-grid/alignment/grid-align-justify-overflow-expected.txt:
  • web-platform-tests/css/css-grid/alignment/grid-align-justify-stretch-with-orthogonal-flows.html:
  • web-platform-tests/css/css-grid/alignment/grid-align-justify-stretch-with-orthogonal-flows-expected.txt:
  • web-platform-tests/css/css-grid/alignment/grid-align-justify-stretch.html:
  • web-platform-tests/css/css-grid/alignment/grid-align-justify-stretch-expected.txt:
  • web-platform-tests/css/css-grid/alignment/grid-align.html:
  • web-platform-tests/css/css-grid/alignment/grid-align-expected.txt:
  • web-platform-tests/css/css-grid/alignment/w3c-import.log:
  • web-platform-tests/css/support/width-keyword-classes.css:

LayoutTests:
[css-grid] Move some alignment tests to the WPT folder
https://bugs.webkit.org/show_bug.cgi?id=204407

Patch by Rossana Monteriso <rmonteriso@igalia.com> on 2019-12-27
Reviewed by Javier Fernandez.

Remove some tests from fast/css-grid/alignment, that are being replaced by adapted tests in the corresponding WPT test folder.

  • fast/css-grid-layout/grid-align-content-expected.txt: Removed.
  • fast/css-grid-layout/grid-align-expected.txt: Removed.
  • fast/css-grid-layout/grid-align-justify-margin-border-padding-expected.txt: Removed.
  • fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-lr-expected.txt: Removed.
  • fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-rl-expected.txt: Removed.
  • fast/css-grid-layout/grid-align-justify-overflow-expected.txt: Removed.
  • fast/css-grid-layout/grid-align-justify-stretch-expected.txt: Removed.
  • fast/css-grid-layout/grid-align-justify-stretch-with-orthogonal-flows-expected.txt: Removed.
  • fast/css-grid-layout/grid-align-justify-stretch-with-orthogonal-flows.html: Removed.
  • fast/css-grid-layout/grid-align-content.html: Removed.
  • fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-lr.html: Removed.
  • fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-rl.html: Removed.
  • fast/css-grid-layout/grid-align-justify-margin-border-padding.html: Removed.
  • fast/css-grid-layout/grid-align-justify-overflow.html: Removed.
  • fast/css-grid-layout/grid-align-justify-stretch-with-orthogonal-flows.html: Removed.
  • fast/css-grid-layout/grid-align-justify-stretch.html: Removed.
  • fast/css-grid-layout/grid-align.html: Removed.
  • resources/import-expectations.json:
  • web-platform-tests/css/css-grid/alignment/w3c-import.log:
7:22 AM Changeset in webkit [253921] by Antti Koivisto
  • 4 edits in trunk/Source/WebCore

[LFC][Integration] Ensure layout boxes have expected display types
https://bugs.webkit.org/show_bug.cgi?id=205606

Reviewed by Zalan Bujtas.

In some cases render tree may have display property values that don't match the renderer type. This is fine since the behavior is driven by the renderer.

LFC layout is driven by display property so the effective value needs to make sense. This patch fixes assertions seen in

fast/css/fieldset-display-row.html
fast/css-grid-layout/grid-strict-ordering-crash-2.html
imported/w3c/web-platform-tests/css/css-display/display-flow-root-001.html
imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-display.html
tables/mozilla/bugs/bug275625.html

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::LineLayout):

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::TreeBuilder::buildLayoutTreeForIntegration):

Always set display to 'block' for the root RenderBlockFlow.
Renamed for clarity.

(WebCore::Layout::TreeBuilder::createLayoutBox):

Always set <br> display to inline.

(WebCore::Layout::TreeBuilder::buildTableStructure):
(WebCore::Layout::TreeBuilder::buildSubTree):

Pass the parent container instead of parent renderer so we can read effective style.

  • layout/layouttree/LayoutTreeBuilder.h:
6:13 AM Changeset in webkit [253920] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Fix LayoutTests/fast/backgrounds/size/backgroundSize15.html
https://bugs.webkit.org/show_bug.cgi?id=205602
<rdar://problem/58212499>

Reviewed by Antti Koivisto.

softWrapOpportunityIndex could point after the last inline item in the list (when there's no more wrap opportunity)
e.g text<br> : the softWrapOpportunityIndex is 2.

  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::LineLayoutContext::nextContentForLine):

2:50 AM Changeset in webkit [253919] by commit-queue@webkit.org
  • 8 edits
    3 deletes in trunk

ANGLE: Fix WebGL conformance tests for EXT_texture_filter_anisotropic
https://bugs.webkit.org/show_bug.cgi?id=205520

Fixes get-extension.html and ext-texture-filter-anisotropic.html.

Patch by James Darpinian <James Darpinian> on 2019-12-27
Reviewed by Dean Jackson.

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::getExtension):
(WebCore::WebGL2RenderingContext::getSupportedExtensions):
(WebCore::WebGL2RenderingContext::getParameter):

  • html/canvas/WebGLRenderingContext.cpp:

(WebCore::WebGLRenderingContext::getExtension):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::getTexParameter):

12:49 AM Changeset in webkit [253918] by commit-queue@webkit.org
  • 6 edits
    4 deletes in trunk

ANGLE: Fix WebGL conformance test framebuffer-object-attachment.html
https://bugs.webkit.org/show_bug.cgi?id=205514

Rely on ANGLE to implement DEPTH_STENCIL_ATTACHMENT instead of emulating it.

Patch by James Darpinian <James Darpinian> on 2019-12-27
Reviewed by Dean Jackson.

  • html/canvas/WebGLFramebuffer.cpp:

(WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::setupFlags):
(WebCore::WebGLRenderingContextBase::framebufferRenderbuffer):
(WebCore::WebGLRenderingContextBase::readPixels):

Dec 26, 2019:

12:38 PM Changeset in webkit [253917] by Antti Koivisto
  • 9 edits
    2 adds in trunk

Remove display:compact
https://bugs.webkit.org/show_bug.cgi?id=205597

Reviewed by Anders Carlsson.

Source/WebCore:

It is rendered as 'block' but the value is still parsed. Remove it completely, matching other engines.

Test: fast/css/display-compact-ignored.html

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):

  • css/CSSValueKeywords.in:
  • rendering/RenderElement.cpp:

(WebCore::RenderElement::createFor):

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::adjustStyle):

  • rendering/style/RenderStyleConstants.cpp:

(WebCore::operator<<):

  • rendering/style/RenderStyleConstants.h:
  • style/StyleAdjuster.cpp:

(WebCore::Style::equivalentBlockDisplay):

LayoutTests:

  • fast/css/display-compact-ignored-expected.txt: Added.
  • fast/css/display-compact-ignored.html: Added.
11:01 AM Changeset in webkit [253916] by Wenson Hsieh
  • 21 edits in trunk/Source/WebCore

Minor code cleanup around WebCore::Path
https://bugs.webkit.org/show_bug.cgi?id=205574

Reviewed by Anders Carlsson.

Carry out some minor refactoring in WebCore::Path:

  • Change PathElementType into an 8-bit-wide enum class, and move it under PathElement's namespace as simply Type.
  • Change PathElement's FloatPoint* that points to an array of 3 FloatPoints into a FloatPoint[3].
  • Change Path::strokeContains() to take a StrokeStyleApplier& instead of a StrokeStyleApplier*, since it assumes that the given StrokeStyleApplier is nonnull anyways.
  • Change Path::RoundedRectStrategy into an 8-bit enum class.
  • Other miscellaneous style fixes.

No change in behavior.

  • accessibility/mac/WebAccessibilityObjectWrapperBase.mm:

(convertPathToScreenSpaceFunction):

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::isPointInStrokeInternal):

  • inspector/InspectorOverlay.cpp:

(WebCore::drawShapeHighlight):

  • platform/graphics/FontCascade.cpp:

(WebCore::findPathIntersections):

  • platform/graphics/Path.cpp:

(WebCore::Path::addRoundedRect):
(WebCore::operator<<):

  • platform/graphics/Path.h:

(WebCore::Path::encode const):
(WebCore::Path::decode):

  • platform/graphics/PathTraversalState.cpp:

(WebCore::PathTraversalState::appendPathElement):
(WebCore::PathTraversalState::processPathElement):

  • platform/graphics/PathTraversalState.h:
  • platform/graphics/cairo/PathCairo.cpp:

(WebCore::Path::strokeContains const):
(WebCore::Path::apply const):

  • platform/graphics/cg/PathCG.cpp:

(WebCore::Path::strokeContains const):
(WebCore::CGPathApplierToPathApplier):

  • platform/graphics/win/PathDirect2D.cpp:

(WebCore::Path::strokeContains const):

  • rendering/shapes/BoxShape.cpp:

(WebCore::BoxShape::buildDisplayPaths const):

  • rendering/shapes/RectangleShape.cpp:

(WebCore::RectangleShape::buildDisplayPaths const):

  • rendering/svg/RenderSVGShape.cpp:

(WebCore::RenderSVGShape::shapeDependentStrokeContains):

  • rendering/svg/SVGMarkerData.h:

(WebCore::SVGMarkerData::updateMarkerDataForPathElement):

  • rendering/svg/SVGPathData.cpp:

(WebCore::pathFromRectElement):

  • rendering/svg/SVGSubpathData.h:

(WebCore::SVGSubpathData::updateFromPathElement):

  • svg/SVGPathTraversalStateBuilder.cpp:

(WebCore::SVGPathTraversalStateBuilder::moveTo):
(WebCore::SVGPathTraversalStateBuilder::lineTo):
(WebCore::SVGPathTraversalStateBuilder::curveToCubic):
(WebCore::SVGPathTraversalStateBuilder::closePath):

  • svg/SVGPathUtilities.cpp:

(WebCore::buildStringFromPath):

  • testing/Internals.cpp:

(WebCore::Internals::pathStringWithShrinkWrappedRects):

8:01 AM Changeset in webkit [253915] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] When align the inline content we need to align the line as well
https://bugs.webkit.org/show_bug.cgi?id=205596
<rdar://problem/58197300>

Reviewed by Antti Koivisto.

Horizontal alignment means that we not only adjust the runs but also make sure the line box is aligned as well.

<div style="text-align: center; width: 100px;">centered text</div>
The line box will also be centered as opposed to start at 0px all the way to [centered text] run's right edge.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::close):
(WebCore::Layout::LineBuilder::alignHorizontally):
(WebCore::Layout::LineBuilder::alignContentHorizontally const): Deleted.

  • layout/inlineformatting/InlineLineBuilder.h:
2:12 AM Changeset in webkit [253914] by Carlos Garcia Campos
  • 8 edits
    2 adds in trunk/Source/WebKit

[GTK][WPE] Remove duplicated code
https://bugs.webkit.org/show_bug.cgi?id=205560

Reviewed by Sergio Villar Senin.

Remove duplicated code related to IME between GTK and WPE that can be shared.

  • SourcesGTK.txt:
  • SourcesWPE.txt:
  • WebProcess/WebCoreSupport/glib/WebEditorClientGLib.cpp: Added.

(WebKit::WebEditorClient::handleInputMethodKeydown):
(WebKit::WebEditorClient::didDispatchInputMethodKeydown):

  • WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
  • WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp:
  • WebProcess/WebPage/glib/WebPageGLib.cpp:

(WebKit::WebPage::setInputMethodState):

  • WebProcess/WebPage/gtk/WebPageGtk.cpp:
  • WebProcess/WebPage/wpe/WebPageWPE.cpp:
2:11 AM Changeset in webkit [253913] by youenn@apple.com
  • 3 edits in trunk/LayoutTests

REGRESSION: [ Mojave+ Debug ] fast/mediastream/captureStream/canvas2d-heavy-drawing.html is a flakey failure
https://bugs.webkit.org/show_bug.cgi?id=205365
<rdar://problem/58026430>

Reviewed by Eric Carlson.

  • fast/mediastream/captureStream/canvas2d-heavy-drawing.html:

Unflake test by comparing the number of frames with the number of printLine calls.
They should never diverge too much one from the other.

  • platform/mac-wk2/TestExpectations:
1:18 AM WebKitW3CTesting edited by Pablo Saavedra
(diff)

Dec 25, 2019:

6:06 PM Changeset in webkit [253912] by Alan Bujtas
  • 5 edits
    2 adds in trunk

Run with offset from the content box's logical left paint its tab stop at wrong position.
https://bugs.webkit.org/show_bug.cgi?id=205595
<rdar://problem/58194698>

Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/text/tab-stops-with-offset-from-parent.html

Use the run's left offset from the line as the xPos for the TextRun. Most cases the line has only one run
with 0 offset. This patch fixes the case when the additional runs (with offset != 0) paint their tab positions at the wrong place.

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::paint):

  • rendering/SimpleLineLayoutFunctions.cpp:

(WebCore::SimpleLineLayout::paintFlow):

LayoutTests:

  • fast/text/tab-stops-with-offset-from-parent-expected.html: Added.
  • fast/text/tab-stops-with-offset-from-parent.html: Added.
10:26 AM Changeset in webkit [253911] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][Painting] Fix LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/tab-stop-threshold-001.html
https://bugs.webkit.org/show_bug.cgi?id=205594
<rdar://problem/58194138>

Reviewed by Antti Koivisto.

Construct the TextRun with relative coordinates to get tab stops right.

  • layout/displaytree/DisplayPainter.cpp:

(WebCore::Display::paintInlineContent):

9:50 AM Changeset in webkit [253910] by dino@apple.com
  • 7 edits in trunk/Tools

WKTR/DRT always trigger the Discrete GPU on dual GPU systems
https://bugs.webkit.org/show_bug.cgi?id=205546
<rdar://problem/58139610>

Reviewed by Alexey Proskuryakov.

Add an option "--prefer-integrated-gpu" to run-webkit-test
that causes the LayoutTestHelper to NOT lock the
machine to a discrete GPU on a dual-GPU system.
The default is false.

  • DumpRenderTree/mac/LayoutTestHelper.m:

(main):

  • Scripts/webkitpy/layout_tests/controllers/manager.py:

(Manager._set_up_run):

  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:

(parse_args):

  • Scripts/webkitpy/port/base.py:

(Port.start_helper):

  • Scripts/webkitpy/port/mac.py:

(MacPort.start_helper):

  • Scripts/webkitpy/port/mock_drt.py:

(MockDRTPort.start_helper):

7:52 AM Changeset in webkit [253909] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] Forward scan for soft wrap opportunities
https://bugs.webkit.org/show_bug.cgi?id=205584
<rdar://problem/58188386>

Reviewed by Antti Koivisto.

This patch implements forward scanning to find wrap opportunities in inline content.
e.g <span></span>example<span><span></span> content</span>
When we reach "ex-" content, in order to figure out if it is at a wrap opportunity, we scan the content
forward until after we reach another inline content, in this case " " right before the "content" and
check if we can break the content between these 2 inline items.

isAtSoftWrapOpportunity: takes 2 (adjacent by skipping non-content inline items) and return true if there's
a soft wrap opportunity in between them.
LineBreaker::nextWrapOpportunity: returns the next wrap opportunity (either a soft wrap opportunity or a line break or the end of the content)

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::endsWithSoftWrapOpportunity):
(WebCore::Layout::isAtSoftWrapOpportunity):
(WebCore::Layout::LineBreaker::nextWrapOpportunity):
(WebCore::Layout::LineBreaker::ContinousContent::ContinousContent):
(WebCore::Layout::LineBreaker::lastSoftWrapOpportunity): Deleted.

  • layout/inlineformatting/InlineLineBreaker.h:
  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::LineCandidateContent::isLineBreak const):
(WebCore::Layout::LineCandidateContent::append):
(WebCore::Layout::LineCandidateContent::setIsLineBreak):
(WebCore::Layout::LineLayoutContext::layoutLine):
(WebCore::Layout::LineLayoutContext::nextContentForLine):
(WebCore::Layout::ContinousContent::hasIntrusiveFloats const): Deleted.
(WebCore::Layout::ContinousContent::runs const): Deleted.
(WebCore::Layout::ContinousContent::floats const): Deleted.
(WebCore::Layout::ContinousContent::endsWithLineBreak const): Deleted.
(WebCore::Layout::ContinousContent::setEndsWithLineBreak): Deleted.
(WebCore::Layout::ContinousContent::append): Deleted.
(WebCore::Layout::LineLayoutContext::nextContinousContentForLine): Deleted.

  • layout/inlineformatting/LineLayoutContext.h:
5:09 AM Changeset in webkit [253908] by Wenson Hsieh
  • 2 edits in trunk/Tools

REGRESSION (r253282): Tests that use applyAutocorrection assert in UIScriptContext::requestUIScriptCompletion
https://bugs.webkit.org/show_bug.cgi?id=205588
<rdar://problem/58109942>

Reviewed by Tim Horton.

The change made in r253282 intended to defer completing the async task prepared in
UIScriptController::applyAutocorrection until after the current runloop; however, it ended up keeping the
synchronous call to asyncTaskComplete. Fix this by removing this code, so that we instead wait for the
dispatch_async block to invoke asyncTaskComplete.

  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptControllerIOS::applyAutocorrection):

4:38 AM Changeset in webkit [253907] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] LineBreaker should tell whether the line should receive no more content
https://bugs.webkit.org/show_bug.cgi?id=205587
<rdar://problem/58188635>

Reviewed by Antti Koivisto.

LineBreaker returns IsEndOfLine::No when the current line should still be able to receive additional content.
This way we can start closing the line sooner (as opposed to start probing the subsequent content).
(Note that just because the current content overflows the line, it does not necessarily mean that the subsequent content
wraps to the next line.)

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::LineBreaker::breakingContextForInlineContent):
(WebCore::Layout::LineBreaker::ContinousContent::lastContentRunIndex const):

  • layout/inlineformatting/InlineLineBreaker.h:
  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::LineLayoutContext::layoutLine):
(WebCore::Layout::LineLayoutContext::addFloatItems):
(WebCore::Layout::LineLayoutContext::placeInlineContentOnCurrentLine):

  • layout/inlineformatting/LineLayoutContext.h:
4:22 AM Changeset in webkit [253906] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] Add support for zero-width-space character (U+200B)
https://bugs.webkit.org/show_bug.cgi?id=205586
<rdar://problem/58188505>

Reviewed by Antti Koivisto.

If a line has only U+200B characters, it is still considered empty from line breaking point of view.
(Note that U+200B is not considered a whitespace character so a run with U+200B does not collapse.)

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::appendTextContent): empty runs don't collapse.
(WebCore::Layout::LineBuilder::isVisuallyNonEmpty const):
(WebCore::Layout::LineBuilder::InlineItemRun::hasEmptyTextContent const):

  • layout/inlineformatting/InlineLineBuilder.h:
  • layout/inlineformatting/InlineTextItem.cpp:

(WebCore::Layout::InlineTextItem::isEmptyContent const):

  • layout/inlineformatting/InlineTextItem.h:
4:07 AM Changeset in webkit [253905] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Fix LayoutTests/imported/w3c/web-platform-tests/css/css-text/letter-spacing/letter-spacing-control-chars-001.html
https://bugs.webkit.org/show_bug.cgi?id=205585
<rdar://problem/58188420>

Reviewed by Antti Koivisto.

TextUtil::fixedPitchWidth works on simple content only (letter-spacing forces slow font measuring path).

  • layout/inlineformatting/text/TextUtil.cpp:

(WebCore::Layout::TextUtil::width):

1:07 AM Changeset in webkit [253904] by ysuzuki@apple.com
  • 9 edits in trunk/Source/JavaScriptCore

[JSC] Compact Bytecodes more by emitting 1-byte Opcode
https://bugs.webkit.org/show_bug.cgi?id=205553

Reviewed by Keith Miller.

When emitting 16bit / 32bit bytecodes, we also emit 16bit / 32bit Opcode.
So the layout is the following.

8bit 16bit 16bit 16bit

  • [op_wide16][ Opcode ][ Operand0 ][ Operand1 ]

But this is unnecessary since Opcode must fit in 8bit. We should emit Opcode in 8bit in all cases.

8bit 8bit 16bit 16bit

  • [op_wide16][Opcode][ Operand0 ][ Operand1 ]
  • bytecode/Instruction.h:

(JSC::BaseInstruction::size const):

  • bytecompiler/BytecodeGeneratorBaseInlines.h:

(JSC::BytecodeGeneratorBase<Traits>::alignWideOpcode16):
(JSC::BytecodeGeneratorBase<Traits>::alignWideOpcode32):

  • generator/Argument.rb:
  • generator/Opcode.rb:
  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • llint/WebAssembly.asm:

Dec 24, 2019:

12:05 PM Changeset in webkit [253903] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix ARM64E by adding missing pointer tag.

  • llint/LowLevelInterpreter.asm:
10:52 AM Changeset in webkit [253902] by ap@apple.com
  • 1 edit
    1 delete in trunk/LayoutTests

REGRESSION: [ Catalina wk1 ] imported/w3c/web-platform-tests/fetch/content-type/script.window.html is failing
https://bugs.webkit.org/show_bug.cgi?id=205313

Remove a no longer necessary and incorrect expectation.

  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/content-type/script.window-expected.txt: Removed.
10:35 AM Changeset in webkit [253901] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

[Web Animations] REGRESSION: Changing the animation-duration of a CSS Animation may not resume it
https://bugs.webkit.org/show_bug.cgi?id=205580
<rdar://problem/58127956>

Patch by Antoine Quint <Antoine Quint> on 2019-12-24
Reviewed by Dean Jackson.

Source/WebCore:

Test: webanimations/css-animation-dynamic-duration-change.html

Setting the animation-duration of an animation will transition the animation back into its idle state
and the "update animations and send events" procedure would remove that animation from the timeline.
It would also remove it from the map that would associate an animation with a given CSS Animation name
so that we would know whether an animation exists for a given animation name when one of the animation's
properties changed. Since that animation was (mistakenly) removed, we would fail to update its timing
and it would never be resumed. We now only update the CSS Animation name to animation map when styles
change.

  • animation/AnimationTimeline.cpp:

(WebCore::AnimationTimeline::animationWasRemovedFromElement):

LayoutTests:

Add a new test that, by virtue of changing the animation-duration, transitions a CSS Animation from
idle, to running, back to idle and back to running. Prior to this change, the test would not perform
the final play state transition and the it would time out.

  • webanimations/css-animation-dynamic-duration-change-expected.txt: Added.
  • webanimations/css-animation-dynamic-duration-change.html: Added.
10:10 AM Changeset in webkit [253900] by eric.carlson@apple.com
  • 12 edits in trunk/Source

[Media in GPU process] Enable media player proxy logging
https://bugs.webkit.org/show_bug.cgi?id=205557
<rdar://problem/58160932>

Reviewed by Youenn Fablet.

Source/WebKit:

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::create):
(WebKit::GPUConnectionToWebProcess::GPUConnectionToWebProcess):
(WebKit::GPUConnectionToWebProcess::logger):

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/GPUProcess.cpp:

(WebKit::GPUProcess::createGPUConnectionToWebProcess):

  • GPUProcess/GPUProcess.h:
  • GPUProcess/GPUProcess.messages.in:
  • GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp:

(WebKit::RemoteMediaPlayerManagerProxy::logger const):
(WebKit::nullLogger): Deleted.

  • Platform/Logging.h:
  • UIProcess/GPU/GPUProcessProxy.cpp:

(WebKit::GPUProcessProxy::openGPUProcessConnection):

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::logChannel const):

Source/WTF:

  • wtf/Logger.h:

(WTF::Logger::willLog const): Minor optimization: don't check m_enabled unnecessarily.

6:41 AM Changeset in webkit [253899] by youenn@apple.com
  • 5 edits
    2 adds in trunk

Deny Notification API access for non secure contexts
https://bugs.webkit.org/show_bug.cgi?id=205496
<rdar://problem/58074660>

Reviewed by Chris Dumez.

Source/WebCore:

If document is not SecureContext, deny permission automatically.
This behavior is matching a planned update to the spec, as discussed in
https://github.com/whatwg/notifications/issues/93.
Chrome landed this restriction in M62. Mozilla is also on board with this restriction.

Test: http/tests/notifications/notification-in-non-secure-context.html

  • Modules/notifications/Notification.cpp:

(WebCore::Notification::requestPermission):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:

(TEST):

LayoutTests:

  • http/tests/notifications/notification-in-non-secure-context-expected.txt: Added.
  • http/tests/notifications/notification-in-non-secure-context.html: Added.
6:19 AM Changeset in webkit [253898] by youenn@apple.com
  • 32 edits
    9 adds in trunk

Service Worker doesn't terminate after a period of time when thread blocking
https://bugs.webkit.org/show_bug.cgi?id=202992
<rdar://problem/56298596>

Reviewed by Chris Dumez.

Source/WebCore:

Whenever running a service worker task, running script or posting events (install, activate, message and fetch),
start a timer to check that the service worker is not spinning.
This is done by posting a task to service worker thread and hopping back to the main thread.
If this post/hop is done before the heartbeat timer is fired, the service worker is considered live.
Otherwise, the check is failed and the task is considered as failing.
The service worker will be terminated.
Timeout is 60 seconds by default and 1 second for test purposes.

Add settings to have short heartbeat timeout for testing purposes.
Add internals API to check whether a service worker is running.

Tests: http/wpt/service-workers/service-worker-spinning-activate.https.html

http/wpt/service-workers/service-worker-spinning-fetch.https.html
http/wpt/service-workers/service-worker-spinning-install.https.html
http/wpt/service-workers/service-worker-spinning-message.https.html

  • page/Settings.yaml:
  • testing/Internals.cpp:

(WebCore::Internals::isServiceWorkerRunning):

  • testing/Internals.h:
  • testing/Internals.idl:
  • workers/service/SWClientConnection.h:

(WebCore::SWClientConnection::isServiceWorkerRunning):

  • workers/service/context/SWContextManager.h:

(WebCore::SWContextManager::Connection::isTestMode const):
(WebCore::SWContextManager::Connection::setIsTestMode):

  • workers/service/context/ServiceWorkerThread.cpp:

(WebCore::ServiceWorkerThread::ServiceWorkerThread):
(WebCore::ServiceWorkerThread::postFetchTask):
(WebCore::ServiceWorkerThread::postMessageToServiceWorker):
(WebCore::ServiceWorkerThread::fireInstallEvent):
(WebCore::ServiceWorkerThread::finishedFiringInstallEvent):
(WebCore::ServiceWorkerThread::fireActivateEvent):
(WebCore::ServiceWorkerThread::finishedFiringActivateEvent):
(WebCore::ServiceWorkerThread::finishedEvaluatingScript):
(WebCore::ServiceWorkerThread::start):
(WebCore::ServiceWorkerThread::finishedStarting):
(WebCore::ServiceWorkerThread::startFetchEventMonitoring):
(WebCore::ServiceWorkerThread::startHeartBeatTimer):
(WebCore::ServiceWorkerThread::heartBeatTimerFired):

  • workers/service/context/ServiceWorkerThread.h:

(WebCore::ServiceWorkerThread::stopFetchEventMonitoring):

  • workers/service/context/ServiceWorkerThreadProxy.cpp:

(WebCore::ServiceWorkerThreadProxy::startFetch):
(WebCore::ServiceWorkerThreadProxy::cancelFetch):
(WebCore::ServiceWorkerThreadProxy::removeFetch):

  • workers/service/server/SWServerToContextConnection.cpp:

(WebCore::SWServerToContextConnection::didFailHeartBeatCheck):

  • workers/service/server/SWServerToContextConnection.h:
  • workers/service/server/SWServerWorker.cpp:

(WebCore::SWServerWorker::didFailHeartBeatCheck):

  • workers/service/server/SWServerWorker.h:

Source/WebKit:

Add a preference to enable/disable service worker short timeouts.
Add IPC handling for passing service worker heart beat failures and to get from WebProcess
whether a given service worker is running or not.

  • NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:

(WebKit::WebSWServerConnection::contextConnectionCreated):
(WebKit::WebSWServerConnection::syncTerminateWorkerFromClient):
(WebKit::WebSWServerConnection::isServiceWorkerRunning):

  • NetworkProcess/ServiceWorker/WebSWServerConnection.h:
  • NetworkProcess/ServiceWorker/WebSWServerConnection.messages.in:
  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.messages.in:
  • Shared/WebPreferences.yaml:
  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesGetServiceWorkerTestMode):
(WKPreferencesSetServiceWorkerTestMode):

  • UIProcess/API/C/WKPreferencesRef.h:
  • WebProcess/Storage/WebSWClientConnection.cpp:

(WebKit::WebSWClientConnection::isServiceWorkerRunning):

  • WebProcess/Storage/WebSWClientConnection.h:
  • WebProcess/Storage/WebSWContextManagerConnection.cpp:

(WebKit::WebSWContextManagerConnection::updatePreferencesStore):
(WebKit::WebSWContextManagerConnection::didFailHeartBeatCheck):

  • WebProcess/Storage/WebSWContextManagerConnection.h:

Tools:

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetPreferencesToConsistentValues):
Enable small timeout values.

LayoutTests:

  • http/wpt/service-workers/resources/routines.js:

(async.waitForServiceWorkerNoLongerRunning):

  • http/wpt/service-workers/service-worker-spinning-activate.https-expected.txt: Added.
  • http/wpt/service-workers/service-worker-spinning-activate.https.html: Added.
  • http/wpt/service-workers/service-worker-spinning-fetch.https-expected.txt: Added.
  • http/wpt/service-workers/service-worker-spinning-fetch.https.html: Added.
  • http/wpt/service-workers/service-worker-spinning-install.https-expected.txt: Added.
  • http/wpt/service-workers/service-worker-spinning-install.https.html: Added.
  • http/wpt/service-workers/service-worker-spinning-message.https-expected.txt: Added.
  • http/wpt/service-workers/service-worker-spinning-message.https.html: Added.
  • http/wpt/service-workers/service-worker-spinning-worker.js: Added.

Dec 23, 2019:

6:34 PM Changeset in webkit [253897] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

REGRESSION (r253634): Reproducible crash going back and forward on goodreads.com in Page::setPageScaleFactor
https://bugs.webkit.org/show_bug.cgi?id=205569

Reviewed by Wenson Hsieh.

When going quickly back and forward, WebPage::didCommitLoad/WebPage::viewportConfigurationChanged/WebPage::scalePage
can be called for a page in the page cache, so the FrameView can be null.

Null-check the view here like the surrounding code does.

  • page/Page.cpp:

(WebCore::Page::setPageScaleFactor):

5:49 PM Changeset in webkit [253896] by keith_miller@apple.com
  • 183 edits
    2 copies
    5 adds in trunk

DFG/FTL should be able to exit to the middle of a bytecode
https://bugs.webkit.org/show_bug.cgi?id=205232

Reviewed by Saam Barati.

JSTests:

  • stress/apply-osr-exit-should-get-length-once-exceptions-occasionally.js: Added.

(expectedArgCount):
(callee):
(test):
(let.array.get length):

  • stress/apply-osr-exit-should-get-length-once.js: Added.

(expectedArgCount):
(callee):
(test):
(let.array.get length):

  • stress/load-varargs-then-inlined-call-and-exit-strict.js:

(checkEqual):

  • stress/recursive-tail-call-with-different-argument-count.js:
  • stress/rest-varargs-osr-exit-to-checkpoint.js: Added.

(foo):
(bar):

Source/JavaScriptCore:

It can be valuable to exit to the middle of a bytecode for a couple of reasons.
1) It can be used to combine bytecodes that share a majority of their operands, reducing bytecode steam size.
2) It enables creating bytecodes that are easier to reconstruct useful optimization information from.

To make exiting to the middle of a bytecode possible this patch
introduces the concept of a temporary operand. A temporary operand
is one that contains the result of effectful operations during the
process of executing a bytecode. tmp operands have no meaning when
executing in the LLInt or Baseline and are only used in the DFG to
preserve information for OSR exit. We use the term checkpoint to
refer to any point where an effectful component of a bytecode executes.
For example, in op_call_varargs there are two checkpoints the first is
before we have determined the number of variable arguments and the second
is the actual call.

When the DFG OSR exits if there are any active checkpoints inline
call stack we will emit a jit probe that allocates a side state
object keyed off the frame pointer of the bytecode whose
checkpoint needs to be finished. We need side state because we may
recursively inline several copies of the same
function. Alternatively, we could call back into ourselves after
OSR and exit again from optimized code before finishing the
checkpoint of our caller.

Another thing we need to be careful of is making sure we remove
side state as we unwind for an exception. To make sure we do this
correctly I've added an assertion to JSLock that there are no
pending checkpoint side states on the vm when releasing the lock.

A large amount of this patch is trying to remove as much code that
refers to virtual registers as an int as possible. Instead, this
patch replaces them with the VirtualRegister class. There are also
a couple of new classes/enums added to JSC:

1) There is now a class, Operand, that represents the combination
of a VirtualRegister and a temporary. This is handy in the DFG to
model OSR exit values all together. Additionally, Operands<T> has
been updated to work with respect to Operand values.

2) CallFrameSlot is now an enum class instead of a struct of
constexpr values. This lets us implicitly convert CallFrameSlots
to VirtualRegisters without allowing all ints to implicity
convert.

3) FTL::SelectPredictability is a new enum that describes to the
FTL whether or not we think a select is going to be
predictable. SelectPredictability has four options: Unpredictable,
Predictable, LeftLikely, and RightLikely. Unpredictable means we
think a branch predictor won't do a good job guessing this value
so we should compile the select to a cmov. The other options mean
we either think we are going to pick the same value every time or
there's a reasonable chance the branch predictor will be able to
guess the value.

In order to validate the correctness of this patch the various
varargs call opcodes have been reworked to use checkpoints. This
also fixed a long-standing issue where we could call length
getters twice if we OSR exit during LoadVarargs but before the
actually call.

Lastly, we have not enabled the probe-based OSR exit for a long
time in production, thus this patch removes that code since it
would be a non-trivial amount of work to get checkpoints working
with probe OSR.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • assembler/MacroAssemblerCodeRef.h:
  • assembler/ProbeFrame.h:

(JSC::Probe::Frame::operand):
(JSC::Probe::Frame::setOperand):

  • b3/testb3.h:

(populateWithInterestingValues):
(floatingPointOperands):

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::generateImpl):

  • bytecode/AccessCaseSnippetParams.cpp:

(JSC::SlowPathCallGeneratorWithArguments::generateImpl):

  • bytecode/BytecodeDumper.cpp:

(JSC::BytecodeDumperBase::dumpValue):
(JSC::BytecodeDumper<Block>::registerName const):
(JSC::BytecodeDumper<Block>::constantName const):
(JSC::Wasm::BytecodeDumper::constantName const):

  • bytecode/BytecodeDumper.h:
  • bytecode/BytecodeIndex.cpp:

(JSC::BytecodeIndex::dump const):

  • bytecode/BytecodeIndex.h:

(JSC::BytecodeIndex::BytecodeIndex):
(JSC::BytecodeIndex::offset const):
(JSC::BytecodeIndex::checkpoint const):
(JSC::BytecodeIndex::asBits const):
(JSC::BytecodeIndex::hash const):
(JSC::BytecodeIndex::operator bool const):
(JSC::BytecodeIndex::pack):
(JSC::BytecodeIndex::fromBits):

  • bytecode/BytecodeList.rb:
  • bytecode/BytecodeLivenessAnalysis.cpp:

(JSC::enumValuesEqualAsIntegral):
(JSC::tmpLivenessForCheckpoint):

  • bytecode/BytecodeLivenessAnalysis.h:
  • bytecode/BytecodeLivenessAnalysisInlines.h:

(JSC::virtualRegisterIsAlwaysLive):
(JSC::virtualRegisterThatIsNotAlwaysLiveIsLive):
(JSC::virtualRegisterIsLive):
(JSC::operandIsAlwaysLive): Deleted.
(JSC::operandThatIsNotAlwaysLiveIsLive): Deleted.
(JSC::operandIsLive): Deleted.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::bytecodeIndexForExit const):
(JSC::CodeBlock::ensureCatchLivenessIsComputedForBytecodeIndexSlow):
(JSC::CodeBlock::updateAllValueProfilePredictionsAndCountLiveness):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::numTmps const):
(JSC::CodeBlock::isKnownNotImmediate):
(JSC::CodeBlock::isTemporaryRegister):
(JSC::CodeBlock::constantRegister):
(JSC::CodeBlock::getConstant const):
(JSC::CodeBlock::constantSourceCodeRepresentation const):
(JSC::CodeBlock::replaceConstant):
(JSC::CodeBlock::isTemporaryRegisterIndex): Deleted.
(JSC::CodeBlock::isConstantRegisterIndex): Deleted.

  • bytecode/CodeOrigin.h:
  • bytecode/FullBytecodeLiveness.h:

(JSC::FullBytecodeLiveness::virtualRegisterIsLive const):
(JSC::FullBytecodeLiveness::operandIsLive const): Deleted.

  • bytecode/InlineCallFrame.h:

(JSC::InlineCallFrame::InlineCallFrame):
(JSC::InlineCallFrame::setTmpOffset):
(JSC::CodeOrigin::walkUpInlineStack const):
(JSC::CodeOrigin::inlineStackContainsActiveCheckpoint const):
(JSC::remapOperand):
(JSC::unmapOperand):
(JSC::CodeOrigin::walkUpInlineStack): Deleted.

  • bytecode/LazyOperandValueProfile.h:

(JSC::LazyOperandValueProfileKey::LazyOperandValueProfileKey):
(JSC::LazyOperandValueProfileKey::hash const):
(JSC::LazyOperandValueProfileKey::operand const):

  • bytecode/MethodOfGettingAValueProfile.cpp:

(JSC::MethodOfGettingAValueProfile::fromLazyOperand):
(JSC::MethodOfGettingAValueProfile::emitReportValue const):
(JSC::MethodOfGettingAValueProfile::reportValue):

  • bytecode/MethodOfGettingAValueProfile.h:
  • bytecode/Operands.h:

(JSC::Operand::Operand):
(JSC::Operand::tmp):
(JSC::Operand::kind const):
(JSC::Operand::value const):
(JSC::Operand::virtualRegister const):
(JSC::Operand::asBits const):
(JSC::Operand::isTmp const):
(JSC::Operand::isArgument const):
(JSC::Operand::isLocal const):
(JSC::Operand::isHeader const):
(JSC::Operand::isConstant const):
(JSC::Operand::toArgument const):
(JSC::Operand::toLocal const):
(JSC::Operand::operator== const):
(JSC::Operand::isValid const):
(JSC::Operand::fromBits):
(JSC::Operands::Operands):
(JSC::Operands::numberOfLocals const):
(JSC::Operands::numberOfTmps const):
(JSC::Operands::tmpIndex const):
(JSC::Operands::argumentIndex const):
(JSC::Operands::localIndex const):
(JSC::Operands::tmp):
(JSC::Operands::tmp const):
(JSC::Operands::argument):
(JSC::Operands::argument const):
(JSC::Operands::local):
(JSC::Operands::local const):
(JSC::Operands::sizeFor const):
(JSC::Operands::atFor):
(JSC::Operands::atFor const):
(JSC::Operands::ensureLocals):
(JSC::Operands::ensureTmps):
(JSC::Operands::getForOperandIndex):
(JSC::Operands::getForOperandIndex const):
(JSC::Operands::operandIndex const):
(JSC::Operands::operand):
(JSC::Operands::operand const):
(JSC::Operands::hasOperand const):
(JSC::Operands::setOperand):
(JSC::Operands::at const):
(JSC::Operands::at):
(JSC::Operands::operator[] const):
(JSC::Operands::operator[]):
(JSC::Operands::operandForIndex const):
(JSC::Operands::operator== const):
(JSC::Operands::isArgument const): Deleted.
(JSC::Operands::isLocal const): Deleted.
(JSC::Operands::virtualRegisterForIndex const): Deleted.
(JSC::Operands::setOperandFirstTime): Deleted.

  • bytecode/OperandsInlines.h:

(JSC::Operand::dump const):
(JSC::Operands<T>::dumpInContext const):
(JSC::Operands<T>::dump const):

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::hasCheckpoints const):
(JSC::UnlinkedCodeBlock::setHasCheckpoints):
(JSC::UnlinkedCodeBlock::constantRegister const):
(JSC::UnlinkedCodeBlock::getConstant const):
(JSC::UnlinkedCodeBlock::isConstantRegisterIndex const): Deleted.

  • bytecode/ValueProfile.h:

(JSC::ValueProfileAndVirtualRegisterBuffer::ValueProfileAndVirtualRegisterBuffer):
(JSC::ValueProfileAndVirtualRegisterBuffer::~ValueProfileAndVirtualRegisterBuffer):
(JSC::ValueProfileAndOperandBuffer::ValueProfileAndOperandBuffer): Deleted.
(JSC::ValueProfileAndOperandBuffer::~ValueProfileAndOperandBuffer): Deleted.
(JSC::ValueProfileAndOperandBuffer::forEach): Deleted.

  • bytecode/ValueRecovery.cpp:

(JSC::ValueRecovery::recover const):

  • bytecode/ValueRecovery.h:
  • bytecode/VirtualRegister.h:

(JSC::virtualRegisterIsLocal):
(JSC::virtualRegisterIsArgument):
(JSC::VirtualRegister::VirtualRegister):
(JSC::VirtualRegister::isValid const):
(JSC::VirtualRegister::isLocal const):
(JSC::VirtualRegister::isArgument const):
(JSC::VirtualRegister::isConstant const):
(JSC::VirtualRegister::toConstantIndex const):
(JSC::operandIsLocal): Deleted.
(JSC::operandIsArgument): Deleted.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::initializeNextParameter):
(JSC::BytecodeGenerator::initializeParameters):
(JSC::BytecodeGenerator::emitEqualityOpImpl):
(JSC::BytecodeGenerator::emitCallVarargs):

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::setUsesCheckpoints):

  • bytecompiler/RegisterID.h:

(JSC::RegisterID::setIndex):

  • dfg/DFGAbstractHeap.cpp:

(JSC::DFG::AbstractHeap::Payload::dumpAsOperand const):
(JSC::DFG::AbstractHeap::dump const):

  • dfg/DFGAbstractHeap.h:

(JSC::DFG::AbstractHeap::Payload::Payload):
(JSC::DFG::AbstractHeap::AbstractHeap):
(JSC::DFG::AbstractHeap::operand const):

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGArgumentPosition.h:

(JSC::DFG::ArgumentPosition::dump):

  • dfg/DFGArgumentsEliminationPhase.cpp:
  • dfg/DFGArgumentsUtilities.cpp:

(JSC::DFG::argumentsInvolveStackSlot):
(JSC::DFG::emitCodeToGetArgumentsArrayLength):

  • dfg/DFGArgumentsUtilities.h:
  • dfg/DFGAtTailAbstractState.h:

(JSC::DFG::AtTailAbstractState::operand):

  • dfg/DFGAvailabilityMap.cpp:

(JSC::DFG::AvailabilityMap::pruneByLiveness):

  • dfg/DFGAvailabilityMap.h:

(JSC::DFG::AvailabilityMap::closeStartingWithLocal):

  • dfg/DFGBasicBlock.cpp:

(JSC::DFG::BasicBlock::BasicBlock):
(JSC::DFG::BasicBlock::ensureTmps):

  • dfg/DFGBasicBlock.h:
  • dfg/DFGBlockInsertionSet.cpp:

(JSC::DFG::BlockInsertionSet::insert):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::ByteCodeParser):
(JSC::DFG::ByteCodeParser::ensureTmps):
(JSC::DFG::ByteCodeParser::progressToNextCheckpoint):
(JSC::DFG::ByteCodeParser::newVariableAccessData):
(JSC::DFG::ByteCodeParser::getDirect):
(JSC::DFG::ByteCodeParser::get):
(JSC::DFG::ByteCodeParser::setDirect):
(JSC::DFG::ByteCodeParser::injectLazyOperandSpeculation):
(JSC::DFG::ByteCodeParser::getLocalOrTmp):
(JSC::DFG::ByteCodeParser::setLocalOrTmp):
(JSC::DFG::ByteCodeParser::setArgument):
(JSC::DFG::ByteCodeParser::findArgumentPositionForLocal):
(JSC::DFG::ByteCodeParser::findArgumentPosition):
(JSC::DFG::ByteCodeParser::flushImpl):
(JSC::DFG::ByteCodeParser::flushForTerminalImpl):
(JSC::DFG::ByteCodeParser::flush):
(JSC::DFG::ByteCodeParser::flushDirect):
(JSC::DFG::ByteCodeParser::addFlushOrPhantomLocal):
(JSC::DFG::ByteCodeParser::phantomLocalDirect):
(JSC::DFG::ByteCodeParser::flushForTerminal):
(JSC::DFG::ByteCodeParser::addToGraph):
(JSC::DFG::ByteCodeParser::InlineStackEntry::remapOperand const):
(JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal):
(JSC::DFG::ByteCodeParser::DelayedSetLocal::execute):
(JSC::DFG::ByteCodeParser::allocateTargetableBlock):
(JSC::DFG::ByteCodeParser::allocateUntargetableBlock):
(JSC::DFG::ByteCodeParser::handleRecursiveTailCall):
(JSC::DFG::ByteCodeParser::inlineCall):
(JSC::DFG::ByteCodeParser::handleVarargsInlining):
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
(JSC::DFG::ByteCodeParser::parse):
(JSC::DFG::ByteCodeParser::getLocal): Deleted.
(JSC::DFG::ByteCodeParser::setLocal): Deleted.

  • dfg/DFGCFAPhase.cpp:

(JSC::DFG::CFAPhase::injectOSR):

  • dfg/DFGCPSRethreadingPhase.cpp:

(JSC::DFG::CPSRethreadingPhase::run):
(JSC::DFG::CPSRethreadingPhase::canonicalizeGetLocal):
(JSC::DFG::CPSRethreadingPhase::canonicalizeFlushOrPhantomLocalFor):
(JSC::DFG::CPSRethreadingPhase::canonicalizeFlushOrPhantomLocal):
(JSC::DFG::CPSRethreadingPhase::canonicalizeSet):
(JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlock):
(JSC::DFG::CPSRethreadingPhase::propagatePhis):
(JSC::DFG::CPSRethreadingPhase::phiStackFor):

  • dfg/DFGCSEPhase.cpp:
  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGCombinedLiveness.cpp:

(JSC::DFG::addBytecodeLiveness):

  • dfg/DFGCommonData.cpp:

(JSC::DFG::CommonData::addCodeOrigin):
(JSC::DFG::CommonData::addUniqueCallSiteIndex):
(JSC::DFG::CommonData::lastCallSite const):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGDriver.cpp:

(JSC::DFG::compileImpl):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGForAllKills.h:

(JSC::DFG::forAllKilledOperands):
(JSC::DFG::forAllKilledNodesAtNodeIndex):
(JSC::DFG::forAllKillsInBlock):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::dump):
(JSC::DFG::Graph::dumpBlockHeader):
(JSC::DFG::Graph::substituteGetLocal):
(JSC::DFG::Graph::isLiveInBytecode):
(JSC::DFG::Graph::localsAndTmpsLiveInBytecode):
(JSC::DFG::Graph::methodOfGettingAValueProfileFor):
(JSC::DFG::Graph::localsLiveInBytecode): Deleted.

  • dfg/DFGGraph.h:

(JSC::DFG::Graph::forAllLocalsAndTmpsLiveInBytecode):
(JSC::DFG::Graph::forAllLiveInBytecode):
(JSC::DFG::Graph::forAllLocalsLiveInBytecode): Deleted.

  • dfg/DFGInPlaceAbstractState.cpp:

(JSC::DFG::InPlaceAbstractState::InPlaceAbstractState):

  • dfg/DFGInPlaceAbstractState.h:

(JSC::DFG::InPlaceAbstractState::operand):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::linkOSRExits):
(JSC::DFG::JITCompiler::noticeOSREntry):

  • dfg/DFGJITCompiler.h:

(JSC::DFG::JITCompiler::emitStoreCallSiteIndex):

  • dfg/DFGLiveCatchVariablePreservationPhase.cpp:

(JSC::DFG::LiveCatchVariablePreservationPhase::isValidFlushLocation):
(JSC::DFG::LiveCatchVariablePreservationPhase::handleBlockForTryCatch):
(JSC::DFG::LiveCatchVariablePreservationPhase::newVariableAccessData):

  • dfg/DFGMovHintRemovalPhase.cpp:
  • dfg/DFGNode.h:

(JSC::DFG::StackAccessData::StackAccessData):
(JSC::DFG::Node::hasArgumentsChild):
(JSC::DFG::Node::argumentsChild):
(JSC::DFG::Node::operand):
(JSC::DFG::Node::hasUnlinkedOperand):
(JSC::DFG::Node::unlinkedOperand):
(JSC::DFG::Node::hasLoadVarargsData):
(JSC::DFG::Node::local): Deleted.
(JSC::DFG::Node::hasUnlinkedLocal): Deleted.
(JSC::DFG::Node::unlinkedLocal): Deleted.

  • dfg/DFGNodeType.h:
  • dfg/DFGOSRAvailabilityAnalysisPhase.cpp:

(JSC::DFG::OSRAvailabilityAnalysisPhase::run):
(JSC::DFG::LocalOSRAvailabilityCalculator::executeNode):

  • dfg/DFGOSREntry.cpp:

(JSC::DFG::prepareOSREntry):
(JSC::DFG::prepareCatchOSREntry):

  • dfg/DFGOSREntrypointCreationPhase.cpp:

(JSC::DFG::OSREntrypointCreationPhase::run):

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::OSRExit::emitRestoreArguments):
(JSC::DFG::OSRExit::compileExit):
(JSC::DFG::jsValueFor): Deleted.
(JSC::DFG::restoreCalleeSavesFor): Deleted.
(JSC::DFG::saveCalleeSavesFor): Deleted.
(JSC::DFG::restoreCalleeSavesFromVMEntryFrameCalleeSavesBuffer): Deleted.
(JSC::DFG::copyCalleeSavesToVMEntryFrameCalleeSavesBuffer): Deleted.
(JSC::DFG::saveOrCopyCalleeSavesFor): Deleted.
(JSC::DFG::createDirectArgumentsDuringExit): Deleted.
(JSC::DFG::createClonedArgumentsDuringExit): Deleted.
(JSC::DFG::emitRestoreArguments): Deleted.
(JSC::DFG::OSRExit::executeOSRExit): Deleted.
(JSC::DFG::reifyInlinedCallFrames): Deleted.
(JSC::DFG::adjustAndJumpToTarget): Deleted.
(JSC::DFG::printOSRExit): Deleted.

  • dfg/DFGOSRExit.h:
  • dfg/DFGOSRExitBase.h:

(JSC::DFG::OSRExitBase::isExitingToCheckpointHandler const):

  • dfg/DFGOSRExitCompilerCommon.cpp:

(JSC::DFG::callerReturnPC):
(JSC::DFG::reifyInlinedCallFrames):
(JSC::DFG::adjustAndJumpToTarget):

  • dfg/DFGObjectAllocationSinkingPhase.cpp:
  • dfg/DFGOpInfo.h:

(JSC::DFG::OpInfo::OpInfo):

  • dfg/DFGOperations.cpp:
  • dfg/DFGPhantomInsertionPhase.cpp:
  • dfg/DFGPreciseLocalClobberize.h:

(JSC::DFG::PreciseLocalClobberizeAdaptor::read):
(JSC::DFG::PreciseLocalClobberizeAdaptor::write):
(JSC::DFG::PreciseLocalClobberizeAdaptor::def):
(JSC::DFG::PreciseLocalClobberizeAdaptor::callIfAppropriate):

  • dfg/DFGPredictionInjectionPhase.cpp:

(JSC::DFG::PredictionInjectionPhase::run):

  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGPutStackSinkingPhase.cpp:
  • dfg/DFGSSAConversionPhase.cpp:

(JSC::DFG::SSAConversionPhase::run):

  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileMovHint):
(JSC::DFG::SpeculativeJIT::compileCurrentBlock):
(JSC::DFG::SpeculativeJIT::checkArgumentTypes):
(JSC::DFG::SpeculativeJIT::compileVarargsLength):
(JSC::DFG::SpeculativeJIT::compileLoadVarargs):
(JSC::DFG::SpeculativeJIT::compileForwardVarargs):
(JSC::DFG::SpeculativeJIT::compileCreateDirectArguments):
(JSC::DFG::SpeculativeJIT::compileGetArgumentCountIncludingThis):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::recordSetLocal):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGStackLayoutPhase.cpp:

(JSC::DFG::StackLayoutPhase::run):
(JSC::DFG::StackLayoutPhase::assign):

  • dfg/DFGStrengthReductionPhase.cpp:

(JSC::DFG::StrengthReductionPhase::handleNode):

  • dfg/DFGThunks.cpp:

(JSC::DFG::osrExitThunkGenerator): Deleted.

  • dfg/DFGThunks.h:
  • dfg/DFGTypeCheckHoistingPhase.cpp:

(JSC::DFG::TypeCheckHoistingPhase::run):
(JSC::DFG::TypeCheckHoistingPhase::disableHoistingAcrossOSREntries):

  • dfg/DFGValidate.cpp:
  • dfg/DFGVarargsForwardingPhase.cpp:
  • dfg/DFGVariableAccessData.cpp:

(JSC::DFG::VariableAccessData::VariableAccessData):
(JSC::DFG::VariableAccessData::shouldUseDoubleFormatAccordingToVote):
(JSC::DFG::VariableAccessData::tallyVotesForShouldUseDoubleFormat):
(JSC::DFG::VariableAccessData::couldRepresentInt52Impl):

  • dfg/DFGVariableAccessData.h:

(JSC::DFG::VariableAccessData::operand):
(JSC::DFG::VariableAccessData::local): Deleted.

  • dfg/DFGVariableEvent.cpp:

(JSC::DFG::VariableEvent::dump const):

  • dfg/DFGVariableEvent.h:

(JSC::DFG::VariableEvent::spill):
(JSC::DFG::VariableEvent::setLocal):
(JSC::DFG::VariableEvent::movHint):
(JSC::DFG::VariableEvent::spillRegister const):
(JSC::DFG::VariableEvent::operand const):
(JSC::DFG::VariableEvent::bytecodeRegister const): Deleted.

  • dfg/DFGVariableEventStream.cpp:

(JSC::DFG::VariableEventStream::logEvent):
(JSC::DFG::VariableEventStream::reconstruct const):

  • dfg/DFGVariableEventStream.h:

(JSC::DFG::VariableEventStream::appendAndLog):

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLForOSREntryJITCode.cpp:

(JSC::FTL::ForOSREntryJITCode::ForOSREntryJITCode):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::lower):
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileExtractOSREntryLocal):
(JSC::FTL::DFG::LowerDFGToB3::compileGetStack):
(JSC::FTL::DFG::LowerDFGToB3::compileGetCallee):
(JSC::FTL::DFG::LowerDFGToB3::compileSetCallee):
(JSC::FTL::DFG::LowerDFGToB3::compileSetArgumentCountIncludingThis):
(JSC::FTL::DFG::LowerDFGToB3::compileVarargsLength):
(JSC::FTL::DFG::LowerDFGToB3::compileLoadVarargs):
(JSC::FTL::DFG::LowerDFGToB3::compileForwardVarargs):
(JSC::FTL::DFG::LowerDFGToB3::getSpreadLengthFromInlineCallFrame):
(JSC::FTL::DFG::LowerDFGToB3::compileForwardVarargsWithSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileLogShadowChickenPrologue):
(JSC::FTL::DFG::LowerDFGToB3::getArgumentsLength):
(JSC::FTL::DFG::LowerDFGToB3::getCurrentCallee):
(JSC::FTL::DFG::LowerDFGToB3::callPreflight):
(JSC::FTL::DFG::LowerDFGToB3::appendOSRExitDescriptor):
(JSC::FTL::DFG::LowerDFGToB3::buildExitArguments):
(JSC::FTL::DFG::LowerDFGToB3::addressFor):
(JSC::FTL::DFG::LowerDFGToB3::payloadFor):
(JSC::FTL::DFG::LowerDFGToB3::tagFor):

  • ftl/FTLOSREntry.cpp:

(JSC::FTL::prepareOSREntry):

  • ftl/FTLOSRExit.cpp:

(JSC::FTL::OSRExitDescriptor::OSRExitDescriptor):

  • ftl/FTLOSRExit.h:
  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileStub):

  • ftl/FTLOperations.cpp:

(JSC::FTL::operationMaterializeObjectInOSR):

  • ftl/FTLOutput.cpp:

(JSC::FTL::Output::select):

  • ftl/FTLOutput.h:
  • ftl/FTLSelectPredictability.h: Copied from Source/JavaScriptCore/ftl/FTLForOSREntryJITCode.cpp.
  • ftl/FTLSlowPathCall.h:

(JSC::FTL::callOperation):

  • generator/Checkpoints.rb: Added.
  • generator/Opcode.rb:
  • generator/Section.rb:
  • heap/Heap.cpp:

(JSC::Heap::gatherStackRoots):

  • interpreter/CallFrame.cpp:

(JSC::CallFrame::callSiteAsRawBits const):
(JSC::CallFrame::unsafeCallSiteAsRawBits const):
(JSC::CallFrame::callSiteIndex const):
(JSC::CallFrame::unsafeCallSiteIndex const):
(JSC::CallFrame::setCurrentVPC):
(JSC::CallFrame::bytecodeIndex):
(JSC::CallFrame::codeOrigin):

  • interpreter/CallFrame.h:

(JSC::CallSiteIndex::CallSiteIndex):
(JSC::CallSiteIndex::operator bool const):
(JSC::CallSiteIndex::operator== const):
(JSC::CallSiteIndex::bits const):
(JSC::CallSiteIndex::fromBits):
(JSC::CallSiteIndex::bytecodeIndex const):
(JSC::DisposableCallSiteIndex::DisposableCallSiteIndex):
(JSC::CallFrame::callee const):
(JSC::CallFrame::unsafeCallee const):
(JSC::CallFrame::addressOfCodeBlock const):
(JSC::CallFrame::argumentCountIncludingThis const):
(JSC::CallFrame::offsetFor):
(JSC::CallFrame::setArgumentCountIncludingThis):
(JSC::CallFrame::setReturnPC):

  • interpreter/CallFrameInlines.h:

(JSC::CallFrame::r):
(JSC::CallFrame::uncheckedR):
(JSC::CallFrame::guaranteedJSValueCallee const):
(JSC::CallFrame::jsCallee const):
(JSC::CallFrame::codeBlock const):
(JSC::CallFrame::unsafeCodeBlock const):
(JSC::CallFrame::setCallee):
(JSC::CallFrame::setCodeBlock):

  • interpreter/CheckpointOSRExitSideState.h: Copied from Source/JavaScriptCore/dfg/DFGThunks.h.
  • interpreter/Interpreter.cpp:

(JSC::eval):
(JSC::sizeOfVarargs):
(JSC::loadVarargs):
(JSC::setupVarargsFrame):
(JSC::UnwindFunctor::operator() const):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):

  • interpreter/Interpreter.h:
  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::readInlinedFrame):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::emitGetFromCallFrameHeaderPtr):
(JSC::AssemblyHelpers::emitGetFromCallFrameHeader32):
(JSC::AssemblyHelpers::emitGetFromCallFrameHeader64):
(JSC::AssemblyHelpers::emitPutToCallFrameHeader):
(JSC::AssemblyHelpers::emitPutToCallFrameHeaderBeforePrologue):
(JSC::AssemblyHelpers::emitPutPayloadToCallFrameHeaderBeforePrologue):
(JSC::AssemblyHelpers::emitPutTagToCallFrameHeaderBeforePrologue):
(JSC::AssemblyHelpers::addressFor):
(JSC::AssemblyHelpers::tagFor):
(JSC::AssemblyHelpers::payloadFor):
(JSC::AssemblyHelpers::calleeFrameSlot):
(JSC::AssemblyHelpers::calleeArgumentSlot):
(JSC::AssemblyHelpers::calleeFrameTagSlot):
(JSC::AssemblyHelpers::calleeFramePayloadSlot):
(JSC::AssemblyHelpers::calleeFrameCallerFrame):
(JSC::AssemblyHelpers::argumentCount):

  • jit/CallFrameShuffler.cpp:

(JSC::CallFrameShuffler::CallFrameShuffler):

  • jit/CallFrameShuffler.h:

(JSC::CallFrameShuffler::setCalleeJSValueRegs):
(JSC::CallFrameShuffler::assumeCalleeIsCell):

  • jit/JIT.h:
  • jit/JITArithmetic.cpp:

(JSC::JIT::emit_op_unsigned):
(JSC::JIT::emit_compareAndJump):
(JSC::JIT::emit_compareAndJumpImpl):
(JSC::JIT::emit_compareUnsignedAndJump):
(JSC::JIT::emit_compareUnsignedAndJumpImpl):
(JSC::JIT::emit_compareUnsigned):
(JSC::JIT::emit_compareUnsignedImpl):
(JSC::JIT::emit_compareAndJumpSlow):
(JSC::JIT::emit_compareAndJumpSlowImpl):
(JSC::JIT::emit_op_inc):
(JSC::JIT::emit_op_dec):
(JSC::JIT::emit_op_mod):
(JSC::JIT::emitBitBinaryOpFastPath):
(JSC::JIT::emit_op_bitnot):
(JSC::JIT::emitRightShiftFastPath):
(JSC::JIT::emitMathICFast):
(JSC::JIT::emitMathICSlow):
(JSC::JIT::emit_op_div):

  • jit/JITCall.cpp:

(JSC::JIT::emitPutCallResult):
(JSC::JIT::compileSetupFrame):
(JSC::JIT::compileOpCall):

  • jit/JITExceptions.cpp:

(JSC::genericUnwind):

  • jit/JITInlines.h:

(JSC::JIT::isOperandConstantDouble):
(JSC::JIT::getConstantOperand):
(JSC::JIT::emitPutIntToCallFrameHeader):
(JSC::JIT::appendCallWithExceptionCheckSetJSValueResult):
(JSC::JIT::appendCallWithExceptionCheckSetJSValueResultWithProfile):
(JSC::JIT::linkSlowCaseIfNotJSCell):
(JSC::JIT::isOperandConstantChar):
(JSC::JIT::getOperandConstantInt):
(JSC::JIT::getOperandConstantDouble):
(JSC::JIT::emitInitRegister):
(JSC::JIT::emitLoadTag):
(JSC::JIT::emitLoadPayload):
(JSC::JIT::emitGet):
(JSC::JIT::emitPutVirtualRegister):
(JSC::JIT::emitLoad):
(JSC::JIT::emitLoad2):
(JSC::JIT::emitLoadDouble):
(JSC::JIT::emitLoadInt32ToDouble):
(JSC::JIT::emitStore):
(JSC::JIT::emitStoreInt32):
(JSC::JIT::emitStoreCell):
(JSC::JIT::emitStoreBool):
(JSC::JIT::emitStoreDouble):
(JSC::JIT::emitJumpSlowCaseIfNotJSCell):
(JSC::JIT::isOperandConstantInt):
(JSC::JIT::emitGetVirtualRegister):
(JSC::JIT::emitGetVirtualRegisters):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_mov):
(JSC::JIT::emit_op_end):
(JSC::JIT::emit_op_new_object):
(JSC::JIT::emitSlow_op_new_object):
(JSC::JIT::emit_op_overrides_has_instance):
(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emitSlow_op_instanceof):
(JSC::JIT::emit_op_is_empty):
(JSC::JIT::emit_op_is_undefined):
(JSC::JIT::emit_op_is_undefined_or_null):
(JSC::JIT::emit_op_is_boolean):
(JSC::JIT::emit_op_is_number):
(JSC::JIT::emit_op_is_cell_with_type):
(JSC::JIT::emit_op_is_object):
(JSC::JIT::emit_op_ret):
(JSC::JIT::emit_op_to_primitive):
(JSC::JIT::emit_op_set_function_name):
(JSC::JIT::emit_op_not):
(JSC::JIT::emit_op_jfalse):
(JSC::JIT::emit_op_jeq_null):
(JSC::JIT::emit_op_jneq_null):
(JSC::JIT::emit_op_jundefined_or_null):
(JSC::JIT::emit_op_jnundefined_or_null):
(JSC::JIT::emit_op_jneq_ptr):
(JSC::JIT::emit_op_eq):
(JSC::JIT::emit_op_jeq):
(JSC::JIT::emit_op_jtrue):
(JSC::JIT::emit_op_neq):
(JSC::JIT::emit_op_jneq):
(JSC::JIT::emit_op_throw):
(JSC::JIT::compileOpStrictEq):
(JSC::JIT::compileOpStrictEqJump):
(JSC::JIT::emit_op_to_number):
(JSC::JIT::emit_op_to_numeric):
(JSC::JIT::emit_op_to_string):
(JSC::JIT::emit_op_to_object):
(JSC::JIT::emit_op_catch):
(JSC::JIT::emit_op_get_parent_scope):
(JSC::JIT::emit_op_switch_imm):
(JSC::JIT::emit_op_switch_char):
(JSC::JIT::emit_op_switch_string):
(JSC::JIT::emit_op_eq_null):
(JSC::JIT::emit_op_neq_null):
(JSC::JIT::emit_op_enter):
(JSC::JIT::emit_op_get_scope):
(JSC::JIT::emit_op_to_this):
(JSC::JIT::emit_op_create_this):
(JSC::JIT::emit_op_check_tdz):
(JSC::JIT::emitSlow_op_eq):
(JSC::JIT::emitSlow_op_neq):
(JSC::JIT::emitSlow_op_instanceof_custom):
(JSC::JIT::emit_op_new_regexp):
(JSC::JIT::emitNewFuncCommon):
(JSC::JIT::emitNewFuncExprCommon):
(JSC::JIT::emit_op_new_array):
(JSC::JIT::emit_op_new_array_with_size):
(JSC::JIT::emit_op_has_structure_property):
(JSC::JIT::emit_op_has_indexed_property):
(JSC::JIT::emitSlow_op_has_indexed_property):
(JSC::JIT::emit_op_get_direct_pname):
(JSC::JIT::emit_op_enumerator_structure_pname):
(JSC::JIT::emit_op_enumerator_generic_pname):
(JSC::JIT::emit_op_profile_type):
(JSC::JIT::emit_op_log_shadow_chicken_prologue):
(JSC::JIT::emit_op_log_shadow_chicken_tail):
(JSC::JIT::emit_op_argument_count):
(JSC::JIT::emit_op_get_rest_length):
(JSC::JIT::emit_op_get_argument):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_catch):

  • jit/JITOperations.cpp:
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emitSlow_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emitGenericContiguousPutByVal):
(JSC::JIT::emitArrayStoragePutByVal):
(JSC::JIT::emitPutByValWithCachedId):
(JSC::JIT::emitSlow_op_put_by_val):
(JSC::JIT::emit_op_put_getter_by_id):
(JSC::JIT::emit_op_put_setter_by_id):
(JSC::JIT::emit_op_put_getter_setter_by_id):
(JSC::JIT::emit_op_put_getter_by_val):
(JSC::JIT::emit_op_put_setter_by_val):
(JSC::JIT::emit_op_del_by_id):
(JSC::JIT::emit_op_del_by_val):
(JSC::JIT::emit_op_try_get_by_id):
(JSC::JIT::emitSlow_op_try_get_by_id):
(JSC::JIT::emit_op_get_by_id_direct):
(JSC::JIT::emitSlow_op_get_by_id_direct):
(JSC::JIT::emit_op_get_by_id):
(JSC::JIT::emit_op_get_by_id_with_this):
(JSC::JIT::emitSlow_op_get_by_id):
(JSC::JIT::emitSlow_op_get_by_id_with_this):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emit_op_in_by_id):
(JSC::JIT::emitSlow_op_in_by_id):
(JSC::JIT::emitResolveClosure):
(JSC::JIT::emit_op_resolve_scope):
(JSC::JIT::emitLoadWithStructureCheck):
(JSC::JIT::emitGetClosureVar):
(JSC::JIT::emit_op_get_from_scope):
(JSC::JIT::emitSlow_op_get_from_scope):
(JSC::JIT::emitPutGlobalVariable):
(JSC::JIT::emitPutGlobalVariableIndirect):
(JSC::JIT::emitPutClosureVar):
(JSC::JIT::emit_op_put_to_scope):
(JSC::JIT::emit_op_get_from_arguments):
(JSC::JIT::emit_op_put_to_arguments):
(JSC::JIT::emitWriteBarrier):
(JSC::JIT::emit_op_get_internal_field):
(JSC::JIT::emit_op_put_internal_field):
(JSC::JIT::emitIntTypedArrayPutByVal):
(JSC::JIT::emitFloatTypedArrayPutByVal):

  • jit/JSInterfaceJIT.h:

(JSC::JSInterfaceJIT::emitLoadJSCell):
(JSC::JSInterfaceJIT::emitJumpIfNotJSCell):
(JSC::JSInterfaceJIT::emitLoadInt32):
(JSC::JSInterfaceJIT::emitLoadDouble):
(JSC::JSInterfaceJIT::emitGetFromCallFrameHeaderPtr):
(JSC::JSInterfaceJIT::emitPutToCallFrameHeader):
(JSC::JSInterfaceJIT::emitPutCellToCallFrameHeader):

  • jit/SetupVarargsFrame.cpp:

(JSC::emitSetupVarargsFrameFastCase):

  • jit/SpecializedThunkJIT.h:

(JSC::SpecializedThunkJIT::loadDoubleArgument):
(JSC::SpecializedThunkJIT::loadCellArgument):
(JSC::SpecializedThunkJIT::loadInt32Argument):

  • jit/ThunkGenerators.cpp:

(JSC::absThunkGenerator):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::getNonConstantOperand):
(JSC::LLInt::getOperand):
(JSC::LLInt::genericCall):
(JSC::LLInt::varargsSetup):
(JSC::LLInt::commonCallEval):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::handleVarargsCheckpoint):
(JSC::LLInt::dispatchToNextInstruction):
(JSC::LLInt::slow_path_checkpoint_osr_exit_from_inlined_call):
(JSC::LLInt::slow_path_checkpoint_osr_exit):
(JSC::LLInt::llint_throw_stack_overflow_error):

  • llint/LLIntSlowPaths.h:
  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/ArgList.h:

(JSC::MarkedArgumentBuffer::fill):

  • runtime/CachedTypes.cpp:

(JSC::CachedCodeBlock::hasCheckpoints const):
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
(JSC::CachedCodeBlock<CodeBlockType>::encode):

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/ConstructData.cpp:

(JSC::construct):

  • runtime/ConstructData.h:
  • runtime/DirectArguments.cpp:

(JSC::DirectArguments::copyToArguments):

  • runtime/DirectArguments.h:
  • runtime/GenericArguments.h:
  • runtime/GenericArgumentsInlines.h:

(JSC::GenericArguments<Type>::copyToArguments):

  • runtime/JSArray.cpp:

(JSC::JSArray::copyToArguments):

  • runtime/JSArray.h:
  • runtime/JSImmutableButterfly.cpp:

(JSC::JSImmutableButterfly::copyToArguments):

  • runtime/JSImmutableButterfly.h:
  • runtime/JSLock.cpp:

(JSC::JSLock::willReleaseLock):

  • runtime/ModuleProgramExecutable.cpp:

(JSC::ModuleProgramExecutable::create):

  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

  • runtime/ScopedArguments.cpp:

(JSC::ScopedArguments::copyToArguments):

  • runtime/ScopedArguments.h:
  • runtime/VM.cpp:

(JSC::VM::addCheckpointOSRSideState):
(JSC::VM::findCheckpointOSRSideState):
(JSC::VM::scanSideState const):

  • runtime/VM.h:

(JSC::VM::hasCheckpointOSRSideState const):

  • tools/VMInspector.cpp:

(JSC::VMInspector::dumpRegisters):

  • wasm/WasmFunctionCodeBlock.h:

(JSC::Wasm::FunctionCodeBlock::getConstant const):
(JSC::Wasm::FunctionCodeBlock::getConstantType const):

  • wasm/WasmLLIntGenerator.cpp:

(JSC::Wasm::LLIntGenerator::setUsesCheckpoints const):

  • wasm/WasmOperations.cpp:

(JSC::Wasm::operationWasmToJSException):

  • wasm/WasmSlowPaths.cpp:

Source/WTF:

  • WTF.xcodeproj/project.pbxproj:
  • wtf/Bitmap.h:

(WTF::WordType>::invert):
(WTF::WordType>::operator):
(WTF::WordType>::operator const const):

  • wtf/CMakeLists.txt:
  • wtf/EnumClassOperatorOverloads.h: Added.
  • wtf/FastBitVector.h:

(WTF::FastBitReference::operator bool const):
(WTF::FastBitReference::operator|=):
(WTF::FastBitReference::operator&=):
(WTF::FastBitVector::fill):
(WTF::FastBitVector::grow):

  • wtf/UnalignedAccess.h:

(WTF::unalignedLoad):
(WTF::unalignedStore):

Tools:

  • Scripts/run-jsc-stress-tests:
5:11 PM Changeset in webkit [253895] by ysuzuki@apple.com
  • 5 edits
    1 add in trunk

[JSC] Wasm OSR entry should capture top-most enclosing-stack
https://bugs.webkit.org/show_bug.cgi?id=205571

Reviewed by Keith Miller.

JSTests:

  • wasm/stress/top-most-enclosing-stack.js: Added.

Source/JavaScriptCore:

OSR entry should capture the top-most enclosing-stack too.
Otherwise the def-node can be unreachable (since it is defined in BB which is unreachable from OSR entry point),
and eliminated.

  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::emitLoopTierUpCheck):
(JSC::Wasm::AirIRGenerator::addLoop):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::emitLoopTierUpCheck):
(JSC::Wasm::B3IRGenerator::addLoop):

  • wasm/WasmLLIntGenerator.cpp:

(JSC::Wasm::LLIntGenerator::addLoop):

5:03 PM Changeset in webkit [253894] by Andres Gonzalez
  • 3 edits in trunk/Source/WebCore

IsolatedObject implementation of property setters.
https://bugs.webkit.org/show_bug.cgi?id=205566

Reviewed by Chris Fleizach.

  • Implementation of setters that need to be executed in the main

thread.

  • Sanity check of the associatedAXObject() before calling corresponding

method on main thread.

  • accessibility/isolatedtree/AXIsolatedTreeNode.cpp:

(WebCore::AXIsolatedObject::initializeAttributeData):
(WebCore::AXIsolatedObject::performFunctionOnMainThread):
(WebCore::AXIsolatedObject::setARIAGrabbed):
(WebCore::AXIsolatedObject::setIsExpanded):
(WebCore::AXIsolatedObject::setValue):
(WebCore::AXIsolatedObject::setSelected):
(WebCore::AXIsolatedObject::setSelectedRows):
(WebCore::AXIsolatedObject::setFocused):
(WebCore::AXIsolatedObject::setSelectedText):
(WebCore::AXIsolatedObject::setSelectedTextRange):
(WebCore::AXIsolatedObject::setCaretBrowsingEnabled):
(WebCore::AXIsolatedObject::setPreventKeyboardDOMEventDispatch):
(WebCore::AXIsolatedObject::findTextRanges const):
(WebCore::AXIsolatedObject::performTextOperation):
(WebCore::AXIsolatedObject::widget const):
(WebCore::AXIsolatedObject::document const):
(WebCore::AXIsolatedObject::documentFrameView const):

  • accessibility/isolatedtree/AXIsolatedTreeNode.h:
4:32 PM Changeset in webkit [253893] by dbates@webkit.org
  • 5 edits
    3 adds in trunk

REGRESSION (r212693): getClientRects(), getBoundingClientRect() for range that spans multi-lines differs depending on whether text is selected
https://bugs.webkit.org/show_bug.cgi?id=205527
<rdar://problem/58128278>

Reviewed by Zalan Bujtas.

Source/WebCore:

Include empty rect when range start position coincides with the end of a simple line layout run.
This makes it match the behavior of line box layout, Firefox's behavior, as well as my understanding
of Extensions to the Range Interface: <https://drafts.csswg.org/cssom-view/#extensions-to-the-range-interface>
(Editor's Draft, 10 October 2019).

At the time of writing, there are two code paths for laying out lines: simple line layout and
line box layout. Simple line layout is not enabled when there is a selection at the time of
writing. As a result, we use line box layout to answer getClientRects(), getBoundingClientRect()
queries.

Test: fast/dom/Range/mac/getClientRects-and-getBoundingClientRect-before-and-after-selection.html

  • rendering/SimpleLineLayoutResolver.cpp:

(WebCore::SimpleLineLayout::RunResolver::rangeForRendererWithOffsets const): Do not skip over a run
if its end position coincides with the range's start offset. This ensures that we emit an empty rect
for this part of the box selection, which matches what we do using the analagous line box layout
code path.

LayoutTests:

For now, add a Mac-specific test. This test is specific to Mac because it depends on text metrics for the
Times font. I specifically did not use Ahem so that this test could also be used as the test for
<https://bugs.webkit.org/show_bug.cgi?id=205563>. Currently the test includes expected failure results
since that bug is not fixed.

  • TestExpectations: Skip
  • fast/dom/Range/mac/getClientRects-and-getBoundingClientRect-before-and-after-selection-expected.txt: Added.
  • fast/dom/Range/mac/getClientRects-and-getBoundingClientRect-before-and-after-selection.html: Added.
  • platform/mac/TestExpectations: Unskip the test on Mac.
3:27 PM Changeset in webkit [253892] by ap@apple.com
  • 2 edits in trunk/LayoutTests

Remove TestExpectations for scrollingcoordinator/ios/fixed-scrolling-with-keyboard.html
https://bugs.webkit.org/show_bug.cgi?id=202283

This test has been passing lately.

  • platform/ios/TestExpectations:
3:22 PM Changeset in webkit [253891] by ap@apple.com
  • 2 edits in trunk/LayoutTests

Add TestExpectations for http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable.html
https://bugs.webkit.org/show_bug.cgi?id=197673

2:40 PM Changeset in webkit [253890] by Kocsen Chung
  • 1 copy in tags/Safari-609.1.13.2

Tag Safari-609.1.13.2.

12:21 PM Changeset in webkit [253889] by ap@apple.com
  • 2 edits in trunk/Source/WebKit

watchOS build fix attempt

Not sure what broke the build, seems like UserInterfaceIdiom.h used to be included
via unified build, and no longer is. Added the include.

While at it, removed an ancient IPHONE_OS_VERSION_MIN_REQUIRED version check.

  • UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
12:14 PM Changeset in webkit [253888] by commit-queue@webkit.org
  • 3 edits in trunk/Source/ThirdParty/libwebrtc

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

Broke production builds (Requested by ap on #webkit).

Reverted changeset:

"Do not build yasm for iOS and iOS simulator"
https://bugs.webkit.org/show_bug.cgi?id=205556
https://trac.webkit.org/changeset/253884

12:01 PM Changeset in webkit [253887] by Kocsen Chung
  • 8 edits in branches/safari-609.1.13-branch/Source

Versioning.

10:49 AM Changeset in webkit [253886] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

Unreviewed, fix the macCatalyst build after r253866

  • WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:

(WebKit::RemoteMediaPlayerManager::createRemoteMediaPlayer):

MediaPlayer::mediaKeysStorageDirectory() is guarded by ENABLE(LEGACY_ENCRYPTED_MEDIA).

9:50 AM Changeset in webkit [253885] by Alan Coon
  • 1 copy in tags/Safari-609.1.13.1

Tag Safari-609.1.13.1.

8:07 AM Changeset in webkit [253884] by youenn@apple.com
  • 3 edits in trunk/Source/ThirdParty/libwebrtc

Do not build yasm for iOS and iOS simulator
https://bugs.webkit.org/show_bug.cgi?id=205556
<rdar://problem/58159497>

Reviewed by Eric Carlson.

Now that we no longer need yasm for iOS simulator, we can stop building it for iOS and iOS simulator.
We can also remove the hack to run yasm.

  • Configurations/yasm.xcconfig:
  • libwebrtc.xcodeproj/project.pbxproj:
2:42 AM Changeset in webkit [253883] by Carlos Garcia Campos
  • 16 edits in trunk/Source

WebDriver: fix handling of session timeouts for values higher than MAX_INT
https://bugs.webkit.org/show_bug.cgi?id=204114

Reviewed by Brian Burg.

Source/JavaScriptCore:

Fix generation of code with optional number in stack variable.

  • inspector/scripts/codegen/cpp_generator.py:

(CppGenerator.cpp_type_for_stack_in_parameter): Do not use Optional for numbers either.

  • inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result:

Source/WebDriver:

Use double instead of Seconds for handling timeouts.

  • Capabilities.h:
  • Session.cpp:

(WebDriver::Session::getTimeouts): Handle the case of script timeout being null.
(WebDriver::Session::go):
(WebDriver::Session::back):
(WebDriver::Session::forward):
(WebDriver::Session::refresh):
(WebDriver::Session::findElements):
(WebDriver::Session::waitForNavigationToComplete):
(WebDriver::Session::executeScript): Do not pass a timeout when it's null.

  • Session.h:

(WebDriver::Session::scriptTimeout const):
(WebDriver::Session::pageLoadTimeout const):
(WebDriver::Session::implicitWaitTimeout const):

  • WebDriverService.cpp:

(WebDriver::deserializeTimeouts): Add IgnoreUnknownTimeout, since we should only fail when processing
capabilities, but not when setting new timeouts. Also handle the case of script timeout being null.
(WebDriver::WebDriverService::parseCapabilities const): Pass IgnoreUnknownTimeout::No to deserializeTimeouts.
(WebDriver::WebDriverService::validatedCapabilities const): Ditto.
(WebDriver::WebDriverService::createSession): Handle the case of script timeout being null.
(WebDriver::WebDriverService::setTimeouts): Pass IgnoreUnknownTimeout::Yes to deserializeTimeouts.

Source/WebKit:

Use number instead of integer for all optional timeout parameters. In the case of script timeout, not passing a
value means a timeout should not be used, so use Optional<double> also for the IPC message and handle the
optional value in the web process to not set any timeout in that case.

  • UIProcess/Automation/Automation.json:
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::waitForNavigationToComplete):
(WebKit::WebAutomationSession::navigateBrowsingContext):
(WebKit::WebAutomationSession::goBackInBrowsingContext):
(WebKit::WebAutomationSession::goForwardInBrowsingContext):
(WebKit::WebAutomationSession::reloadBrowsingContext):
(WebKit::WebAutomationSession::evaluateJavaScriptFunction):

  • UIProcess/Automation/WebAutomationSession.h:
  • WebProcess/Automation/WebAutomationSessionProxy.cpp:

(WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction):

  • WebProcess/Automation/WebAutomationSessionProxy.h:
  • WebProcess/Automation/WebAutomationSessionProxy.js:

(let.AutomationSessionProxy.prototype.evaluateJavaScriptFunction):

  • WebProcess/Automation/WebAutomationSessionProxy.messages.in:
2:06 AM Changeset in webkit [253882] by Carlos Garcia Campos
  • 4 edits in trunk

[GTK] InputMethod API unit tests don't work under X11
https://bugs.webkit.org/show_bug.cgi?id=205497

Reviewed by Žan Doberšek.

Source/WebKit:

Assume the web view is always focused when running tests under Xvfb, since there isn't a window manager to focus
the toplevel window in that case.

  • UIProcess/API/glib/InputMethodFilter.cpp:

(WebKit::InputMethodFilter::isViewFocused const):

Tools:

Use a toplevel window instead of a popup for the input method tests, since that's required in X11 to get the web
view focused.

  • TestWebKitAPI/Tests/WebKitGLib/TestInputMethodContext.cpp:

(testWebKitInputMethodContextSimple):
(testWebKitInputMethodContextSequence):
(testWebKitInputMethodContextInvalidSequence):
(testWebKitInputMethodContextCancelSequence):
(testWebKitInputMethodContextReset):

1:19 AM Changeset in webkit [253881] by Carlos Garcia Campos
  • 35 edits in trunk

[GTK][WPE] Special combination characters doesn't respect the keystroke order when high CPU load
https://bugs.webkit.org/show_bug.cgi?id=185248

Reviewed by Žan Doberšek.

Source/WebCore:

Notify the editor when a key event handled by input method has been dispatched. This way we can handle the
composition results right after the event is dispatched.

  • editing/Editor.cpp:

(WebCore::Editor::didDispatchInputMethodKeydown): Notify the client.

  • editing/Editor.h:
  • page/EditorClient.h:

(WebCore::EditorClient::didDispatchInputMethodKeydown): Added.

  • page/EventHandler.cpp:

(WebCore::EventHandler::internalKeyEvent): Call Editor::didDispatchInputMethodKeydown() for events handled by
input method right after the event is dispatched.

  • platform/PlatformKeyboardEvent.h:

(WebCore::PlatformKeyboardEvent::preeditUnderlines const):
(WebCore::PlatformKeyboardEvent::preeditSelectionRangeStart const):
(WebCore::PlatformKeyboardEvent::preeditSelectionRangeLength const):

  • platform/gtk/PlatformKeyboardEventGtk.cpp:

(WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent): Return early if the event was handled by input
method and remove the special case for Char events handled by input method because this is never called with
Char type for events handled by input method.

  • platform/libwpe/PlatformKeyboardEventLibWPE.cpp:

(WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent): Return early if the event was handled by input
method.

Source/WebKit:

Key events are queued by the WebPageProxy so that the next event is not sent to the web process until the
previous one has been handled by the web process already. However, the composition results generated by key
events are sent to the web process using IPC messages when they happen. In case of high CPU load it can happen
that the composition results are sent to the web process even before the associated keys, that are still in the
queue waiting to be sent. We need to ensure that composition results are always processed right after its
associated key press event. So, instead of sending the results independently, we now include them as part of the
key event.

  • Shared/NativeWebKeyboardEvent.h: Add optional preeditUnderlines and preeditSelectionRange parameters to constructor.
  • Shared/WebEvent.h:

(WebKit::WebKeyboardEvent::preeditUnderlines const): Return the optional preeditUnderlines.
(WebKit::WebKeyboardEvent::preeditSelectionRange const): Return the optional preeditSelectionRange.

  • Shared/WebEventConversion.cpp:

(WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent): Copy preeditUnderlines and
preeditSelectionRange too.

  • Shared/WebKeyboardEvent.cpp:

(WebKit::WebKeyboardEvent::WebKeyboardEvent): Add optional preeditUnderlines and preeditSelectionRange
parameters and initialize them.
(WebKit::WebKeyboardEvent::encode const): Encode preeditUnderlines and preeditSelectionRange.
(WebKit::WebKeyboardEvent::decode): Decode preeditUnderlines and preeditSelectionRange.

  • Shared/gtk/NativeWebKeyboardEventGtk.cpp:

(WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent): Add optional preeditUnderlines and
preeditSelectionRange parameters and initialize them.

  • Shared/gtk/WebEventFactory.cpp:

(WebKit::WebEventFactory::createWebKeyboardEvent): Add optional preeditUnderlines and preeditSelectionRange
parameters and pass them to WebKeyboardEvent constructor.

  • Shared/gtk/WebEventFactory.h:
  • Shared/libwpe/NativeWebKeyboardEventLibWPE.cpp:

(WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent): Add optional preeditUnderlines and
preeditSelectionRange parameters and initialize them.

  • Shared/libwpe/WebEventFactory.cpp:

(WebKit::WebEventFactory::createWebKeyboardEvent): Add optional preeditUnderlines and preeditSelectionRang
parameters and pass them to WebKeyboardEvent constructor.

  • Shared/libwpe/WebEventFactory.h: Add optional preeditUnderlines and preeditSelectionRange parameters to constructor.
  • UIProcess/API/glib/WebKitWebView.cpp:

(webkitWebViewSynthesizeCompositionKeyPress): Pass the preeditUnderlines and preeditSelectionRange to platform
implementation.
(webkitWebViewSetComposition): Remove the call to WebPageProxy::setComposition().
(webkitWebViewConfirmComposition): Remove the call to WebPageProxy::confirmComposition().
(webkitWebViewCancelComposition): Call WebPageProxy::cancelComposition();

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseKeyPressEvent): Pass the preeditUnderlines and preeditSelectionRange to NativeWebKeyboardEvent constructor.
(webkitWebViewBaseKeyReleaseEvent): Ditto.
(webkitWebViewBaseSynthesizeCompositionKeyPress): Ditto.

  • UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
  • UIProcess/API/wpe/WPEView.cpp:

(WKWPE::View::handleKeyboardEvent): Ditto.
(WKWPE::View::synthesizeCompositionKeyPress): Ditto.

  • UIProcess/API/wpe/WPEView.h:
  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebPageProxy.h:
  • WebProcess/WebCoreSupport/WebEditorClient.h:
  • WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:

(WebKit::WebEditorClient::didDispatchInputMethodKeydown): Handle the composition results here, right after the
associated key events has been dispatched.

  • WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp:

(WebKit::WebEditorClient::didDispatchInputMethodKeydown): Ditto.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::cancelComposition): Confirm the given string to cancel the composition.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in: Remove SetComposition message and rename ConfirmComposition as

CancelComposition since it's now only used for canceling.

Tools:

Remove the waits() that were added to work around this bug.

  • TestWebKitAPI/Tests/WebKitGLib/TestInputMethodContext.cpp:

(testWebKitInputMethodContextSequence):
(testWebKitInputMethodContextInvalidSequence):
(testWebKitInputMethodContextCancelSequence):
(testWebKitInputMethodContextReset):

Note: See TracTimeline for information about the timeline view.