Timeline



Dec 30, 2020:

7:27 PM Changeset in webkit [271115] by ysuzuki@apple.com
  • 8 edits in trunk

[JSC] WebAssembly Table/Memory/Global should allow inheritance
https://bugs.webkit.org/show_bug.cgi?id=220207

Reviewed by Alexey Shvayka.

LayoutTests/imported/w3c:

  • web-platform-tests/wasm/jsapi/proto-from-ctor-realm-expected.txt:
  • web-platform-tests/wasm/jsapi/prototypes.any-expected.txt:
  • web-platform-tests/wasm/jsapi/prototypes.any.worker-expected.txt:

Source/JavaScriptCore:

WebAssembly.{Table,Memory,Global} should accept inheritance by JS class syntax.
We need to create structure from new.target value.

  • wasm/js/WebAssemblyGlobalConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/WebAssemblyMemoryConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/WebAssemblyTableConstructor.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

7:20 PM Changeset in webkit [271114] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

Unreviewed, fix iteration count check
https://bugs.webkit.org/show_bug.cgi?id=220206

JSTests:

  • wasm/stress/multivalue-iteration-count.js: Added.

(async let):

Source/JavaScriptCore:

We should have iterationCount variable to track iteration count since it can be larger than MarkedArgumentBuffer's size.

  • wasm/WasmOperations.cpp:

(JSC::Wasm::JSC_DEFINE_JIT_OPERATION):

6:49 PM Changeset in webkit [271113] by ysuzuki@apple.com
  • 5 edits in trunk

[JSC] Wasm multivalue should iterate iterable result from JS function first before converting values
https://bugs.webkit.org/show_bug.cgi?id=220206

Reviewed by Alexey Shvayka.

LayoutTests/imported/w3c:

  • web-platform-tests/wasm/jsapi/constructor/multi-value.any-expected.txt:
  • web-platform-tests/wasm/jsapi/constructor/multi-value.any.worker-expected.txt:

Source/JavaScriptCore:

When converting JS results to Wasm multivalue (result from JS when executing Wasm->JS calls), we should first iterate all results from iterable.
And then, we should convert each element into Wasm value. Currently, we are converting while iterating, this is not aligned to the spec.

  • wasm/WasmOperations.cpp:

(JSC::Wasm::JSC_DEFINE_JIT_OPERATION):

4:04 PM Changeset in webkit [271112] by ysuzuki@apple.com
  • 17 edits
    1 add in trunk

[JSC] Update WebAssembly instance's exports object
https://bugs.webkit.org/show_bug.cgi?id=220189

Reviewed by Alexey Shvayka.

JSTests:

  • stress/sampling-profiler-wasm-name-section.js:

(platformSupportsSamplingProfiler.vm.isWasmSupported):

  • stress/sampling-profiler-wasm.js:

(platformSupportsSamplingProfiler.vm.isWasmSupported):

  • wasm/js-api/test_basic_api.js:

(const.c.in.constructorProperties.switch):

  • wasm/stress/exports-object.js: Added.

(async try):
(catch):

LayoutTests/imported/w3c:

  • web-platform-tests/wasm/jsapi/constructor/instantiate.any-expected.txt:
  • web-platform-tests/wasm/jsapi/constructor/instantiate.any.worker-expected.txt:
  • web-platform-tests/wasm/jsapi/instance/constructor.any-expected.txt:
  • web-platform-tests/wasm/jsapi/instance/constructor.any.worker-expected.txt:
  • web-platform-tests/wasm/jsapi/table/grow-reftypes.tentative.any-expected.txt:

Source/JavaScriptCore:

This patch aligns the WebAssembly Instance's exports object to the updated spec.

  1. exports object is a plain object which Prototype? is null[1]. We were using module namespace object. Also, the object should be frozen.
  2. exported functions' name should be index, according to the spec[2].

