Title: [226195] trunk/Source/WebCore
- Revision
- 226195
- Author
- [email protected]
- Date
- 2017-12-20 12:04:54 -0800 (Wed, 20 Dec 2017)
Log Message
Cleanup: Dereference value of optional directly instead of using checked value in WebCore::subdivide()
https://bugs.webkit.org/show_bug.cgi?id=181050
Reviewed by Simon Fraser.
It is sufficient and more efficient to dereference a std::optional directly when we know that it has
a value as opposed to using the checked dereference member function std::optional<>::value().
No functionality changed. So, no new tests.
* rendering/MarkerSubrange.cpp:
(WebCore::subdivide):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (226194 => 226195)
--- trunk/Source/WebCore/ChangeLog 2017-12-20 19:59:35 UTC (rev 226194)
+++ trunk/Source/WebCore/ChangeLog 2017-12-20 20:04:54 UTC (rev 226195)
@@ -1,5 +1,20 @@
2017-12-20 Daniel Bates <[email protected]>
+ Cleanup: Dereference value of optional directly instead of using checked value in WebCore::subdivide()
+ https://bugs.webkit.org/show_bug.cgi?id=181050
+
+ Reviewed by Simon Fraser.
+
+ It is sufficient and more efficient to dereference a std::optional directly when we know that it has
+ a value as opposed to using the checked dereference member function std::optional<>::value().
+
+ No functionality changed. So, no new tests.
+
+ * rendering/MarkerSubrange.cpp:
+ (WebCore::subdivide):
+
+2017-12-20 Daniel Bates <[email protected]>
+
MarkerSubrange.SubdivideGrammarAndSelectionOverlap{Frontmost, FrontmostWithLongestEffectiveRange} are failing
https://bugs.webkit.org/show_bug.cgi?id=181014
Modified: trunk/Source/WebCore/rendering/MarkerSubrange.cpp (226194 => 226195)
--- trunk/Source/WebCore/rendering/MarkerSubrange.cpp 2017-12-20 19:59:35 UTC (rev 226194)
+++ trunk/Source/WebCore/rendering/MarkerSubrange.cpp 2017-12-20 20:04:54 UTC (rev 226195)
@@ -76,12 +76,12 @@
if (frontmost) {
if (overlapStrategy == OverlapStrategy::FrontmostWithLongestEffectiveRange && !result.isEmpty()) {
auto& previous = result.last();
- if (previous.endOffset == offsetSoFar && previous.type == offsets[frontmost.value()].subrange->type && previous.marker == offsets[frontmost.value()].subrange->marker)
+ if (previous.endOffset == offsetSoFar && previous.type == offsets[*frontmost].subrange->type && previous.marker == offsets[*frontmost].subrange->marker)
previous.endOffset = offsets[i].value;
else
- result.append({ offsetSoFar, offsets[i].value, offsets[frontmost.value()].subrange->type, offsets[frontmost.value()].subrange->marker });
+ result.append({ offsetSoFar, offsets[i].value, offsets[*frontmost].subrange->type, offsets[*frontmost].subrange->marker });
} else
- result.append({ offsetSoFar, offsets[i].value, offsets[frontmost.value()].subrange->type, offsets[frontmost.value()].subrange->marker });
+ result.append({ offsetSoFar, offsets[i].value, offsets[*frontmost].subrange->type, offsets[*frontmost].subrange->marker });
}
} else {
// The appended subranges may not be in paint order. We will fix this up at the end of this function.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes