Bug 199845 - Hang in WebCore::AccessibilityRenderObject::visiblePositionRangeForLine.
Summary: Hang in WebCore::AccessibilityRenderObject::visiblePositionRangeForLine.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-07-16 18:34 PDT by Andres Gonzalez
Modified: 2019-07-17 10:06 PDT (History)
9 users (show)

See Also:


Attachments
Patch (3.12 KB, patch)
2019-07-16 18:48 PDT, Andres Gonzalez
no flags Details | Formatted Diff | Diff
Patch (2.82 KB, patch)
2019-07-16 21:21 PDT, Andres Gonzalez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andres Gonzalez 2019-07-16 18:34:58 PDT
Hang in WebCore::AccessibilityRenderObject::visiblePositionRangeForLine.
Comment 1 Andres Gonzalez 2019-07-16 18:48:51 PDT
Created attachment 374270 [details]
Patch
Comment 2 Andres Gonzalez 2019-07-16 19:29:42 PDT
<rdar://problem/53121017>
Comment 3 chris fleizach 2019-07-16 19:57:38 PDT
Comment on attachment 374270 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=374270&action=review

> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:-1970
> -    if (!lineCount || !m_renderer)

NSNotFound is an apple thing, so this check needs to be in the Mac wrapper. also probably sufficient to check if it’s equals to nsnotfound. I think it’s already uint max so it won’t matter checking higher

> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:1983
> +            || visiblePos.equals(savedVisiblePos))

surprised the == operator doesn’t call .equals directly
Comment 4 Andres Gonzalez 2019-07-16 21:21:20 PDT
Created attachment 374279 [details]
Patch
Comment 5 Andres Gonzalez 2019-07-16 21:29:10 PDT
(In reply to chris fleizach from comment #3)
> Comment on attachment 374270 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=374270&action=review
> 
> > Source/WebCore/accessibility/AccessibilityRenderObject.cpp:-1970
> > -    if (!lineCount || !m_renderer)
> 
> NSNotFound is an apple thing, so this check needs to be in the Mac wrapper.
> also probably sufficient to check if it’s equals to nsnotfound. I think it’s
> already uint max so it won’t matter checking higher
>

Done.
 
> > Source/WebCore/accessibility/AccessibilityRenderObject.cpp:1983
> > +            || visiblePos.equals(savedVisiblePos))
> 
> surprised the == operator doesn’t call .equals directly

The equals method has a FIXME comment in the header file:
    // FIXME: Combine this function with operator==
and looking at the implementation, it does a lot more than operator==.
Comment 6 WebKit Commit Bot 2019-07-17 10:06:02 PDT
Comment on attachment 374279 [details]
Patch

Clearing flags on attachment: 374279

Committed r247519: <https://trac.webkit.org/changeset/247519>
Comment 7 WebKit Commit Bot 2019-07-17 10:06:04 PDT
All reviewed patches have been landed.  Closing bug.