[webkit-changes] [287458] trunk/Source/JavaScriptCore
Title: [287458] trunk/Source/_javascript_Core Revision 287458 Author ysuz...@apple.com Date 2021-12-26 23:46:43 -0800 (Sun, 26 Dec 2021) Log Message [JSC] Use SlowPathReturnType instead of EncodedMatchResult https://bugs.webkit.org/show_bug.cgi?id=234686 Reviewed by Filip Pizlo. This patch replaces YarrJIT's EncodedMatchResult with SlowPathReturnType so that CCallHelpers can handle it correctly. * runtime/MatchResult.h: (JSC::MatchResult::MatchResult): (JSC::MatchResult::failed): * runtime/SlowPathReturnType.h: (JSC::decodeResult): * yarr/YarrJIT.h: Modified Paths trunk/Source/_javascript_Core/ChangeLog trunk/Source/_javascript_Core/runtime/MatchResult.h trunk/Source/_javascript_Core/runtime/SlowPathReturnType.h trunk/Source/_javascript_Core/yarr/YarrJIT.h Diff Modified: trunk/Source/_javascript_Core/ChangeLog (287457 => 287458) --- trunk/Source/_javascript_Core/ChangeLog 2021-12-27 07:38:42 UTC (rev 287457) +++ trunk/Source/_javascript_Core/ChangeLog 2021-12-27 07:46:43 UTC (rev 287458) @@ -1,3 +1,20 @@ +2021-12-26 Yusuke Suzuki + +[JSC] Use SlowPathReturnType instead of EncodedMatchResult +https://bugs.webkit.org/show_bug.cgi?id=234686 + +Reviewed by Filip Pizlo. + +This patch replaces YarrJIT's EncodedMatchResult with SlowPathReturnType so that +CCallHelpers can handle it correctly. + +* runtime/MatchResult.h: +(JSC::MatchResult::MatchResult): +(JSC::MatchResult::failed): +* runtime/SlowPathReturnType.h: +(JSC::decodeResult): +* yarr/YarrJIT.h: + 2021-12-23 Mark Lam Make DeferredWorkTimer::addPendingWork() return a Ticket. Modified: trunk/Source/_javascript_Core/runtime/MatchResult.h (287457 => 287458) --- trunk/Source/_javascript_Core/runtime/MatchResult.h 2021-12-27 07:38:42 UTC (rev 287457) +++ trunk/Source/_javascript_Core/runtime/MatchResult.h 2021-12-27 07:46:43 UTC (rev 287458) @@ -25,28 +25,15 @@ #pragma once +#include "SlowPathReturnType.h" #include #include namespace JSC { -struct MatchResult; -#if CPU(ADDRESS32) -using EncodedMatchResult = uint64_t; -#else -struct EncodedMatchResult { -size_t start; -size_t end; -}; -#endif +struct MatchResult { +constexpr MatchResult() = default; -struct MatchResult { -MatchResult() -: start(WTF::notFound) -, end(0) -{ -} - ALWAYS_INLINE MatchResult(size_t start, size_t end) : start(start) , end(end) @@ -53,21 +40,12 @@ { } -#if CPU(ADDRESS32) -ALWAYS_INLINE MatchResult(EncodedMatchResult match) -: start(bitwise_cast(match).start) -, end(bitwise_cast(match).end) +ALWAYS_INLINE MatchResult(SlowPathReturnType match) { +decodeResult(match, start, end); } -#else -ALWAYS_INLINE MatchResult(EncodedMatchResult match) -: start(match.start) -, end(match.end) -{ -} -#endif -ALWAYS_INLINE static MatchResult failed() +ALWAYS_INLINE static constexpr MatchResult failed() { return MatchResult(); } @@ -84,11 +62,13 @@ void dump(PrintStream&) const; -size_t start; -size_t end; +size_t start { WTF::notFound }; +size_t end { 0 }; }; -static_assert(sizeof(EncodedMatchResult) == 2 * sizeof(size_t), "https://bugs.webkit.org/show_bug.cgi?id=198518#c11"); -static_assert(sizeof(MatchResult) == sizeof(EncodedMatchResult), "Match result and EncodedMatchResult should be the same size"); +#if ENABLE(JIT) +static_assert(sizeof(SlowPathReturnType) == 2 * sizeof(size_t), "https://bugs.webkit.org/show_bug.cgi?id=198518#c11"); +static_assert(sizeof(MatchResult) == sizeof(SlowPathReturnType), "Match result and SlowPathReturnType should be the same size"); +#endif } // namespace JSC Modified: trunk/Source/_javascript_Core/runtime/SlowPathReturnType.h (287457 => 287458) --- trunk/Source/_javascript_Core/runtime/SlowPathReturnType.h 2021-12-27 07:38:42 UTC (rev 287457) +++ trunk/Source/_javascript_Core/runtime/SlowPathReturnType.h 2021-12-27 07:46:43 UTC (rev 287458) @@ -54,6 +54,12 @@ b = reinterpret_cast(result.b); } +inline void decodeResult(SlowPathReturnType result, size_t& a, size_t& b) +{ +a = static_cast(result.a); +b = static_cast(result.b); +} + #else // USE(JSVALUE32_64) typedef int64_t SlowPathReturnType; @@ -80,6 +86,14 @@ a = u.pair.a; b = u.pair.b; } + +inline void decodeResult(SlowPathReturnType result, size_t& a, size_t& b) +{ +SlowPathReturnTypeEncoding u; +u.i = result; +a = bitwise_cast(u.pair.a); +b = bitwise_cast(u.pair.b); +} #endif // USE(JSVALUE32_64) } // namespace JSC Modified: trunk/Source/_javascript_Core/yarr/YarrJIT.h (287457 => 287458) --- trunk/Source/_javascript_Core/yarr/YarrJIT.h 2021-12-27 07:38:42 UTC (rev 287457) +++ trunk/Source/_javascript_Core/yarr/YarrJIT.h 2021-12-27 07:46:43 UTC (rev 287458) @@ -198,7 +198,7 @@ }; #if CPU(ARM64E) -extern
[webkit-changes] [287457] trunk/Source/WebCore
Title: [287457] trunk/Source/WebCore Revision 287457 Author carlo...@webkit.org Date 2021-12-26 23:38:42 -0800 (Sun, 26 Dec 2021) Log Message [GTK][a11y] Test accessibility/aria-inherits-presentational.html is failing with ATSPI https://bugs.webkit.org/show_bug.cgi?id=234685 Reviewed by Adrian Perez de Castro. We are ignoring list items inheriting presentational role, but we need to expose its contents. * accessibility/atspi/AccessibilityObjectAtspi.cpp: (WebCore::AccessibilityObjectAtspi::effectiveRole const): Use section as effective role of list items inheriting presentational role. (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject const): Include list items inheriting presentational role. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/accessibility/atspi/AccessibilityObjectAtspi.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (287456 => 287457) --- trunk/Source/WebCore/ChangeLog 2021-12-27 07:37:13 UTC (rev 287456) +++ trunk/Source/WebCore/ChangeLog 2021-12-27 07:38:42 UTC (rev 287457) @@ -1,5 +1,20 @@ 2021-12-26 Carlos Garcia Campos +[GTK][a11y] Test accessibility/aria-inherits-presentational.html is failing with ATSPI +https://bugs.webkit.org/show_bug.cgi?id=234685 + +Reviewed by Adrian Perez de Castro. + +We are ignoring list items inheriting presentational role, but we need to expose its contents. + +* accessibility/atspi/AccessibilityObjectAtspi.cpp: +(WebCore::AccessibilityObjectAtspi::effectiveRole const): Use section as effective role of list items inheriting +presentational role. +(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject const): Include list items inheriting +presentational role. + +2021-12-26 Carlos Garcia Campos + [GTK][a11y] Stop setting manages-descendants on web process root object with ATSPI https://bugs.webkit.org/show_bug.cgi?id=234663 Modified: trunk/Source/WebCore/accessibility/atspi/AccessibilityObjectAtspi.cpp (287456 => 287457) --- trunk/Source/WebCore/accessibility/atspi/AccessibilityObjectAtspi.cpp 2021-12-27 07:37:13 UTC (rev 287456) +++ trunk/Source/WebCore/accessibility/atspi/AccessibilityObjectAtspi.cpp 2021-12-27 07:38:42 UTC (rev 287457) @@ -1318,6 +1318,20 @@ if (m_axObject->isMathToken()) return Atspi::Role::Static; break; +case AccessibilityRole::ListItem: { +bool inheritsPresentationalRole = Accessibility::retrieveValueFromMainThread([this]() -> bool { +if (m_coreObject) +m_coreObject->updateBackingStore(); + +if (!m_coreObject) +return Atspi::Role::InvalidRole; + +return m_coreObject->inheritsPresentationalRole(); +}); +if (inheritsPresentationalRole) +return Atspi::Role::Section; +break; +} default: break; } @@ -1497,6 +1511,12 @@ if (parent->isPasswordField() || parent->isTextControl()) return AccessibilityObjectInclusion::IgnoreObject; +// List items inheriting presentational are ignored, but their content exposed. +// Since we expose text in the parent, we need to expose presentational list items +// with a different role (section). +if (roleValue() == AccessibilityRole::ListItem && inheritsPresentationalRole()) +return AccessibilityObjectInclusion::IncludeObject; + return AccessibilityObjectInclusion::DefaultBehavior; } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [287456] trunk
Title: [287456] trunk Revision 287456 Author carlo...@webkit.org Date 2021-12-26 23:37:13 -0800 (Sun, 26 Dec 2021) Log Message [GTK][a11y] Stop setting manages-descendants on web process root object with ATSPI https://bugs.webkit.org/show_bug.cgi?id=234663 Reviewed by Adrian Perez de Castro. Source/WebCore: Emit parent-changed and children-changed signals instead, like all other objects, to properly update the ATSPI cache. * accessibility/atspi/AccessibilityAtspi.cpp: (WebCore::AccessibilityAtspi::parentChanged): Emit the signal for the root object. (WebCore::AccessibilityAtspi::childrenChanged): Ditto. * accessibility/atspi/AccessibilityAtspi.h: * accessibility/atspi/AccessibilityObjectAtspi.cpp: (WebCore::AccessibilityObjectAtspi::cacheDestroyed): Notify the root object too. (WebCore::AccessibilityObjectAtspi::elementDestroyed): Ditto. (WebCore::AccessibilityObjectAtspi::setParent): Ditto. (WebCore::AccessibilityObjectAtspi::serialize const): Use AccessibilityRootAtspi::applicationReference(). * accessibility/atspi/AccessibilityRootAtspi.cpp: (WebCore::AccessibilityRootAtspi::embedded): Call AccessibilityAtspi::parentChanged(). (WebCore::AccessibilityRootAtspi::parentReference const): Added. (WebCore::AccessibilityRootAtspi::childAdded): Call AccessibilityAtspi::childrenChanged(). (WebCore::AccessibilityRootAtspi::childRemoved): Ditto. (WebCore::AccessibilityRootAtspi::serialize const): Do not set manages-descendants state. * accessibility/atspi/AccessibilityRootAtspi.h: Tools: Update the unit test to remove the ATSPI ifdef. * TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp: (testAccessibleBasicHierarchy): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/accessibility/atspi/AccessibilityAtspi.cpp trunk/Source/WebCore/accessibility/atspi/AccessibilityAtspi.h trunk/Source/WebCore/accessibility/atspi/AccessibilityObjectAtspi.cpp trunk/Source/WebCore/accessibility/atspi/AccessibilityRootAtspi.cpp trunk/Source/WebCore/accessibility/atspi/AccessibilityRootAtspi.h trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (287455 => 287456) --- trunk/Source/WebCore/ChangeLog 2021-12-27 07:36:06 UTC (rev 287455) +++ trunk/Source/WebCore/ChangeLog 2021-12-27 07:37:13 UTC (rev 287456) @@ -1,5 +1,32 @@ 2021-12-26 Carlos Garcia Campos +[GTK][a11y] Stop setting manages-descendants on web process root object with ATSPI +https://bugs.webkit.org/show_bug.cgi?id=234663 + +Reviewed by Adrian Perez de Castro. + +Emit parent-changed and children-changed signals instead, like all other objects, to properly update the ATSPI +cache. + +* accessibility/atspi/AccessibilityAtspi.cpp: +(WebCore::AccessibilityAtspi::parentChanged): Emit the signal for the root object. +(WebCore::AccessibilityAtspi::childrenChanged): Ditto. +* accessibility/atspi/AccessibilityAtspi.h: +* accessibility/atspi/AccessibilityObjectAtspi.cpp: +(WebCore::AccessibilityObjectAtspi::cacheDestroyed): Notify the root object too. +(WebCore::AccessibilityObjectAtspi::elementDestroyed): Ditto. +(WebCore::AccessibilityObjectAtspi::setParent): Ditto. +(WebCore::AccessibilityObjectAtspi::serialize const): Use AccessibilityRootAtspi::applicationReference(). +* accessibility/atspi/AccessibilityRootAtspi.cpp: +(WebCore::AccessibilityRootAtspi::embedded): Call AccessibilityAtspi::parentChanged(). +(WebCore::AccessibilityRootAtspi::parentReference const): Added. +(WebCore::AccessibilityRootAtspi::childAdded): Call AccessibilityAtspi::childrenChanged(). +(WebCore::AccessibilityRootAtspi::childRemoved): Ditto. +(WebCore::AccessibilityRootAtspi::serialize const): Do not set manages-descendants state. +* accessibility/atspi/AccessibilityRootAtspi.h: + +2021-12-26 Carlos Garcia Campos + [GTK][a11y] Test /webkit/WebKitAccessibility/selection/listbox is flaky with ATSPI https://bugs.webkit.org/show_bug.cgi?id=234665 Modified: trunk/Source/WebCore/accessibility/atspi/AccessibilityAtspi.cpp (287455 => 287456) --- trunk/Source/WebCore/accessibility/atspi/AccessibilityAtspi.cpp 2021-12-27 07:36:06 UTC (rev 287455) +++ trunk/Source/WebCore/accessibility/atspi/AccessibilityAtspi.cpp 2021-12-27 07:37:13 UTC (rev 287456) @@ -342,6 +342,16 @@ }); } +void AccessibilityAtspi::parentChanged(AccessibilityRootAtspi& rootObject) +{ +RELEASE_ASSERT(!isMainThread()); +if (!m_connection) +return; + +g_dbus_connection_emit_signal(m_connection.get(), nullptr, rootObject.path().utf8().data(), "org.a11y.atspi.Event.Object", "PropertyChange", +g_variant_new("(siiva{sv})", "accessible-parent", 0, 0, rootObject.parentReference(), nullptr), nullptr); +} + void AccessibilityAtspi::childrenChanged(AccessibilityObjectAtspi& atspiObject,
[webkit-changes] [287455] trunk/Source/WebCore
Title: [287455] trunk/Source/WebCore Revision 287455 Author carlo...@webkit.org Date 2021-12-26 23:36:06 -0800 (Sun, 26 Dec 2021) Log Message [GTK][a11y] Test /webkit/WebKitAccessibility/selection/listbox is flaky with ATSPI https://bugs.webkit.org/show_bug.cgi?id=234665 Reviewed by Adrian Perez de Castro. The problem is that selection-changed can be called multiple times for list boxes. When the notification is deferred by the AXObject cache, it's ensured to be called only one for every element in the following run loop iteration, but when not deferred the signal is emitted for every notification. * accessibility/atspi/AccessibilityObjectAtspi.h: * accessibility/atspi/AccessibilityObjectSelectionAtspi.cpp: (WebCore::AccessibilityObjectAtspi::selectionChanged): Ensure we don't emit the selection-changed signal more than once in the same run loop iteration. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/accessibility/atspi/AccessibilityObjectAtspi.h trunk/Source/WebCore/accessibility/atspi/AccessibilityObjectSelectionAtspi.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (287454 => 287455) --- trunk/Source/WebCore/ChangeLog 2021-12-27 07:34:58 UTC (rev 287454) +++ trunk/Source/WebCore/ChangeLog 2021-12-27 07:36:06 UTC (rev 287455) @@ -1,3 +1,19 @@ +2021-12-26 Carlos Garcia Campos + +[GTK][a11y] Test /webkit/WebKitAccessibility/selection/listbox is flaky with ATSPI +https://bugs.webkit.org/show_bug.cgi?id=234665 + +Reviewed by Adrian Perez de Castro. + +The problem is that selection-changed can be called multiple times for list boxes. When the notification is +deferred by the AXObject cache, it's ensured to be called only one for every element in the following run loop +iteration, but when not deferred the signal is emitted for every notification. + +* accessibility/atspi/AccessibilityObjectAtspi.h: +* accessibility/atspi/AccessibilityObjectSelectionAtspi.cpp: +(WebCore::AccessibilityObjectAtspi::selectionChanged): Ensure we don't emit the selection-changed signal more +than once in the same run loop iteration. + 2021-12-26 Alan Bujtas [LFC][IFC] Do not trim the hanging trailing content Modified: trunk/Source/WebCore/accessibility/atspi/AccessibilityObjectAtspi.h (287454 => 287455) --- trunk/Source/WebCore/accessibility/atspi/AccessibilityObjectAtspi.h 2021-12-27 07:34:58 UTC (rev 287454) +++ trunk/Source/WebCore/accessibility/atspi/AccessibilityObjectAtspi.h 2021-12-27 07:36:06 UTC (rev 287455) @@ -246,6 +246,7 @@ Atomic m_isRegistered { false }; String m_path; String m_hyperlinkPath; +int64_t m_lastSelectionChangedTime { -1 }; mutable std::atomic m_hasListMarkerAtStart; mutable int m_indexInParent { -1 }; mutable Lock m_rootLock; Modified: trunk/Source/WebCore/accessibility/atspi/AccessibilityObjectSelectionAtspi.cpp (287454 => 287455) --- trunk/Source/WebCore/accessibility/atspi/AccessibilityObjectSelectionAtspi.cpp 2021-12-27 07:34:58 UTC (rev 287454) +++ trunk/Source/WebCore/accessibility/atspi/AccessibilityObjectSelectionAtspi.cpp 2021-12-27 07:36:06 UTC (rev 287455) @@ -224,6 +224,15 @@ void AccessibilityObjectAtspi::selectionChanged() { RELEASE_ASSERT(isMainThread()); + +// selectionChanged can be called multiple times by WebCore, so ensure we don't +// emit it if the last one happened in the same run loop iteration. +auto* source = g_main_current_source(); +int64_t sourceTime = source ? g_source_get_time(source) : -1; +if (sourceTime <= m_lastSelectionChangedTime) +return; + +m_lastSelectionChangedTime = sourceTime; m_root.atspi().selectionChanged(*this); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [287454] trunk/Tools
Title: [287454] trunk/Tools Revision 287454 Author carlo...@webkit.org Date 2021-12-26 23:34:58 -0800 (Sun, 26 Dec 2021) Log Message [GTK][a11y] WTR: handle xml-roles attributes to return the right role for landmark with ATSPI https://bugs.webkit.org/show_bug.cgi?id=234638 Reviewed by Adrian Perez de Castro. * WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp: (WTR::xmlRoleValueString): (WTR::AccessibilityUIElement::role): Modified Paths trunk/Tools/ChangeLog trunk/Tools/WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp Diff Modified: trunk/Tools/ChangeLog (287453 => 287454) --- trunk/Tools/ChangeLog 2021-12-27 06:43:31 UTC (rev 287453) +++ trunk/Tools/ChangeLog 2021-12-27 07:34:58 UTC (rev 287454) @@ -1,3 +1,14 @@ +2021-12-26 Carlos Garcia Campos + +[GTK][a11y] WTR: handle xml-roles attributes to return the right role for landmark with ATSPI +https://bugs.webkit.org/show_bug.cgi?id=234638 + +Reviewed by Adrian Perez de Castro. + +* WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp: +(WTR::xmlRoleValueString): +(WTR::AccessibilityUIElement::role): + 2021-12-26 Sam Weinig Replace WebKit/CocoaColor.h with WebCore/ColorCocoa.h, not confusing at all Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp (287453 => 287454) --- trunk/Tools/WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp 2021-12-27 06:43:31 UTC (rev 287453) +++ trunk/Tools/WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp 2021-12-27 07:34:58 UTC (rev 287454) @@ -35,6 +35,8 @@ #include #include #include +#include +#include #include #include #include @@ -564,6 +566,52 @@ return JSStringCreateWithCharacters(nullptr, 0); } +static String xmlRoleValueString(const String& xmlRoles) +{ +static NeverDestroyed> regionRoles = HashSet({ +"doc-acknowledgments", +"doc-afterword", +"doc-appendix", +"doc-bibliography", +"doc-chapter", +"doc-conclusion", +"doc-credits", +"doc-endnotes", +"doc-epilogue", +"doc-errata", +"doc-foreword", +"doc-glossary", +"doc-glossref", +"doc-index", +"doc-introduction", +"doc-pagelist", +"doc-part", +"doc-preface", +"doc-prologue", +"doc-toc", +"region" +}); + +if (regionRoles->contains(xmlRoles)) +return "AXLandmarkRegion"_s; +if (equalLettersIgnoringASCIICase(xmlRoles, "banner")) +return "AXLandmarkBanner"_s; +if (equalLettersIgnoringASCIICase(xmlRoles, "complementary")) +return "AXLandmarkComplementary"_s; +if (equalLettersIgnoringASCIICase(xmlRoles, "contentinfo")) +return "AXLandmarkContentInfo"_s; +if (equalLettersIgnoringASCIICase(xmlRoles, "form")) +return "AXLandmarkForm"_s; +if (equalLettersIgnoringASCIICase(xmlRoles, "main")) +return "AXLandmarkMain"_s; +if (equalLettersIgnoringASCIICase(xmlRoles, "navigation")) +return "AXLandmarkNavigation"_s; +if (equalLettersIgnoringASCIICase(xmlRoles, "search")) +return "AXLandmarkSearch"_s; + +return { }; +} + static String roleValueToString(unsigned roleValue) { switch (roleValue) { @@ -742,7 +790,8 @@ m_element->updateBackingStore(); roleValue = m_element->role(); }); -auto roleValueString = roleValueToString(roleValue); + +auto roleValueString = roleValue == WebCore::Atspi::Role::Landmark ? xmlRoleValueString(m_element->attributes().get("xml-roles")) : roleValueToString(roleValue); if (roleValueString.isEmpty()) return JSStringCreateWithCharacters(nullptr, 0); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [287453] trunk
Title: [287453] trunk Revision 287453 Author za...@apple.com Date 2021-12-26 22:43:31 -0800 (Sun, 26 Dec 2021) Log Message [LFC][IFC] Do not trim the hanging trailing content https://bugs.webkit.org/show_bug.cgi?id=234679 Reviewed by Antti Koivisto. Source/WebCore: This is the final step of making the hanging content handling inline with the spec. (https://www.w3.org/TR/css-text-3/#hang) Since we don't (fake)trim such content when closing the line, the content width matches the actual content on the line which also helps when it is aligned to support RTL ordering. * layout/formattingContexts/inline/InlineLine.cpp: (WebCore::Layout::Line::Run::removeTrailingWhitespace): (WebCore::Layout::Line::visuallyCollapseHangingOverflowingGlyphs): Deleted. (WebCore::Layout::Line::Run::visuallyCollapseTrailingWhitespace): Deleted. * layout/formattingContexts/inline/InlineLine.h: * layout/formattingContexts/inline/InlineLineBoxBuilder.cpp: (WebCore::Layout::horizontalAlignmentOffset): * layout/formattingContexts/inline/InlineLineBuilder.cpp: (WebCore::Layout::LineBuilder::close): LayoutTests: * platform/mac/fast/text/whitespace/pre-wrap-overflow-selection-expected.txt: Progression. Matches FF and Chrome selection behavior. Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/ios/fast/text/whitespace/pre-wrap-overflow-selection-expected.txt trunk/LayoutTests/platform/mac/fast/text/whitespace/pre-wrap-overflow-selection-expected.txt trunk/LayoutTests/platform/mac/http/tests/misc/acid3-expected.txt trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp trunk/Source/WebCore/layout/formattingContexts/inline/InlineLine.h trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.h trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp Diff Modified: trunk/LayoutTests/ChangeLog (287452 => 287453) --- trunk/LayoutTests/ChangeLog 2021-12-27 00:46:40 UTC (rev 287452) +++ trunk/LayoutTests/ChangeLog 2021-12-27 06:43:31 UTC (rev 287453) @@ -1,3 +1,12 @@ +2021-12-26 Alan Bujtas + +[LFC][IFC] Do not trim the hanging trailing content +https://bugs.webkit.org/show_bug.cgi?id=234679 + +Reviewed by Antti Koivisto. + +* platform/mac/fast/text/whitespace/pre-wrap-overflow-selection-expected.txt: Progression. Matches FF and Chrome selection behavior. + 2021-12-26 Tim Nguyen Make -webkit-text-combine an inherited property Modified: trunk/LayoutTests/platform/ios/fast/text/whitespace/pre-wrap-overflow-selection-expected.txt (287452 => 287453) --- trunk/LayoutTests/platform/ios/fast/text/whitespace/pre-wrap-overflow-selection-expected.txt 2021-12-27 00:46:40 UTC (rev 287452) +++ trunk/LayoutTests/platform/ios/fast/text/whitespace/pre-wrap-overflow-selection-expected.txt 2021-12-27 06:43:31 UTC (rev 287453) @@ -21,8 +21,8 @@ RenderBlock {HR} at (0,92) size 784x2 [border: (1px inset #00)] RenderBlock {HR} at (0,198) size 784x2 [border: (1px inset #00)] RenderBlock {PRE} at (0,213) size 108x78 [border: (4px solid #FF)] -RenderText {#text} at (4,4) size 100x70 - text run at (4,4) width 100: "This text " +RenderText {#text} at (4,4) size 125x70 + text run at (4,4) width 125: "This text " text run at (4,18) width 71: "will wrap" text run at (74,18) width 1: " " text run at (4,32) width 94: "and fit " Modified: trunk/LayoutTests/platform/mac/fast/text/whitespace/pre-wrap-overflow-selection-expected.txt (287452 => 287453) --- trunk/LayoutTests/platform/mac/fast/text/whitespace/pre-wrap-overflow-selection-expected.txt 2021-12-27 00:46:40 UTC (rev 287452) +++ trunk/LayoutTests/platform/mac/fast/text/whitespace/pre-wrap-overflow-selection-expected.txt 2021-12-27 06:43:31 UTC (rev 287453) @@ -21,8 +21,8 @@ RenderBlock {HR} at (0,86) size 784x2 [border: (1px inset #00)] RenderBlock {HR} at (0,197) size 784x2 [border: (1px inset #00)] RenderBlock {PRE} at (0,212) size 108x83 [border: (4px solid #FF)] -RenderText {#text} at (4,4) size 100x75 - text run at (4,4) width 100: "This text " +RenderText {#text} at (4,4) size 125x75 + text run at (4,4) width 125: "This text " text run at (4,19) width 71: "will wrap" text run at (74,19) width 1: " " text run at (4,34) width 94: "and fit " Modified: trunk/LayoutTests/platform/mac/http/tests/misc/acid3-expected.txt (287452 => 287453) --- trunk/LayoutTests/platform/mac/http/tests/misc/acid3-expected.txt 2021-12-27 00:46:40 UTC (rev 287452) +++ trunk/LayoutTests/platform/mac/http/tests/misc/acid3-expected.txt 2021-12-27 06:43:31 UTC (rev 287453) @@
[webkit-changes] [287452] trunk
Title: [287452] trunk Revision 287452 Author wei...@apple.com Date 2021-12-26 16:46:40 -0800 (Sun, 26 Dec 2021) Log Message Replace WebKit/CocoaColor.h with WebCore/ColorCocoa.h, not confusing at all https://bugs.webkit.org/show_bug.cgi?id=234693 Reviewed by Simon Fraser. Source/WebKit: We don't need both. The WebCore one can work for both. * Platform/cocoa/CocoaColor.h: Removed. * Shared/Cocoa/ArgumentCodersCocoa.mm: (IPC::typeFromObject): (IPC::encodeColorInternal): (IPC::encodeObject): * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView themeColor]): (-[WKWebView underPageBackgroundColor]): (-[WKWebView setUnderPageBackgroundColor:]): (-[WKWebView _themeColor]): (-[WKWebView _pageExtendedBackgroundColor]): (-[WKWebView _sampledPageTopColor]): * UIProcess/API/Cocoa/_WKApplicationManifest.mm: (-[_WKApplicationManifest initWithCoder:]): (-[_WKApplicationManifest themeColor]): * UIProcess/Cocoa/WKSafeBrowsingWarning.h: * UIProcess/Cocoa/WKSafeBrowsingWarning.mm: (colorForItem): (-[WKSafeBrowsingBox setSafeBrowsingBackgroundColor:]): (-[WKSafeBrowsingWarning showDetailsClicked]): (-[WKSafeBrowsingTextView initWithAttributedString:forWarning:]): * WebKit.xcodeproj/project.pbxproj: * WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::PDFPlugin): Tools: Use WebCore/ColorCocoa.h instead. * TestWebKitAPI/Tests/WebKitCocoa/CopyHTML.mm: * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewThemeColor.mm: * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewUnderPageBackgroundColor.mm: Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm trunk/Source/WebKit/UIProcess/API/Cocoa/_WKApplicationManifest.mm trunk/Source/WebKit/UIProcess/Cocoa/WKSafeBrowsingWarning.h trunk/Source/WebKit/UIProcess/Cocoa/WKSafeBrowsingWarning.mm trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/CopyHTML.mm trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewThemeColor.mm trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewUnderPageBackgroundColor.mm Removed Paths trunk/Source/WebKit/Platform/cocoa/CocoaColor.h Diff Modified: trunk/Source/WebKit/ChangeLog (287451 => 287452) --- trunk/Source/WebKit/ChangeLog 2021-12-27 00:03:41 UTC (rev 287451) +++ trunk/Source/WebKit/ChangeLog 2021-12-27 00:46:40 UTC (rev 287452) @@ -1,3 +1,37 @@ +2021-12-26 Sam Weinig + +Replace WebKit/CocoaColor.h with WebCore/ColorCocoa.h, not confusing at all +https://bugs.webkit.org/show_bug.cgi?id=234693 + +Reviewed by Simon Fraser. + +We don't need both. The WebCore one can work for both. + +* Platform/cocoa/CocoaColor.h: Removed. +* Shared/Cocoa/ArgumentCodersCocoa.mm: +(IPC::typeFromObject): +(IPC::encodeColorInternal): +(IPC::encodeObject): +* UIProcess/API/Cocoa/WKWebView.mm: +(-[WKWebView themeColor]): +(-[WKWebView underPageBackgroundColor]): +(-[WKWebView setUnderPageBackgroundColor:]): +(-[WKWebView _themeColor]): +(-[WKWebView _pageExtendedBackgroundColor]): +(-[WKWebView _sampledPageTopColor]): +* UIProcess/API/Cocoa/_WKApplicationManifest.mm: +(-[_WKApplicationManifest initWithCoder:]): +(-[_WKApplicationManifest themeColor]): +* UIProcess/Cocoa/WKSafeBrowsingWarning.h: +* UIProcess/Cocoa/WKSafeBrowsingWarning.mm: +(colorForItem): +(-[WKSafeBrowsingBox setSafeBrowsingBackgroundColor:]): +(-[WKSafeBrowsingWarning showDetailsClicked]): +(-[WKSafeBrowsingTextView initWithAttributedString:forWarning:]): +* WebKit.xcodeproj/project.pbxproj: +* WebProcess/Plugins/PDF/PDFPlugin.mm: +(WebKit::PDFPlugin::PDFPlugin): + 2021-12-26 Yousuke Kimoto RemoteInspectorProtocolHandler::inspect() expects ConnectionID as uint32_t Deleted: trunk/Source/WebKit/Platform/cocoa/CocoaColor.h (287451 => 287452) --- trunk/Source/WebKit/Platform/cocoa/CocoaColor.h 2021-12-27 00:03:41 UTC (rev 287451) +++ trunk/Source/WebKit/Platform/cocoa/CocoaColor.h 2021-12-27 00:46:40 UTC (rev 287452) @@ -1,36 +0,0 @@ -/* -* Copyright (C) 2020 Apple Inc. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* 1. Redistributions of source code must retain the above copyright -*notice, this list of conditions and the following disclaimer. -* 2. Redistributions in binary form must reproduce the above copyright -*notice, this list of conditions and the following disclaimer in the -*documentation and/or other materials provided with the distribution. -* -* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
[webkit-changes] [287451] trunk
Title: [287451] trunk Revision 287451 Author n...@apple.com Date 2021-12-26 16:03:41 -0800 (Sun, 26 Dec 2021) Log Message Make -webkit-text-combine an inherited property https://bugs.webkit.org/show_bug.cgi?id=234694 Reviewed by Simon Fraser. Source/WebCore: -webkit-text-combine is said to be inherited in CSSProperties.json, but it is not actually the case. It should be inherited per-spec (for text-combine-upright). https://drafts.csswg.org/css-writing-modes/#text-combine-upright Test: fast/text/text-combine-inherited.html * rendering/style/RenderStyle.cpp: (WebCore::rareNonInheritedDataChangeRequiresLayout): (WebCore::rareInheritedDataChangeRequiresLayout): * rendering/style/RenderStyle.h: (WebCore::RenderStyle::textCombine const): (WebCore::RenderStyle::setTextCombine): * rendering/style/StyleRareInheritedData.cpp: (WebCore::StyleRareInheritedData::StyleRareInheritedData): (WebCore::StyleRareInheritedData::operator== const): * rendering/style/StyleRareInheritedData.h: * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator== const): * rendering/style/StyleRareNonInheritedData.h: LayoutTests: There are also WPT that already exist for the standard version (text-combine-upright): - css/css-writing-modes/text-combine-upright-inherit-all-001.html - css/css-writing-modes/text-combine-upright-inherit-all-002.html * fast/text/text-combine-inherited-expected.html: Added. * fast/text/text-combine-inherited.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/rendering/style/RenderStyle.cpp trunk/Source/WebCore/rendering/style/RenderStyle.h trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h Added Paths trunk/LayoutTests/fast/text/text-combine-inherited-expected.html trunk/LayoutTests/fast/text/text-combine-inherited.html Diff Modified: trunk/LayoutTests/ChangeLog (287450 => 287451) --- trunk/LayoutTests/ChangeLog 2021-12-26 23:11:37 UTC (rev 287450) +++ trunk/LayoutTests/ChangeLog 2021-12-27 00:03:41 UTC (rev 287451) @@ -1,3 +1,17 @@ +2021-12-26 Tim Nguyen + +Make -webkit-text-combine an inherited property +https://bugs.webkit.org/show_bug.cgi?id=234694 + +Reviewed by Simon Fraser. + +There are also WPT that already exist for the standard version (text-combine-upright): +- css/css-writing-modes/text-combine-upright-inherit-all-001.html +- css/css-writing-modes/text-combine-upright-inherit-all-002.html + +* fast/text/text-combine-inherited-expected.html: Added. +* fast/text/text-combine-inherited.html: Added. + 2021-12-25 Alan Bujtas [iOS] Rebaselining after r287440. Added: trunk/LayoutTests/fast/text/text-combine-inherited-expected.html (0 => 287451) --- trunk/LayoutTests/fast/text/text-combine-inherited-expected.html (rev 0) +++ trunk/LayoutTests/fast/text/text-combine-inherited-expected.html 2021-12-27 00:03:41 UTC (rev 287451) @@ -0,0 +1,10 @@ + + + +Test inheritance of -webkit-text-combine + +html { writing-mode: vertical-rl; font: 24px serif } +span { -webkit-text-combine: horizontal; } + +民105年4月29日 + \ No newline at end of file Added: trunk/LayoutTests/fast/text/text-combine-inherited.html (0 => 287451) --- trunk/LayoutTests/fast/text/text-combine-inherited.html (rev 0) +++ trunk/LayoutTests/fast/text/text-combine-inherited.html 2021-12-27 00:03:41 UTC (rev 287451) @@ -0,0 +1,10 @@ + + + +Test inheritance of -webkit-text-combine + +html { writing-mode: vertical-rl; font: 24px serif } +p { -webkit-text-combine: horizontal; } + +民105年4月29日 + \ No newline at end of file Modified: trunk/Source/WebCore/ChangeLog (287450 => 287451) --- trunk/Source/WebCore/ChangeLog 2021-12-26 23:11:37 UTC (rev 287450) +++ trunk/Source/WebCore/ChangeLog 2021-12-27 00:03:41 UTC (rev 287451) @@ -1,3 +1,32 @@ +2021-12-26 Tim Nguyen + +Make -webkit-text-combine an inherited property +https://bugs.webkit.org/show_bug.cgi?id=234694 + +Reviewed by Simon Fraser. + +-webkit-text-combine is said to be inherited in CSSProperties.json, but it is not actually the case. +It should be inherited per-spec (for text-combine-upright). + +https://drafts.csswg.org/css-writing-modes/#text-combine-upright + +Test: fast/text/text-combine-inherited.html + +* rendering/style/RenderStyle.cpp: +(WebCore::rareNonInheritedDataChangeRequiresLayout): +(WebCore::rareInheritedDataChangeRequiresLayout): +* rendering/style/RenderStyle.h: +(WebCore::RenderStyle::textCombine const): +
[webkit-changes] [287450] trunk/Source/WebKit
Title: [287450] trunk/Source/WebKit Revision 287450 Author yousuke.kim...@sony.com Date 2021-12-26 15:11:37 -0800 (Sun, 26 Dec 2021) Log Message RemoteInspectorProtocolHandler::inspect() expects ConnectionID as uint32_t https://bugs.webkit.org/show_bug.cgi?id=234657 Reviewed by Don Olmstead. connectionID a parameter of ScriptMessageClient::didPostMessage() is casteed as . Since ConnectionID is define as uint32_t, it should be casted as . * UIProcess/Inspector/socket/RemoteInspectorProtocolHandler.cpp: Fixed cast for connectionID. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/Inspector/socket/RemoteInspectorProtocolHandler.cpp Diff Modified: trunk/Source/WebKit/ChangeLog (287449 => 287450) --- trunk/Source/WebKit/ChangeLog 2021-12-26 21:53:12 UTC (rev 287449) +++ trunk/Source/WebKit/ChangeLog 2021-12-26 23:11:37 UTC (rev 287450) @@ -1,3 +1,15 @@ +2021-12-26 Yousuke Kimoto + +RemoteInspectorProtocolHandler::inspect() expects ConnectionID as uint32_t +https://bugs.webkit.org/show_bug.cgi?id=234657 + +Reviewed by Don Olmstead. + +connectionID a parameter of ScriptMessageClient::didPostMessage() is casteed as . +Since ConnectionID is define as uint32_t, it should be casted as . + +* UIProcess/Inspector/socket/RemoteInspectorProtocolHandler.cpp: Fixed cast for connectionID. + 2021-12-25 Commit Queue Unreviewed, reverting r285088. Modified: trunk/Source/WebKit/UIProcess/Inspector/socket/RemoteInspectorProtocolHandler.cpp (287449 => 287450) --- trunk/Source/WebKit/UIProcess/Inspector/socket/RemoteInspectorProtocolHandler.cpp 2021-12-26 21:53:12 UTC (rev 287449) +++ trunk/Source/WebKit/UIProcess/Inspector/socket/RemoteInspectorProtocolHandler.cpp 2021-12-26 23:11:37 UTC (rev 287450) @@ -60,7 +60,7 @@ return; URL requestURL { { }, page.pageLoadState().url() }; -m_inspectorProtocolHandler.inspect(requestURL.hostAndPort(), parseInteger(tokens[0]).value_or(0), parseInteger(tokens[1]).value_or(0), tokens[2]); +m_inspectorProtocolHandler.inspect(requestURL.hostAndPort(), parseInteger(tokens[0]).value_or(0), parseInteger(tokens[1]).value_or(0), tokens[2]); } bool supportsAsyncReply() override ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [287449] trunk/Source/WebCore
Title: [287449] trunk/Source/WebCore Revision 287449 Author commit-qu...@webkit.org Date 2021-12-26 13:53:12 -0800 (Sun, 26 Dec 2021) Log Message null ptr deref in WebCore::indexForVisiblePosition() https://bugs.webkit.org/show_bug.cgi?id=234255 Patch by Frédéric Wang on 2021-12-26 Reviewed by Darin Adler. * editing/InsertListCommand.cpp: (WebCore::InsertListCommand::doApply): Ensure endOfSelection did not become orphan before calling indexForVisiblePosition(). This may happen because the VisiblePosition constructor is called in the while loop, triggering re-layout and post-layout tasks. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/editing/InsertListCommand.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (287448 => 287449) --- trunk/Source/WebCore/ChangeLog 2021-12-26 21:40:03 UTC (rev 287448) +++ trunk/Source/WebCore/ChangeLog 2021-12-26 21:53:12 UTC (rev 287449) @@ -1,3 +1,15 @@ +2021-12-26 Frédéric Wang + +null ptr deref in WebCore::indexForVisiblePosition() +https://bugs.webkit.org/show_bug.cgi?id=234255 + +Reviewed by Darin Adler. + +* editing/InsertListCommand.cpp: +(WebCore::InsertListCommand::doApply): Ensure endOfSelection did not become orphan before +calling indexForVisiblePosition(). This may happen because the VisiblePosition constructor +is called in the while loop, triggering re-layout and post-layout tasks. + 2021-12-26 Tim Nguyen Remove -webkit-{border-fit/margin-collapse} leftovers in StyleRareNonInheritedData Modified: trunk/Source/WebCore/editing/InsertListCommand.cpp (287448 => 287449) --- trunk/Source/WebCore/editing/InsertListCommand.cpp 2021-12-26 21:40:03 UTC (rev 287448) +++ trunk/Source/WebCore/editing/InsertListCommand.cpp 2021-12-26 21:53:12 UTC (rev 287449) @@ -166,6 +166,8 @@ // the beginning of the document to the endOfSelection everytime this code is executed. // But not using index is hard because there are so many ways we can lose selection inside doApplyForSingleParagraph. RefPtr scope; +if (endOfSelection.isOrphan()) +return; int indexForEndOfSelection = indexForVisiblePosition(endOfSelection, scope); doApplyForSingleParagraph(forceCreateList, listTag, currentSelection); if (endOfSelection.isNull() || endOfSelection.isOrphan() || startOfLastParagraph.isNull() || startOfLastParagraph.isOrphan()) { ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [287448] trunk/Source/WebCore
Title: [287448] trunk/Source/WebCore Revision 287448 Author n...@apple.com Date 2021-12-26 13:40:03 -0800 (Sun, 26 Dec 2021) Log Message Remove -webkit-{border-fit/margin-collapse} leftovers in StyleRareNonInheritedData https://bugs.webkit.org/show_bug.cgi?id=234692 Reviewed by Simon Fraser. r285615 removed -webkit-border-fit. r287429 removed -webkit-margin-collapse properties. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::hashForTextAutosizing const): (WebCore::RenderStyle::equalForTextAutosizing const): (WebCore::rareNonInheritedDataChangeRequiresLayout): * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator== const): * rendering/style/StyleRareNonInheritedData.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/rendering/style/RenderStyle.cpp trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h Diff Modified: trunk/Source/WebCore/ChangeLog (287447 => 287448) --- trunk/Source/WebCore/ChangeLog 2021-12-26 19:24:52 UTC (rev 287447) +++ trunk/Source/WebCore/ChangeLog 2021-12-26 21:40:03 UTC (rev 287448) @@ -1,3 +1,22 @@ +2021-12-26 Tim Nguyen + +Remove -webkit-{border-fit/margin-collapse} leftovers in StyleRareNonInheritedData +https://bugs.webkit.org/show_bug.cgi?id=234692 + +Reviewed by Simon Fraser. + +r285615 removed -webkit-border-fit. +r287429 removed -webkit-margin-collapse properties. + +* rendering/style/RenderStyle.cpp: +(WebCore::RenderStyle::hashForTextAutosizing const): +(WebCore::RenderStyle::equalForTextAutosizing const): +(WebCore::rareNonInheritedDataChangeRequiresLayout): +* rendering/style/StyleRareNonInheritedData.cpp: +(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): +(WebCore::StyleRareNonInheritedData::operator== const): +* rendering/style/StyleRareNonInheritedData.h: + 2021-12-26 Alan Bujtas [IFC][Integration] Update text renderer's needsVisualReordering bit Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (287447 => 287448) --- trunk/Source/WebCore/rendering/style/RenderStyle.cpp 2021-12-26 19:24:52 UTC (rev 287447) +++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp 2021-12-26 21:40:03 UTC (rev 287448) @@ -461,8 +461,6 @@ { // FIXME: Not a very smart hash. Could be improved upon. See . unsigned hash = m_rareNonInheritedData->effectiveAppearance; -hash ^= m_rareNonInheritedData->marginBeforeCollapse; -hash ^= m_rareNonInheritedData->marginAfterCollapse; hash ^= m_rareNonInheritedData->lineClamp.value(); hash ^= m_rareInheritedData->overflowWrap; hash ^= m_rareInheritedData->nbspMode; @@ -483,8 +481,6 @@ bool RenderStyle::equalForTextAutosizing(const RenderStyle& other) const { return m_rareNonInheritedData->effectiveAppearance == other.m_rareNonInheritedData->effectiveAppearance -&& m_rareNonInheritedData->marginBeforeCollapse == other.m_rareNonInheritedData->marginBeforeCollapse -&& m_rareNonInheritedData->marginAfterCollapse == other.m_rareNonInheritedData->marginAfterCollapse && m_rareNonInheritedData->lineClamp == other.m_rareNonInheritedData->lineClamp && m_rareInheritedData->textSizeAdjust == other.m_rareInheritedData->textSizeAdjust && m_rareInheritedData->overflowWrap == other.m_rareInheritedData->overflowWrap @@ -654,8 +650,6 @@ ASSERT( != ); if (first.effectiveAppearance != second.effectiveAppearance -|| first.marginBeforeCollapse != second.marginBeforeCollapse -|| first.marginAfterCollapse != second.marginAfterCollapse || first.lineClamp != second.lineClamp || first.initialLetter != second.initialLetter || first.textOverflow != second.textOverflow) Modified: trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp (287447 => 287448) --- trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp 2021-12-26 19:24:52 UTC (rev 287447) +++ trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp 2021-12-26 21:40:03 UTC (rev 287448) @@ -193,11 +193,8 @@ , userDrag(o.userDrag) , textOverflow(o.textOverflow) , useSmoothScrolling(o.useSmoothScrolling) -, marginBeforeCollapse(o.marginBeforeCollapse) -, marginAfterCollapse(o.marginAfterCollapse) , appearance(o.appearance) , effectiveAppearance(o.effectiveAppearance) -, borderFit(o.borderFit) , textCombine(o.textCombine) , textDecorationStyle(o.textDecorationStyle) , aspectRatioType(o.aspectRatioType) @@ -302,11 +299,8 @@ && userDrag == o.userDrag && textOverflow == o.textOverflow && useSmoothScrolling == o.useSmoothScrolling -&& marginBeforeCollapse == o.marginBeforeCollapse -&&
[webkit-changes] [287447] trunk/Source/WebCore
Title: [287447] trunk/Source/WebCore Revision 287447 Author za...@apple.com Date 2021-12-26 11:24:52 -0800 (Sun, 26 Dec 2021) Log Message [IFC][Integration] Update text renderer's needsVisualReordering bit https://bugs.webkit.org/show_bug.cgi?id=234688 Reviewed by Antti Koivisto. This is similar to legacy line layout where the RenderText's needsVisualReordering is updated as the (bidi) text box is being placed on the line. Here we update this bit right after the line layout, when we finished constructing the display boxes. * layout/formattingContexts/inline/InlineItemsBuilder.cpp: (WebCore::Layout::InlineItemsBuilder::handleTextContent): * layout/integration/LayoutIntegrationBoxTree.cpp: (WebCore::LayoutIntegration::BoxTree::buildTree): * layout/integration/LayoutIntegrationInlineContentBuilder.cpp: (WebCore::LayoutIntegration::InlineContentBuilder::InlineContentBuilder): (WebCore::LayoutIntegration::InlineContentBuilder::build const): * layout/integration/LayoutIntegrationInlineContentBuilder.h: * layout/layouttree/LayoutInlineTextBox.cpp: (WebCore::Layout::InlineTextBox::InlineTextBox): (WebCore::Layout::m_canUseSimplifiedContentMeasuring): (WebCore::Layout::m_containsBidiText): Deleted. * layout/layouttree/LayoutInlineTextBox.h: (WebCore::Layout::InlineTextBox::canUseSimplifiedContentMeasuring const): (WebCore::Layout::InlineTextBox::containsBidiText const): Deleted. No need to cache this value on the layout box InlineTextItems more or less have the same lifecycle as their associated layout boxes. * layout/layouttree/LayoutTreeBuilder.cpp: (WebCore::Layout::TreeBuilder::createTextBox): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp trunk/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.cpp trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.h trunk/Source/WebCore/layout/layouttree/LayoutInlineTextBox.cpp trunk/Source/WebCore/layout/layouttree/LayoutInlineTextBox.h trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (287446 => 287447) --- trunk/Source/WebCore/ChangeLog 2021-12-26 18:47:26 UTC (rev 287446) +++ trunk/Source/WebCore/ChangeLog 2021-12-26 19:24:52 UTC (rev 287447) @@ -1,3 +1,33 @@ +2021-12-26 Alan Bujtas + +[IFC][Integration] Update text renderer's needsVisualReordering bit +https://bugs.webkit.org/show_bug.cgi?id=234688 + +Reviewed by Antti Koivisto. + +This is similar to legacy line layout where the RenderText's needsVisualReordering is +updated as the (bidi) text box is being placed on the line. +Here we update this bit right after the line layout, when we finished constructing the display boxes. + +* layout/formattingContexts/inline/InlineItemsBuilder.cpp: +(WebCore::Layout::InlineItemsBuilder::handleTextContent): +* layout/integration/LayoutIntegrationBoxTree.cpp: +(WebCore::LayoutIntegration::BoxTree::buildTree): +* layout/integration/LayoutIntegrationInlineContentBuilder.cpp: +(WebCore::LayoutIntegration::InlineContentBuilder::InlineContentBuilder): +(WebCore::LayoutIntegration::InlineContentBuilder::build const): +* layout/integration/LayoutIntegrationInlineContentBuilder.h: +* layout/layouttree/LayoutInlineTextBox.cpp: +(WebCore::Layout::InlineTextBox::InlineTextBox): +(WebCore::Layout::m_canUseSimplifiedContentMeasuring): +(WebCore::Layout::m_containsBidiText): Deleted. +* layout/layouttree/LayoutInlineTextBox.h: +(WebCore::Layout::InlineTextBox::canUseSimplifiedContentMeasuring const): +(WebCore::Layout::InlineTextBox::containsBidiText const): Deleted. No need to cache this value on the layout box +InlineTextItems more or less have the same lifecycle as their associated layout boxes. +* layout/layouttree/LayoutTreeBuilder.cpp: +(WebCore::Layout::TreeBuilder::createTextBox): + 2021-12-26 Tim Nguyen Update writing-mode property values in CSSProperties.json Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp (287446 => 287447) --- trunk/Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp 2021-12-26 18:47:26 UTC (rev 287446) +++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp 2021-12-26 19:24:52 UTC (rev 287447) @@ -452,7 +452,7 @@ if (!contentLength) return inlineItems.append(InlineTextItem::createEmptyItem(inlineTextBox)); -m_needsVisualReordering = m_needsVisualReordering || inlineTextBox.containsBidiText(); +m_needsVisualReordering = m_needsVisualReordering || TextUtil::containsStrongDirectionalityText(text); auto& style = inlineTextBox.style(); auto shouldPreserveSpacesAndTabs =
[webkit-changes] [287446] trunk/Source/WebCore
Title: [287446] trunk/Source/WebCore Revision 287446 Author n...@apple.com Date 2021-12-26 10:47:26 -0800 (Sun, 26 Dec 2021) Log Message Update writing-mode property values in CSSProperties.json https://bugs.webkit.org/show_bug.cgi?id=234689 Reviewed by Simon Fraser. horizontal-tb/vertical-lr/vertical-rl have been supported for a while now. horizontal-bt has too, but it is non-standard. * css/CSSProperties.json: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSProperties.json Diff Modified: trunk/Source/WebCore/ChangeLog (287445 => 287446) --- trunk/Source/WebCore/ChangeLog 2021-12-26 18:45:32 UTC (rev 287445) +++ trunk/Source/WebCore/ChangeLog 2021-12-26 18:47:26 UTC (rev 287446) @@ -1,3 +1,15 @@ +2021-12-26 Tim Nguyen + +Update writing-mode property values in CSSProperties.json +https://bugs.webkit.org/show_bug.cgi?id=234689 + +Reviewed by Simon Fraser. + +horizontal-tb/vertical-lr/vertical-rl have been supported for a while now. +horizontal-bt has too, but it is non-standard. + +* css/CSSProperties.json: + 2021-12-26 Antti Koivisto [:has() pseudo-class] Support :disabled and :enabled pseudo-class invalidation Modified: trunk/Source/WebCore/css/CSSProperties.json (287445 => 287446) --- trunk/Source/WebCore/css/CSSProperties.json 2021-12-26 18:45:32 UTC (rev 287445) +++ trunk/Source/WebCore/css/CSSProperties.json 2021-12-26 18:47:26 UTC (rev 287446) @@ -765,25 +765,20 @@ "value": "tb", "status": "deprecated" }, +"horizontal-tb", +"vertical-lr", +"vertical-rl", { -"value": "horizontal-tb", +"value": "sideways-lr", "status": "unimplemented" }, { -"value": "vertical-rl", -"status": "unimplemented" -}, -{ -"value": "vertical-lr", -"status": "unimplemented" -}, -{ "value": "sideways-rl", "status": "unimplemented" }, { -"value": "sideways-lr", -"status": "unimplemented" +"value": "horizontal-bt", +"status": "non-standard" } ], "codegen-properties": { ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [287445] trunk
Title: [287445] trunk
Revision 287445
Author an...@apple.com
Date 2021-12-26 10:45:32 -0800 (Sun, 26 Dec 2021)
Log Message
[:has() pseudo-class] Support :disabled and :enabled pseudo-class invalidation
https://bugs.webkit.org/show_bug.cgi?id=234636
Reviewed by Simon Fraser.
LayoutTests/imported/w3c:
* web-platform-tests/css/selectors/invalidation/has-pseudo-class.html:
Source/WebCore:
Use Style::PseudoClassChangeInvalidation to support invalidation with :has(:disabled).
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::setAncestorDisabled):
(WebCore::HTMLFormControlElement::parseAttribute):
(WebCore::HTMLFormControlElement::disabledStateChanged):
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::isDisabledFormControl const):
Use a member bit instead of checking the attribute directly. This allows invalidation to be scoped over the state change.
(WebCore::HTMLOptGroupElement::parseAttribute):
Optgroup can flip the disabled status of the associated option elements too so handle that specifically.
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::parseAttribute):
Modified Paths
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/invalidation/has-pseudo-class-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/invalidation/has-pseudo-class.html
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/HTMLFormControlElement.cpp
trunk/Source/WebCore/html/HTMLOptGroupElement.cpp
trunk/Source/WebCore/html/HTMLOptGroupElement.h
trunk/Source/WebCore/html/HTMLOptionElement.cpp
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (287444 => 287445)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-12-26 17:21:44 UTC (rev 287444)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2021-12-26 18:45:32 UTC (rev 287445)
@@ -1,3 +1,12 @@
+2021-12-26 Antti Koivisto
+
+[:has() pseudo-class] Support :disabled and :enabled pseudo-class invalidation
+https://bugs.webkit.org/show_bug.cgi?id=234636
+
+Reviewed by Simon Fraser.
+
+* web-platform-tests/css/selectors/invalidation/has-pseudo-class.html:
+
2021-12-24 Tim Nguyen
Internally unprefix -webkit-font-kerning CSS property
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/invalidation/has-pseudo-class-expected.txt (287444 => 287445)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/invalidation/has-pseudo-class-expected.txt 2021-12-26 17:21:44 UTC (rev 287444)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/invalidation/has-pseudo-class-expected.txt 2021-12-26 18:45:32 UTC (rev 287445)
@@ -1,8 +1,32 @@
-PASS Initial color
-PASS Set checked on checkbox
-PASS Unset checked on checkbox
-PASS Set selected on option
-PASS Unset selected on option
+PASS Before set checked on checkbox, testing subject
+PASS Set checked on checkbox, testing subject
+PASS Unset checked on checkbox, testing subject
+PASS Set select on option
+PASS Reset select
+PASS Before set disabled on checkbox, testing subject
+PASS Set disabled on checkbox, testing subject
+PASS Unset disabled on checkbox, testing subject
+PASS Before set disabled on checkbox, testing subject3
+PASS Set disabled on checkbox, testing subject3
+PASS Unset disabled on checkbox, testing subject3
+PASS Before set disabled on option, testing subject
+PASS Set disabled on option, testing subject
+PASS Unset disabled on option, testing subject
+PASS Before set disabled on option, testing subject3
+PASS Set disabled on option, testing subject3
+PASS Unset disabled on option, testing subject3
+PASS Before set disabled on optgroup, testing subject
+PASS Set disabled on optgroup, testing subject
+PASS Unset disabled on optgroup, testing subject
+PASS Before set disabled on optgroup, testing subject2
+PASS Set disabled on optgroup, testing subject2
+PASS Unset disabled on optgroup, testing subject2
+PASS Before set disabled on optgroup, testing subject3
+PASS Set disabled on optgroup, testing subject3
+PASS Unset disabled on optgroup, testing subject3
+PASS Before set disabled on optgroup, testing subject4
+PASS Set disabled on optgroup, testing subject4
+PASS Unset disabled on optgroup, testing subject4
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/invalidation/has-pseudo-class.html (287444 => 287445)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/invalidation/has-pseudo-class.html 2021-12-26 17:21:44 UTC (rev 287444)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/invalidation/has-pseudo-class.html 2021-12-26 18:45:32 UTC (rev 287445)
@@ -6,15 +6,24 @@