[1]: https://webassembly.github.io/spec/js-api/index.html#create-an-exports-object
[2]: https://webassembly.github.io/spec/js-api/index.html#exported-function-exotic-objects

  • wasm/js/JSWebAssembly.cpp:

(JSC::resolve):

  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::finishCreation):
(JSC::JSWebAssemblyInstance::visitChildren):
(JSC::JSWebAssemblyInstance::finalizeCreation):
(JSC::JSWebAssemblyInstance::tryCreate):

  • wasm/js/JSWebAssemblyInstance.h:
  • wasm/js/WebAssemblyInstancePrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::visitChildren):
(JSC::WebAssemblyModuleRecord::link):

  • wasm/js/WebAssemblyModuleRecord.h:
3:01 PM Changeset in webkit [271111] by Nikolas Zimmermann
  • 4 edits
    2 adds in trunk/Source/WebCore

Introduce RenderLayerScrollableArea
https://bugs.webkit.org/show_bug.cgi?id=219808

Reviewed by Simon Fraser.

Overhaul RenderLayer:
The goal is to move all overflow/scroll/... handling
out of RenderLayer, to streamline its interface and
make it re-usable for layer types that do not need
nor support scrolling/overflow.

This patch introduces RenderLayerScrollableArea inheriting
from ScrollableArea, with a back-reference to RenderLayer --
that mimics the design of RenderLayerFilters.

Follow-up patches will land the actual implementation, this
only adds a stub and adds it to the build systems.

No functional change - no new tests needed.

  • Headers.cmake: Add RenderLayerScrollableArea.* to build.
  • Sources.txt: Ditto.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • rendering/RenderLayerScrollableArea.cpp: Added.

(WebCore::RenderLayerScrollableArea::RenderLayerScrollableArea):
(WebCore::RenderLayerScrollableArea::~RenderLayerScrollableArea):
(WebCore::RenderLayerScrollableArea::shouldPlaceBlockDirectionScrollbarOnLeft const):

  • rendering/RenderLayerScrollableArea.h: Added.
2:31 PM Changeset in webkit [271110] by Alan Bujtas
  • 23 edits in trunk

[Legacy Line Layout] Remove unnecessary 'vertical-align: middle' integral rounding
https://bugs.webkit.org/show_bug.cgi?id=220198

Reviewed by Antti Koivisto.

Source/WebCore:

Let's not do "random" rounding for 'vertical-align: middle'. Fix it for all the alignment types by
adjusting the logical top position when the inline box stretches the line.

  • rendering/InlineFlowBox.cpp:

(WebCore::InlineFlowBox::computeLogicalBoxHeights):

  • rendering/RootInlineBox.cpp:

(WebCore::RootInlineBox::verticalPositionForBox):

LayoutTests:

Added additional 'vertical-align' values.

  • fast/sub-pixel/vertical-align-middle-overflow.html:
1:30 PM Changeset in webkit [271109] by Simon Fraser
  • 4 edits
    3 adds in trunk

[LFC Display] Stacking item bounds were wrong in some cases
https://bugs.webkit.org/show_bug.cgi?id=220201

Reviewed by Zalan Bujtas.

Source/WebCore:

Display::StackingItem were computed incorrectly for some content configurations,
such as:

  • inline non-container box
  • inline container box with no children
  • positioned inline non-container box
  • positioned inline container box with no children
  • positioned block non-container box

Fix by ensuring that when we create a StackingItem for a box with no children
to descend into, we run the same geometry logic that happens for
pushStateForBoxDescendants()/popState(). Also ensure that we call
accountForBoxPaintingExtent() for leaf boxes without a stacking item.

Test: fast/layoutformattingcontext/display/stacking-item-bounds.html

  • display/DisplayTreeBuilder.cpp:

(WebCore::Display::TreeBuilder::popState):
(WebCore::Display::TreeBuilder::didAppendNonContainerStackingItem):
(WebCore::Display::TreeBuilder::insertIntoTree):
(WebCore::Display::TreeBuilder::buildInlineDisplayTree):
(WebCore::Display::TreeBuilder::recursiveBuildDisplayTree):

  • display/DisplayTreeBuilder.h:

