Title: [258918] trunk/Source/WebKit
- Revision
- 258918
- Author
- dp...@igalia.com
- Date
- 2020-03-24 10:53:38 -0700 (Tue, 24 Mar 2020)
Log 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.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (258917 => 258918)
--- trunk/Source/WebKit/ChangeLog 2020-03-24 17:46:41 UTC (rev 258917)
+++ trunk/Source/WebKit/ChangeLog 2020-03-24 17:53:38 UTC (rev 258918)
@@ -1,3 +1,14 @@
+2020-03-24 Diego Pino Garcia <dp...@igalia.com>
+
+ 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.
+
2020-03-24 Per Arne Vollan <pvol...@apple.com>
[Cocoa] Deny access to database mapping service
Modified: trunk/Source/WebKit/WebProcess/WebPage/glib/WebPageGLib.cpp (258917 => 258918)
--- trunk/Source/WebKit/WebProcess/WebPage/glib/WebPageGLib.cpp 2020-03-24 17:46:41 UTC (rev 258917)
+++ trunk/Source/WebKit/WebProcess/WebPage/glib/WebPageGLib.cpp 2020-03-24 17:53:38 UTC (rev 258918)
@@ -120,8 +120,14 @@
postLayoutData.surroundingContextSelectionPosition = postLayoutData.surroundingContextCursorPosition;
} else {
postLayoutData.surroundingContext = plainText(surroundingRange.get());
- postLayoutData.surroundingContextCursorPosition = characterCount(*makeRange(surroundingStart, selectionStart));
- postLayoutData.surroundingContextSelectionPosition = characterCount(*makeRange(surroundingStart, selection.visibleEnd()));
+ if (surroundingStart.isNull() || selectionStart.isNull())
+ postLayoutData.surroundingContextCursorPosition = 0;
+ else
+ postLayoutData.surroundingContextCursorPosition = characterCount(*makeRange(surroundingStart, selectionStart));
+ if (surroundingStart.isNull() || selection.visibleEnd().isNull())
+ postLayoutData.surroundingContextSelectionPosition = 0;
+ else
+ postLayoutData.surroundingContextSelectionPosition = characterCount(*makeRange(surroundingStart, selection.visibleEnd()));
}
}
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes