Make InvalidationType an enum class to clear the blink ns

kInvalidateDescendants was used both in blink/paint and blink/css
and to avoid shadowing, this makes the one in the blink namespace
(InvalidationType::kInvalidateDescendants) into an enum class.

This will make is easier/possible to later turn on the -Wshadow
warning. I'm interested in prohibiting shadowing because I think
it might prevent potential jumbo problems.

The exact warning this avoids is:
In file included from third_party/blink/renderer/core/paint/
third_party/blink/renderer/core/paint/block_flow_paint_invalidator.h:31:5: error: declaration shadows a variable in namespace 'blink' [-Werror,-Wshadow]
third_party/blink/renderer/core/css/invalidation/invalidation_set.h:52:25: note: previous declaration is here
enum InvalidationType { kInvalidateDescendants, kInvalidateSiblings };

Bug: 923510
Change-Id: Ib1ab2720adf1abda4c9ded69d8e086d1e8f3f360
Reviewed-by: Anders Hartvoll Ruud <>
Commit-Queue: Daniel Bratell <>
Cr-Commit-Position: refs/heads/master@{#635069}
5 files changed