LayoutTests:

  • fast/layoutformattingcontext/display/stacking-item-bounds-expected.html: Added.
  • fast/layoutformattingcontext/display/stacking-item-bounds.html: Added.

Dec 29, 2020:

10:57 PM Changeset in webkit [271108] by Simon Fraser
  • 14 edits in trunk/Source/WebCore

[LFC Display] Clean up display tree dumping
https://bugs.webkit.org/show_bug.cgi?id=220195

Reviewed by Daniel Bates.

Reduce redundant code in debugDescription() functions by having boxes
report their box type.

Improve the formatting of the tree dump.

  • display/DisplayTreeBuilder.cpp:

(WebCore::Display::outputStackingTree):
(WebCore::Display::displayTreeAsText):

  • display/css/DisplayBox.cpp:

(WebCore::Display::Box::boxName const):
(WebCore::Display::Box::debugDescription const):

  • display/css/DisplayBox.h:
  • display/css/DisplayBoxModelBox.cpp:

(WebCore::Display::BoxModelBox::boxName const):
(WebCore::Display::BoxModelBox::debugDescription const):

  • display/css/DisplayBoxModelBox.h:
  • display/css/DisplayContainerBox.cpp:

(WebCore::Display::ContainerBox::boxName const):
(WebCore::Display::ContainerBox::debugDescription const): Deleted.

  • display/css/DisplayContainerBox.h:
  • display/css/DisplayImageBox.cpp:

(WebCore::Display::ImageBox::boxName const):
(WebCore::Display::ImageBox::debugDescription const):

  • display/css/DisplayImageBox.h:
  • display/css/DisplayReplacedBox.cpp:

(WebCore::Display::ReplacedBox::boxName const):

  • display/css/DisplayReplacedBox.h:
  • display/css/DisplayTextBox.cpp:

(WebCore::Display::TextBox::boxName const):
(WebCore::Display::TextBox::debugDescription const):

  • display/css/DisplayTextBox.h:
3:18 PM Changeset in webkit [271107] by ysuzuki@apple.com
  • 2 edits in trunk/Source/WebCore

Fix compile error in non libressl WinCairo
https://bugs.webkit.org/show_bug.cgi?id=220191

Reviewed by Don Olmstead.

  • platform/network/curl/CurlSSLVerifier.cpp:

(WebCore::CurlSSLVerifier::CurlSSLVerifier):

10:08 AM Changeset in webkit [271106] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Incorrectly positioned content with vertical-align: length/percentage
https://bugs.webkit.org/show_bug.cgi?id=220193

Reviewed by Antti Koivisto.

vertical-align: length/percentage is a baseline shift. Let's use the inline level box's baseline and not its height
when adjusting the vertical position (css1/text_properties/vertical_align.html).

  • layout/inlineformatting/InlineFormattingContextGeometry.cpp:

(WebCore::Layout::LineBoxBuilder::computeLineBoxHeightAndAlignInlineLevelBoxesVertically):

Dec 28, 2020:

1:43 PM Changeset in webkit [271105] by ap@apple.com
  • 2 edits in trunk/LayoutTests

Mark tests as flaky for https://bugs.webkit.org/show_bug.cgi?id=220188

  • platform/mac-wk1/TestExpectations:
1:03 PM Changeset in webkit [271104] by ap@apple.com
  • 2 edits in trunk/LayoutTests

Mark webanimations/accelerated-animation-with-easing.html as flaky
https://bugs.webkit.org/show_bug.cgi?id=220187

  • platform/mac/TestExpectations:
10:26 AM Changeset in webkit [271103] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][Integration] Add support for non-baseline aligned text painting
https://bugs.webkit.org/show_bug.cgi?id=220185

Reviewed by Antti Koivisto.

