Title: [227757] trunk/Source/WebCore
- Revision
- 227757
- Author
- emi...@crisal.io
- Date
- 2018-01-29 14:35:06 -0800 (Mon, 29 Jan 2018)
Log Message
Trivially cleanup std::optional usage in RenderBlockFlow.
https://bugs.webkit.org/show_bug.cgi?id=182142
Reviewed by Antti Koivisto.
No new tests, no behavior change.
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::firstLineBaseline const):
(WebCore::RenderBlockFlow::inlineBlockBaseline const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (227756 => 227757)
--- trunk/Source/WebCore/ChangeLog 2018-01-29 22:09:07 UTC (rev 227756)
+++ trunk/Source/WebCore/ChangeLog 2018-01-29 22:35:06 UTC (rev 227757)
@@ -1,3 +1,16 @@
+2018-01-29 Emilio Cobos Álvarez <emi...@crisal.io>
+
+ Trivially cleanup std::optional usage in RenderBlockFlow.
+ https://bugs.webkit.org/show_bug.cgi?id=182142
+
+ Reviewed by Antti Koivisto.
+
+ No new tests, no behavior change.
+
+ * rendering/RenderBlockFlow.cpp:
+ (WebCore::RenderBlockFlow::firstLineBaseline const):
+ (WebCore::RenderBlockFlow::inlineBlockBaseline const):
+
2018-01-29 Brent Fulgham <bfulg...@apple.com>
Add telemetry to track storage access API adoption
Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (227756 => 227757)
--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2018-01-29 22:09:07 UTC (rev 227756)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2018-01-29 22:35:06 UTC (rev 227757)
@@ -3014,13 +3014,13 @@
std::optional<int> RenderBlockFlow::firstLineBaseline() const
{
if (isWritingModeRoot() && !isRubyRun())
- return std::optional<int>();
+ return std::nullopt;
if (!childrenInline())
return RenderBlock::firstLineBaseline();
if (!hasLines())
- return std::optional<int>();
+ return std::nullopt;
if (auto simpleLineLayout = this->simpleLineLayout())
return std::optional<int>(SimpleLineLayout::computeFlowFirstLineBaseline(*this, *simpleLineLayout));
@@ -3032,7 +3032,7 @@
std::optional<int> RenderBlockFlow::inlineBlockBaseline(LineDirectionMode lineDirection) const
{
if (isWritingModeRoot() && !isRubyRun())
- return std::optional<int>();
+ return std::nullopt;
// Note that here we only take the left and bottom into consideration. Our caller takes the right and top into consideration.
float boxHeight = lineDirection == HorizontalLine ? height() + m_marginBox.bottom() : width() + m_marginBox.left();
@@ -3045,7 +3045,7 @@
} else {
if (!hasLines()) {
if (!hasLineIfEmpty())
- return std::optional<int>();
+ return std::nullopt;
const auto& fontMetrics = firstLineStyle().fontMetrics();
return std::optional<int>(fontMetrics.ascent()
+ (lineHeight(true, lineDirection, PositionOfInteriorLineBoxes) - fontMetrics.height()) / 2
@@ -3063,7 +3063,7 @@
// According to the CSS spec http://www.w3.org/TR/CSS21/visudet.html, we shouldn't be performing this min, but should
// instead be returning boxHeight directly. However, we feel that a min here is better behavior (and is consistent
// enough with the spec to not cause tons of breakages).
- return std::optional<int>(style().overflowY() == OVISIBLE ? lastBaseline : std::min(boxHeight, lastBaseline));
+ return style().overflowY() == OVISIBLE ? lastBaseline : std::min(boxHeight, lastBaseline);
}
void RenderBlockFlow::setSelectionState(SelectionState state)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes