[Webkit-unassigned] [Bug 273219] New: Stop TextIterator from checking margin when adding double newlines after <p>

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 24 16:06:31 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=273219

            Bug ID: 273219
           Summary: Stop TextIterator from checking margin when adding
                    double newlines after <p>
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: DOM
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ahmad.saleem792 at gmail.com
                CC: annevk at annevk.nl, rniwa at webkit.org

Hi Team,

While looking into Blink commits, I noticed the test expectation changes between our current vs Blink and noticed that we don't have this merged / aligned:

Blink Commit: https://chromium.googlesource.com/chromium/src.git/+/8ff781cd5c1aabca068247de9a3f143645e80422

I took following test as example: fast/css-generated-content/hover-inline-expected.txt (See from source.chromium.org vs GitHub webkit repo) - Chrome / Blink adds additional space.

WebKit Source: https://github.com/WebKit/WebKit/blob/983b6c8a16f0fbe166336a0c9653cd8eca72f639/Source/WebCore/editing/TextIterator.cpp#L929

___

In above, if I do following:

Current:

RefPtr element = dynamicDowncast<HTMLElement>(node);
    if (!element || (!hasHeaderTag(*element) && !is<HTMLParagraphElement>(*element)))
        return false;

to:

RefPtr element = dynamicDowncast<HTMLElement>(node);
    if (is<HTMLParagraphElement>(*element))
        return true;

    if (!element || !hasHeaderTag(*element))
        return false;

___

In debug build, it leads to following 'assert' while running WPT test (e.g., https://wpt.fyi/results/html/dom/elements/the-innertext-and-outertext-properties/getter.html?label=master&label=experimental&aligned&q=innertext)

ASSERTION FAILED: m_ptr
/Users/ahmadsaleem/Documents/GitHub/WebKit/WebKitBuild/Debug/usr/local/include/wtf/RefPtr.h(68) : T &WTF::RefPtr<WebCore::HTMLElement>::operator*() const [T = WebCore::HTMLElement, _PtrTraits = WTF::RawPtrTraits<WebCore::HTMLElement>, _RefDerefTraits = WTF::DefaultRefDerefTraits<WebCore::HTMLElement>]
2024-04-24 19:45:05.336 MiniBrowser[43249:479598] WebContent process crashed; reloading

___

Just wanted to raise so we can track and fix it.

Thanks!

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240424/bcac714b/attachment.htm>


More information about the webkit-unassigned mailing list