Skip to content

Commit

Permalink
Remove dead code LocalFrame::DeviceScaleFactorChanged()
Browse files Browse the repository at this point in the history
I guess it was for pre-use-zoom-for-dsf.

Now LocalFrame::SetPageAndTextZoomFactors() invalidates style on
change of page zoom including dsf.

Bug: 1296791
Change-Id: I31eb3fb380fa7274cae512eab99f957fffa54ab5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3726854
Auto-Submit: Xianzhu Wang <[email protected]>
Commit-Queue: Philip Rogers <[email protected]>
Reviewed-by: Philip Rogers <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1018468}
  • Loading branch information
wangxianzhu authored and Chromium LUCI CQ committed Jun 27, 2022
1 parent 866be68 commit a2c04c2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
12 changes: 0 additions & 12 deletions third_party/blink/renderer/core/frame/local_frame.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1286,18 +1286,6 @@ void LocalFrame::SetPageAndTextZoomFactors(float page_zoom_factor,
View()->SetNeedsLayout();
}

void LocalFrame::DeviceScaleFactorChanged() {
GetDocument()->MediaQueryAffectingValueChanged(MediaValueChange::kOther);
GetDocument()->GetStyleEngine().MarkViewportStyleDirty();
GetDocument()->GetStyleEngine().MarkAllElementsForStyleRecalc(
StyleChangeReasonForTracing::Create(style_change_reason::kZoom));
for (Frame* child = Tree().FirstChild(); child;
child = child->Tree().NextSibling()) {
if (auto* child_local_frame = DynamicTo<LocalFrame>(child))
child_local_frame->DeviceScaleFactorChanged();
}
}

void LocalFrame::MediaQueryAffectingValueChangedForLocalSubtree(
MediaValueChange value) {
GetDocument()->MediaQueryAffectingValueChanged(value);
Expand Down
1 change: 0 additions & 1 deletion third_party/blink/renderer/core/frame/local_frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ class CORE_EXPORT LocalFrame final
void SetPageAndTextZoomFactors(float page_zoom_factor,
float text_zoom_factor);

void DeviceScaleFactorChanged();
double DevicePixelRatio() const;

// Informs the local root's document and its local descendant subtree that a
Expand Down

0 comments on commit a2c04c2

Please sign in to comment.