Add auto-panning to all remaining tools (#1682)

* Add auto-panning to Gradient tool

* Add auto-panning to Path tool

* Add auto-panning to Pen tool

* Add auto-panning to Spline tool

* Add auto-panning to Line tool

* Add auto-panning to Rectangle tool

* Add auto-panning to Ellipse tool

* Add auto-panning to Polygon tool

* Hide `PointerOutsideViewport` in debug messages

* cargo fmt

* Code review cleanup

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Elbert Ronnie
2024-03-14 06:05:33 +00:00
committed by GitHub
co-authored by Keavon Chambers
parent 9ac10cdcf8
commit ea4f3d8bba
9 changed files with 244 additions and 9 deletions
+2 -1
View File
@@ -40,6 +40,7 @@ const SIDE_EFFECT_FREE_MESSAGES: &[MessageDiscriminant] = &[
MessageDiscriminant::Frontend(FrontendMessageDiscriminant::UpdateDocumentLayerStructure),
MessageDiscriminant::Frontend(FrontendMessageDiscriminant::TriggerFontLoad),
];
const DEBUG_MESSAGE_BLOCK_LIST: &[&str] = &["AnimationFrame", "PointerMove", "PointerOutsideViewport"];
impl Dispatcher {
pub fn new() -> Self {
@@ -224,7 +225,7 @@ impl Dispatcher {
fn log_message(&self, message: &Message, queues: &[VecDeque<Message>], message_logging_verbosity: MessageLoggingVerbosity) {
let message_name = MessageDiscriminant::from(message).local_name();
if !(message_name.ends_with("PointerMove") || message_name.ends_with("AnimationFrame")) {
if !DEBUG_MESSAGE_BLOCK_LIST.iter().any(|blocked_name| message_name.ends_with(blocked_name)) {
match message_logging_verbosity {
MessageLoggingVerbosity::Off => {}
MessageLoggingVerbosity::Names => {