Ignore:
Timestamp:
Mar 17, 2022, 7:30:52 PM (3 years ago)
Author:
Alan Bujtas
Message:

[IFC][Integration] Introduce LineSelection
https://bugs.webkit.org/show_bug.cgi?id=237997

Reviewed by Antti Koivisto.

Use LineSelection to retrieve line based selection information.
This is in preparation for removing selection/hittesting related functions from InlineIterator::Line.

  • WebCore.xcodeproj/project.pbxproj:
  • editing/VisiblePosition.cpp:

(WebCore::VisiblePosition::absoluteSelectionBoundsForLine const):

  • layout/integration/InlineIteratorLine.h:
  • layout/integration/InlineIteratorTextBox.cpp:

(WebCore::InlineIterator::TextBox::selectionRect const):

  • layout/integration/LineSelection.h: Added.

(WebCore::LineSelection::logicalTop):
(WebCore::LineSelection::logicalBottom):
(WebCore::LineSelection::logicalRect):
(WebCore::LineSelection::physicalRect):
(WebCore::LineSelection::logicalTopAdjustedForPrecedingBlock):
(WebCore::LineSelection::logicalHeightAdjustedForPrecedingBlock):
(WebCore::LineSelection::selectionState):

  • rendering/CaretRectComputation.cpp:

(WebCore::computeCaretRectForLinePosition):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::adjustEnclosingTopForPrecedingBlock const):
(WebCore::RenderBlockFlow::inlineSelectionGaps):
(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::collectSelectionGeometries):

  • rendering/RenderLineBreak.cpp:

(WebCore::RenderLineBreak::collectSelectionGeometries):

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::positionForPoint):

  • rendering/RenderText.cpp:

(WebCore::RenderText::positionForPoint):

  • rendering/TextBoxPainter.cpp:

(WebCore::TextBoxPainter::paintBackground):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/rendering/RenderLineBreak.cpp

    r291312 r291463  
    3232#include "LegacyInlineElementBox.h"
    3333#include "LegacyRootInlineBox.h"
     34#include "LineSelection.h"
    3435#include "LogicalSelectionOffsetCaches.h"
    3536#include "RenderBlock.h"
     
    188189    auto line = run->line();
    189190
    190     auto lineSelectionRect = line->enclosingLogicalRect();
     191    auto lineSelectionRect = LineSelection::logicalRect(*line);
    191192    LayoutRect rect = IntRect(run->logicalLeft(), lineSelectionRect.y(), 0, lineSelectionRect.height());
    192193    if (!line->isHorizontal())
Note: See TracChangeset for help on using the changeset viewer.