Skip to content

Commit

Permalink
Bug 1936957 - Avoid a redundant GetProperty(nsGkAtoms::DisplayPortMar…
Browse files Browse the repository at this point in the history
…gins) call in HasNonMinimalNonZeroDisplayPort. r=tnikkel

Differential Revision: https://phabricator.services.mozilla.com/D232024

UltraBlame original commit: 1a7e4ea52fc2be6f92755c1ba2438cd87a39dc0e
  • Loading branch information
marco-c committed Dec 16, 2024
1 parent e5685a7 commit 8d46625
Showing 1 changed file with 19 additions and 25 deletions.
44 changes: 19 additions & 25 deletions layout/base/DisplayPortUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3304,45 +3304,39 @@ return
false
;
}
DisplayPortPropertyData
*
rectData
=
nullptr
;
DisplayPortMarginsPropertyData
*
marginsData
=
nullptr
;
if
(
!
HasDisplayPort
GetDisplayPortData
(
aContent
&
rectData
&
marginsData
)
)
{
return
false
;
}
DisplayPortMarginsPropertyData
*
currentData
=
static_cast
<
DisplayPortMarginsPropertyData
*
>
(
aContent
-
>
GetProperty
(
nsGkAtoms
:
:
DisplayPortMargins
)
)
;
if
(
!
currentData
marginsData
)
{
/
Expand Down Expand Up @@ -3403,7 +3397,7 @@ true
}
if
(
currentData
marginsData
-
>
mMargins
Expand Down

0 comments on commit 8d46625

Please sign in to comment.