⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Timeline



Jan 12, 2019:

9:54 PM Changeset in webkit [239904] by timothy@apple.com
  • 27 edits
    7 adds in trunk

Have prefers-color-scheme: light always match on macOS versions before Mojave.
https://bugs.webkit.org/show_bug.cgi?id=191655
rdar://problem/46074680

Reviewed by Megan Gardner.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig: ENABLE_DARK_MODE_CSS_macosx for all OS versions.

Source/WebCore:

Tests: css-dark-mode/older-systems/prefers-color-scheme.html

css-dark-mode/older-systems/supported-color-schemes-css.html
css-dark-mode/older-systems/supported-color-schemes.html

Use new HAVE(OS_DARK_MODE_SUPPORT) to make it easier to find code.
Added HAVE(OS_DARK_MODE_SUPPORT) around more bits to make it work on older systems.

  • Configurations/FeatureDefines.xcconfig:
  • dom/Document.cpp:

(WebCore::Document::useDarkAppearance const):

  • inspector/agents/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::enable):

  • page/Page.cpp:

(WebCore::Page::setUseDarkAppearance):
(WebCore::Page::useDarkAppearance const):
(WebCore::Page::setUseDarkAppearanceOverride):

  • platform/mac/LocalDefaultSystemAppearance.h:

(WebCore::LocalDefaultSystemAppearance::usingDarkAppearance const):

  • platform/mac/LocalDefaultSystemAppearance.mm:

(WebCore::LocalDefaultSystemAppearance::LocalDefaultSystemAppearance):
(WebCore::LocalDefaultSystemAppearance::~LocalDefaultSystemAppearance):

  • platform/mac/ScrollAnimatorMac.mm:
  • rendering/RenderThemeMac.mm:

(-[WebCoreTextFieldCell _adjustedCoreUIDrawOptionsForDrawingBordersOnly:]):
(-[WebListButtonCell drawWithFrame:inView:]):
(WebCore::RenderThemeMac::platformInactiveSelectionBackgroundColor const):
(WebCore::RenderThemeMac::platformInactiveSelectionForegroundColor const):
(WebCore::RenderThemeMac::platformActiveListBoxSelectionBackgroundColor const):
(WebCore::RenderThemeMac::platformInactiveListBoxSelectionBackgroundColor const):
(WebCore::RenderThemeMac::platformInactiveListBoxSelectionForegroundColor const):
(WebCore::RenderThemeMac::systemColor const):

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig: ENABLE_DARK_MODE_CSS_macosx for all OS versions.

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig: ENABLE_DARK_MODE_CSS_macosx for all OS versions.
  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::effectiveAppearanceIsDark):

  • UIProcess/RemoteLayerTree/mac/ScrollerMac.mm:

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig: ENABLE_DARK_MODE_CSS_macosx for all OS versions.
  • WebView/WebView.mm:

(-[WebView _effectiveAppearanceIsDark]):

Source/WTF:

  • wtf/Platform.h: Define HAVE_OS_DARK_MODE_SUPPORT on macOS 10.14.

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig: ENABLE_DARK_MODE_CSS_macosx for all OS versions.
  • TestWebKitAPI/Tests/WebKit/mac/ForceLightAppearanceInBundle.mm:

LayoutTests:

  • css-dark-mode/older-systems/prefers-color-scheme-expected.txt: Added.
  • css-dark-mode/older-systems/prefers-color-scheme.html: Added.
  • css-dark-mode/older-systems/supported-color-schemes-css-expected.txt: Added.
  • css-dark-mode/older-systems/supported-color-schemes-css.html: Added.
  • css-dark-mode/older-systems/supported-color-schemes-expected.txt: Added.
  • css-dark-mode/older-systems/supported-color-schemes.html: Added.
  • platform/mac/TestExpectations:
3:52 PM WebKitGTK/2.22.x edited by Adrian Perez de Castro
(diff)
1:28 PM Changeset in webkit [239903] by Alan Bujtas
  • 8 edits in trunk/Source/WebCore

[LFC] Block/InlinFormattingContext should take Block/InlineFormattingState
https://bugs.webkit.org/show_bug.cgi?id=193383

Reviewed by Antti Koivisto.

This is just a downcast really.

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::FormattingContext):
(WebCore::Layout::FormattingContext::formattingState const): Deleted.

  • layout/FormattingContext.h:
  • layout/LayoutState.cpp:

(WebCore::Layout::LayoutState::createFormattingContext):

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::BlockFormattingContext):

  • layout/blockformatting/BlockFormattingContext.h:

(WebCore::Layout::BlockFormattingContext::formattingState const):
(WebCore::Layout::BlockFormattingContext::blockFormattingState const): Deleted.

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::InlineFormattingContext):
(WebCore::Layout::InlineFormattingContext::splitInlineRunIfNeeded const):
(WebCore::Layout::InlineFormattingContext::createFinalRuns const):
(WebCore::Layout::InlineFormattingContext::postProcessInlineRuns const):
(WebCore::Layout::InlineFormattingContext::layoutInlineContent const):
(WebCore::Layout::InlineFormattingContext::placeInFlowPositionedChildren const):
(WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
(WebCore::Layout::InlineFormattingContext::instrinsicWidthConstraints const):

  • layout/inlineformatting/InlineFormattingContext.h:

(WebCore::Layout::InlineFormattingContext::formattingState const):
(WebCore::Layout::InlineFormattingContext::inlineFormattingState const): Deleted.

  • page/FrameViewLayoutContext.cpp:

(WebCore::layoutUsingFormattingContext):

12:56 PM Changeset in webkit [239902] by mmaxfield@apple.com
  • 11 edits
    7 copies
    7 adds in trunk/Source/WebCore

[WHLSL] Add native function synthesis passes
https://bugs.webkit.org/show_bug.cgi?id=193360

Reviewed by Dean Jackson.

This patch includes all the passes in prepare() that are between the name resolver and the
type checker. It involves a few small pieces:

  • CheckDuplicateFunctions which makes sure the same function isn't defined twice
  • Intrinsics, which remembers all of the native types so they can be referred to by the rest of the compiler
  • RecursiveTypeChecker which makes sure types don't refer to themselves
  • SynthesizeArrayOperatorLength which creates operator.length() functions for arrays
  • SynthesizeConstructors which creates copy constructors and default constructors for all types
  • SynthesizeEnumerationFunctions which provides cast operators between enum types and their base types
  • SynthesizeStructureAccessors which provides getters, setters, and anders for each member of a struct

No new tests because it isn't hooked up yet. Not enough of the compiler exists to have any meaningful sort
of test. When enough of the compiler is present, I'll port the reference implementation's test suite.

  • Modules/webgpu/WHLSL/AST/WHLSLBuiltInSemantic.cpp:

(WebCore::WHLSL::AST::BuiltInSemantic::isAcceptableType const):

  • Modules/webgpu/WHLSL/AST/WHLSLResourceSemantic.cpp:

(WebCore::WHLSL::AST::ResourceSemantic::isAcceptableType const):

  • Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.cpp: Added.

(WebCore::WHLSL::checkDuplicateFunctions):

  • Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLResourceSemantic.cpp.
  • Modules/webgpu/WHLSL/WHLSLIntrinsics.cpp: Added.

(WebCore::WHLSL::Intrinsics::Intrinsics):
(WebCore::WHLSL::Intrinsics::add):
(WebCore::WHLSL::Intrinsics::addPrimitive):
(WebCore::WHLSL::Intrinsics::addVector):
(WebCore::WHLSL::Intrinsics::addMatrix):
(WebCore::WHLSL::Intrinsics::addFullTexture):
(WebCore::WHLSL::Intrinsics::addDepthTexture):
(WebCore::WHLSL::Intrinsics::addTexture):

  • Modules/webgpu/WHLSL/WHLSLIntrinsics.h: Added.

(WebCore::WHLSL::Intrinsics::voidType const):
(WebCore::WHLSL::Intrinsics::boolType const):
(WebCore::WHLSL::Intrinsics::intType const):
(WebCore::WHLSL::Intrinsics::uintType const):
(WebCore::WHLSL::Intrinsics::samplerType const):
(WebCore::WHLSL::Intrinsics::floatType const):
(WebCore::WHLSL::Intrinsics::float3Type const):
(WebCore::WHLSL::Intrinsics::float4Type const):

  • Modules/webgpu/WHLSL/WHLSLProgram.h:

(WebCore::WHLSL::Program::append):
(WebCore::WHLSL::Program::intrinsics):

  • Modules/webgpu/WHLSL/WHLSLRecursiveTypeChecker.cpp: Added.

(WebCore::WHLSL::checkRecursiveTypes):

  • Modules/webgpu/WHLSL/WHLSLRecursiveTypeChecker.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLResourceSemantic.cpp.
  • Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp: Added.

(WebCore::WHLSL::FindArrayTypes::takeArrayTypes):
(WebCore::WHLSL::synthesizeArrayOperatorLength):

  • Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLResourceSemantic.cpp.
  • Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp: Added.

(WebCore::WHLSL::FindAllTypes::takeUnnamedTypes):
(WebCore::WHLSL::FindAllTypes::takeNamedTypes):
(WebCore::WHLSL::synthesizeConstructors):

  • Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLResourceSemantic.cpp.
  • Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp: Added.

(WebCore::WHLSL::synthesizeEnumerationFunctions):

  • Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLResourceSemantic.cpp.
  • Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.cpp: Added.

(WebCore::WHLSL::synthesizeStructureAccessors):

  • Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLResourceSemantic.cpp.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
12:36 PM Changeset in webkit [239901] by mitz@apple.com
  • 39 edits in trunk

[Cocoa] Avoid importing directly from subumbrella frameworks
https://bugs.webkit.org/show_bug.cgi?id=186016
<rdar://problem/40591038>

Reviewed by Sam Weinig.

Source/WebCore:

  • Configurations/WebCore.xcconfig: Removed -iframework options from OTHER_CFLAGS and OTHER_CPLUSPLUSFLAGS.
  • editing/mac/DictionaryLookupLegacy.mm: Import Quartz.h instead of a PDFKit header.
  • platform/mac/PlatformEventFactoryMac.mm: Import Carbon.h instead of HIToolbox headers.
  • platform/text/mac/TextEncodingRegistryMac.mm: Import Carbon.h instead of CarbonCore.h.

Source/WebCore/PAL:

  • Configurations/PAL.xcconfig: Removed -iframework options from OTHER_CFLAGS and OTHER_CPLUSPLUSFLAGS.
  • pal/spi/cg/CoreGraphicsSPI.h: Import ApplicationServices.h instead of ColorSync.h when using SDKs earlier than 10.13.
  • pal/spi/mac/HIToolboxSPI.h: Import CarbonPriv.h instead of HIToolboxPriv.h.
  • pal/spi/mac/QuickLookMacSPI.h: Import Quartz.h instead of a QuickLookUI header.

Source/WebKit:

  • Configurations/BaseTarget.xcconfig: Removed -iframework options from OTHER_CFLAGS and OTHER_CPLUSPLUSFLAGS.
  • UIProcess/Automation/mac/WebAutomationSessionMac.mm: Import Carbon.h instead of an HIToolbox header.
  • UIProcess/Cocoa/WebViewImpl.mm: Ditto.
  • UIProcess/mac/WKPrintingView.mm: Import Quartz.h instead of a PDFKit header.
  • UIProcess/mac/WKTextInputWindowController.mm: Import Carbon.h instead of an HIToolbox header.
  • WebProcess/Plugins/PDF/PDFAnnotationTextWidgetDetails.h: Import Quartz.h instead of a PDFKit header.
  • WebProcess/Plugins/PDF/PDFLayerControllerSPI.h: Ditto.
  • WebProcess/Plugins/PDF/PDFPlugin.mm: Ditto.
  • WebProcess/Plugins/PDF/PDFPluginAnnotation.mm: Ditto.
  • WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm: Ditto.
  • WebProcess/Plugins/PDF/PDFPluginPasswordField.mm: Ditto.
  • WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm: Ditto.
  • WebProcess/WebPage/mac/WebPageMac.mm: Ditto.

Source/WebKitLegacy/mac:

  • Carbon/CarbonWindowAdapter.h: Import Carbon.h instead of HIToolbox headers.
  • Carbon/CarbonWindowAdapter.mm: Ditto.
  • Carbon/CarbonWindowFrame.m: Ditto.
  • Carbon/HIViewAdapter.h: Ditto.
  • Configurations/WebKitLegacy.xcconfig: Removed -iframework options from OTHER_CFLAGS_COCOA_TOUCH_NO.
  • Plugins/WebNetscapePluginEventHandlerCarbon.mm: Import Carbon.h instead of CarbonEvents.h.
  • WebView/WebPDFDocumentExtras.mm: Import Quartz.h instead of a PDFKit header.
  • WebView/WebPDFView.h: Ditto.

Tools:

  • DumpRenderTree/cg/PixelDumpSupportCG.cpp: Include CoreServices.h instead of a LaunchServices header.
  • DumpRenderTree/mac/Configurations/BaseTarget.xcconfig: Removed -iframework options from OTHER_CFLAGS and OTHER_CPLUSPLUSFLAGS.
  • DumpRenderTree/mac/LayoutTestHelper.m: Import ApplicationServices.h instead of ColorSync.h when using SDKs earlier than 10.13.
  • TestWebKitAPI/Configurations/Base.xcconfig: Removed -iframework options from OTHER_CFLAGS and OTHER_CPLUSPLUSFLAGS.
  • WebKitTestRunner/Configurations/BaseTarget.xcconfig: Removed -iframework options from OTHER_CFLAGS and OTHER_CPLUSPLUSFLAGS.
  • WebKitTestRunner/cg/TestInvocationCG.cpp: Include CoreServices.h instead of a LaunchServices header.
8:56 AM Changeset in webkit [239900] by Alan Bujtas
  • 12 edits in trunk/Source/WebCore

[LFC] Move formatting context creation from FormattingState to LayoutState
https://bugs.webkit.org/show_bug.cgi?id=193381

Reviewed by Antti Koivisto.

layoutState().createFormattingStateForFormattingRootIfNeeded(root).createFormattingContext(root) is not only mouthful
but also feels unintuitive. Use layoutState().createFormattingContext(root) instead.

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::FormattingContext):
(WebCore::Layout::FormattingContext::~FormattingContext):
(WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):

  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):

  • layout/FormattingState.h:
  • layout/LayoutState.cpp:

(WebCore::Layout::LayoutState::layoutFormattingContextSubtree):
(WebCore::Layout::LayoutState::createFormattingContext):

  • layout/LayoutState.h:

(WebCore::Layout::LayoutState::deregisterFormattingContext):
(WebCore::Layout::LayoutState::registerFormattingContext):

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const):
(WebCore::Layout::BlockFormattingContext::instrinsicWidthConstraints const):

  • layout/blockformatting/BlockFormattingState.cpp:

(WebCore::Layout::BlockFormattingState::createFormattingContext): Deleted.

  • layout/blockformatting/BlockFormattingState.h:
  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const):

  • layout/inlineformatting/InlineFormattingState.cpp:

(WebCore::Layout::InlineFormattingState::createFormattingContext): Deleted.

  • layout/inlineformatting/InlineFormattingState.h:
7:30 AM Changeset in webkit [239899] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[LFC][BFC][MarginCollapsing] Move estimatedMarginBefore flag from state/display box to BlockFormattingContext
https://bugs.webkit.org/show_bug.cgi?id=193375

Reviewed by Antti Koivisto.

The estimated marginBefore is a pre-computed, temporary value. We need to keep it around until the final vertical margin value is computed.
Neither BlockFormattingState nor Display should hold temporary values.

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::computeEstimatedMarginBefore const):
(WebCore::Layout::BlockFormattingContext::computeEstimatedMarginBeforeForAncestors const):
(WebCore::Layout::BlockFormattingContext::hasPrecomputedMarginBefore const):
(WebCore::Layout::BlockFormattingContext::computeFloatingPosition const):
(WebCore::Layout::BlockFormattingContext::computePositionToAvoidFloats const):
(WebCore::Layout::BlockFormattingContext::computeVerticalPositionForFloatClear const):
(WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):
(WebCore::Layout::BlockFormattingContext::setEstimatedMarginBefore const):
(WebCore::Layout::BlockFormattingContext::hasEstimatedMarginBefore const):
(WebCore::Layout::hasPrecomputedMarginBefore): Deleted.

  • layout/blockformatting/BlockFormattingContext.h:

(WebCore::Layout::BlockFormattingContext::removeEstimatedMarginBefore const):
(WebCore::Layout::BlockFormattingContext::estimatedMarginBefore const):

  • layout/blockformatting/BlockFormattingState.h:

(WebCore::Layout::BlockFormattingState::setHasEstimatedMarginBefore): Deleted.
(WebCore::Layout::BlockFormattingState::clearHasEstimatedMarginBefore): Deleted.
(WebCore::Layout::BlockFormattingState::hasEstimatedMarginBefore const): Deleted.

  • layout/displaytree/DisplayBox.cpp:

(WebCore::Display::Box::Box):

  • layout/displaytree/DisplayBox.h:

(WebCore::Display::Box::setHasEstimatedMarginBefore):
(WebCore::Display::Box::invalidateEstimatedMarginBefore):
(WebCore::Display::Box::top const):
(WebCore::Display::Box::topLeft const):
(WebCore::Display::Box::setEstimatedMarginBefore): Deleted.
(WebCore::Display::Box::estimatedMarginBefore const): Deleted.

  • page/FrameViewLayoutContext.cpp:

(WebCore::layoutUsingFormattingContext):

1:49 AM Changeset in webkit [239898] by yusukesuzuki@slowstart.org
  • 4 edits in trunk/Source/JavaScriptCore

Unreviewed, fix scope check assertions
https://bugs.webkit.org/show_bug.cgi?id=193308

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::notifyLexicalBindingShadowing):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::notifyLexicalBindingShadowing):

  • runtime/ProgramExecutable.cpp:

(JSC::ProgramExecutable::initializeGlobalProperties):

Jan 11, 2019:

11:42 PM Changeset in webkit [239897] by rniwa@webkit.org
  • 4 edits in trunk/Source

Enable visual viewport API by default
https://bugs.webkit.org/show_bug.cgi?id=193376

Reviewed by Simon Fraser.

Source/WebKit:

Enable this feature by default since the remaining issue on iOS is mostly about test failures,
not an issue with the core functionality of the API.

  • Shared/WebPreferences.yaml:

Source/WebKitLegacy/mac:

  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):

10:26 PM Changeset in webkit [239896] by mmaxfield@apple.com
  • 12 edits
    5 copies
    4 adds in trunk/Source/WebCore

[WHLSL] Implement the NameResolver
https://bugs.webkit.org/show_bug.cgi?id=193007

Reviewed by Dean Jackson.

This is the base implementation for WHLSL's name resolver. The name resolver matches three kinds of things:

  1. It matches VariableRefs to VariableDecls
  2. It matches TypeRefs to NamedTypes
  3. It matches CallExpressions to FunctionDeclarations

No new tests because it isn't hooked up yet. Not enough of the compiler exists to have any meaningful sort
of test. When enough of the compiler is present, I'll port the reference implementation's test suite.

  • Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.cpp: Now that InferTypes.h exists, we can implement these

functions.
(WebCore::WHLSL::AST::FloatLiteralType::canResolve const):
(WebCore::WHLSL::AST::FloatLiteralType::conversionCost const):

  • Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.h: Remove unnecessary function.

(WebCore::WHLSL::AST::FloatLiteralType::value const): Deleted.

  • Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.cpp: Now that InferTypes.h exists, we can implement these

functions.
(WebCore::WHLSL::AST::IntegerLiteralType::canResolve const):
(WebCore::WHLSL::AST::IntegerLiteralType::conversionCost const):

  • Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.h: Remove unnecessary function.

(WebCore::WHLSL::AST::IntegerLiteralType::value const): Deleted.

  • Modules/webgpu/WHLSL/AST/WHLSLSpecializationConstantSemantic.cpp: Modifying Sources.txt caused the sources

to get shuffled around, so the #includes need to be fixed.

  • Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.cpp: Now that InferTypes.h exists, we can implement

these functions.
(WebCore::WHLSL::AST::UnsignedIntegerLiteralType::canResolve const):
(WebCore::WHLSL::AST::UnsignedIntegerLiteralType::conversionCost const):

  • Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.h: Remove unnecessary function.

(WebCore::WHLSL::AST::UnsignedIntegerLiteralType::value const): Deleted.

  • Modules/webgpu/WHLSL/WHLSLInferTypes.cpp: Added. This is the replacement for UnificationContext in the

reference compiler. It's much simpler (and we should remove UnificationContext in the reference compiler in
favor of this design). It has three sets of functions: Tell if two types are the same, tell if two types are
the same and commit the resolvable type, and run the above functions on type references or function arguments.
(WebCore::WHLSL::matches):
(WebCore::WHLSL::matchAndCommit):
(WebCore::WHLSL::commit):
(WebCore::WHLSL::inferTypesForTypeArguments):
(WebCore::WHLSL::inferTypesForCall):

  • Modules/webgpu/WHLSL/WHLSLInferTypes.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.cpp.
  • Modules/webgpu/WHLSL/WHLSLNameContext.cpp: Added. This is the data structure that remembers NamedTypes,

FunctionDeclarations, and VariableDeclarations so NameResolver can work.
(WebCore::WHLSL::NameContext::NameContext):
(WebCore::WHLSL::NameContext::add):
(WebCore::WHLSL::NameContext::getTypes):
(WebCore::WHLSL::NameContext::getFunctions):
(WebCore::WHLSL::NameContext::getVariable):
(WebCore::WHLSL::NameContext::exists):

  • Modules/webgpu/WHLSL/WHLSLNameContext.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.h.
  • Modules/webgpu/WHLSL/WHLSLNameResolver.cpp: Added. Use the NameContext to match up the three types of names.

(WebCore::WHLSL::NameResolver::NameResolver):
(WebCore::WHLSL::NameResolver::visit):
(WebCore::WHLSL::resolveNamesInTypes):
(WebCore::WHLSL::resolveNamesInFunctions):

  • Modules/webgpu/WHLSL/WHLSLNameResolver.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.h.

(WebCore::WHLSL::NameResolver::setCurrentFunctionDefinition):

  • Modules/webgpu/WHLSL/WHLSLProgram.h:

(WebCore::WHLSL::Program::append): The parser needs to add all global declarations to the name context so the
name resolver is ready to go as soon as parsing is finished.
(WebCore::WHLSL::Program::nameContext):

  • Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.cpp: Added. Pick the appropriate FunctionDeclaration or

NamedType for a particular CallExpression or TypeReference.
(WebCore::WHLSL::conversionCost):
(WebCore::WHLSL::resolveFunctionOverloadImpl):
(WebCore::WHLSL::resolveTypeOverloadImpl):

  • Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.cpp.
  • Modules/webgpu/WHLSL/WHLSLResolvingType.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.cpp. This describes the two states that a type in the type resolver can be in: either an owned

UnnamedType, or a reference to a ResolvableType. This is because every expression needs to have a type
associated with it, but those types might be the type of a literal (aka a ResolvableType). Multiple
expressions might need to reference the same ResolvableType so when it gets resolved, all the expressions
get the result.
(WebCore::WHLSL::ResolvableTypeReference::ResolvableTypeReference):
(WebCore::WHLSL::ResolvableTypeReference::resolvableType):

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
7:40 PM Changeset in webkit [239895] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

Allow WebContent process access to some drawing-related IOKit properties
https://bugs.webkit.org/show_bug.cgi?id=193086
<rdar://problem/46568088>

Reviewed by Eric Carlson.

Add one missing IOKit property, and revise the regexp used for another.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
7:07 PM Changeset in webkit [239894] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WTF

Follow-up: WorkQueue::concurrentApply() passes a raw pointer to a temporary String to Thread::create().
https://bugs.webkit.org/show_bug.cgi?id=191350

  • wtf/WorkQueue.cpp:

(WTF::WorkQueue::concurrentApply): Fix whitespace.

6:46 PM Changeset in webkit [239893] by mmaxfield@apple.com
  • 3 edits
    2 adds in trunk/Source/WebCore

[WHLSL] Add a Visitor class
https://bugs.webkit.org/show_bug.cgi?id=192826

Reviewed by Dean Jackson.

This patch exposes a bunch of the private members of WHLSL's AST nodes so that Visitor can recurse on constituent nodes.
It also writes the recursion in Visitor.h. This is a virtual base class that gets subclassed for compiler passes.

I've split this part into its own patch to aid reviewing of the compiler.

  • Modules/webgpu/WHLSL/AST/WHLSLStageInOutSemantic.cpp:
  • Modules/webgpu/WHLSL/WHLSLVisitor.cpp: Added.

(WebCore::WHLSL::Visitor::visit):
(WebCore::WHLSL::Visitor::checkErrorAndVisit):

  • Modules/webgpu/WHLSL/WHLSLVisitor.h: Added.

(WebCore::WHLSL::Visitor::setError):
(WebCore::WHLSL::Visitor::error const):

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
5:50 PM Changeset in webkit [239892] by Alan Coon
  • 10 edits
    1 add in tags/Safari-607.1.20.1/Source

Cherry-pick r239792. rdar://problem/46627875

Expand use of sourceApplicationAuditData
https://bugs.webkit.org/show_bug.cgi?id=192995
<rdar://problem/46627875>

Reviewed by Brady Eidson.

Source/WebKit:

sourceApplicationAuditData has been used for a long time on iOS, but it's needed on more platforms.
I also made it return an Optional instead of a bool and returning by reference. Ahhh. So much nicer.
The NetworkProcess needed an additional entitlement on Mac to continue to load anything, which is desirable.

  • NetworkProcess/cocoa/NetworkProcessCocoa.mm: (WebKit::NetworkProcess::sourceApplicationAuditData const):
  • Platform/IPC/Connection.h:
  • Platform/IPC/mac/ConnectionMac.mm: (IPC::Connection::getAuditToken):
  • WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess):
  • WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::sourceApplicationAuditData const):

Source/WTF:

  • wtf/Platform.h:

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

5:49 PM Changeset in webkit [239891] by Alan Coon
  • 7 edits in tags/Safari-607.1.20.1/Source

Versioning.

5:25 PM Changeset in webkit [239890] by Alan Coon
  • 1 copy in tags/Safari-607.1.20.1

New tag.

5:22 PM Changeset in webkit [239889] by jer.noble@apple.com
  • 3 edits in trunk/Source/WebCore

REGRESSION(r239419): Crash in AudioSourceProviderAVFObjC::~AudioSourceProviderAVFObjC()
https://bugs.webkit.org/show_bug.cgi?id=193342
<rdar://problem/47119836>

Reviewed by Eric Carlson.

Make the TapStorage used by AudioSourceProviderAVFObjC thread-safe RefCounted.

  • platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h:
  • platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:

(WebCore::AudioSourceProviderAVFObjC::initCallback):
(WebCore::AudioSourceProviderAVFObjC::finalizeCallback):

5:13 PM Changeset in webkit [239888] by wilander@apple.com
  • 19 edits in trunk

Compile out Web API Statistics Collection
https://bugs.webkit.org/show_bug.cgi?id=193370
<rdar://problem/45388584>

Reviewed by Brent Fulgham.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Defined ENABLE_WEB_API_STATISTICS, off by default.

Source/WebCore:

No new tests. This patch disables functionality. The associated tests
are skipped.

These functions are now no-ops unless web API statistics is enabled.

  • Configurations/FeatureDefines.xcconfig:
  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::logFontLoad):
(WebCore::ResourceLoadObserver::logCanvasRead):
(WebCore::ResourceLoadObserver::logCanvasWriteOrMeasure):
(WebCore::ResourceLoadObserver::logNavigatorAPIAccessed):
(WebCore::ResourceLoadObserver::logScreenAPIAccessed):

  • loader/ResourceLoadStatistics.cpp:

(WebCore::ResourceLoadStatistics::encode const):
(WebCore::ResourceLoadStatistics::decode):
(WebCore::ResourceLoadStatistics::toString const):
(WebCore::ResourceLoadStatistics::merge):

  • loader/ResourceLoadStatistics.h:

The associated struct members are skipped unless web API
statistics is enabled.

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Defined ENABLE_WEB_API_STATISTICS, off by default.

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:

Defined ENABLE_WEB_API_STATISTICS, off by default.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<ResourceLoadStatistics>::encode):

Skipped encoding of web API statistics.

(IPC::ArgumentCoder<ResourceLoadStatistics>::decode):

Skipped decoding of web API statistics.

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:

Defined ENABLE_WEB_API_STATISTICS, off by default.

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

Defined ENABLE_WEB_API_STATISTICS, off by default.

LayoutTests:

  • platform/ios-wk2/TestExpectations:

http/tests/webAPIStatistics skipped.

  • platform/mac-wk2/TestExpectations:

http/tests/webAPIStatistics skipped.

5:11 PM Changeset in webkit [239887] by sihui_liu@apple.com
  • 8 edits in trunk/Source

IndexedDB: leak WebIDBConnectionToClient for retain cycle
https://bugs.webkit.org/show_bug.cgi?id=193097
<rdar://problem/46899601>

Reviewed by Brady Eidson.

Source/WebCore:

Let IDBConnectionToClient hold a WeakPtr of IDBConnectionToClientDelegate.

  • Modules/indexeddb/server/IDBConnectionToClient.cpp:

(WebCore::IDBServer::IDBConnectionToClient::IDBConnectionToClient):
(WebCore::IDBServer::IDBConnectionToClient::identifier const):
(WebCore::IDBServer::IDBConnectionToClient::didDeleteDatabase):
(WebCore::IDBServer::IDBConnectionToClient::didOpenDatabase):
(WebCore::IDBServer::IDBConnectionToClient::didAbortTransaction):
(WebCore::IDBServer::IDBConnectionToClient::didCreateObjectStore):
(WebCore::IDBServer::IDBConnectionToClient::didDeleteObjectStore):
(WebCore::IDBServer::IDBConnectionToClient::didRenameObjectStore):
(WebCore::IDBServer::IDBConnectionToClient::didClearObjectStore):
(WebCore::IDBServer::IDBConnectionToClient::didCreateIndex):
(WebCore::IDBServer::IDBConnectionToClient::didDeleteIndex):
(WebCore::IDBServer::IDBConnectionToClient::didRenameIndex):
(WebCore::IDBServer::IDBConnectionToClient::didPutOrAdd):
(WebCore::IDBServer::IDBConnectionToClient::didGetRecord):
(WebCore::IDBServer::IDBConnectionToClient::didGetAllRecords):
(WebCore::IDBServer::IDBConnectionToClient::didGetCount):
(WebCore::IDBServer::IDBConnectionToClient::didDeleteRecord):
(WebCore::IDBServer::IDBConnectionToClient::didOpenCursor):
(WebCore::IDBServer::IDBConnectionToClient::didIterateCursor):
(WebCore::IDBServer::IDBConnectionToClient::didCommitTransaction):
(WebCore::IDBServer::IDBConnectionToClient::fireVersionChangeEvent):
(WebCore::IDBServer::IDBConnectionToClient::didStartTransaction):
(WebCore::IDBServer::IDBConnectionToClient::didCloseFromServer):
(WebCore::IDBServer::IDBConnectionToClient::notifyOpenDBRequestBlocked):
(WebCore::IDBServer::IDBConnectionToClient::didGetAllDatabaseNames):

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