Use the run's vertical position to set the text origin (instead of using the line's baseline position).
This is in preparation for enabling inline box content.
(e.g. <div><span style="vertical-align: text-top">non-baseline aligned text</span></div>)

  • layout/integration/LayoutIntegrationLineLayout.cpp:

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

9:33 AM Changeset in webkit [271102] by ap@apple.com
  • 2 edits in trunk/Tools

built-product-archive should work with Python 3
https://bugs.webkit.org/show_bug.cgi?id=220157

Reviewed by Aakash Jain.

  • CISupport/built-product-archive:

(webkitBuildDirectoryForConfigurationAndPlatform): Decode result as a string,
because the directory is then used in string manipulation.
(createZipFromList): Use Python 3 compatible 'except' syntax. The new syntax works
in Python 2.6 and newer.
(createZip): Ditto.

Dec 27, 2020:

10:44 PM Changeset in webkit [271101] by Wenson Hsieh
  • 3 edits in trunk/Source/WTF

Add a helper method to WTF::MachSemaphore to wait with a timeout duration
https://bugs.webkit.org/show_bug.cgi?id=220110

Reviewed by Sam Weinig.

Adds a helper method on the cross-process WTF::MachSemaphore class (to be utilized in webkit.org/b/219586).

  • wtf/cocoa/MachSemaphore.cpp:

(WTF::MachSemaphore::waitFor):

This wraps a call to semaphore_timedwait, and converts the given time (in WTF::Seconds) into a
mach_timespec_t, which is an unsigned representing the number of seconds, along with another integer
representing the number of nanoseconds.

  • wtf/cocoa/MachSemaphore.h:
8:41 PM Changeset in webkit [271100] by commit-queue@webkit.org
  • 7 edits
    2 adds in trunk

[WASM-References] Fix table.init and table.grow to satisfy the spec
https://bugs.webkit.org/show_bug.cgi?id=220181

Patch by Dmitry Bezhetskov <dbezhetskov> on 2020-12-27
Reviewed by Yusuke Suzuki.

JSTests:

Fix behaviour of the previous tests and added ref-types
spec tests for bulk operations and table.grow.

  • wasm.yaml:
  • wasm/references-spec-tests/bulk.wast.js: Added.
  • wasm/references-spec-tests/table_grow.wast.js: Added.
  • wasm/references/table_misc.js:

(TableSize.0.End.End.WebAssembly):

Source/JavaScriptCore:

Fix and refactor a little bit table.init and
table.grow.

  • wasm/WasmOperations.cpp:

(JSC::Wasm::JSC_DEFINE_JIT_OPERATION):

  • wasm/WasmOperations.h:
  • wasm/WasmSlowPaths.cpp:

(JSC::LLInt::WASM_SLOW_PATH_DECL):

6:47 PM Changeset in webkit [271099] by Simon Fraser
  • 1 edit
    1 add in trunk/Source/WebCore

Add a ReadMe.md for Source/WebCore/display

Reviewed by Zalan Bujtas.

  • display/ReadMe.md: Added.
3:50 PM Changeset in webkit [271098] by commit-queue@webkit.org
  • 7 edits
    1 add in trunk

[WASM-References] Adjust table.fill to satisfy the spec
https://bugs.webkit.org/show_bug.cgi?id=220161

Patch by Dmitry Bezhetskov <dbezhetskov> on 2020-12-27
Reviewed by Yusuke Suzuki.

JSTests:

Added table.fill spec tests and adjusted existing tests.

  • wasm.yaml:
  • wasm/references-spec-tests/table_fill.wast.js: Added.
  • wasm/references/table_misc.js:

(GetLocal.0.GetLocal.1.TableGrow.0.End.End.WebAssembly):

Source/JavaScriptCore:

Fixed table.fill for the case when count is 0 and offset is equal to
table size.

  • wasm/WasmOperations.cpp:

(JSC::Wasm::setWasmTableElement):
(JSC::Wasm::JSC_DEFINE_JIT_OPERATION):

  • wasm/WasmOperations.h:
  • wasm/WasmSlowPaths.cpp:

(JSC::LLInt::WASM_SLOW_PATH_DECL):

3:35 PM Changeset in webkit [271097] by commit-queue@webkit.org
  • 7 edits
    1 add in trunk

[WASM-References] Add declared function indexes set to check from what functions we can create refs
https://bugs.webkit.org/show_bug.cgi?id=220009

Patch by Dmitry Bezhetskov <dbezhetskov> on 2020-12-27
Reviewed by Yusuke Suzuki.

JSTests:

Now we satisfy ref_func spec test so I've added it.

  • wasm.yaml:
  • wasm/references-spec-tests/ref_func.wast.js: Added.

Source/JavaScriptCore:

By ref-types spec we can create references only from declared functions.
Declared function is a function that was mentioned:
as export,
as part of ref.func init expression for a global,
in the element section.
In this patch declared function indexes set introduced to check this
requirement.
https://webassembly.github.io/reference-types/core/valid/instructions.html#reference-instructions.

  • wasm/WasmFunctionParser.h:

(JSC::Wasm::FunctionParser<Context>::parseExpression):

  • wasm/WasmModuleInformation.h:

(JSC::Wasm::ModuleInformation::isDeclaredFunction const):
(JSC::Wasm::ModuleInformation::addDeclaredFunction):

  • wasm/WasmSectionParser.cpp:

(JSC::Wasm::SectionParser::parseGlobal):
(JSC::Wasm::SectionParser::parseExport):
(JSC::Wasm::SectionParser::parseElementSegmentVectorOfExpressions):
(JSC::Wasm::SectionParser::parseElementSegmentVectorOfIndexes):

10:57 AM Changeset in webkit [271096] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Inline box should start with a strut in standards mode
https://bugs.webkit.org/show_bug.cgi?id=220160

Reviewed by Antti Koivisto.

If the inline box contains no glyphs at all, or if it contains only glyphs from fallback fonts,
it is considered to contain a “strut” (an invisible glyph of zero width) with the metrics of the box’s first available font.
https://www.w3.org/TR/css-inline-3/#inline-height

(css2.1/20110323/empty-inline-003.htm)

  • layout/inlineformatting/InlineFormattingContextGeometry.cpp:

(WebCore::Layout::LineBoxBuilder::constructInlineLevelBoxes):

10:37 AM Changeset in webkit [271095] by weinig@apple.com
  • 2 edits in trunk/Source/WebCore

Fix incorrect return types of fallback color conversion functions
https://bugs.webkit.org/show_bug.cgi?id=220159

Reviewed by Dean Jackson.

  • platform/graphics/ColorConversion.h:

Fixup return types of fallback conversion functions to match signature.

10:34 AM Changeset in webkit [271094] by weinig@apple.com
  • 2 edits in trunk/Source/WebCore

Generalize callWithColorType to work with either float or uint8_t color types
https://bugs.webkit.org/show_bug.cgi?id=220155

Reviewed by Dean Jackson.

  • platform/graphics/ColorTypes.h:

(WebCore::callWithColorType):
Templatize the component type.

10:00 AM Changeset in webkit [271093] by weinig@apple.com
  • 3 edits in trunk/Source/WebCore

Remove one more place needed when adding new color types
https://bugs.webkit.org/show_bug.cgi?id=220156

Reviewed by Simon Fraser.

  • platform/graphics/Color.h:

(WebCore::Color::Color):
Missed this in the last pass. Replace specific overloads with a conditional template function contructor.

  • platform/graphics/ColorTypes.h:

Adds a few traits to help identify color types.

Dec 26, 2020:

12:40 PM Changeset in webkit [271092] by Alexey Shvayka
  • 15 edits
    4 adds in trunk

[WebIDL] Remove [CustomToStringName] and Location-specific extended attributes
https://bugs.webkit.org/show_bug.cgi?id=219276

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/html/browsers/history/the-location-interface/location-non-configurable-toString-valueOf-expected.txt: Added.
  • web-platform-tests/html/browsers/history/the-location-interface/location-non-configurable-toString-valueOf.html: Added.
  • web-platform-tests/html/browsers/history/the-location-interface/location-prototype-no-toString-valueOf-expected.txt: Added.
  • web-platform-tests/html/browsers/history/the-location-interface/location-prototype-no-toString-valueOf.html: Added.

Source/WebCore:

This patch:

a) Removes [CustomToStringName] and 3 related overrides, whose purpose was to ensure

that Object.prototype.toString() returns "[object Object]" for cross-realm Location /
WindowProxy objects, which is already accomplished via own unforgeable @@toStringTag
property [1], making this change unobservable.

b) Inlines putCommon() to avoid weird true => false returns and save an extra identifier

creation / check in putByIndex(). This is also unobservable.

c) Removes "toString" and "valueOf" special-casing from JSLocation::defineOwnProperty(),

which failed silently instead of throwing a TypeError. Since these are own unforgeable
properties of Location [2], ordinary DefineOwnProperty? prevents their redefinition.

d) Removes [CustomDefineOwnPropertyOnPrototype], [CustomPutOnPrototype], and corresponding

overrides, whose purpose was to prevent definition of "toString" and "valueOf" properties
on Location.prototype. Since these are own unforgeable properties of Location instances [2],
the limitation doesn't make sense. Location.prototype is an ordinary object per spec.

Both c) and d) align WebKit with the spec, Blink, and Gecko.

[1]: https://html.spec.whatwg.org/multipage/browsers.html#crossoriginpropertyfallback-(-p-)
[2]: https://html.spec.whatwg.org/multipage/history.html#the-location-interface (step 3)

Tests: imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-non-configurable-toString-valueOf.html

imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-prototype-no-toString-valueOf.html

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::JSDOMWindow::toStringName): Deleted.

  • bindings/js/JSLocationCustom.cpp:

(WebCore::JSLocation::put):
(WebCore::JSLocation::putByIndex):
(WebCore::JSLocation::defineOwnProperty):
(WebCore::putCommon): Deleted.
(WebCore::JSLocation::toStringName): Deleted.
(WebCore::JSLocationPrototype::put): Deleted.
(WebCore::JSLocationPrototype::defineOwnProperty): Deleted.

  • bindings/js/JSRemoteDOMWindowCustom.cpp:

(WebCore::JSRemoteDOMWindow::toStringName): Deleted.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):
(GeneratePrototypeDeclaration):
(HeaderNeedsPrototypeDeclaration):

  • bindings/scripts/IDLAttributes.json:
  • page/DOMWindow.idl:
  • page/Location.idl:
  • page/RemoteDOMWindow.idl:

LayoutTests:

  • fast/dom/Window/Location/location-override-toString-using-defineGetter-expected.txt:
  • fast/dom/Window/Location/location-override-toString-using-defineGetter.html:
  • fast/dom/Window/Location/location-override-valueOf-using-defineGetter-expected.txt:
  • fast/dom/Window/Location/location-override-valueOf-using-defineGetter.html:
11:42 AM Changeset in webkit [271091] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC] Rect::expandToContain should call LayoutRect::uniteEvenIfEmpty
https://bugs.webkit.org/show_bug.cgi?id=220153

Reviewed by Antti Koivisto.

Multiline inline boxes should expand even when they start at the end of the line and are empty.
e.g.

<pre>this is the first line<span>
and this is the second</span></pre>

The <span>'s height = first line height (even though the <span> is empty on this line) + second line height.

  • layout/layouttree/LayoutGeometryRect.h:

(WebCore::Layout::Rect::expandToContain):

  • platform/graphics/LayoutRect.cpp:

