diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/core/animation/scroll_timeline_offset.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/core/animation/scroll_timeline_offset.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/chromium/third_party/blink/renderer/core/animation/scroll_timeline_offset.cc b/chromium/third_party/blink/renderer/core/animation/scroll_timeline_offset.cc index 7555b92eca1..6631be00e8e 100644 --- a/chromium/third_party/blink/renderer/core/animation/scroll_timeline_offset.cc +++ b/chromium/third_party/blink/renderer/core/animation/scroll_timeline_offset.cc @@ -58,8 +58,11 @@ bool ElementBasedOffsetsEqual(ScrollTimelineElementBasedOffset* o1, return true; if (!o1 || !o2) return false; - return (o1->edge() == o2->edge()) && (o1->target() == o2->target()) && - (o1->threshold() == o2->threshold()); + // TODO(crbug.com/1070871): Use targetOr(nullptr) after migration is done. + Element* target_or_null1 = o1->hasTarget() ? o1->target() : nullptr; + Element* target_or_null2 = o2->hasTarget() ? o2->target() : nullptr; + return target_or_null1 == target_or_null2 && o1->edge() == o2->edge() && + o1->threshold() == o2->threshold(); } CSSKeywordValue* GetCSSKeywordValue(const ScrollTimelineOffsetValue& offset) { |