Changeset 263591 in webkit


Ignore:
Timestamp:
Jun 26, 2020 3:00:52 PM (4 years ago)
Author:
Wenson Hsieh
Message:

[iOS] Layout tests sometimes assert under -[WKContentView hasContent]
https://bugs.webkit.org/show_bug.cgi?id=213656
<rdar://problem/64818648>

Reviewed by Tim Horton.

Make it safe to invoke -[WKContentView hasContent] when post-layout data is not present, and there is no
ranged or caret selection. Some editing layout tests on iOS tend to hit the post-layout data assertion due to
the callout bar presentation callback firing while we reset the test harness to a consistent state (and spin the
runloop while doing so).

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView hasContent]):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r263589 r263591  
     12020-06-26  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        [iOS] Layout tests sometimes assert under -[WKContentView hasContent]
     4        https://bugs.webkit.org/show_bug.cgi?id=213656
     5        <rdar://problem/64818648>
     6
     7        Reviewed by Tim Horton.
     8
     9        Make it safe to invoke `-[WKContentView hasContent]` when post-layout data is not present, and there is no
     10        ranged or caret selection. Some editing layout tests on iOS tend to hit the post-layout data assertion due to
     11        the callout bar presentation callback firing while we reset the test harness to a consistent state (and spin the
     12        runloop while doing so).
     13
     14        * UIProcess/ios/WKContentViewInteraction.mm:
     15        (-[WKContentView hasContent]):
     16
    1172020-06-26  Pablo Saavedra  <psaavedra@igalia.com>
    218
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r263531 r263591  
    56625662- (BOOL)hasContent
    56635663{
    5664     return _page->editorState().postLayoutData().hasContent;
     5664    auto& editorState = _page->editorState();
     5665    return !editorState.selectionIsNone && editorState.postLayoutData().hasContent;
    56655666}
    56665667
Note: See TracChangeset for help on using the changeset viewer.