Title: [291523] trunk/Source/WebCore
- Revision
- 291523
- Author
- [email protected]
- Date
- 2022-03-19 01:49:04 -0700 (Sat, 19 Mar 2022)
Log Message
[IFC][Integration] Move enclosingHeightAdjustedForPrecedingBlock off of InlineIterator::Line
https://bugs.webkit.org/show_bug.cgi?id=238081
Reviewed by Antti Koivisto.
This function is way too specific to be on InlineIterator::Line (and has only one callsite).
* layout/integration/InlineIteratorLine.cpp:
(WebCore::InlineIterator::Line::enclosingHeightAdjustedForPrecedingBlock const): Deleted.
* layout/integration/LineSelection.h:
(WebCore::LineSelection::logicalTopAdjustedForPrecedingBlock):
(WebCore::LineSelection::logicalHeightAdjustedForPrecedingBlock): Deleted.
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::inlineSelectionGaps):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (291522 => 291523)
--- trunk/Source/WebCore/ChangeLog 2022-03-19 08:14:42 UTC (rev 291522)
+++ trunk/Source/WebCore/ChangeLog 2022-03-19 08:49:04 UTC (rev 291523)
@@ -1,3 +1,20 @@
+2022-03-19 Alan Bujtas <[email protected]>
+
+ [IFC][Integration] Move enclosingHeightAdjustedForPrecedingBlock off of InlineIterator::Line
+ https://bugs.webkit.org/show_bug.cgi?id=238081
+
+ Reviewed by Antti Koivisto.
+
+ This function is way too specific to be on InlineIterator::Line (and has only one callsite).
+
+ * layout/integration/InlineIteratorLine.cpp:
+ (WebCore::InlineIterator::Line::enclosingHeightAdjustedForPrecedingBlock const): Deleted.
+ * layout/integration/LineSelection.h:
+ (WebCore::LineSelection::logicalTopAdjustedForPrecedingBlock):
+ (WebCore::LineSelection::logicalHeightAdjustedForPrecedingBlock): Deleted.
+ * rendering/RenderBlockFlow.cpp:
+ (WebCore::RenderBlockFlow::inlineSelectionGaps):
+
2022-03-18 Joseph Griego <[email protected]>
Fix typo from r291295
Modified: trunk/Source/WebCore/layout/integration/InlineIteratorLine.cpp (291522 => 291523)
--- trunk/Source/WebCore/layout/integration/InlineIteratorLine.cpp 2022-03-19 08:14:42 UTC (rev 291522)
+++ trunk/Source/WebCore/layout/integration/InlineIteratorLine.cpp 2022-03-19 08:49:04 UTC (rev 291523)
@@ -167,11 +167,6 @@
return containingBlock().adjustEnclosingTopForPrecedingBlock(enclosingTopAdjustedForPrecedingLine());
}
-LayoutUnit Line::enclosingHeightAdjustedForPrecedingBlock() const
-{
- return std::max<LayoutUnit>(0, enclosingBottom() - enclosingTopAdjustedForPrecedingBlock());
-}
-
RenderObject::HighlightState Line::selectionState() const
{
auto& block = containingBlock();
Modified: trunk/Source/WebCore/layout/integration/InlineIteratorLine.h (291522 => 291523)
--- trunk/Source/WebCore/layout/integration/InlineIteratorLine.h 2022-03-19 08:14:42 UTC (rev 291522)
+++ trunk/Source/WebCore/layout/integration/InlineIteratorLine.h 2022-03-19 08:49:04 UTC (rev 291523)
@@ -102,7 +102,6 @@
LayoutUnit enclosingTopAdjustedForPrecedingLine() const;
LayoutUnit enclosingTopAdjustedForPrecedingBlock() const;
- LayoutUnit enclosingHeightAdjustedForPrecedingBlock() const;
RenderObject::HighlightState selectionState() const;
Modified: trunk/Source/WebCore/layout/integration/LineSelection.h (291522 => 291523)
--- trunk/Source/WebCore/layout/integration/LineSelection.h 2022-03-19 08:14:42 UTC (rev 291522)
+++ trunk/Source/WebCore/layout/integration/LineSelection.h 2022-03-19 08:49:04 UTC (rev 291523)
@@ -38,7 +38,6 @@
static LayoutRect physicalRect(const InlineIterator::Line& line) { return line.enclosingPhysicalRect(); }
static LayoutUnit logicalTopAdjustedForPrecedingBlock(const InlineIterator::Line& line) { return line.enclosingTopAdjustedForPrecedingBlock(); }
- static LayoutUnit logicalHeightAdjustedForPrecedingBlock(const InlineIterator::Line& line) { return line.enclosingHeightAdjustedForPrecedingBlock(); }
static RenderObject::HighlightState selectionState(const InlineIterator::Line& line) { return line.selectionState(); }
};
Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (291522 => 291523)
--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2022-03-19 08:14:42 UTC (rev 291522)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2022-03-19 08:49:04 UTC (rev 291523)
@@ -3166,7 +3166,7 @@
// Now paint the gaps for the lines.
for (; line && hasSelectedChildren(line); line.traverseNext()) {
auto selectionTop = LineSelection::logicalTopAdjustedForPrecedingBlock(*line);
- auto selectionHeight = LineSelection::logicalHeightAdjustedForPrecedingBlock(*line);
+ auto selectionHeight = std::max(0_lu, LineSelection::logicalBottom(*line) - selectionTop);
if (!containsStart && !lastSelectedLine &&
selectionState() != HighlightState::Start && selectionState() != HighlightState::Both && !isRubyBase())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes