Bug 1896516 Part 6 - Remove nsIScrollableFrame usages in nsLayoutUtils. r=layout-reviewers,emilio
Convert `nsIScrollableFrame` to `ScrollContainerFrame` for all the APIs in nsLayoutUtils, and then adapt other callers until everything compiles. In `nsLayoutUtils::CalculateBasicFrameMetrics()`'s documentation, s/ComputeFrameMetrics/ComputeScrollMetadata/ because the method was renamed in https://hg.mozilla.org/mozilla-central/rev/cb2023f50288 Differential Revision: https://phabricator.services.mozilla.com/D211493
This commit is contained in:
@@ -9366,15 +9366,15 @@ void PresShell::EventHandler::GetCurrentItemAndPositionForElement(
|
||||
if (!istree) {
|
||||
extra = frame->GetSize().height;
|
||||
if (checkLineHeight) {
|
||||
nsIScrollableFrame* scrollFrame =
|
||||
nsLayoutUtils::GetNearestScrollableFrame(
|
||||
ScrollContainerFrame* scrollContainerFrame =
|
||||
nsLayoutUtils::GetNearestScrollContainerFrame(
|
||||
frame, nsLayoutUtils::SCROLLABLE_INCLUDE_HIDDEN |
|
||||
nsLayoutUtils::SCROLLABLE_FIXEDPOS_FINDS_ROOT);
|
||||
if (scrollFrame) {
|
||||
nsSize scrollAmount = scrollFrame->GetLineScrollAmount();
|
||||
nsIFrame* f = do_QueryFrame(scrollFrame);
|
||||
if (scrollContainerFrame) {
|
||||
nsSize scrollAmount = scrollContainerFrame->GetLineScrollAmount();
|
||||
int32_t APD = presContext->AppUnitsPerDevPixel();
|
||||
int32_t scrollAPD = f->PresContext()->AppUnitsPerDevPixel();
|
||||
int32_t scrollAPD =
|
||||
scrollContainerFrame->PresContext()->AppUnitsPerDevPixel();
|
||||
scrollAmount = scrollAmount.ScaleToOtherAppUnits(scrollAPD, APD);
|
||||
if (extra > scrollAmount.height) {
|
||||
extra = scrollAmount.height;
|
||||
|
||||
Reference in New Issue
Block a user