Timeline
Aug 22, 2020:
- 11:06 PM Changeset in webkit [266043] by
-
- 2 edits in trunk/Source/JavaScriptCore
Unreviewed, assertion was opposite
https://bugs.webkit.org/show_bug.cgi?id=215058
We should ensure that this is *not* zero.
- runtime/IntlObject.cpp:
(JSC::parseVariantCode):
- 7:27 PM Changeset in webkit [266042] by
-
- 2 edits in trunk/LayoutTests
[WPE] Rebaseline test after r265851
Updated the Render element name.
Unreviewed test gardening.
- platform/wpe/fast/layers/video-layer-expected.txt:
- 6:51 PM Changeset in webkit [266041] by
-
- 3 edits in trunk/LayoutTests
Make fast/text/letter-spacing-shaping.html more robust
https://bugs.webkit.org/show_bug.cgi?id=215711
Unreviewed test gardening.
- fast/text/letter-spacing-shaping-expected.html:
- fast/text/letter-spacing-shaping.html:
- 6:15 PM Changeset in webkit [266040] by
-
- 6 edits1 move in trunk/Source/WebCore
[LFC][IFC] adjustBaselineAndLineHeight should take the parent inline box.
https://bugs.webkit.org/show_bug.cgi?id=214406
Reviewed by Antti Koivisto.
This is in prepartion for supporting nested lineboxes required by certain vertical alignment values.
<div>text content</div> <- This content requires only one inline box, the root linebox.
<div>nested <span><span style="vertical-align: text-top">text</span> </span>content</div> <- the content [text] is vertically
aligned with the top of the _parent element_'s font and not the root inline box.
- Let's rename the LineBoxBuilder to InlineBox. We'll have a bunch of these.
- Pass in the parent inline to adjustBaselineAndLineHeight (currently there's only one inline box per line, the root inline box).
- WebCore.xcodeproj/project.pbxproj:
- layout/inlineformatting/InlineFormattingContextQuirks.cpp:
(WebCore::Layout::InlineFormattingContext::Quirks::lineHeightConstraints const):
- layout/inlineformatting/InlineLineBox.h: Renamed from Source/WebCore/layout/inlineformatting/InlineLineBoxBuilder.h.
(WebCore::Layout::LineBox::Baseline::height const):
(WebCore::Layout::LineBox::logicalRect const):
(WebCore::Layout::LineBox::scrollableOverflow const):
(WebCore::Layout::LineBox::logicalLeft const):
(WebCore::Layout::LineBox::logicalRight const):
(WebCore::Layout::LineBox::logicalTop const):
(WebCore::Layout::LineBox::logicalBottom const):
(WebCore::Layout::LineBox::logicalWidth const):
(WebCore::Layout::LineBox::logicalHeight const):
(WebCore::Layout::LineBox::resetDescent):
(WebCore::Layout::LineBox::setLogicalHeight):
(WebCore::Layout::LineBox::setLogicalWidth):
(WebCore::Layout::LineBox::setScrollableOverflow):
(WebCore::Layout::LineBox::moveHorizontally):
(WebCore::Layout::LineBox::expandHorizontally):
(WebCore::Layout::LineBox::shrinkHorizontally):
(WebCore::Layout::LineBox::expandVertically):
(WebCore::Layout::LineBox::shrinkVertically):
(WebCore::Layout::LineBox::isConsideredEmpty const):
(WebCore::Layout::LineBox::setIsConsideredEmpty):
(WebCore::Layout::LineBox::setIsConsideredNonEmpty):
(WebCore::Layout::LineBox::LineBox):
(WebCore::Layout::LineBox::setLogicalHeightIfGreater):
(WebCore::Layout::LineBox::baseline const):
(WebCore::Layout::LineBox::setBaselineOffsetIfGreater):
(WebCore::Layout::LineBox::setAscentIfGreater):
(WebCore::Layout::LineBox::setDescentIfGreater):
(WebCore::Layout::LineBox::baselineOffset const):
(WebCore::Layout::LineBox::resetBaseline):
(WebCore::Layout::LineBox::Baseline::Baseline):
(WebCore::Layout::LineBox::Baseline::setAscent):
(WebCore::Layout::LineBox::Baseline::setDescent):
(WebCore::Layout::LineBox::Baseline::reset):
(WebCore::Layout::LineBox::Baseline::ascent const):
(WebCore::Layout::LineBox::Baseline::descent const):
- layout/inlineformatting/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::initialize):
(WebCore::Layout::LineBuilder::close):
(WebCore::Layout::LineBuilder::adjustBaselineAndLineHeight):
(WebCore::Layout::LineBuilder::halfLeadingMetrics):
- layout/inlineformatting/InlineLineBuilder.h:
(WebCore::Layout::LineBuilder::lineBox const):
- layout/inlineformatting/LineLayoutContext.h:
- 5:26 PM Changeset in webkit [266039] by
-
- 15 edits1 add in trunk
[JSC] Implement Intl Language Tag Parser
https://bugs.webkit.org/show_bug.cgi?id=215058
Reviewed by Ross Kirsling and Darin Adler.
JSTests:
- stress/intl-collator.js:
- stress/intl-datetimeformat.js:
- stress/intl-language-tag.js: Added.
(shouldThrow):
(shouldNotThrow):
- stress/intl-locale.js:
- stress/intl-numberformat.js:
- stress/intl-object.js:
- stress/intl-pluralrules.js:
- stress/intl-relativetimeformat.js:
- stress/string-toLocaleLowerCase.js:
- stress/string-toLocaleUpperCase.js:
- test262/expectations.yaml:
Source/JavaScriptCore:
This patch adds LanguageTagParser which performs isStructurallyValidLanguageTag[1] validation precisely.
The spec strictly defines acceptable format as language-tag and this is not the same to ICU's one and this
is even tested in test262. We should have LanguageTagParser to validate the input.
[1]: https://tc39.es/ecma402/#sec-isstructurallyvalidlanguagetag
- runtime/IntlLocale.cpp:
(JSC::LocaleIDBuilder::initialize):
(JSC::IntlLocale::initializeLocale):
- runtime/IntlObject.cpp:
(JSC::canonicalizeLocaleList):
(JSC::parseVariantCode):
(JSC::convertToUnicodeSingletonIndex):
(JSC::isUnicodeExtensionAttribute):
(JSC::isUnicodeExtensionKey):
(JSC::isUnicodeExtensionTypeComponent):
(JSC::isUnicodePUExtensionValue):
(JSC::isUnicodeOtherExtensionValue):
(JSC::isUnicodeTKey):
(JSC::isUnicodeTValueComponent):
(JSC::LanguageTagParser::LanguageTagParser):
(JSC::LanguageTagParser::isEOS):
(JSC::LanguageTagParser::next):
(JSC::LanguageTagParser::parseUnicodeLocaleId):
(JSC::LanguageTagParser::parseUnicodeLanguageId):
(JSC::LanguageTagParser::parseUnicodeExtensionAfterPrefix):
(JSC::LanguageTagParser::parseTransformedExtensionAfterPrefix):
(JSC::LanguageTagParser::parseOtherExtensionAfterPrefix):
(JSC::LanguageTagParser::parsePUExtensionAfterPrefix):
(JSC::LanguageTagParser::parseExtensionsAndPUExtensions):
(JSC::isStructurallyValidLanguageTag):
(JSC::isUnicodeLanguageId):
- runtime/IntlObject.h:
- 3:45 PM Changeset in webkit [266038] by
-
- 4 edits96 adds in trunk/LayoutTests
Import css-content tests.
https://bugs.webkit.org/show_bug.cgi?id=215751
Reviewed by Antti Koivisto.
- resources/import-expectations.json:
- web-platform-tests/css/css-content/META.yml: Added.
- web-platform-tests/css/css-content/attr-case-insensitive-expected.html: Added.
- web-platform-tests/css/css-content/attr-case-insensitive.html: Added.
- web-platform-tests/css/css-content/computed-value-expected.txt: Added.
- web-platform-tests/css/css-content/computed-value.html: Added.
- web-platform-tests/css/css-content/element-replacement-alt-expected.html: Added.
- web-platform-tests/css/css-content/element-replacement-alt.html: Added.
- web-platform-tests/css/css-content/element-replacement-display-contents-expected.html: Added.
- web-platform-tests/css/css-content/element-replacement-display-contents.html: Added.
- web-platform-tests/css/css-content/element-replacement-display-none-expected.html: Added.
- web-platform-tests/css/css-content/element-replacement-display-none.html: Added.
- web-platform-tests/css/css-content/element-replacement-dynamic-expected.html: Added.
- web-platform-tests/css/css-content/element-replacement-dynamic.html: Added.
- web-platform-tests/css/css-content/element-replacement-expected.html: Added.
- web-platform-tests/css/css-content/element-replacement-image-alt-expected.html: Added.
- web-platform-tests/css/css-content/element-replacement-image-alt.html: Added.
- web-platform-tests/css/css-content/element-replacement-on-replaced-element.tentative-expected.html: Added.
- web-platform-tests/css/css-content/element-replacement-on-replaced-element.tentative.html: Added.
- web-platform-tests/css/css-content/element-replacement.html: Added.
- web-platform-tests/css/css-content/inheritance-expected.txt: Added.
- web-platform-tests/css/css-content/inheritance.html: Added.
- web-platform-tests/css/css-content/pseudo-element-inline-box-expected.html: Added.
- web-platform-tests/css/css-content/pseudo-element-inline-box.html: Added.
- web-platform-tests/css/css-content/quotes-001-expected.html: Added.
- web-platform-tests/css/css-content/quotes-001.html: Added.
- web-platform-tests/css/css-content/quotes-002-expected.html: Added.
- web-platform-tests/css/css-content/quotes-002.html: Added.
- web-platform-tests/css/css-content/quotes-003-expected.html: Added.
- web-platform-tests/css/css-content/quotes-003.html: Added.
- web-platform-tests/css/css-content/quotes-004-expected.html: Added.
- web-platform-tests/css/css-content/quotes-004.html: Added.
- web-platform-tests/css/css-content/quotes-005-expected.html: Added.
- web-platform-tests/css/css-content/quotes-005.html: Added.
- web-platform-tests/css/css-content/quotes-006-expected.html: Added.
- web-platform-tests/css/css-content/quotes-006.html: Added.
- web-platform-tests/css/css-content/quotes-007-expected.html: Added.
- web-platform-tests/css/css-content/quotes-007.html: Added.
- web-platform-tests/css/css-content/quotes-008-expected.html: Added.
- web-platform-tests/css/css-content/quotes-008.html: Added.
- web-platform-tests/css/css-content/quotes-009-expected.html: Added.
- web-platform-tests/css/css-content/quotes-009.html: Added.
- web-platform-tests/css/css-content/quotes-010-expected.html: Added.
- web-platform-tests/css/css-content/quotes-010.html: Added.
- web-platform-tests/css/css-content/quotes-011-expected.html: Added.
- web-platform-tests/css/css-content/quotes-011.html: Added.
- web-platform-tests/css/css-content/quotes-012-expected.html: Added.
- web-platform-tests/css/css-content/quotes-012.html: Added.
- web-platform-tests/css/css-content/quotes-013-expected.html: Added.
- web-platform-tests/css/css-content/quotes-013.html: Added.
- web-platform-tests/css/css-content/quotes-014-expected.html: Added.
- web-platform-tests/css/css-content/quotes-014.html: Added.
- web-platform-tests/css/css-content/quotes-015-expected.html: Added.
- web-platform-tests/css/css-content/quotes-015.html: Added.
- web-platform-tests/css/css-content/quotes-016-expected.html: Added.
- web-platform-tests/css/css-content/quotes-016.html: Added.
- web-platform-tests/css/css-content/quotes-017-expected.html: Added.
- web-platform-tests/css/css-content/quotes-017.html: Added.
- web-platform-tests/css/css-content/quotes-018-expected.html: Added.
- web-platform-tests/css/css-content/quotes-018.html: Added.
- web-platform-tests/css/css-content/quotes-019-expected.html: Added.
- web-platform-tests/css/css-content/quotes-019.html: Added.
- web-platform-tests/css/css-content/quotes-020-expected.html: Added.
- web-platform-tests/css/css-content/quotes-020.html: Added.
- web-platform-tests/css/css-content/quotes-021-expected.html: Added.
- web-platform-tests/css/css-content/quotes-021.html: Added.
- web-platform-tests/css/css-content/quotes-022-expected.html: Added.
- web-platform-tests/css/css-content/quotes-022.html: Added.
- web-platform-tests/css/css-content/quotes-023-expected.html: Added.
- web-platform-tests/css/css-content/quotes-023.html: Added.
- web-platform-tests/css/css-content/quotes-024-expected.html: Added.
- web-platform-tests/css/css-content/quotes-024.html: Added.
- web-platform-tests/css/css-content/quotes-025-expected.html: Added.
- web-platform-tests/css/css-content/quotes-025.html: Added.
- web-platform-tests/css/css-content/quotes-026-expected.html: Added.
- web-platform-tests/css/css-content/quotes-026.html: Added.
- web-platform-tests/css/css-content/quotes-027-expected.html: Added.
- web-platform-tests/css/css-content/quotes-027.html: Added.
- web-platform-tests/css/css-content/quotes-028-expected.html: Added.
- web-platform-tests/css/css-content/quotes-028.html: Added.
- web-platform-tests/css/css-content/quotes-029-expected.html: Added.
- web-platform-tests/css/css-content/quotes-029.html: Added.
- web-platform-tests/css/css-content/quotes-030-expected.html: Added.
- web-platform-tests/css/css-content/quotes-030.html: Added.
- web-platform-tests/css/css-content/quotes-031-expected.html: Added.
- web-platform-tests/css/css-content/quotes-031.html: Added.
- web-platform-tests/css/css-content/quotes-032-expected.html: Added.
- web-platform-tests/css/css-content/quotes-032.html: Added.
- web-platform-tests/css/css-content/quotes-033-expected.html: Added.
- web-platform-tests/css/css-content/quotes-033.html: Added.
- web-platform-tests/css/css-content/quotes-034-expected.html: Added.
- web-platform-tests/css/css-content/quotes-034.html: Added.
- web-platform-tests/css/css-content/resources/rect.svg: Added.
- web-platform-tests/css/css-content/resources/w3c-import.log: Added.
- web-platform-tests/css/css-content/w3c-import.log: Added.
LayoutTests/imported/w3c:
- resources/import-expectations.json:
- web-platform-tests/css/css-content/META.yml: Added.
- web-platform-tests/css/css-content/attr-case-insensitive-expected.html: Added.
- web-platform-tests/css/css-content/attr-case-insensitive.html: Added.
- web-platform-tests/css/css-content/computed-value-expected.txt: Added.
- web-platform-tests/css/css-content/computed-value.html: Added.
- web-platform-tests/css/css-content/element-replacement-alt-expected.html: Added.
- web-platform-tests/css/css-content/element-replacement-alt.html: Added.
- web-platform-tests/css/css-content/element-replacement-display-contents-expected.html: Added.
- web-platform-tests/css/css-content/element-replacement-display-contents.html: Added.
- web-platform-tests/css/css-content/element-replacement-display-none-expected.html: Added.
- web-platform-tests/css/css-content/element-replacement-display-none.html: Added.
- web-platform-tests/css/css-content/element-replacement-dynamic-expected.html: Added.
- web-platform-tests/css/css-content/element-replacement-dynamic.html: Added.
- web-platform-tests/css/css-content/element-replacement-expected.html: Added.
- web-platform-tests/css/css-content/element-replacement-image-alt-expected.html: Added.
- web-platform-tests/css/css-content/element-replacement-image-alt.html: Added.
- web-platform-tests/css/css-content/element-replacement-on-replaced-element.tentative-expected.html: Added.
- web-platform-tests/css/css-content/element-replacement-on-replaced-element.tentative.html: Added.
- web-platform-tests/css/css-content/element-replacement.html: Added.
- web-platform-tests/css/css-content/inheritance-expected.txt: Added.
- web-platform-tests/css/css-content/inheritance.html: Added.
- web-platform-tests/css/css-content/pseudo-element-inline-box-expected.html: Added.
- web-platform-tests/css/css-content/pseudo-element-inline-box.html: Added.
- web-platform-tests/css/css-content/quotes-001-expected.html: Added.
- web-platform-tests/css/css-content/quotes-001.html: Added.
- web-platform-tests/css/css-content/quotes-002-expected.html: Added.
- web-platform-tests/css/css-content/quotes-002.html: Added.
- web-platform-tests/css/css-content/quotes-003-expected.html: Added.
- web-platform-tests/css/css-content/quotes-003.html: Added.
- web-platform-tests/css/css-content/quotes-004-expected.html: Added.
- web-platform-tests/css/css-content/quotes-004.html: Added.
- web-platform-tests/css/css-content/quotes-005-expected.html: Added.
- web-platform-tests/css/css-content/quotes-005.html: Added.
- web-platform-tests/css/css-content/quotes-006-expected.html: Added.
- web-platform-tests/css/css-content/quotes-006.html: Added.
- web-platform-tests/css/css-content/quotes-007-expected.html: Added.
- web-platform-tests/css/css-content/quotes-007.html: Added.
- web-platform-tests/css/css-content/quotes-008-expected.html: Added.
- web-platform-tests/css/css-content/quotes-008.html: Added.
- web-platform-tests/css/css-content/quotes-009-expected.html: Added.
- web-platform-tests/css/css-content/quotes-009.html: Added.
- web-platform-tests/css/css-content/quotes-010-expected.html: Added.
- web-platform-tests/css/css-content/quotes-010.html: Added.
- web-platform-tests/css/css-content/quotes-011-expected.html: Added.
- web-platform-tests/css/css-content/quotes-011.html: Added.
- web-platform-tests/css/css-content/quotes-012-expected.html: Added.
- web-platform-tests/css/css-content/quotes-012.html: Added.
- web-platform-tests/css/css-content/quotes-013-expected.html: Added.
- web-platform-tests/css/css-content/quotes-013.html: Added.
- web-platform-tests/css/css-content/quotes-014-expected.html: Added.
- web-platform-tests/css/css-content/quotes-014.html: Added.
- web-platform-tests/css/css-content/quotes-015-expected.html: Added.
- web-platform-tests/css/css-content/quotes-015.html: Added.
- web-platform-tests/css/css-content/quotes-016-expected.html: Added.
- web-platform-tests/css/css-content/quotes-016.html: Added.
- web-platform-tests/css/css-content/quotes-017-expected.html: Added.
- web-platform-tests/css/css-content/quotes-017.html: Added.
- web-platform-tests/css/css-content/quotes-018-expected.html: Added.
- web-platform-tests/css/css-content/quotes-018.html: Added.
- web-platform-tests/css/css-content/quotes-019-expected.html: Added.
- web-platform-tests/css/css-content/quotes-019.html: Added.
- web-platform-tests/css/css-content/quotes-020-expected.html: Added.
- web-platform-tests/css/css-content/quotes-020.html: Added.
- web-platform-tests/css/css-content/quotes-021-expected.html: Added.
- web-platform-tests/css/css-content/quotes-021.html: Added.
- web-platform-tests/css/css-content/quotes-022-expected.html: Added.
- web-platform-tests/css/css-content/quotes-022.html: Added.
- web-platform-tests/css/css-content/quotes-023-expected.html: Added.
- web-platform-tests/css/css-content/quotes-023.html: Added.
- web-platform-tests/css/css-content/quotes-024-expected.html: Added.
- web-platform-tests/css/css-content/quotes-024.html: Added.
- web-platform-tests/css/css-content/quotes-025-expected.html: Added.
- web-platform-tests/css/css-content/quotes-025.html: Added.
- web-platform-tests/css/css-content/quotes-026-expected.html: Added.
- web-platform-tests/css/css-content/quotes-026.html: Added.
- web-platform-tests/css/css-content/quotes-027-expected.html: Added.
- web-platform-tests/css/css-content/quotes-027.html: Added.
- web-platform-tests/css/css-content/quotes-028-expected.html: Added.
- web-platform-tests/css/css-content/quotes-028.html: Added.
- web-platform-tests/css/css-content/quotes-029-expected.html: Added.
- web-platform-tests/css/css-content/quotes-029.html: Added.
- web-platform-tests/css/css-content/quotes-030-expected.html: Added.
- web-platform-tests/css/css-content/quotes-030.html: Added.
- web-platform-tests/css/css-content/quotes-031-expected.html: Added.
- web-platform-tests/css/css-content/quotes-031.html: Added.
- web-platform-tests/css/css-content/quotes-032-expected.html: Added.
- web-platform-tests/css/css-content/quotes-032.html: Added.
- web-platform-tests/css/css-content/quotes-033-expected.html: Added.
- web-platform-tests/css/css-content/quotes-033.html: Added.
- web-platform-tests/css/css-content/quotes-034-expected.html: Added.
- web-platform-tests/css/css-content/quotes-034.html: Added.
- web-platform-tests/css/css-content/resources/rect.svg: Added.
- web-platform-tests/css/css-content/resources/w3c-import.log: Added.
- web-platform-tests/css/css-content/w3c-import.log: Added.
LayoutTests:
- 3:34 PM Changeset in webkit [266037] by
-
- 5 edits in trunk
Unreviewed, workaround for old ICU headers in macOS Catalina bots
https://bugs.webkit.org/show_bug.cgi?id=209774
EWS and Catalina bots are inconsistent in terms of ICU header versions.
This patch adds a workaround which checks ICU header version too at runtime.
JSTests:
- stress/intl-numberformat-unified-ja.js:
(vm.icuVersion.64.vm.icuHeaderVersion):
(vm.icuVersion): Deleted.
- stress/intl-numberformat-unified.js:
(vm.icuVersion.64.vm.icuHeaderVersion):
(vm.icuVersion): Deleted.
Source/JavaScriptCore:
- tools/JSDollarVM.cpp:
(JSC::functionICUHeaderVersion):
(JSC::JSDollarVM::finishCreation):
- 3:25 PM Changeset in webkit [266036] by
-
- 4 edits in trunk
The ThrowTypeError function object must not be extensible
https://bugs.webkit.org/show_bug.cgi?id=108873
Reviewed by Yusuke Suzuki.
JSTests:
- test262/expectations.yaml: Mark 8 test cases as passing.
Source/JavaScriptCore:
This patch:
- Sets the value of %ThrowTypeError% "name" property to the empty string, as required [1] for anonymous built-in functions.
- Calls JSObject::freeze() on %ThrowTypeError%, making it non-extensible and its "name" and "length" properties non-configurable to match the spec [2].
Both changes align JSC with V8 and SpiderMonkey.
[1]: https://tc39.es/ecma262/#sec-ecmascript-standard-built-in-objects
[2]: https://tc39.es/ecma262/#sec-%throwtypeerror%
- runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
- 1:41 PM Changeset in webkit [266035] by
-
- 8 edits3 adds in trunk
[ECMA-402] Intl.DateTimeFormat dateStyle/timeStyle missing in WebKit
https://bugs.webkit.org/show_bug.cgi?id=209776
Reviewed by Darin Adler and Ross Kirsling.
JSTests:
- stress/intl-date-time-format-date-time-style-basic.js: Added.
(shouldBe):
(shouldBe.o.format):
- stress/intl-date-time-format-date-time-style-hour-cycle.js: Added.
(shouldBe):
(shouldBe.o.format):
- stress/intl-date-time-style-option-consistency.js: Added.
(shouldThrow):
(value.of.Object.entries):
- test262/config.yaml:
- test262/expectations.yaml:
Source/JavaScriptCore:
This patch implements Intl.DateTimeFormat dateStyle and timeStyle options. When it is specified,
we query the best date-time format with these options to ICU instead of configuring each date-time
formats.
Since ECMA402 requires enforcement of hourCycle specified from the option, even if ICU ignores that.
So, after getting the appropriate pattern from ICU, we modify this pattern and re-create UDateFormat
from the modified pattern.
- builtins/DatePrototype.js:
(toLocaleString.toDateTimeOptionsAnyAll):
(toLocaleString):
(toLocaleDateString.toDateTimeOptionsDateDate):
(toLocaleDateString):
(toLocaleTimeString.toDateTimeOptionsTimeTime):
(toLocaleTimeString):
- runtime/CommonIdentifiers.h:
- runtime/IntlDateTimeFormat.cpp:
(JSC::toDateTimeOptionsAnyDate):
(JSC::IntlDateTimeFormat::initializeDateTimeFormat):
(JSC::IntlDateTimeFormat::formatStyleString):
(JSC::IntlDateTimeFormat::resolvedOptions const):
- runtime/IntlDateTimeFormat.h:
- 1:30 PM Changeset in webkit [266034] by
-
- 2 edits in trunk/JSTests
Unreviewed, Catalina test262 bot is using older SDK than actual Catalina's one
We should update the bot. For now, skipping these tests.
- test262/config.yaml:
- 1:16 PM Changeset in webkit [266033] by
-
- 7 edits3 adds in trunk
[ECMA-402] Implement Intl.DateTimeFormat.prototype.formatRange
https://bugs.webkit.org/show_bug.cgi?id=209778
Reviewed by Ross Kirsling.
JSTests:
test262 failures are due to either of
- formatRangeToParts is missing
- ICU version difference
- stress/intl-datetimeformat-formatrange-relevant-extensions-ja.js: Added.
(shouldBe):
(shouldThrow):
(vm.icuVersion):
- stress/intl-datetimeformat-formatrange-relevant-extensions.js: Added.
(shouldBe):
(shouldThrow):
- stress/intl-datetimeformat-formatrange.js: Added.
(shouldBe):
(shouldThrow):
(test):
- test262/config.yaml:
- test262/expectations.yaml:
Source/JavaScriptCore:
This patch adds Intl.DateTimeFormat#formatRange. It takes two dates, and
generates formatted text which represents interval between these two dates.
We skip the implementation of Intl.DateTimeFormat#formatRangeToParts since
ICU udtitvfmt_formatToResult API is not getting stable state yet. We retrieve
pattern from UDateFormat, get skeleton from that pattern, and construct
UDateIntervalFormat from this skeleton.
- runtime/IntlDateTimeFormat.cpp:
(JSC::IntlDateTimeFormat::initializeDateTimeFormat):
(JSC::IntlDateTimeFormat::createDateIntervalFormatIfNecessary):
(JSC::IntlDateTimeFormat::formatRange):
(JSC::IntlDateTimeFormat::UDateFormatDeleter::operator() const): Deleted.
- runtime/IntlDateTimeFormat.h:
- runtime/IntlDateTimeFormatPrototype.cpp:
(JSC::IntlDateTimeFormatPrototypeFuncFormatRange):
- 12:22 PM Changeset in webkit [266032] by
-
- 21 edits15 adds in trunk
[JSC] Add Intl.Segmenter
https://bugs.webkit.org/show_bug.cgi?id=213638
Reviewed by Ross Kirsling.
JSTests:
- stress/intl-segmenter.js: Added.
(shouldBe):
(shouldNotThrow):
(func):
- test262/config.yaml:
- test262/expectations.yaml:
Source/JavaScriptCore:
This patch implements Intl.Segmenter[1]. Intl.Segmenter offers access to ICU break iterator feature, which can break strings into grapheme cluster / words / sentences.
[1]: https://github.com/tc39/proposal-intl-segmenter
- CMakeLists.txt:
- DerivedSources-input.xcfilelist:
- DerivedSources-output.xcfilelist:
- DerivedSources.make:
- JavaScriptCore.xcodeproj/project.pbxproj:
- Sources.txt:
- runtime/CommonIdentifiers.h:
- runtime/IntlObject.cpp:
(JSC::createSegmenterConstructor):
(JSC::IntlObject::finishCreation):
(JSC::intlSegmenterAvailableLocales):
- runtime/IntlObject.h:
- runtime/IntlSegmentIterator.cpp: Added.
(JSC::IntlSegmentIterator::create):
(JSC::IntlSegmentIterator::createStructure):
(JSC::IntlSegmentIterator::IntlSegmentIterator):
(JSC::IntlSegmentIterator::finishCreation):
(JSC::IntlSegmentIterator::visitChildren):
(JSC::IntlSegmentIterator::next):
- runtime/IntlSegmentIterator.h: Added.
- runtime/IntlSegmentIteratorPrototype.cpp: Added.
(JSC::IntlSegmentIteratorPrototype::create):
(JSC::IntlSegmentIteratorPrototype::createStructure):
(JSC::IntlSegmentIteratorPrototype::IntlSegmentIteratorPrototype):
(JSC::IntlSegmentIteratorPrototype::finishCreation):
(JSC::IntlSegmentIteratorPrototypeFuncNext):
- runtime/IntlSegmentIteratorPrototype.h: Added.
- runtime/IntlSegmenter.cpp: Added.
(JSC::IntlSegmenter::create):
(JSC::IntlSegmenter::createStructure):
(JSC::IntlSegmenter::IntlSegmenter):
(JSC::IntlSegmenter::finishCreation):
(JSC::IntlSegmenter::initializeSegmenter):
(JSC::IntlSegmenter::segment const):
(JSC::IntlSegmenter::resolvedOptions const):
(JSC::IntlSegmenter::granularityString):
(JSC::IntlSegmenter::createSegmentDataObject):
- runtime/IntlSegmenter.h: Added.
- runtime/IntlSegmenterConstructor.cpp: Added.
(JSC::IntlSegmenterConstructor::create):
(JSC::IntlSegmenterConstructor::createStructure):
(JSC::IntlSegmenterConstructor::IntlSegmenterConstructor):
(JSC::IntlSegmenterConstructor::finishCreation):
(JSC::constructIntlSegmenter):
(JSC::callIntlSegmenter):
(JSC::IntlSegmenterConstructorSupportedLocalesOf):
- runtime/IntlSegmenterConstructor.h: Added.
- runtime/IntlSegmenterPrototype.cpp: Added.
(JSC::IntlSegmenterPrototype::create):
(JSC::IntlSegmenterPrototype::createStructure):
(JSC::IntlSegmenterPrototype::IntlSegmenterPrototype):
(JSC::IntlSegmenterPrototype::finishCreation):
(JSC::IntlSegmenterPrototypeFuncSegment):
(JSC::IntlSegmenterPrototypeFuncResolvedOptions):
- runtime/IntlSegmenterPrototype.h: Added.
- runtime/IntlSegments.cpp: Added.
(JSC::IntlSegments::create):
(JSC::IntlSegments::createStructure):
(JSC::IntlSegments::IntlSegments):
(JSC::IntlSegments::finishCreation):
(JSC::IntlSegments::containing):
(JSC::IntlSegments::createSegmentIterator):
(JSC::IntlSegments::visitChildren):
- runtime/IntlSegments.h: Added.
- runtime/IntlSegmentsPrototype.cpp: Added.
(JSC::IntlSegmentsPrototype::create):
(JSC::IntlSegmentsPrototype::createStructure):
(JSC::IntlSegmentsPrototype::IntlSegmentsPrototype):
(JSC::IntlSegmentsPrototype::finishCreation):
(JSC::IntlSegmentsPrototypeFuncContaining):
(JSC::IntlSegmentsPrototypeFuncIterator):
- runtime/IntlSegmentsPrototype.h: Added.
- runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
- runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::segmentIteratorStructure):
(JSC::JSGlobalObject::segmenterStructure):
(JSC::JSGlobalObject::segmentsStructure):
- runtime/OptionsList.h:
- runtime/VM.cpp:
(JSC::VM::VM):
- runtime/VM.h:
Source/WTF:
- wtf/text/WTFString.cpp:
(WTF::String::charactersWithoutNullTermination const):
(WTF::String::charactersWithNullTermination const):
- wtf/text/WTFString.h:
- 11:32 AM Changeset in webkit [266031] by
-
- 17 edits3 adds in trunk
[ECMA-402] Implement unified Intl.NumberFormat
https://bugs.webkit.org/show_bug.cgi?id=209774
Reviewed by Ross Kirsling and Darin Adler.
JSTests:
All test262 failures are due to old ICU version. Once ICU is updated, they will go away.
- stress/intl-numberformat-unified-ja.js: Added.
(shouldBe):
(vm.icuVersion):
- stress/intl-numberformat-unified.js: Added.
(shouldBe):
(vm.icuVersion):
- stress/intl-numberformat.js:
(testNumberFormat):
(shouldBe.testNumberFormat.Intl.NumberFormat):
- test262/config.yaml:
- test262/expectations.yaml:
Source/JavaScriptCore:
This patch implements updated Intl.NumberFormat. This update was proposed in [1], and integrated into ECMA-402 spec.
This patch adds support for missing features in the previous Intl.NumberFormat implementation. Adding "unit", "unitDisplay",
"signDisplay", "notation", and "currencySign". Then Intl.NumberFormat can now handle "unit" etc.
To support new features, we need to use UNumberFormatter which is available after ICU 64 (while it is offered in ICU 62, some
critical part are added in 64 too). So, we keep the old UNumberFormat based implementation which is used for [60, 64) since WebKit
currently supports ICU 60. Old implementation does not support new things. If ICU is 64 or later, Intl.NumberFormat starts using
UNumberFormatter, and implements all the specified features.
[1]: https://github.com/tc39/proposal-unified-intl-numberformat
- JavaScriptCore.xcodeproj/project.pbxproj:
- runtime/IntlCollator.cpp:
(JSC::IntlCollator::UCollatorDeleter::operator() const): Deleted.
- runtime/IntlCollator.h:
- runtime/IntlDateTimeFormat.cpp:
(JSC::IntlDateTimeFormat::UDateFormatDeleter::operator() const): Deleted.
- runtime/IntlDateTimeFormat.h:
- runtime/IntlNumberFormat.cpp:
(JSC::computeCurrencyDigits):
(JSC::sanctionedSimpleUnitIdentifier):
(JSC::WellFormedUnit::WellFormedUnit):
(JSC::wellFormedUnitIdentifier):
(JSC::IntlNumberFormat::initializeNumberFormat):
(JSC::IntlNumberFormat::format const):
(JSC::IntlNumberFormat::styleString):
(JSC::IntlNumberFormat::currencyDisplayString):
(JSC::IntlNumberFormat::notationString):
(JSC::IntlNumberFormat::currencySignString):
(JSC::IntlNumberFormat::unitDisplayString):
(JSC::IntlNumberFormat::compactDisplayString):
(JSC::IntlNumberFormat::signDisplayString):
(JSC::IntlNumberFormat::resolvedOptions const):
(JSC::partTypeString):
(JSC::IntlNumberFormat::formatToPartsInternal):
(JSC::IntlNumberFormat::formatToParts const):
(JSC::IntlNumberFormat::UNumberFormatDeleter::operator() const): Deleted.
- runtime/IntlNumberFormat.h:
- runtime/IntlNumberFormatInlines.h: Added.
(JSC::setNumberFormatDigitOptions):
(JSC::IntlFieldIterator::IntlFieldIterator):
(JSC::IntlFieldIterator::next):
- runtime/IntlPluralRules.cpp:
(JSC::IntlPluralRules::initializePluralRules):
(JSC::IntlPluralRules::resolvedOptions const):
(JSC::IntlPluralRules::UPluralRulesDeleter::operator() const): Deleted.
(JSC::IntlPluralRules::UNumberFormatDeleter::operator() const): Deleted.
(JSC::UEnumerationDeleter::operator() const): Deleted.
- runtime/IntlPluralRules.h:
- runtime/IntlRelativeTimeFormat.cpp:
(JSC::IntlRelativeTimeFormat::formatToParts const):
(JSC::IntlRelativeTimeFormat::URelativeDateTimeFormatterDeleter::operator() const): Deleted.
(JSC::IntlRelativeTimeFormat::UNumberFormatDeleter::operator() const): Deleted.
- runtime/IntlRelativeTimeFormat.h:
- tools/JSDollarVM.cpp:
(JSC::functionICUVersion):
- 11:08 AM Changeset in webkit [266030] by
-
- 16 edits28 adds in trunk
Console object's @@toStringTag should be "console" instead of "Console"
https://bugs.webkit.org/show_bug.cgi?id=215750
Reviewed by Ross Kirsling.
LayoutTests/imported/w3c:
Import ToT wpt/console tests including @@toStringTag tests.
- resources/import-expectations.json:
- web-platform-tests/console/META.yml: Added.
- web-platform-tests/console/console-is-a-namespace.any-expected.txt: Added.
- web-platform-tests/console/console-is-a-namespace.any.html: Added.
- web-platform-tests/console/console-is-a-namespace.any.js: Added.
(test):
- web-platform-tests/console/console-is-a-namespace.any.worker-expected.txt: Added.
- web-platform-tests/console/console-is-a-namespace.any.worker.html: Added.
- web-platform-tests/console/console-label-conversion.any-expected.txt: Added.
- web-platform-tests/console/console-label-conversion.any.html: Added.
- web-platform-tests/console/console-label-conversion.any.js: Added.
(const.method.of.methods.test):
- web-platform-tests/console/console-label-conversion.any.worker-expected.txt: Added.
- web-platform-tests/console/console-label-conversion.any.worker.html: Added.
- web-platform-tests/console/console-namespace-object-class-string.any-expected.txt: Added.
- web-platform-tests/console/console-namespace-object-class-string.any.html: Added.
- web-platform-tests/console/console-namespace-object-class-string.any.js: Added.
(test):
(test.t.t.add_cleanup):
- web-platform-tests/console/console-namespace-object-class-string.any.worker-expected.txt: Added.
- web-platform-tests/console/console-namespace-object-class-string.any.worker.html: Added.
- web-platform-tests/console/console-tests-historical.any-expected.txt: Added.
- web-platform-tests/console/console-tests-historical.any.html: Added.
- web-platform-tests/console/console-tests-historical.any.js: Added.
(test):
- web-platform-tests/console/console-tests-historical.any.worker-expected.txt: Added.
- web-platform-tests/console/console-tests-historical.any.worker.html: Added.
- web-platform-tests/console/idlharness.any-expected.txt: Added.
- web-platform-tests/console/idlharness.any.html: Added.
- web-platform-tests/console/idlharness.any.js: Added.
- web-platform-tests/console/idlharness.any.worker-expected.txt: Added.
- web-platform-tests/console/idlharness.any.worker.html: Added.
- web-platform-tests/console/w3c-import.log: Added.
Source/JavaScriptCore:
Use "console" instead of "Console". Now, namespace object has @@toStringTag.
https://github.com/web-platform-tests/wpt/pull/24717
- runtime/ConsoleObject.cpp:
LayoutTests:
- fast/dom/Window/window-lookup-precedence-expected.txt:
- fast/loader/window-properties-restored-from-page-cache-expected.txt:
- http/tests/security/cross-frame-access-put-expected.txt:
- inspector/debugger/pause-for-internal-scripts-expected.txt:
- inspector/debugger/stepping/stepping-internal-scripts-expected.txt:
- js/console-expected.txt:
- js/console.html:
- platform/gtk/fast/dom/Window/window-lookup-precedence-expected.txt:
- platform/mac-wk2/fast/dom/Window/window-lookup-precedence-expected.txt:
- 10:57 AM Changeset in webkit [266029] by
-
- 8 edits in trunk
[JSC] Enable Intl.DisplayNames
https://bugs.webkit.org/show_bug.cgi?id=215749
Reviewed by Ross Kirsling.
JSTests:
- stress/intl-displaynames.js:
- stress/intl-parse-unicode-subtags.js:
- stress/intl-suppored-locales-of.js:
- test262/config.yaml:
Source/JavaScriptCore:
Enable Intl.DisplayNames by default. This is already stage 4 and integrated into the spec.
- runtime/IntlObject.cpp:
(JSC::IntlObject::finishCreation):
- runtime/OptionsList.h:
- 9:16 AM Changeset in webkit [266028] by
-
- 24 edits in trunk
Move node geometry functions from Range to RenderObject
https://bugs.webkit.org/show_bug.cgi?id=215677
Reviewed by Zalan Bujtas.
Source/WebCore:
Moved functions that return quads and rectangles out of Range into RenderObject.
We could find another home for them, but for now they make sense as static member
functions there since RenderObject has the non-static member functions that they
call on multiple nodes. Mostly did not change the design of these functions much,
and was careful not to change behavior at all. But did change a few things:
- Got rid of the functions that return a single unioned rectangle. Instead callers call unionRect at each call site.
- Changed the "use selection height" boolean to a BoundingRectBehavior flag.
- accessibility/AccessibilityRenderObject.cpp:
(WebCore::boundsForRects): Call unionRect(RenderObject::absoluteTextRects) instead
of Range::absoluteBoundingBox.
- dom/DocumentMarkerController.cpp:
(WebCore::updateRenderedRectsForMarker): Instead of passing "true", pass
"RenderObject::BoundingRectBehavior::UseSelectionHeight".
- dom/Range.cpp:
(WebCore::Range::absoluteBoundingBox const): Deleted.
(WebCore::Range::absoluteRectsForRangeInText const): Deleted.
(WebCore::Range::absoluteTextRects const): Deleted.
(WebCore::Range::getClientRects const): Call RenderObject::clientBorderAndTextRects.
(WebCore::Range::getBoundingClientRect const): Call
unionRect(RenderObject::clientBorderAndTextRects).
(WebCore::Range::borderAndTextRects const): Deleted.
(WebCore::Range::boundingRect const): Deleted.
(WebCore::Range::absoluteBoundingRect const): Deleted.
- dom/Range.h: Updated for above.
- dom/SimpleRange.cpp:
(WebCore::IntersectingNodeIterator::IntersectingNodeIterator): Fix bug affecting
empty ranges by calling enforceEndInvariant.
(WebCore::IntersectingNodeIterator::advance): Refactor to call enforceEndInvariant.
(WebCore::IntersectingNodeIterator::advanceSkippingChildren): Ditto.
(WebCore::IntersectingNodeIterator::enforceEndInvariant): Added.
- dom/SimpleRange.h: Added enforceEndInvariant.
- editing/FrameSelection.cpp:
(WebCore::FrameSelection::getClippedVisibleTextRectangles const): Instead of
passing a useSelectionHeight boolean, pass BoundingRectBehavior.
- page/TextIndicator.cpp:
(WebCore::absoluteBoundingRectForRange): Call
unionRectIgnoringZeroRects(RenderObject::absoluteBorderAndTextRects).
(WebCore::initializeIndicator): Call RenderObject::absoluteTextRects.
- platform/graphics/GeometryUtilities.cpp:
(WebCore::unionRectIgnoringZeroRects): Added.
- platform/graphics/GeometryUtilities.h: Updated for above.
- rendering/RenderLineBreak.h: Marked a lot of functions final.
Added a default value for the absoluteQuads out argument.
- rendering/RenderObject.cpp:
(WebCore::RenderObject::addPDFURLRect): Tweaked code style a bit.
(WebCore::RenderObject::absoluteTextQuads): Replaced boolean useSelectionHeight
argument with a BoundingRectBehavior argument. Also added a downcast so the
call to RenderLineBreak::absoluteQuads is a non-virtual function call.
(WebCore::absoluteRectsForRangeInText): Added.
(WebCore::RenderObject::absoluteTextRects): Replaced boolean useSelectionHeight
argument with a BoundingRectBehavior argument.
(WebCore::nodeBefore): Added.
(WebCore::borderAndTextRects): Added.
(WebCore::RenderObject::absoluteBorderAndTextRects): Added.
(WebCore::RenderObject::clientBorderAndTextRects): Added.
- rendering/RenderObject.h: Updated for above.
Source/WebKit:
- WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
(WebKit::InjectedBundleRangeHandle::boundingRectInWindowCoordinates const):
Call unionRectIgnoringZeroRects(RenderObject::absoluteBorderAndTextRects).
(WebKit::InjectedBundleRangeHandle::renderedImage): Call
unionRectIgnoringZeroRects(RenderObject::absoluteBorderAndTextRects).
- WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::requestEvasionRectsAboveSelection): Call
unionRect(RenderObject::absoluteTextRects).
(WebKit::WebPage::requestDocumentEditingContext): Call
unionRect(RenderObject::absoluteTextRects).
Source/WebKitLegacy/mac:
- DOM/DOM.mm:
(-[DOMRange boundingBox]): Call unionRect(RenderObject::absoluteTextRects).
Source/WebKitLegacy/win:
- AccessibleTextImpl.cpp:
(AccessibleText::scrollSubstringTo): Call
unionRect(RenderObject::absoluteTextRects) instead of
Range::absoluteBoundingBox.
LayoutTests:
- fast/dom/Range/scale-page-bounding-client-rect.html: Fix this test that accidentally
depended on getting rects for an empty range (the contents of a div element with no
text inside it) to instead get rects for a non-empty element (the div element, not
just its contents). Test now works correctly, but results don't need to change.
- fast/dom/Range/scale-page-client-rects.html: Ditto.
- 9:13 AM Changeset in webkit [266027] by
-
- 6 edits in trunk/Source/WebCore
Make some small improvements involving sorting
https://bugs.webkit.org/show_bug.cgi?id=215617
Reviewed by Anders Carlsson.
- contentextensions/DFA.cpp:
(WebCore::ContentExtensions::printTransitions): Fixed "incomming" spelling error.
- css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::fillImageSet): Use std::stable_sort instead of std::sort
because there is no guarantee that each image has different resolution and we want
repeatable behavior when they are the same.
- page/Performance.cpp:
(WebCore::Performance::appendBufferedEntriesByType const): Removed the return
value since we don't need it any more.
- page/Performance.h: Updated for above.
- page/PerformanceObserver.cpp:
(WebCore::PerformanceObserver::observe): Use std::stable_sort only on the new
entries and then use std::inplace_merge. It's wasteful to re-sort the entire
array when adding entries. A little less elegant, but more efficient.
- 9:11 AM Changeset in webkit [266026] by
-
- 35 edits1 add in trunk
Create documentOrder function, start refactoring to use it instead of Range::compare functions
https://bugs.webkit.org/show_bug.cgi?id=215551
Reviewed by Chris Dumez.
Source/WebCore:
- WebCore.xcodeproj/project.pbxproj: Make TextControlInnerElements.h Private so
we can use it from unit tests.
- accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::text const): Tweak code slightly.
- accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::selectedTextRange const): Always use the native
text control's idea of the selected text range. There is no need to use the
document-based range with any of these native text controls. The check before would
almost always return true, except for unusual cases, particularly combo box, which
returns false for isARIATextControl. We may want to change isARIATextControl to
return true for combo box, but it's not necessary for this fix. Without this change,
a test involving a combo box was failing because changes caused
documentBasedSelectedTextRange to no longer accidentally do the right thing.
- dom/BoundaryPoint.h: Added != and documentOrder.
- dom/Document.h: Export allocation function and constructor so we can allocate
in a unit test.
- dom/Node.cpp:
(WebCore::connectedInSameTreeScope): Renamed from areNodesConnectedInSameTreeScope.
(WebCore::Node::compareDocumentPosition): Updated for name change above.
(WebCore::depth): Changed to take a const& and to walk acrosss shadow host boundaries,
so this can be used in algorithms that are intended to work on the combined tree.
Has no effect when called on nodes that are not in a shadow tree.
(WebCore::commonInclusiveAncestorAndChildren): Refactored so this can be used by
callers that need to know the distinct ancestor children as well as the common
ancestor. Also revised it to work across shadow tree boundaries.
(WebCore::commonInclusiveAncestor): Updated to call commonInclusiveAncestorAndChildren.
(WebCore::isSiblingSubsequent): Added.
(WebCore::documentOrder): Added. Implemented using commonInclusiveAncestorAndChildren and
isSiblingSubsequent.
- dom/Node.h: Updated for above. Also added PartialOrdering class, a compatible
subset of C++20's std::partial_ordering, for return value for documentOrder.
- dom/Position.cpp:
(WebCore::Position::computeOffsetInContainerNode const): Removed clamping the
result to the length of the container node; not needed.
(WebCore::Position::previous const): Updated for name change.
(WebCore::Position::next const): Updated for name change.
(WebCore::Position::upstream const): Updated for name change.
(WebCore::Position::downstream const): Updated for name change.
(WebCore::commonInclusiveAncestor): Renamed from commonShadowIncludingAncestor
since this is now the same as the commonInclusiveAncestor that takes two nodes;
they now both take shadow trees into account.
(WebCore::makeContainerOffsetPosition): Added. Clearer way to construct
positions from containers and offsets. An alternative to makeDeprecatedLegacyPosition
for cases where we don't need the deprecated legacy behavior.
(WebCore::makeDeprecatedLegacyPosition): Renamed from createLegacyEditingPosition.
Adding the word "deprecated" to be clearer that this is not just "legacy" but also
something we are trying to get rid of. Changing from "create" to "make" because
this does not allocate memory on the heap.
(WebCore::documentOrder): Added. Still to do: more optimized implementation when
we can compare two positions without computing node offsets.
- dom/Position.h: Updated for above.
(WebCore::minOffsetForNode): Deleted.
- dom/RadioButtonGroups.cpp:
(WebCore::RadioButtonGroup::members const): Use documentOrder instead of
documentOrderComparator.
- dom/Range.cpp:
(WebCore::areRangesEqual): Rewrote to not use Position.
(WebCore::rangesOverlap): Updated for name change.
(WebCore::Range::expand): Rewrote to not use Range::start/endPosition.
(WebCore::operator<<): Deleted.
- dom/Range.h: Removed now-unused Range::start/endPosition, documentOrderComparator,
and TextStream operators.
- dom/RangeBoundaryPoint.h: Removed now-unused RangeBoundaryPoint::toPosition.
Added makeBoundaryPoint function to convert RangeBoundaryPoint into BoundaryPoint.
- dom/SimpleRange.cpp:
(WebCore::isOffsetBeforeChild): Added. For use by documentOrder.
(WebCore::documentOrder): Added.
- editing/TextIterator.cpp:
(WebCore::characterCount): Use documentOrder instead of
Range::compareBoundaryPoints.
- editing/VisiblePosition.cpp:
(WebCore::areVisiblePositionsInSameTreeScope): Updated for name change.
- editing/VisiblePosition.h: Use assignment insteed of calling clear,
to possibly prepare to get rid of Position::clear in the future.
Added a documentORder function that takes two visible positions.
- editing/cocoa/HTMLConverter.mm:
(HTMLConverterCaches::cacheAncestorsOfStartToBeConverted): Use
commonInclusiveAncestor instead of commonShadowIncludingAncestor.
- editing/markup.cpp:
(WebCore::serializePreservingVisualAppearanceInternal): Ditto.
- html/HTMLBodyElement.h: Export create function so it can used in unit tests.
- html/HTMLDivElement.h: Ditto.
- html/HTMLHtmlElement.h: Ditto.
- html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::create): Added so it can be used in unit tests.
- html/HTMLTextAreaElement.h: Ditto. Also export the innerTextElement function
so it can be used in unit tests.
- page/DOMSelection.cpp:
(WebCore::DOMSelection::addRange): Use makeDeprecatedLegacyPosition directly
rather than using Range::start/endPosition. This was the only place in WebCore
still using Range::start/endPosition and over time we would like to move from
makeDeprecatedLegacyPosition to makeContainerOffsetPosition, so it's good to
have it be explicit here rather than hidden inside the Range class.
(WebCore::DOMSelection::containsNode const): Added a check of containingShadowRoot.
This preserves the old behavior. Before, constructing the range resulted in
a collapsed range when the shadow tree was involved. This is a more direct way
to achieve the same result.
- page/Page.cpp:
(WebCore::replaceRanges): Use documentOrder instead of comparePositions.
Eventually we will delete comparePositions.
Source/WebKit:
- WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
(-[WKDOMRange rangeByExpandingToWordBoundaryByCharacters:inDirection:]):
Use makeDeprecatedLegacyPosition instead of Range::start/endPosition.
This was the only place in the WebKit framework still using
Range::start/endPosition and over time we would like to move from
makeDeprecatedLegacyPosition to makeContainerOffsetPosition, so it's good
to have it be explicit here rather than hidden inside the Range class.
Source/WebKitLegacy/ios:
- WebCoreSupport/WebVisiblePosition.mm:
(-[DOMRange startPosition]): Rewrote to not use Range::startPosition.
(-[DOMRange endPosition]): Rewrote to not use Range::endPosition.
Source/WebKitLegacy/mac:
- WebView/WebFrame.mm:
(-[WebFrame _smartInsertForString:replacingRange:beforeString:afterString:]):
Rewrite to use makeSimpleRange and makeContainerOffsetPosition. Simplifies
the null checks. Would love to remove the function but at this time it's
still used by Apple's Mail app (albeit in a peculiar way, always passing a
constant string).
Tools:
- TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Added DocumentOrder.cpp.
- TestWebKitAPI/Tests/WebCore/DocumentOrder.cpp: Added.
Relatively thorough test of three different documentOrder functions.
Could still use even more test cases involving different types of shadow trees.
- 7:33 AM Changeset in webkit [266025] by
-
- 14 edits in trunk
[GTK][WPE] Compilation warnings with clang/gcc 10
https://bugs.webkit.org/show_bug.cgi?id=215699
Reviewed by Darin Adler.
.:
- Source/cmake/WebKitCompilerFlags.cmake: Disable tautological-compare and
misleading-indentation warnings triggering false-positive when building JSC.
Source/WebCore:
- Modules/indexeddb/server/SQLiteIDBBackingStore.h: Mark class as final because its destructor is marked as such.
(WebCore::IDBServer::SQLiteIDBBackingStore::databaseDirectory const): Deleted.
(WebCore::IDBServer::SQLiteIDBBackingStore::sessionID const): Deleted.
(WebCore::IDBServer::SQLiteIDBBackingStore::databaseRootDirectoryIsolatedCopy const): Deleted.
- dom/messageports/MessagePortChannelProviderImpl.h: Ditto.
- layout/Verification.cpp:
(WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded): Remove spurious
matchingRuns assignment. I have no idea how this was supposed to work?
- platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::JPEGImageReader::decode): Use FALLTHROUGH macro.
- platform/image-decoders/webp/WEBPImageDecoder.cpp:
(WebCore::WEBPImageDecoder::decodeFrame): Ditto.
Source/WebKit:
- UIProcess/API/wpe/PageClientImpl.cpp:
(WebKit::PageClientImpl::doneWithTouchEvent): Use null input touch event enum value for touch event handling.
Tools:
- TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp: Wrap m_geometry private field in GTK
ifdefs, this is not used in WPE.
- WebKitTestRunner/wpe/PlatformWebViewWPE.cpp:
(WTR::PlatformWebView::windowFrame): Return rect built with explicit initializers.
- wpe/backends/WindowViewBackend.cpp: Supply additional touch client callbacks, mandated by the interface.
- 6:25 AM Changeset in webkit [266024] by
-
- 2 edits in trunk/Tools
Unreviewed, reverting r266012.
Fix API tests after r266020
Reverted changeset:
"[GLIB] Update checked exception after r265942"
https://bugs.webkit.org/show_bug.cgi?id=215738
https://trac.webkit.org/changeset/266012
- 1:27 AM Changeset in webkit [266023] by
-
- 2 edits in trunk/Tools
Unreviewed, add slackId to my contributors.json entry
Slack allows multiple users having the same name. How to identify one user in slack is using Slack member ID.
Try setting a slackId and leverage it via WKR / WebKitBot.
- Scripts/webkitpy/common/config/contributors.json:
Aug 21, 2020:
- 6:32 PM Changeset in webkit [266022] by
-
- 2 edits in trunk/Source/JavaScriptCore
StrictEq should not care about masqueradesAsUndefinedWatchpoint
https://bugs.webkit.org/show_bug.cgi?id=215743
Reviewed by Yusuke Suzuki.
This patch removes masqueradesAsUndefinedWatchpoint handling for StrictEq
from fixupCompareStrictEqAndSameValue(), aligning it with SameValue.
According to the spec [1], only a few language constructs special-case
IsHTMLDDA objects: ToBoolean, abstract equality, andtypeof.
No behavior change.
[1]: https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
- dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupCompareStrictEqAndSameValue):
- 5:52 PM Changeset in webkit [266021] by
-
- 4 edits1 add in trunk
[macOS] Unable to copy text from the function browser panel in Numbers
https://bugs.webkit.org/show_bug.cgi?id=215740
<rdar://problem/65189303>
Reviewed by Darin Adler.
Source/WebKit:
On some versions of Xcode, using Interface Builder to set up WKWebViews causes the WKWebView to contain two
WKFlippedViews as subviews; one of these is created and added in the normal initialization path of the web view
underneath WebViewImpl's constructor, and the other is created and added underneath the superclass (NSView's)
-initWithCoder:implementation.
This causes issues when hit-testing WKWebView using the
-hitTest:method, which is expected to return the
WKWebView itself instead of the inner WKFlippedView. The logic that tries to implement this behavior is in
WebViewImpl::hitTest, which calls into WKWebView's-hitTest:method and returns the WKWebView if the hit-
tested view ended up being equal to them_layerHostingView. Since we end up with two layer hosting views (only
one of which is the realm_layerHostingView), we fail the check and end up returning the other WKFlippedView.
In the context of this bug, this erroneous hit-test causes AppKit to ask if the WKFlippedView can become the
first responder upon mousedown (which it cannot), and so the window's first responder remains the same (instead
of changing to WKWebView).
To fix this, adjust the constructor of WebViewImpl to avoid making an extra layer hosting view in the case where
decoding the WKWebView already initialized and placed the layer hosting view, and just use the existing one
instead.
Test: WKWebView.HitTestAfterInitializingFromCoder
- UIProcess/Cocoa/WebViewImpl.mm:
(-[WKFlippedView initWithFrame:]):
(-[WKFlippedView initWithCoder:]):
(-[WKFlippedView _commonInitialize]):
Override both designated initialization codepaths so that we call the
-_commonInitializehelper, which sets
the autoresizing mask. This was previously called immediately after creating the WKFlippedView in the
constructor of WebViewImpl.
(WebKit::WebViewImpl::WebViewImpl):
Tools:
Add a new API test that serializes a WKWebView, then deserializes it, and then verifies that calling
-hitTest:
on the deserializedWKWebViewgrabs theWKWebViewitself rather than theWKFlippedViewunderneath it.
- TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
- TestWebKitAPI/Tests/mac/WKWebViewCoders.mm: Added.
- 5:20 PM Changeset in webkit [266020] by
-
- 2 edits1 add in trunk/Tools
Regression (r265942): Layout-tests are hanging on iOS EWS
https://bugs.webkit.org/show_bug.cgi?id=215742
<rdar://problem/67584717>
Unreviewed infrastructure fix.
Partial revert of r265942, since EWS is raising objc exceptions after forking.
- Scripts/webkitpy/common/timeout_context.py:
(Timeout):
- Scripts/webkitpy/common/timeout_context_unittest.py: Added.
(TimeoutContextTests):
- 4:46 PM Changeset in webkit [266019] by
-
- 6 edits in trunk/Source/JavaScriptCore
Unreviewed, reverting r265965.
https://bugs.webkit.org/show_bug.cgi?id=215744
getCallData can be called from DFG concurrent compiler, but it
is not safe in DOM PluginObject
Reverted changeset:
"Use jsTypeofIsObject() in DFG AI and
operationTypeOfIsObject()"
https://bugs.webkit.org/show_bug.cgi?id=144457
https://trac.webkit.org/changeset/265965
- 4:07 PM Changeset in webkit [266018] by
-
- 10 edits in trunk
Align "length" properties of function prototypes with the spec
https://bugs.webkit.org/show_bug.cgi?id=215716
Reviewed by Ross Kirsling.
JSTests:
- test262/expectations.yaml: Mark 8 test cases as passing.
Source/JavaScriptCore:
This change defines Function.prototype.length [1] as Configurable and
removes "length" properties from other (async/generator) function prototypes
that are ordinary non-callable objects [2], aligning JSC with V8 and SpiderMonkey.
Also, adds inherits() ASSERT in FunctionPrototype::finishCreation()
to match (most of) the other built-ins.
[1]: https://tc39.es/ecma262/#sec-properties-of-the-function-prototype-object
[2]: https://tc39.es/ecma262/#sec-async-function-prototype-properties
- runtime/AsyncFunctionPrototype.cpp:
(JSC::AsyncFunctionPrototype::finishCreation):
- runtime/AsyncGeneratorFunctionPrototype.cpp:
(JSC::AsyncGeneratorFunctionPrototype::finishCreation):
- runtime/FunctionPrototype.cpp:
(JSC::FunctionPrototype::finishCreation):
- runtime/GeneratorFunctionPrototype.cpp:
(JSC::GeneratorFunctionPrototype::finishCreation):
LayoutTests:
- js/kde/prototype_length-expected.txt:
- js/kde/script-tests/prototype_length.js:
- 3:49 PM Changeset in webkit [266017] by
-
- 2 edits in trunk/Tools
Fix the Color/ExtendedColor lldb data provider
https://bugs.webkit.org/show_bug.cgi?id=215735
Reviewed by Darin Adler.
Fix the data provider for Color after Color and ExtendedColor internals changed.
- lldb/lldb_webkit.py:
(WebCoreColorProvider._to_string_extended):
(WebCoreColorProvider.to_string):
- 3:49 PM Changeset in webkit [266016] by
-
- 4 edits in trunk/Source/WebCore
Add some FIXMEs in the EventHandler wheel event handling code for all the things that are wrong
https://bugs.webkit.org/show_bug.cgi?id=215741
Reviewed by Wenson Hsieh.
There is much confusing code here. Trying to document the issues I've found.
- page/EventHandler.cpp:
(WebCore::EventHandler::handleWheelEvent):
- page/mac/EventHandlerMac.mm:
(WebCore::findEnclosingScrollableContainer):
(WebCore::EventHandler::determineWheelEventTarget):
(WebCore::EventHandler::processWheelEventForScrolling):
- page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::handleWheelEvent):
- 2:30 PM Changeset in webkit [266015] by
-
- 5 edits in trunk
Define Intl[Symbol.toStringTag]
https://bugs.webkit.org/show_bug.cgi?id=215715
Reviewed by Ross Kirsling.
JSTests:
- stress/intl-object.js:
- test262/expectations.yaml: Mark 4 test cases as passing.
Source/JavaScriptCore:
This patch utilizes JSC_TO_STRING_TAG_WITHOUT_TRANSITION() to define Symbol.toStringTag
on Intl namespace object, implementing the recent spec change [1] and aligning JSC with V8.
Also, adds inherits() ASSERT to match (most of) the other built-ins.
[1]: https://github.com/tc39/ecma402/pull/487
- runtime/IntlObject.cpp:
(JSC::IntlObject::finishCreation):
- 2:29 PM Changeset in webkit [266014] by
-
- 4 edits in trunk/Source/WebKit
IPC::encodeSharedBuffer combines SharedBuffer data segments when copying to SharedMemory
https://bugs.webkit.org/show_bug.cgi?id=215737
<rdar://problem/67568099>
Reviewed by Darin Adler.
IPC::encodeSharedBuffer called SharedBuffer::data() when copying data into SharedMemory,
requiring the SharedBuffer to combine its data segments. This can be avoided by using
SharedMemory::copyBuffer() instead.
- Platform/SharedMemory.cpp:
(WebKit::SharedMemory::copyBuffer): Modernized to use auto and range-based for loops.
- Shared/WebCoreArgumentCoders.cpp:
(IPC::encodeSharedBuffer): Used SharedMemory::copyBuffer() to create a copy of the buffer in
a new SharedMemory. Calling this function does not combine the buffer's data segments.
- Platform/SharedMemory.h: Added a FIXME for how SharedMemory's factory functions could be
improved.
- 1:41 PM Changeset in webkit [266013] by
-
- 8 edits1 add in trunk
Function.prototype.bind should not clamp "length" to int32
https://bugs.webkit.org/show_bug.cgi?id=215733
Reviewed by Darin Adler.
JSTests:
- microbenchmarks/function-bind-creation.js: Added.
- test262/expectations.yaml: Mark 4 test cases as passing.
Source/JavaScriptCore:
This patch fixes to integer conversion of target function's "length" values
beyond UINT_MAX, aligning JSC with the spec [1], V8 and SpiderMonkey.
doubleis used instead ofuint64_tto retain semantics of JS Number type [2]
and hold Infinity values. To avoid spreadingdouble lengthover JSFunction::create()
and its subclasses, JSBoundFunction is modified to use JSFunction::finishCreation(VM&)
overload, removing 2 unused arguments and speeding up bound function creation by ~9%.
[1]: https://tc39.es/ecma262/#sec-function.prototype.bind (step 6.c.i)
[2]: https://tc39.es/ecma262/#sec-ecmascript-language-types-number-type
- builtins/FunctionPrototype.js:
(bind):
- runtime/JSBoundFunction.cpp:
(JSC::JSBoundFunction::create):
(JSC::JSBoundFunction::JSBoundFunction):
(JSC::JSBoundFunction::finishCreation):
- runtime/JSBoundFunction.h:
- runtime/JSFunction.cpp:
(JSC::JSFunction::finishCreation):
(JSC::JSFunction::reifyLength):
- runtime/JSGlobalObject.cpp:
(JSC::makeBoundFunction):
- 12:43 PM Changeset in webkit [266012] by
-
- 2 edits in trunk/Tools
[GLIB] Update checked exception after r265942
https://bugs.webkit.org/show_bug.cgi?id=215738
Reviewed by Carlos Alberto Lopez Perez.
Avoid aborting the full script on a timeout due to unchecked
exception.
- glib/api_test_runner.py:
(TestRunner._run_google_test): Use exception from new timeout module.
- 12:16 PM Changeset in webkit [266011] by
-
- 2 edits in trunk/Source/WebKit
Use closeReason provided in didCloseWithCode delegate for the NSURLSessionWebSocket code path
https://bugs.webkit.org/show_bug.cgi?id=215519
Patch by Jiten Mehta <jmehta@apple.com> on 2020-08-21
Reviewed by Youenn Fablet.
Covered by existing protocol tests with NSURLSession code path enabled.
http/tests/websocket/tests/hybi/workers/close-code-and-reason.html
- NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:webSocketTask:didCloseWithCode:reason:]):
- 11:28 AM Changeset in webkit [266010] by
-
- 4 edits in trunk/Source/WebCore
Merge two DOMURL constructors
https://bugs.webkit.org/show_bug.cgi?id=215734
Patch by Rob Buis <rbuis@igalia.com> on 2020-08-21
Reviewed by Darin Adler.
Merge two DOMURL constructors to make it match the relevant WebIDL:
https://url.spec.whatwg.org/#dom-url-url-url-base-base
- html/DOMURL.cpp:
(WebCore::DOMURL::create):
- html/DOMURL.h:
- html/DOMURL.idl:
- 10:43 AM Changeset in webkit [266009] by
-
- 4 edits in trunk/Source/WebCore
Fix USE_ANGLE=0 build after "WebGLLayer clobbers TEXTURE_2D binding on iOS"
https://bugs.webkit.org/show_bug.cgi?id=211758
Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2020-08-21
Reviewed by Kenneth Russell.
No new tests, build fix.
- html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::getUniformIndices): Mark parameters unused
when USE_ANGLE=0
- platform/graphics/cocoa/WebGLLayer.mm: Define scoped binding restorer
only for USE_ANGLE=1, since it's not used otherwise and it is implemented
in terms of ANGLE gl::... API.
- platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp:
Include Logging.h to make RELEASE_LOG(WebGL, ...) work.
Presumably this file is not compiled with USE_ANGLE=1 or
the unified build mechanism hides the error.
- 9:39 AM Changeset in webkit [266008] by
-
- 1 copy in tags/Safari-610.1.28.1.3
Tag Safari-610.1.28.1.3.
- 9:36 AM Changeset in webkit [266007] by
-
- 9 edits in branches/safari-610.1.28.1-branch/Source
Cherry-pick r265953. rdar://problem/67560218
Sandbox violation when calling [NSHTTPCookieStorage sharedHTTPCookieStorage] from the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=215701
<rdar://problem/67069826>
Reviewed by Geoffrey Garen.
The sandbox does not allow calling [NSHTTPCookieStorage sharedHTTPCookieStorage] from the WebProcess.
createPrivateStorageSession() was calling [NSHTTPCookieStorage sharedHTTPCookieStorage] to retrieve
the cookieAcceptPolicy and createPrivateStorageSession() is used by the cookie cache in the WebProcess.
To address the issue, we now allow the caller of createPrivateStorageSession() to provide the
cookieAcceptPolicy and we have the cookie cache retrieve the cookieAcceptPolicy from the
NetworkProcessConnection.
Source/WebCore:
- platform/network/NetworkStorageSession.h:
- platform/network/cf/NetworkStorageSessionCFNetWin.cpp: (WebCore::createPrivateStorageSession):
- platform/network/cocoa/NetworkStorageSessionCocoa.mm: (WebCore::createPrivateStorageSession):
Source/WebKit:
- WebProcess/Network/NetworkProcessConnection.h: (WebKit::NetworkProcessConnection::cookieAcceptPolicy const):
- WebProcess/WebPage/Cocoa/WebCookieCacheCocoa.mm: (WebKit::WebCookieCache::inMemoryStorageSession):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@265953 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 9:34 AM Changeset in webkit [266006] by
-
- 8 edits in branches/safari-610.1.28.1-branch/Source
Versioning.
WebKit-7610.1.28.1.3
- 9:25 AM Changeset in webkit [266005] by
-
- 2 edits in branches/safari-609-branch/Source/WTF
Cherry-pick r265252. rdar://problem/67080756
about: scheme URL constants should be backed by StaticStringImpl
https://bugs.webkit.org/show_bug.cgi?id=215113
Reviewed by Darin Adler.
- wtf/URL.cpp: (WTF::aboutBlankURL): (WTF::aboutSrcDocURL):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@265252 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- 4:42 AM Changeset in webkit [266004] by
-
- 6 edits in trunk
Source/WebCore:
Range::contains does not work correctly when the common ancestor node is a Document.
https://bugs.webkit.org/show_bug.cgi?id=215714
Reviewed by Darin Adler.
Test: accessibility/mac/selected-visible-position-range.html.
For a Range with a Document object as common ancestor, Range::contains(otherRange)
would return false for any given other range in the same document. This
causes problems in VoiceOver navigation and Braille functionality in
the MacOS Mail.app.
- accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange const):
Use SimpleRange::isNull instead of repeating its implementation.
- dom/Range.cpp:
(WebCore::Range::contains const): Compare the Documents of the ranges'
common ancesstor nodes instead of their ownerDocuments.
LayoutTests:
Range::contains(const Range&) should compare the Documents to which the Ranges belong, not the ownerDocuments.
https://bugs.webkit.org/show_bug.cgi?id=215714
Reviewed by Darin Adler.
Revamped the following test to check that a collapsed selection range is
set to the correct character offset in the text content. In addition,
properly used the Promise returned by waitFor in order to make the test
timing independent and work in isolated tree mode.
- accessibility/mac/selected-visible-position-range-expected.txt:
- accessibility/mac/selected-visible-position-range.html:
- 4:29 AM Changeset in webkit [266003] by
-
- 48 edits3 copies in trunk/Source/WebKit
REGRESSION (r257667): 1.9x more CPU time in IPC::SharedBufferDataReference decoding during Netflix playback
https://bugs.webkit.org/show_bug.cgi?id=215232
<rdar://problem/66637920>
Reviewed by Geoff Garen.
Prior to r257667, an IPC message defined a IPC::SharedBufferDataReference argument to allow
its sender to easily encode SharedBuffer data as a DataReference. SharedBufferDataReference
cost the same to encode as a DataReference -- both copied data into the Encoder -- but did
so by iterating over the SharedBuffer's data segments rather than combining them into a
contiguous allocation. The message argument was received as a decoded IPC::DataReference,
which stores a pointer into the IPC::Decoder's buffer rather than making a copy.
In r257667, IPC::SharedBufferDataReference switched its encoder to use IPC::ArgumentCoder's
SharedBuffer specialization, which works by allocating a SharedMemory buffer, copying
SharedBuffer data into it, creating a SharedMemory::IPCHandle from it, and encoding the
handle. It makes only one copy like the old encoder did, but pays the added cost of
combining SharedBuffer data segments prior to copying by needlessly calling
SharedBuffer::data() (this should be fixed independently).
Since this serialization could no longer be decoded by DataReference's decoder,
SharedBufferDataReference implemented a decoder, also in terms of ArgumentCoder's SharedBuffer
specialization. It works by mapping a SharedMemory buffer from a decoded
SharedMemory::IPCHandle and copying that buffer into a new SharedBuffer. This copy is a cost
that the old decoder did not incur, but in some cases the message receiver would have made
such a copy anyway and can instead just ref the decoded SharedBuffer. In other cases though,
the receiver either made no copies or couldn't use the decoded SharedBuffer to avoid making
its own copy so creating the SharedBuffer was pure added cost.
There are additional costs from allocating, mapping, and deleting shared memory and Mach
send rights, but they are offset by savings due to smaller Encoder and Decoder buffers. The
additional SharedBuffer combining and copying is not offset elsewhere, and on net makes
sending and receiving IPC::SharedBufferDataReferences use up to 2x more CPU time when
playing a video on netflix.com in Safari.
Resolve this slowdown by reverting the argument encoding changes made to
IPC::SharedBufferDataReference in r257667. For compatibility with code added after r257667,
the current IPC::SharedBufferDataReference was copied to IPC::SharedBufferCopy and retains
the behavior of copying into a SharedBuffer when decoded. IPC::SharedBufferDataReference now
has the pre-r257667 behavior of decoding to an IPC::DataReference. Messages added after
r257667 whose receivers were designed to handle a SharedBuffer were changed to use
IPC::SharedBufferCopy, and all other receivers of messages with IPC::SharedBufferDataReference
arguments were changed to handle an IPC::DataReference.
- GPUProcess/media/RemoteCDMInstanceProxy.cpp:
- GPUProcess/media/RemoteCDMInstanceProxy.h:
- GPUProcess/media/RemoteCDMInstanceProxy.messages.in:
- GPUProcess/media/RemoteCDMInstanceSessionProxy.cpp:
- GPUProcess/media/RemoteCDMInstanceSessionProxy.h:
- GPUProcess/media/RemoteCDMInstanceSessionProxy.messages.in:
- GPUProcess/media/RemoteCDMProxy.cpp:
- GPUProcess/media/RemoteCDMProxy.h:
- GPUProcess/media/RemoteLegacyCDMSessionProxy.cpp:
- GPUProcess/media/RemoteLegacyCDMSessionProxy.h:
- GPUProcess/media/RemoteLegacyCDMSessionProxy.messages.in:
- UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::platformRegisterAttachment):
- UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::registerAttachmentIdentifierFromData):
(WebKit::WebPageProxy::platformRegisterAttachment):
- UIProcess/WebPageProxy.h:
- UIProcess/WebPageProxy.messages.in:
- UIProcess/WebPasteboardProxy.h:
- UIProcess/WebPasteboardProxy.messages.in:
- UIProcess/gtk/WebPasteboardProxyGtk.cpp:
- WebProcess/GPU/media/RemoteCDMInstance.cpp:
- WebProcess/GPU/media/RemoteCDMInstanceSession.cpp:
- WebProcess/GPU/media/RemoteCDMInstanceSession.h:
- WebProcess/GPU/media/RemoteCDMInstanceSession.messages.in:
- WebProcess/GPU/media/RemoteLegacyCDMSession.cpp:
- WebProcess/GPU/media/RemoteLegacyCDMSession.h:
- WebProcess/GPU/media/RemoteLegacyCDMSession.messages.in:
- WebProcess/WebCoreSupport/WebEditorClient.cpp:
- WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Replaced
IPC::SharedBufferDataReference with IPC::SharedBufferCopy.
- NetworkProcess/NetworkResourceLoader.cpp:
- NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:
- NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h:
- NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.messages.in:
- WebProcess/Network/WebResourceLoader.cpp:
- WebProcess/Network/WebResourceLoader.h:
- WebProcess/Network/WebResourceLoader.messages.in:
- WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp: Removed the DidReceiveSharedBuffer
message and reverted the DidReceiveData message back to taking an
IPC::SharedBufferDataReference.
- Platform/IPC/Encoder.h: Made Encoder::reserve(size_t) public so
SharedBufferCopy::encode(Encoder&) can call it.
- Platform/IPC/HandleMessage.h: Restored the CodingType specialization that decodes
SharedBufferDataReference arguments as DataReferences.
- Platform/IPC/SharedBufferCopy.cpp:
- Platform/IPC/SharedBufferCopy.h: Copied from SharedBufferDataReference.h. Implemented the
interface and decoding behavior that SharedBufferDataReference had between r257667 and this
change.
- Platform/IPC/SharedBufferDataReference.cpp:
- Platform/IPC/SharedBufferDataReference.h: Reverted to the pre-r257667 interface and
decoding behvior.
- Scripts/webkit/messages.py: Removed an unneeded special case.
- Sources.txt:
- WebKit.xcodeproj/project.pbxproj: Added SharedBuffer{Copy,DataReference}.cpp.
- UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::dataCallback):
(WebKit::WebPageProxy::finishedLoadingIcon):
- UIProcess/WebPageProxy.h:
- WebProcess/WebPage/WebPage.cpp:
- WebProcess/WebPage/WebPage.h: Used
const IPC::DataReference&in message receiver
signatures for SharedBufferDataReference arguments.
- UIProcess/WebURLSchemeTask.cpp:
- WebProcess/GPU/media/RemoteAudioBusData.h:
- WebProcess/GPU/media/RemoteCDM.cpp:
- WebProcess/Network/WebLoaderStrategy.cpp: Removed unused includes.
- 12:51 AM BuildingCairoOnWindows edited by
- (diff)