Changeset 258918 in webkit


Ignore:
Timestamp:
Mar 24, 2020 10:53:38 AM (4 years ago)
Author:
Diego Pino Garcia
Message:

REGRESSION(r258871): [GTK] test bot exiting early due to too many crashes
https://bugs.webkit.org/show_bug.cgi?id=209467

Reviewed by Darin Adler.

  • WebProcess/WebPage/glib/WebPageGLib.cpp:

(WebKit::WebPage::platformEditorState const): Add a check to prevent start
and end position of selection range is not null.

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r258915 r258918  
     12020-03-24  Diego Pino Garcia  <dpino@igalia.com>
     2
     3        REGRESSION(r258871): [GTK] test bot exiting early due to too many crashes
     4        https://bugs.webkit.org/show_bug.cgi?id=209467
     5
     6        Reviewed by Darin Adler.
     7
     8        * WebProcess/WebPage/glib/WebPageGLib.cpp:
     9        (WebKit::WebPage::platformEditorState const): Add a check to prevent start
     10        and end position of selection range is not null.
     11
    1122020-03-24  Per Arne Vollan  <pvollan@apple.com>
    213
  • trunk/Source/WebKit/WebProcess/WebPage/glib/WebPageGLib.cpp

    r258871 r258918  
    121121        } else {
    122122            postLayoutData.surroundingContext = plainText(surroundingRange.get());
    123             postLayoutData.surroundingContextCursorPosition = characterCount(*makeRange(surroundingStart, selectionStart));
    124             postLayoutData.surroundingContextSelectionPosition = characterCount(*makeRange(surroundingStart, selection.visibleEnd()));
     123            if (surroundingStart.isNull() || selectionStart.isNull())
     124                postLayoutData.surroundingContextCursorPosition = 0;
     125            else
     126                postLayoutData.surroundingContextCursorPosition = characterCount(*makeRange(surroundingStart, selectionStart));
     127            if (surroundingStart.isNull() || selection.visibleEnd().isNull())
     128                postLayoutData.surroundingContextSelectionPosition = 0;
     129            else
     130                postLayoutData.surroundingContextSelectionPosition = characterCount(*makeRange(surroundingStart, selection.visibleEnd()));
    125131        }
    126132    }
Note: See TracChangeset for help on using the changeset viewer.