Source/WebKit:

Let WebIDBConnectionToClient hold reference to IPC::Connection instead of NetworkConnectionToWebProcess to break
the cycle.

  • NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:

(WebKit::WebIDBConnectionToClient::create):
(WebKit::WebIDBConnectionToClient::WebIDBConnectionToClient):
(WebKit::WebIDBConnectionToClient::messageSenderConnection):

  • NetworkProcess/IndexedDB/WebIDBConnectionToClient.h:
  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::establishIDBConnectionToServer):

5:02 PM Changeset in webkit [239886] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

[WPE] Add gtk-doc
https://bugs.webkit.org/show_bug.cgi?id=178900

Patch by Carlos Eduardo Ramalho <cadubentzen@gmail.com> on 2019-01-11
Reviewed by Michael Catanzaro.

Add Tools/gtkdoc to manifest.txt.in files.
This should have been done in r238853 and caused failure in building WebKitGTK+ unstable release 2.23.2.

  • gtk/manifest.txt.in: Add Tools/gtkdoc directory.
  • wpe/manifest.txt.in: Add Tools/gtkdoc directory and uncomment lines to move documentation artifacts.
5:00 PM Changeset in webkit [239885] by sihui_liu@apple.com
  • 2 edits in trunk/Source/WebKit

Make "Disable Web SQL" on by default
https://bugs.webkit.org/show_bug.cgi?id=193354
<rdar://problem/46524584>

Reviewed by Geoffrey Garen.

  • Shared/WebPreferences.yaml:
4:40 PM Changeset in webkit [239884] by Devin Rousso
  • 6 edits in trunk/Source

Fix style CFNetworkSPI style checker warnings from r239698
https://bugs.webkit.org/show_bug.cgi?id=193369

Reviewed by Joseph Pecoraro.

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):

Source/WTF:

  • wtf/Platform.h:
4:39 PM Changeset in webkit [239883] by mmaxfield@apple.com
  • 5 edits in trunk/Source/WebCore

Fix the build after r239844
https://bugs.webkit.org/show_bug.cgi?id=192991

Unreviewed.

  • Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.cpp:
  • Modules/webgpu/WHLSL/AST/WHLSLSpecializationConstantSemantic.cpp:
  • Modules/webgpu/WHLSL/AST/WHLSLStageInOutSemantic.cpp:
  • Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.cpp:
4:26 PM Changeset in webkit [239882] by sbarati@apple.com
  • 5 edits
    1 add in trunk

DFG combined liveness can be wrong for terminal basic blocks
https://bugs.webkit.org/show_bug.cgi?id=193304
<rdar://problem/45268632>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/dfg-combined-liveness-consider-terminal-blocks-bytecode-liveness.js: Added.

Source/JavaScriptCore:

If a block doesn't have any successors, it can't rely on the typical
backwards liveness propagation that CombinedLiveness was doing. The phase
first got what was live in bytecode and IR at the heads of each block. Then
for each block, it made the live at tail the union of the live at head for
each successor. For a terminal block though, this could be wrong. We could
end up saying nothing is live even though many things may be live in bytecode.
We must account for what's bytecode live at the end of the block. Consider a
block that ends with:
`
ForceOSRExit
Unreachable
`

Things may definitely be live in bytecode at the tail. However, we'll
report nothing as being alive. This probably subtly breaks many analyses,
but we have a test case of it breaking the interference analysis that
the ArgumentsEliminationPhase performs.

  • dfg/DFGBasicBlock.h:

(JSC::DFG::BasicBlock::last const):

  • dfg/DFGCombinedLiveness.cpp:

(JSC::DFG::addBytecodeLiveness):
(JSC::DFG::liveNodesAtHead):
(JSC::DFG::CombinedLiveness::CombinedLiveness):

  • dfg/DFGCombinedLiveness.h:
4:21 PM Changeset in webkit [239881] by Wenson Hsieh
  • 11 edits in trunk

[iOS] Precision drop state thrashes when dragging near the top edge of an editable element
https://bugs.webkit.org/show_bug.cgi?id=193364
<rdar://problem/47214117>

Reviewed by Tim Horton.

Source/WebCore:

Add a new helper method on DragCaretController to compute the bounds of the editable element around the drop
caret position. This is either the enclosing form control (in the case of text fields and text areas), or the
highest editable root. See WebKit ChangeLog for more details.

Test: DragAndDropTests.AvoidPreciseDropNearTopOfTextArea

  • editing/FrameSelection.cpp:

(WebCore::DragCaretController::editableElementRectInRootViewCoordinates const):

  • editing/FrameSelection.h:

Source/WebKit:

On iOS, marking a UIDropProposal as precise offsets the hit-testing location of the drop by a small distance
either upwards or downwards from the actual location of the user's finger. When dragging over an editable
element, WebKit currently marks the drop proposal as precise; however, when dragging over the top edge of an
editable element, what happens is that the hit-testing location is offset to a location outside of the editable
element, which causes us to turn off precision drop mode; subsequently, turning off precision drop mode removes
the offset, which causes us to hit-test within the editable element once again and re-enable precision mode, and
the cycle continues.

In order to mitigate this, bail out of precision drop mode when dragging near the top or bottom edges of the
highest editable root that contains the current drop caret position (or, if the drop caret is inside of a text
form control, use the form control as the editable element instead).

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didPerformDragControllerAction):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::currentDragCaretEditableElementRect const):

  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView dropInteraction:sessionDidUpdate:]):

Avoid precise mode when we're less than 25pt away from the top and bottom edge of the editable element rect.
Since the drag location offset amount is a fixed offset in window coordinates, we first convert this minimum
distance to the content view's coordinate space by dividing by the content scale factor.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::performDragControllerAction):

Tools:

Add a test to verify that dragging near the top of a textarea element does not flag the drop proposal as
precise, whereas dragging near the middle of the textarea does.

  • TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:

(TestWebKitAPI::TEST):

3:30 PM Changeset in webkit [239880] by timothy_horton@apple.com
  • 7 edits in trunk/Source

REGRESSION (PSON): Firefox app lacks Open in New Tab in menu
https://bugs.webkit.org/show_bug.cgi?id=193366
<rdar://problem/46097212>

Reviewed by Simon Fraser.

Source/WebCore:

  • platform/RuntimeApplicationChecks.h:
  • platform/cocoa/RuntimeApplicationChecksCocoa.mm:

(WebCore::IOSApplication::isFirefox):
Add a Firefox Mobile bundle check.

Source/WebKit:

A pair of unrelated changes broke Firefox's use of WKWebView internals
to override the long-press menu. Maintain binary compatibility by
introducing linked-on-or-after checks.

  • UIProcess/Cocoa/VersionChecks.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::createWebPage):
Disable PSON in Firefox when linked against an SDK where PSON wasn't enabled by default.
Because gestures are very stateful, we always swap them out when swapping
processes (changing that behavior is fairly risky). Also, we don't always
inform the client when we swap processes (only when the process actually crashes),
so they currently don't re-adjust the gesture recognizers when a PSON swap occurs.

  • UIProcess/ios/WKContentView.mm:

(-[WKContentView _commonInitializationWithProcessPool:configuration:]):
Synchronously install gesture recognizers under -init when linked against
an SDK before the version that introduces lazy gesture recognizer installation.
r237331 is an optimization that made us lazily install gestures when the
view is parented, but Firefox (and potentially other clients) depend
on them being installed synchronously in order to find and override them.

3:10 PM Changeset in webkit [239879] by yusukesuzuki@slowstart.org
  • 16 edits
    15 adds in trunk

[JSC] Global lexical bindings can shadow global variables if it is configurable = true
https://bugs.webkit.org/show_bug.cgi?id=193308
<rdar://problem/45546542>

Reviewed by Saam Barati.

JSTests:

  • stress/const-lexical-binding-shadow-existing-global-property-ftl.js: Added.

