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

Changeset 282209 in webkit


Ignore:
Timestamp:
Sep 9, 2021, 4:38:34 AM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Chromium test-case asserts with ASSERTION FAILED: propertyMissingOrEqualToNone
​https://bugs.webkit.org/show_bug.cgi?id=202904

Patch by Frederic Wang <​fwang@igalia.com> on 2021-09-09
Reviewed by Darin Adler.

Source/WebCore:

WebCore::CompositeEditCommand::moveParagraphs calls createFragmentFromMarkup with a parameter
AnnotateForInterchange set to No. As a consequence, StyledMarkupAccumulator::serializeNodes
will not call EditingStyle::wrappingStyleForSerialization (in order to remove
-webkit-text-decorations-in-effect) contrary to the assumption of the ASSERT in
propertyMissingOrEqualToNone. This can lead to the ASSERT failing e.g. with the JustifyRight
command. This patch fixes that wrong expectation by importing the corresponding change and
test from Chromium [1].

[1] ​https://codereview.chromium.org/1522063002

Test: imported/blink/editing/execCommand/justify-right-in-effect-crash.html

  • editing/markup.cpp:

(WebCore::StyledMarkupAccumulator::appendStyleNodeOpenTag): Skip the assert if we should not
annotate and update the code comment accordingly.

LayoutTests:

Import regression test from Blink.

  • imported/blink/editing/execCommand/justify-right-in-effect-crash-expected.txt: Added.
  • imported/blink/editing/execCommand/justify-right-in-effect-crash.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r282208 r282209  
     12021-09-09  Frederic Wang  <fwang@igalia.com>
     2
     3        Chromium test-case asserts with ASSERTION FAILED: propertyMissingOrEqualToNone
     4        https://bugs.webkit.org/show_bug.cgi?id=202904
     5
     6        Reviewed by Darin Adler.
     7
     8        Import regression test from Blink.
     9
     10        * imported/blink/editing/execCommand/justify-right-in-effect-crash-expected.txt: Added.
     11        * imported/blink/editing/execCommand/justify-right-in-effect-crash.html: Added.
     12
    1132021-09-09  Manuel Rego Casasnovas  <rego@igalia.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r282204 r282209  
     12021-09-09  Frederic Wang  <fwang@igalia.com>
     2
     3        Chromium test-case asserts with ASSERTION FAILED: propertyMissingOrEqualToNone
     4        https://bugs.webkit.org/show_bug.cgi?id=202904
     5
     6        Reviewed by Darin Adler.
     7
     8        WebCore::CompositeEditCommand::moveParagraphs calls createFragmentFromMarkup with a parameter
     9        AnnotateForInterchange set to No. As a consequence, StyledMarkupAccumulator::serializeNodes
     10        will not call EditingStyle::wrappingStyleForSerialization (in order to remove
     11        -webkit-text-decorations-in-effect) contrary to the assumption of the ASSERT in
     12        propertyMissingOrEqualToNone. This can lead to the ASSERT failing e.g. with the JustifyRight
     13        command. This patch fixes that wrong expectation by importing the corresponding change and
     14        test from Chromium [1].
     15
     16        [1] https://codereview.chromium.org/1522063002
     17
     18        Test: imported/blink/editing/execCommand/justify-right-in-effect-crash.html
     19
     20        * editing/markup.cpp:
     21        (WebCore::StyledMarkupAccumulator::appendStyleNodeOpenTag): Skip the assert if we should not
     22        annotate and update the code comment accordingly.
     23
    1242021-09-09  Myles C. Maxfield  <mmaxfield@apple.com>
    225
  • trunk/Source/WebCore/editing/markup.cpp

    r279284 r282209  
    384384void StyledMarkupAccumulator::appendStyleNodeOpenTag(StringBuilder& out, StyleProperties* style, Document& document, bool isBlock)
    385385{
    386     // wrappingStyleForSerialization should have removed -webkit-text-decorations-in-effect
    387     ASSERT(propertyMissingOrEqualToNone(style, CSSPropertyWebkitTextDecorationsInEffect));
     386    // With AnnotateForInterchange::Yes, wrappingStyleForSerialization should have removed -webkit-text-decorations-in-effect
     387    ASSERT(!shouldAnnotate() || propertyMissingOrEqualToNone(style, CSSPropertyWebkitTextDecorationsInEffect));
    388388    if (isBlock)
    389389        out.append("<div style=\"");
Note: See TracChangeset for help on using the changeset viewer.