(WebCore::LayoutRect::unite):
(WebCore::LayoutRect::uniteEvenIfEmpty): copy from FloatRect.

  • platform/graphics/LayoutRect.h:

(WebCore::LayoutRect::setLocationAndSizeFromEdges): copy from FloatRect.

10:28 AM Changeset in webkit [271090] by Simon Fraser
  • 6 edits
    4 adds in trunk

Fix scrolling issues when scrolling on only one axis is enabled
https://bugs.webkit.org/show_bug.cgi?id=220134

Reviewed by Sam Weinig.

Source/WebCore:

If an overflow:scroll has overflow on an axis, but overflow:hidden on that
axis, then there are various issues with finding the correct scroller and
latching.

This affects nested scrollers where inner and outer and scrollable on different
axes, and the inner scroller has overflow, but overflow:hidden on the cross axis.

The fix involves adding checks for scrolling being allowed in code that fetches
pinned state, and code that looks for scrollable areas for a given event delta.

Tests: fast/scrolling/mac/overflow-hidden-on-one-axis-async-overflow.html

fast/scrolling/mac/overflow-hidden-on-one-axis.html

  • page/mac/EventHandlerMac.mm:

(WebCore::findEnclosingScrollableContainer):

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::edgePinnedState const):

  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:

(WebCore::ScrollingTreeScrollingNodeDelegateMac::isPinnedForScrollDeltaOnAxis const):

  • platform/ScrollableArea.cpp:

(WebCore::ScrollableArea::isPinnedForScrollDeltaOnAxis const):
(WebCore::ScrollableArea::isPinnedForScrollDelta const): Check for non-zero deltas.
isPinnedForScrollDeltaOnAxis() returns false if a delta is zero, so we don't want to say
we're not pinned if a delta is zero. The logic of this code really needs to be inverted
to talk about scrollability, not pinning.
(WebCore::ScrollableArea::edgePinnedState const):

LayoutTests:

  • fast/scrolling/mac/overflow-hidden-on-one-axis-async-overflow-expected.txt: Added.
  • fast/scrolling/mac/overflow-hidden-on-one-axis-async-overflow.html: Added.
  • fast/scrolling/mac/overflow-hidden-on-one-axis-expected.txt: Added.
  • fast/scrolling/mac/overflow-hidden-on-one-axis.html: Added.
9:42 AM Changeset in webkit [271089] by weinig@apple.com
  • 17 edits
    3 adds in trunk/Source/WebCore

Simplify adding new color spaces to WebCore
https://bugs.webkit.org/show_bug.cgi?id=220146

Reviewed by Dean Jackson.

Reduce the number of places one needs to touch when adding new color types to:

  • ColorTypes.h
  • ColorConversion.h/cpp
  • ColorSpace.h/cpp (only needed if support in Color is required).
  • ColorSerialization.h (only needed if support in Color is required).
  • ColorSpaceCG.h/cpp (only needed if support in Color is required).
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:

Add ColorSpace.cpp, ColorSpaceCG.h and ColorSpaceCG.cpp.

  • platform/graphics/Color.cpp:
  • platform/graphics/Color.h:

(WebCore::Color::Color):
(WebCore::Color::setColor):
Replace specific overloads of the contructor and setColor with template functions
that do the same things. These are safe to make as if a non-supported color type
(one that doesn't have a colorSpace member) is passed it will fail to compile due
to use beneath ExtendedColor::create().

Also moves WTF::TextStream operator<< overload for ColorSpace out and into
ColorSpace.cpp where it makes more sense.

  • platform/graphics/ColorConversion.cpp:
  • platform/graphics/ColorConversion.h:

Re-order and explicitly comment conversion functions to be more clear.

As the comment indicates, all color types must implement at least the following
conversions:

XYZA<float> toXYZA(const ColorType<float>&);
ColorType<float> toColorType(const XYZA<float>&);

This allows generic fallback code, inline at the bottom of the header, to
support conversion to and from any set of colors. Additional conversion functions
are useful for the cases where the optimal or base conversion is not through XYZ
such as from SRGBA to LinearSRGBA.

To allow this to work a few additional conversion functions were added which just
combine existing conversions together and one was added for SRGBA to CMYKA which
was missing, though currently unused.

  • platform/graphics/ColorSpace.cpp: Added.

(WebCore::operator<<):

  • platform/graphics/ColorSpace.h:

Moved from Color.h

  • platform/graphics/ColorTypes.h:

(WebCore::callWithColorType):
This is a generalization of ExtendedColor::callOnUnderlyingType() that also
has the benefit of now being in the same file as the color type definitions,
reducing the number of files people need to touch.

  • platform/graphics/ColorUtilities.h:

(WebCore::colorByModifingEachNonAlphaComponent):
Update to not assume that colors use the names red/green/blue for non-alpha
components. This makes it work generically for all four component color types.

  • platform/graphics/ExtendedColor.h:

(WebCore::ExtendedColor::callOnUnderlyingType const):
Use generalized form, callWithColorType to avoid requiring modiftying this
when new color types are added.

  • platform/graphics/cg/ColorCG.cpp:

(WebCore::leakCGColor):
When going to generalize this (we could have simply called
return CGColorCreate(cachedCGColorSpace(colorSpace), cgFloatComponents))
I noticed this was not doing the right thing for CG ports that don't support
all the color spaces WebCore requires (such as Windows). For instance,
displayP3ColorSpaceRef() just returns sRGBColorSpaceRef() on windows, meaning
we would be taking some DisplayP3 components and having CG interpret them as
sRGB. To avoid this, we now check if the color space returned is the fallback
color space, sRGB, and do our own conversion to sRGB using ColorConversion
before creating the color.

This also resolves a long standing bug / FIXME around LinearRGB where we were
using sRGBColorSpaceRef() for them. In practice, we don't actually ever create
LinearRGB CGColorRefs right now, but if we ever do in the future, makes sense
to use the right color space.

  • platform/graphics/cg/ColorSpaceCG.cpp: Added.

(WebCore::sRGBColorSpaceRef):
(WebCore::linearRGBColorSpaceRef):
(WebCore::displayP3ColorSpaceRef):
(WebCore::extendedSRGBColorSpaceRef):

  • platform/graphics/cg/ColorSpaceCG.h: Added.

(WebCore::cachedCGColorSpace):

  • platform/graphics/cg/GraphicsContextCG.cpp:

(WebCore::sRGBColorSpaceRef): Deleted.
(WebCore::linearRGBColorSpaceRef): Deleted.
(WebCore::extendedSRGBColorSpaceRef): Deleted.
(WebCore::displayP3ColorSpaceRef): Deleted.

  • platform/graphics/cg/GraphicsContextCG.h:

(WebCore::cachedCGColorSpace): Deleted.
Moved color space specific CG code to its own files to make it more clear
where to find them.

7:22 AM Changeset in webkit [271088] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][Integration] Set pre-computed inline box geometries (margin, border and padding)
https://bugs.webkit.org/show_bug.cgi?id=220149

Reviewed by Antti Koivisto.

  • layout/integration/LayoutIntegrationLineLayout.cpp:

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

  • layout/integration/LayoutIntegrationLineLayout.h:
  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::layoutModernLines):

2:20 AM Changeset in webkit [271087] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Remove redundant LineBox::inlineLevelBoxList()
https://bugs.webkit.org/show_bug.cgi?id=220147

Reviewed by Antti Koivisto.

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):

  • layout/inlineformatting/InlineLineBox.h:

(WebCore::Layout::LineBox::inlineLevelBoxList const): Deleted.

  • layout/integration/LayoutIntegrationInlineContentBuilder.cpp:

(WebCore::LayoutIntegration::InlineContentBuilder::computeLineLevelVisualAdjustmentsForRuns const):

Note: See TracTimeline for information about the timeline view.