(shouldThrow):
(shouldBe):
(foo):
(get shouldThrow):

  • stress/const-lexical-binding-shadow-existing-global-property-tdz-ftl.js: Added.

(shouldThrow):
(shouldBe):
(foo):
(get shouldBe):
(get shouldThrow):
(get return):

  • stress/const-lexical-binding-shadow-existing-global-property-tdz.js: Added.

(shouldThrow):
(shouldBe):
(foo):
(get shouldBe):
(get shouldThrow):

  • stress/const-lexical-binding-shadow-existing-global-property.js: Added.

(shouldThrow):
(shouldBe):
(foo):

  • stress/const-lexical-binding-shadowing-global-properties-and-eval-injection.js: Added.

(shouldThrow):
(shouldBe):
(foo):

  • stress/global-add-function-should-not-be-shadowed-by-lexical-bindings.js: Added.

(shouldThrow):

  • stress/global-static-variables-should-not-be-shadowed-by-lexical-bindings.js: Added.

(shouldThrow):

  • stress/let-lexical-binding-shadow-existing-global-property-ftl.js: Added.

(shouldThrow):
(shouldBe):
(foo):

  • stress/let-lexical-binding-shadow-existing-global-property-tdz-ftl.js: Added.

(shouldThrow):
(shouldBe):
(foo):
(get shouldBe):
(get shouldThrow):
(get return):

  • stress/let-lexical-binding-shadow-existing-global-property-tdz.js: Added.

(shouldThrow):
(shouldBe):
(foo):
(get shouldBe):
(get shouldThrow):

  • stress/let-lexical-binding-shadow-existing-global-property.js: Added.

(shouldThrow):
(shouldBe):
(foo):

  • stress/let-lexical-binding-shadowing-global-properties-and-eval-injection.js: Added.

(shouldThrow):
(shouldBe):
(foo):

Source/JavaScriptCore:

Previously, we assumed that lexical bindings in JSGlobalLexicalEnvironment cannot shadow existing global properties.
However, it is wrong. According to the spec, we can shadow global properties if a property's attribute is configurable = true.
For example, we execute two scripts.

script1.js

bar = 42;
function load() { return bar; }
print(bar); 42
print(load());
42

script2.js

let bar = 0; This lexical binding can shadow the global.bar defined in script1.js
print(bar);
0
print(load()); 0

In JSC, we cache GlobalProperty resolve type and its associated information in op_resolve_type, op_get_from_scope, and op_put_to_scope.
They attempt to load a property from JSGlobalObject directly. However, once the newly added lexical binding starts shadowing this, our existing instructions
become invalid since they do not respect JSGlobalLexicalEnvironment.

In this patch, we fix this issue by introducing the following mechanisms.

  1. We have a HashMap<property name, watchpoint set> in JSGlobalObject. DFG and FTL create a watchpoint set with the property name if the generated code

depends on GlobalProperty condition of op_resolve_scope etc. These watchpoint will be fired when the shadowing happens, so that our generated DFG and FTL
code will be invalidated if it depends on the condition which is no longer valid.

  1. When we detect shadowing, we iterate all the live CodeBlocks which globalObject is the target one. And we rewrite instructions in them from GlobalProperty

to GlobalLexicalVar (or Dynamic precisely). So, the subsequent LLInt code just works well. "Dynamic" conversion happens when your op_put_to_scope attempts to
put a value onto a const lexical binding. This fails and it should throw a type error.

  1. GlobalProperty scope operations in Baseline JIT start checking ResolveType in metadata, and emit code for GlobalProperty and GlobalLexicalVar. Once the rewrite

happens, baseline JIT continues working because it checks the rewritten metadata's ResolveType.

We use this mechanism (which is similar to haveABadTime() thing) because,

  1. Shadowing should be super rare. Before r214145, we made these cases as SytaxError. Thus, before r214145, this type of code cannot be executed in WebKit.

And the number of the live CodeBlocks for the given JSGlobalObject should be small. This supports introducing rather simple (but not so efficient) mechanism
instead of the complicated one.

  1. Rewriting instructions immediately forces GlobalProperty => GlobalLexicalVar / Dynamic conversion in all the possible CodeBlock. This allows us to avoid

compilation failure loop in DFG and FTL: DFG and FTL codes are invalidated by the watchpoint, but we may attempt to compile the code with the invalidated watchpoint
and GlobalProperty status if we do not rewrite it. One possible other implementation is having and checking a counter in instruction, and every time we introduce
a new shadow binding, bump the counter. And eventually executed instruction will go to the slow path and rewrite itself. However, this way leaves the not-executed-again-yet
instructions as is, and DFG and FTL repeatedly fail to compile if we just watch the invalidated watchpoint for that. Rewriting all the existing GlobalProperty immediately
avoids this situation easily.

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

(JSC::CodeBlock::notifyLexicalBindingShadowing):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::scriptMode const):

  • bytecode/Watchpoint.h:

(JSC::WatchpointSet::create):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGDesiredGlobalProperties.cpp: Added.

(JSC::DFG::DesiredGlobalProperties::isStillValidOnMainThread):
(JSC::DFG::DesiredGlobalProperties::reallyAdd):

  • dfg/DFGDesiredGlobalProperties.h: Added.

(JSC::DFG::DesiredGlobalProperties::addLazily):
We need this DesiredGlobalProperties mechanism since we do not want to ref() the UniquedStringImpl in DFG and FTL thread.
We keep JSGlobalObject* and identifierNumber, and materialize WatchpointSets for each JSGlobalObject's property referenced
from DFG and FTL and inject CodeBlock jettison watchpoints in the main thread.

  • dfg/DFGDesiredGlobalProperty.h: Added.

(JSC::DFG::DesiredGlobalProperty::DesiredGlobalProperty):
(JSC::DFG::DesiredGlobalProperty::globalObject const):
(JSC::DFG::DesiredGlobalProperty::identifierNumber const):
(JSC::DFG::DesiredGlobalProperty::operator== const):
(JSC::DFG::DesiredGlobalProperty::operator!= const):
(JSC::DFG::DesiredGlobalProperty::isHashTableDeletedValue const):
(JSC::DFG::DesiredGlobalProperty::hash const):
(JSC::DFG::DesiredGlobalProperty::dumpInContext const):
(JSC::DFG::DesiredGlobalProperty::dump const):
(JSC::DFG::DesiredGlobalPropertyHash::hash):
(JSC::DFG::DesiredGlobalPropertyHash::equal):

  • dfg/DFGGraph.h:

(JSC::DFG::Graph::globalProperties):

  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::reallyAdd):
(JSC::DFG::Plan::isStillValidOnMainThread):
(JSC::DFG::Plan::finalizeWithoutNotifyingCallback):
(JSC::DFG::Plan::cancel):

  • dfg/DFGPlan.h:

(JSC::DFG::Plan::globalProperties):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_resolve_scope):
(JSC::JIT::emit_op_get_from_scope):
(JSC::JIT::emit_op_put_to_scope):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_resolve_scope):
(JSC::JIT::emit_op_get_from_scope):
(JSC::JIT::emit_op_put_to_scope):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::addStaticGlobals):
(JSC::JSGlobalObject::notifyLexicalBindingShadowing):
(JSC::JSGlobalObject::getReferencedPropertyWatchpointSet):
(JSC::JSGlobalObject::ensureReferencedPropertyWatchpointSet):

  • runtime/JSGlobalObject.h:
  • runtime/ProgramExecutable.cpp:

(JSC::hasRestrictedGlobalProperty):
(JSC::ProgramExecutable::initializeGlobalProperties):

2:48 PM Changeset in webkit [239878] by Jonathan Bedard
  • 2 edits in trunk/Tools

webkitpy: Support alternate simctl device list output
https://bugs.webkit.org/show_bug.cgi?id=193362
<rdar://problem/47122965>

Reviewed by Lucas Forschler.

  • Scripts/webkitpy/xcode/simulated_device.py:

