Title: [243844] trunk/Source/WebCore
- Revision
- 243844
- Author
- [email protected]
- Date
- 2019-04-03 19:01:07 -0700 (Wed, 03 Apr 2019)
Log Message
Nullptr crash in InlineTextBox::selectionState via TextIndicator::createWithRange
https://bugs.webkit.org/show_bug.cgi?id=196579
Reviewed by Simon Fraser.
Avoid crashing accessing the unengated optional's value in relese builds for now.
Unfortunately, fixing the underlying cause of the selection states of RenderView & RenderObject
getting out out of sync would require a significant re-architecturing of the whole selection
repainting / state managing mechanism.
* rendering/SelectionRangeData.h:
(WebCore::SelectionRangeData::startPosition const):
(WebCore::SelectionRangeData::endPosition const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (243843 => 243844)
--- trunk/Source/WebCore/ChangeLog 2019-04-04 01:28:49 UTC (rev 243843)
+++ trunk/Source/WebCore/ChangeLog 2019-04-04 02:01:07 UTC (rev 243844)
@@ -1,3 +1,20 @@
+2019-04-03 Ryosuke Niwa <[email protected]>
+
+ Nullptr crash in InlineTextBox::selectionState via TextIndicator::createWithRange
+ https://bugs.webkit.org/show_bug.cgi?id=196579
+
+ Reviewed by Simon Fraser.
+
+ Avoid crashing accessing the unengated optional's value in relese builds for now.
+
+ Unfortunately, fixing the underlying cause of the selection states of RenderView & RenderObject
+ getting out out of sync would require a significant re-architecturing of the whole selection
+ repainting / state managing mechanism.
+
+ * rendering/SelectionRangeData.h:
+ (WebCore::SelectionRangeData::startPosition const):
+ (WebCore::SelectionRangeData::endPosition const):
+
2019-04-03 Myles C. Maxfield <[email protected]>
-apple-trailing-word is needed for browser detection
Modified: trunk/Source/WebCore/rendering/SelectionRangeData.h (243843 => 243844)
--- trunk/Source/WebCore/rendering/SelectionRangeData.h 2019-04-04 01:28:49 UTC (rev 243843)
+++ trunk/Source/WebCore/rendering/SelectionRangeData.h 2019-04-04 02:01:07 UTC (rev 243844)
@@ -78,9 +78,10 @@
RenderObject* start() const { return m_selectionContext.start(); }
RenderObject* end() const { return m_selectionContext.end(); }
- unsigned startPosition() const { ASSERT(m_selectionContext.startPosition()); return m_selectionContext.startPosition().value(); }
- unsigned endPosition() const { ASSERT(m_selectionContext.endPosition()); return m_selectionContext.endPosition().value(); }
+ unsigned startPosition() const { ASSERT(m_selectionContext.startPosition()); return m_selectionContext.startPosition().valueOr(0); }
+ unsigned endPosition() const { ASSERT(m_selectionContext.endPosition()); return m_selectionContext.endPosition().valueOr(0); }
+
void clear();
IntRect bounds() const { return collectBounds(ClipToVisibleContent::No); }
IntRect boundsClippedToVisibleContent() const { return collectBounds(ClipToVisibleContent::Yes); }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes