Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1240c24cc6c34462b69d9778250b03635123c978
      
https://github.com/WebKit/WebKit/commit/1240c24cc6c34462b69d9778250b03635123c978
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-07-02 (Thu, 02 Jul 2026)

  Changed paths:
    M Source/WebCore/inspector/InspectorStyleSheet.cpp

  Log Message:
  -----------
  [Web Inspector] Duplicate invalid CSS declarations both show as Active due to 
dead has_value() && !has_value() check
https://bugs.webkit.org/show_bug.cgi?id=318419
rdar://181203080

Reviewed by Devin Rousso.

InspectorStyleSheet::buildArrayForComputedStyle's handling of a
non-parsed property overriding a previous same-named non-parsed
property was dead code. getBoolean() returns std::optional<bool>, so
the guard `previousParsedOk && !previousParsedOk` evaluated to
`has_value() && !has_value()`, which is always false. As a result the
"non-parsed property overrides previous non-parsed property" path never
ran, and two duplicate invalid declarations of the same property both
rendered as Active in the Styles sidebar instead of inactivating the
earlier one.

Dereference the optional so the value is actually read:
`previousParsedOk && !*previousParsedOk`.

* Source/WebCore/inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyle::styleWithProperties):

Canonical link: https://commits.webkit.org/316418@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to