(SimulatedDeviceManager.populate_available_devices):

2:38 PM Changeset in webkit [239877] by Antti Koivisto
  • 3 edits
    2 adds in trunk

Release assert when removing element with a map element in the shadow tree
https://bugs.webkit.org/show_bug.cgi?id=193351
<rdar://problem/47208807>

Reviewed by Ryosuke Niwa.

Source/WebCore:

When a shadow host that has a map element in the shadow tree is removed from the document, we try
to remove the map from the scope of the host.

Test: fast/shadow-dom/image-map-tree-scope.html

  • html/HTMLMapElement.cpp:

(WebCore::HTMLMapElement::insertedIntoAncestor):
(WebCore::HTMLMapElement::removedFromAncestor):

Add and remove image maps when the scope changes, not when the document changes.
This matches how id/name/etc updates work in the HTMLElement.

LayoutTests:

  • fast/shadow-dom/image-map-tree-scope-expected.txt: Added.
  • fast/shadow-dom/image-map-tree-scope.html: Added.
2:36 PM Changeset in webkit [239876] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-build] Update macOS queue configurations
https://bugs.webkit.org/show_bug.cgi?id=193365

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/config.json:
2:26 PM Changeset in webkit [239875] by Jonathan Bedard
  • 10 edits in trunk/Tools

webkitpy: Incorporate device type into baseline search path
https://bugs.webkit.org/show_bug.cgi?id=193356
<rdar://problem/47215515>

Reviewed by Lucas Forschler.

We need a way to include device type in the baseline search path for iOS to support device specific test expectations.

  • Scripts/webkitpy/port/base.py:

(Port.default_baseline_search_path): Allow device type to be passed in.

  • Scripts/webkitpy/port/gtk.py:

(GtkPort.default_baseline_search_path): Ignore device type.

  • Scripts/webkitpy/port/ios.py:

(IOSPort.default_baseline_search_path): Optionally allow device type to be incorporated into the baseline search path.
(IOSPort.test_expectations_file_position): Update index for the additional device-type specific baseline search path.

  • Scripts/webkitpy/port/ios_device_unittest.py:

(IOSDeviceTest):

  • Scripts/webkitpy/port/ios_simulator_unittest.py:

(IOSSimulatorTest):

  • Scripts/webkitpy/port/mac.py:

(MacPort.default_baseline_search_path): Ignore device type.

  • Scripts/webkitpy/port/watch.py:

(WatchPort.default_baseline_search_path): Ditto.

  • Scripts/webkitpy/port/win.py:

(WinPort.default_baseline_search_path): Ditto.
(WinCairoPort.default_baseline_search_path): Ditto.

  • Scripts/webkitpy/port/wpe.py:

(WPEPort.default_baseline_search_path): Ditto.

2:25 PM Changeset in webkit [239874] by Jonathan Bedard
  • 3 edits in trunk/Tools

webkitpy: Print abbreviated baseline search path that includes only folders that exist
https://bugs.webkit.org/show_bug.cgi?id=193352
<rdar://problem/47210736>

Reviewed by Lucas Forschler.

  • Scripts/webkitpy/layout_tests/views/printing.py:

(Printer.print_config): Print list on only baseline search paths which exist.

  • Scripts/webkitpy/layout_tests/views/printing_unittest.py:

(Testprinter.test_print_config):

2:01 PM Changeset in webkit [239873] by Said Abou-Hallawa
  • 2 edits in trunk/Source/WTF

WorkQueue::concurrentApply() passes a raw pointer to a temporary String to Thread::create().
https://bugs.webkit.org/show_bug.cgi?id=191350

Reviewed by Brent Fulgham.

The non COCOA version of WorkQueue::concurrentApply() creates a temporary
String for the threadName and passes the raw pointer of this String to
Thread::create(). After freeing this String, Thread::entryPoint() uses
the raw char pointer to internally initialize the thread.

The fix is to use a single literal string for all the threads' names since
they are created for a thread-pool.

  • wtf/WorkQueue.cpp:

(WTF::WorkQueue::concurrentApply):

1:57 PM Changeset in webkit [239872] by sihui_liu@apple.com
  • 2 edits in trunk/Source/WebCore

Fix an assertion in UniqueIDBDatabase
https://bugs.webkit.org/show_bug.cgi?id=193096

Reviewed by Brady Eidson.

m_objectStoreTransactionCounts.count(objectStore) == 1 in UniqueIDBDatabase::operationAndTransactionTimerFired()
is not necessarily true because m_objectStoreTransactionCounts may be cleared in immediateCloseForUserDelete.

  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):

1:04 PM Changeset in webkit [239871] by commit-queue@webkit.org
  • 4 edits in trunk/Tools

Cleanup possible WK*Copy/Create leaks in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=193340

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2019-01-11
Reviewed by David Kilzer.

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::didReceiveMessageToPage):
Pull the strings out into a WKRetainPtr.

  • WebKitTestRunner/WebNotificationProvider.cpp:

(WTR::WebNotificationProvider::closeWebNotification):
Adopt the created value into the WKRetainPtr.

  • WebKitTestRunner/mac/TestControllerMac.mm:

(WTR::generateWhitelist):
Immediately adopt a created value to avoid potential mistakes.

1:02 PM Changeset in webkit [239870] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION: deleting an audit puts selection in a selected but invisible state
https://bugs.webkit.org/show_bug.cgi?id=192917
<rdar://problem/46875285>

Reviewed by Devin Rousso.

SelectionController should not be notified of removed children until the
child items have been removed from the TreeOutline. Doing so at this stage
is unsafe, since this method checks this.selectedTreeElement, which could
return the adjusted index from the SelectionController before anything has
actually been removed from the TreeOutline.

The number of calls to SelectionController.prototype.didRemoveItems is also
reduced somewhat, since we're no longer calling it for every TreeElement.

  • UserInterface/Views/TreeOutline.js:

(WI.TreeOutline.prototype.removeChildAtIndex):
(WI.TreeOutline.prototype.removeChildren):
(WI.TreeOutline.prototype._forgetTreeElement):
(WI.TreeOutline.prototype._indexesForSubtree): Added.

1:01 PM Changeset in webkit [239869] by magomez@igalia.com
  • 2 edits in trunk/Source/WebCore

[GTK] Garbled rendering on Youtube while scrolling under X11.
https://bugs.webkit.org/show_bug.cgi?id=192982

Reviewed by Carlos Garcia Campos.

When creating a GLX window context, try to get a GLXFBConfig that has depth and stencil buffers for
the default framebuffer.

  • platform/graphics/glx/GLContextGLX.cpp:

(WebCore::compatibleVisuals):
(WebCore::GLContextGLX::createWindowContext):

1:00 PM Changeset in webkit [239868] by Kocsen Chung
  • 7 edits in branches/safari-607-branch/Source

Versioning.

12:41 PM Changeset in webkit [239867] by dinfuehr@igalia.com
  • 23 edits in trunk

Enable DFG on ARM/Linux again
https://bugs.webkit.org/show_bug.cgi?id=192496

Reviewed by Yusuke Suzuki.

JSTests:

Test wasn't really skipped before moving the line with skip
to the top.

  • stress/regress-192717.js:

Source/JavaScriptCore:

After changing the bytecode format DFG was disabled on all 32-bit
architectures. Enable DFG now again on ARM/Linux. Do not use register
r11 in compiled DFG mode since it is already used in LLInt as metadataTable
register. Also clean up code since ARM traditional isn't supported anymore.

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::restoreCalleeSavesFromVMEntryFrameCalleeSavesBuffer):
(JSC::DFG::copyCalleeSavesToVMEntryFrameCalleeSavesBuffer):

  • jit/CallFrameShuffler.cpp:

(JSC::CallFrameShuffler::CallFrameShuffler):

  • jit/GPRInfo.h:

(JSC::GPRInfo::toIndex):

  • llint/LowLevelInterpreter32_64.asm:
  • offlineasm/arm.rb:

Source/WTF:

After changing the bytecode format DFG was disabled on all 32-bit
architectures. Enable DFG now again on ARM/Linux.

  • wtf/Platform.h:

Tools:

After changing the bytecode format DFG was disabled on all 32-bit
architectures. Enable DFG now again on ARM/Linux. Run again JIT-tests
on ARM by default.

  • Scripts/run-jsc-stress-tests:

LayoutTests:

After changing the bytecode format DFG was disabled on all 32-bit
architectures. Enable DFG now again on ARM/Linux. Disable tests that
run out of executable memory with LLInt disabled.

  • js/script-tests/dfg-float32array.js:
  • js/script-tests/dfg-float64array.js:
  • js/script-tests/dfg-int16array.js:
  • js/script-tests/dfg-int32array-overflow-values.js:
  • js/script-tests/dfg-int32array.js:
  • js/script-tests/dfg-int8array.js:
  • js/script-tests/dfg-uint16array.js:
  • js/script-tests/dfg-uint32array.js:
  • js/script-tests/dfg-uint8array.js:
12:37 PM Changeset in webkit [239866] by timothy@apple.com
  • 2 edits in trunk/Tools

Unreviewed, fix #ifdef in API test added in r239851.
https://bugs.webkit.org/show_bug.cgi?id=193327
rdar://problem/47093222

  • TestWebKitAPI/Tests/WebKit/mac/ForceLightAppearanceInBundle_Bundle.mm:
12:21 PM Changeset in webkit [239865] by sihui_liu@apple.com
  • 4 edits in trunk/Source/WebCore

IndexedDB: leak IDBTransaction, TransactionOperation and IDBRequest in layout tests
https://bugs.webkit.org/show_bug.cgi?id=193167
<rdar://problem/46891688>

Reviewed by Geoffrey Garen.

Do some cleanup to break retain cycle when context is stopped.

  • Modules/indexeddb/IDBOpenDBRequest.cpp:

(WebCore::IDBOpenDBRequest::cancelForStop):

  • Modules/indexeddb/IDBTransaction.cpp:

(WebCore::IDBTransaction::abortOnServerAndCancelRequests):
(WebCore::IDBTransaction::stop):
(WebCore::IDBTransaction::removeRequest):

  • Modules/indexeddb/client/TransactionOperation.h:

(WebCore::IDBClient::TransactionOperation::doComplete):

10:28 AM Changeset in webkit [239864] by Wenson Hsieh
  • 27 edits
    5 copies
    5 adds in trunk

Introduce IDL files for runtime-enabled UndoManager and UndoItem JavaScript API
https://bugs.webkit.org/show_bug.cgi?id=193109
<rdar://problem/44807048>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Adds new IDL files and stubs for UndoManager and UndoItem. This is an experimental DOM API that (in the near
future) is intended only for use in internal WebKit text editing clients. This API allows the page to
participate in the processes of undoing and redoing by defining custom undo and redo handlers, to be executed
when undo or redo is triggered.

Tests: editing/undo-manager/undo-manager-interfaces.html

editing/undo-manager/undo-manager-keeps-wrapper-alive.html

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Sources.txt:
  • UnifiedSources-input.xcfilelist:
  • WebCore.xcodeproj/project.pbxproj:

Add new source files.

  • bindings/js/WebCoreBuiltinNames.h:

Add "UndoManager" and "UndoItem" names.

  • dom/Document.cpp:

(WebCore::m_undoManager):

Have the document own a UndoManager.

  • dom/Document.h:

(WebCore::Document::undoManager const):

  • dom/Document.idl:
  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setUndoManagerAPIEnabled):
(WebCore::RuntimeEnabledFeatures::undoManagerAPIEnabled const):

Guard the new bindings behind a runtime-enabled feature flag.

  • page/UndoItem.h: Added.

(WebCore::UndoItem::create):
(WebCore::UndoItem::label const):
(WebCore::UndoItem::undoHandler const):
(WebCore::UndoItem::redoHandler const):
(WebCore::UndoItem::UndoItem):

  • page/UndoItem.idl: Added.
  • page/UndoManager.cpp: Added.

(WebCore::UndoManager::addItem):

  • page/UndoManager.h: Added.

(WebCore::UndoManager::create):
(WebCore::UndoManager::document):
(WebCore::UndoManager::UndoManager):

  • page/UndoManager.idl: Added.
  • page/mac/WheelEventDeltaFilterMac.h:

Necessary (albeit unrelated) build fix to appease unified sources.

Source/WebKit:

Add a new SPI configuration flag to enable the UndoManager API. This is off by default.

  • Shared/WebPreferences.yaml:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _setUndoManagerAPIEnabled:]):
(-[WKWebViewConfiguration _undoManagerAPIEnabled]):

  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:

Tools:

Introduce and respect a test option to enable the UndoManager API.

  • WebKitTestRunner/TestController.cpp:

(WTR::updateTestOptionsFromTestHeader):

  • WebKitTestRunner/TestOptions.h:

(WTR::TestOptions::hasSameInitializationOptions const):

  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::TestController::platformCreateWebView):

LayoutTests:

Add UndoManager tests to exercise new bindings, and verify that the JS wrapper for Document's UndoManager
survives garbage collection.

  • TestExpectations:
  • editing/undo-manager/undo-manager-interfaces-expected.txt: Added.
  • editing/undo-manager/undo-manager-interfaces.html: Added.
  • editing/undo-manager/undo-manager-keeps-wrapper-alive-expected.txt: Added.
  • editing/undo-manager/undo-manager-keeps-wrapper-alive.html: Added.
  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
8:19 AM Changeset in webkit [239863] by Alan Bujtas
  • 8 edits
    2 adds in trunk

[LFC][BFC][MarginCollapsing] Adjust vertical position when box margin collapses through.
https://bugs.webkit.org/show_bug.cgi?id=193346

Reviewed by Antti Koivisto.

Source/WebCore:

If the top and bottom margins of a box are adjoining, then it is possible for margins to collapse through it.
In this case, the position of the element depends on its relationship with the other elements whose margins are being collapsed.

  1. If the element's margins are collapsed with its parent's top margin, the top border edge of the box is defined to be the same as the parent's.
  2. Otherwise, either the element's parent is not taking part in the margin collapsing, or only the parent's bottom margin is involved. The position of the element's top border edge is the same as it would have been if the element had a non-zero bottom border.

Test: fast/block/block-only/collapsed-through-with-parent.html

  • layout/MarginTypes.h:

(WebCore::Layout::EstimatedMarginBefore::usedValue const):

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::computeEstimatedMarginBefore const):
(WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):
(WebCore::Layout::BlockFormattingContext::adjustedVerticalPositionAfterMarginCollapsing const):

  • layout/blockformatting/BlockFormattingContext.h:
  • layout/blockformatting/BlockMarginCollapse.cpp:

(WebCore::Layout::BlockFormattingContext::MarginCollapse::estimatedMarginBefore):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeIgnoringCollapsingThrough):

Tools:

  • LayoutReloaded/misc/LFC-passing-tests.txt:

LayoutTests:

  • fast/block/block-only/collapsed-through-with-parent-expected.txt: Added.
  • fast/block/block-only/collapsed-through-with-parent.html: Added.
5:17 AM Changeset in webkit [239862] by Carlos Garcia Campos
  • 8 edits in trunk/LayoutTests

Unreviewed GTK gardening. Rebaseline several tests after r239822.

  • platform/gtk/css2.1/t1202-counter-04-b-expected.png:
  • platform/gtk/css2.1/t1202-counter-04-b-expected.txt:
  • platform/gtk/css2.1/t1202-counters-04-b-expected.png:
  • platform/gtk/css2.1/t1202-counters-04-b-expected.txt:
  • platform/gtk/fast/text/combining-enclosing-keycap-expected.txt:
  • platform/gtk/fast/text/fallback-traits-fixup-expected.png:
  • platform/gtk/fast/text/fallback-traits-fixup-expected.txt:
Note: See TracTimeline for information about the timeline view.