Verified Commit 3c493b1e authored by Ting-Yu Lin's avatar Ting-Yu Lin Committed by ma1
Browse files

Bug 2053578 - Use static_cast in...

Bug 2053578 - Use static_cast in nsSplittableFrame::UpdateFirstContinuationAndFirstInFlowCache(). r=layout-reviewers,jfkthame

`nsSplittableFrame` is a subclass of `nsIFrame`, it is sufficient to use
`static_cast`.

Differential Revision: https://phabricator.services.mozilla.com/D315157
parent 3e75dcee
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -214,7 +214,7 @@ void nsSplittableFrame::UpdateFirstContinuationAndFirstInFlowCache() {
    if (oldCachedFirstContinuation != newFirstContinuation) {
      // Update the first-continuation cache for us and our next-continuations.
      for (nsSplittableFrame* f = this; f;
           f = reinterpret_cast<nsSplittableFrame*>(f->GetNextContinuation())) {
           f = static_cast<nsSplittableFrame*>(f->GetNextContinuation())) {
        f->mFirstContinuation = newFirstContinuation;
      }
    }
@@ -227,7 +227,7 @@ void nsSplittableFrame::UpdateFirstContinuationAndFirstInFlowCache() {
      // behavior when a frame list is destroyed from the front. To avoid that
      // pathological behavior, we simply purge the cached values.
      for (nsSplittableFrame* f = this; f;
           f = reinterpret_cast<nsSplittableFrame*>(f->GetNextContinuation())) {
           f = static_cast<nsSplittableFrame*>(f->GetNextContinuation())) {
        f->mFirstContinuation = nullptr;
      }
    }
@@ -239,7 +239,7 @@ void nsSplittableFrame::UpdateFirstContinuationAndFirstInFlowCache() {
    if (oldCachedFirstInFlow != newFirstInFlow) {
      // Update the first-in-flow cache for us and our next-in-flows.
      for (nsSplittableFrame* f = this; f;
           f = reinterpret_cast<nsSplittableFrame*>(f->GetNextInFlow())) {
           f = static_cast<nsSplittableFrame*>(f->GetNextInFlow())) {
        f->mFirstInFlow = newFirstInFlow;
      }
    }
@@ -251,7 +251,7 @@ void nsSplittableFrame::UpdateFirstContinuationAndFirstInFlowCache() {
      // behavior when a frame list is destroyed from the front. To avoid that
      // pathological behavior, we simply purge the cached values.
      for (nsSplittableFrame* f = this; f;
           f = reinterpret_cast<nsSplittableFrame*>(f->GetNextInFlow())) {
           f = static_cast<nsSplittableFrame*>(f->GetNextInFlow())) {
        f->mFirstInFlow = nullptr;
      }
    }