https://bugs.webkit.org/show_bug.cgi?id=218444
Reviewed by Zalan Bujtas.
Source/WebCore:
Add the required iterator support and convert absoluteQuadsForRange to use it.
This eliminates ensureLineBoxes from two places.
* layout/integration/LayoutIntegrationRunIterator.h:
(WebCore::LayoutIntegration::PathTextRun::isSelectable const):
(WebCore::LayoutIntegration::PathTextRun::selectionRect const):
* layout/integration/LayoutIntegrationRunIteratorLegacyPath.h:
(WebCore::LayoutIntegration::RunIteratorLegacyPath::isSelectable const):
(WebCore::LayoutIntegration::RunIteratorLegacyPath::selectionRect const):
* layout/integration/LayoutIntegrationRunIteratorModernPath.h:
(WebCore::LayoutIntegration::RunIteratorModernPath::offsetForPosition const):
(WebCore::LayoutIntegration::RunIteratorModernPath::isSelectable const):
(WebCore::LayoutIntegration::RunIteratorModernPath::selectionRect const):
(WebCore::LayoutIntegration::RunIteratorModernPath::clampedOffset const):
(WebCore::LayoutIntegration::RunIteratorModernPath::createTextRun const):
* rendering/RenderText.cpp:
(WebCore::RenderText::absoluteRectsForRange const):
(WebCore::localQuadForTextRun):
(WebCore::RenderText::absoluteQuadsForRange const):
* rendering/RenderTextLineBoxes.cpp:
(WebCore::localQuadForTextBox): Deleted.
(WebCore::RenderTextLineBoxes::absoluteQuadsForRange const): Deleted.
(WebCore::RenderTextLineBoxes::absoluteRectsForRange const): Deleted.
* rendering/RenderTextLineBoxes.h:
LayoutTests:
* fast/dom/Range/getBoundingClientRect-expected.txt:
* fast/dom/Range/getBoundingClientRect.html:
On legacy path <br> y position is miscomputed affecting getBoundingClientRect().
Update the test to match the new behavior. Results now match Firefox and Chrome.
Canonical link: https://commits.webkit.org/231123@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269272 268f45cc-cd09-0410-ab3c-d52691b4dbfc