Remove dead code LocalFrame::DeviceScaleFactorChanged() [chromium/src : main]

0 views
Skip to first unread message

Xianzhu Wang (Gerrit)

unread,
Jun 27, 2022, 6:26:56 PM6/27/22
to Philip Rogers, blink-revi...@chromium.org, blink-...@chromium.org

Attention is currently required from: Philip Rogers.

Xianzhu Wang would like Philip Rogers to review this change.

View Change

Remove dead code LocalFrame::DeviceScaleFactorChanged()

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
---
M third_party/blink/renderer/core/frame/local_frame.cc
M third_party/blink/renderer/core/frame/local_frame.h
2 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index 9d8a9be..e80a356 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -1286,18 +1286,6 @@
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);
diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/blink/renderer/core/frame/local_frame.h
index 669d4ec..ba6e2a7 100644
--- a/third_party/blink/renderer/core/frame/local_frame.h
+++ b/third_party/blink/renderer/core/frame/local_frame.h
@@ -357,7 +357,6 @@
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

To view, visit change 3726854. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I31eb3fb380fa7274cae512eab99f957fffa54ab5
Gerrit-Change-Number: 3726854
Gerrit-PatchSet: 1
Gerrit-Owner: Xianzhu Wang <wangx...@chromium.org>
Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
Gerrit-Reviewer: Xianzhu Wang <wangx...@chromium.org>
Gerrit-Attention: Philip Rogers <p...@chromium.org>
Gerrit-MessageType: newchange

Xianzhu Wang (Gerrit)

unread,
Jun 27, 2022, 6:27:01 PM6/27/22
to blink-revi...@chromium.org, blink-...@chromium.org, Philip Rogers, Chromium LUCI CQ, chromium...@chromium.org

Attention is currently required from: Philip Rogers.

Patch set 1:Auto-Submit +1

View Change

    To view, visit change 3726854. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I31eb3fb380fa7274cae512eab99f957fffa54ab5
    Gerrit-Change-Number: 3726854
    Gerrit-PatchSet: 1
    Gerrit-Owner: Xianzhu Wang <wangx...@chromium.org>
    Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
    Gerrit-Reviewer: Xianzhu Wang <wangx...@chromium.org>
    Gerrit-Attention: Philip Rogers <p...@chromium.org>
    Gerrit-Comment-Date: Mon, 27 Jun 2022 22:26:52 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    Gerrit-MessageType: comment

    Philip Rogers (Gerrit)

    unread,
    Jun 27, 2022, 7:41:47 PM6/27/22
    to Xianzhu Wang, blink-revi...@chromium.org, blink-...@chromium.org, Chromium LUCI CQ, chromium...@chromium.org

    Attention is currently required from: Xianzhu Wang.

    Patch set 1:Code-Review +1Commit-Queue +2

    View Change

    1 comment:

    To view, visit change 3726854. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I31eb3fb380fa7274cae512eab99f957fffa54ab5
    Gerrit-Change-Number: 3726854
    Gerrit-PatchSet: 1
    Gerrit-Owner: Xianzhu Wang <wangx...@chromium.org>
    Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
    Gerrit-Reviewer: Xianzhu Wang <wangx...@chromium.org>
    Gerrit-Attention: Xianzhu Wang <wangx...@chromium.org>
    Gerrit-Comment-Date: Mon, 27 Jun 2022 23:41:37 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Gerrit-MessageType: comment

    Chromium LUCI CQ (Gerrit)

    unread,
    Jun 27, 2022, 7:46:11 PM6/27/22
    to Xianzhu Wang, blink-revi...@chromium.org, blink-...@chromium.org, Philip Rogers, chromium...@chromium.org

    Chromium LUCI CQ submitted this change.

    View Change


    Approvals: Philip Rogers: Looks good to me; Commit Xianzhu Wang: Send CL to CQ automatically after approval
    Remove dead code LocalFrame::DeviceScaleFactorChanged()

    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 <wangx...@chromium.org>
    Commit-Queue: Philip Rogers <p...@chromium.org>
    Reviewed-by: Philip Rogers <p...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1018468}

    ---
    M third_party/blink/renderer/core/frame/local_frame.cc
    M third_party/blink/renderer/core/frame/local_frame.h
    2 files changed, 20 insertions(+), 13 deletions(-)

    To view, visit change 3726854. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I31eb3fb380fa7274cae512eab99f957fffa54ab5
    Gerrit-Change-Number: 3726854
    Gerrit-PatchSet: 2
    Gerrit-Owner: Xianzhu Wang <wangx...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
    Gerrit-Reviewer: Xianzhu Wang <wangx...@chromium.org>
    Gerrit-MessageType: merged
    Reply all
    Reply to author
    Forward
    0 new messages