-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core: remove some trivial uses of WebInspector #6090
Conversation
@@ -6,13 +6,10 @@ | |||
'use strict'; | |||
|
|||
/** @typedef {LH.Artifacts.FontSize['analyzedFailingNodesData'][0]} FailingNodeData */ | |||
/** @typedef {{Type: {Regular: 'Regular', Inline: 'Inline', Attributes: 'Attributes'}}} WebInspectorCSSStyle */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The values that are compared against these are typed to only be one of these values, so really no point in bringing it in just for these three constants.
@@ -47,10 +46,6 @@ class NetworkRecorder extends EventEmitter { | |||
return super.once(event, listener); | |||
} | |||
|
|||
get EventTypes() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Injected: 'injected', | ||
UserAgent: 'user-agent', | ||
Inspector: 'inspector', | ||
Regular: 'regular', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these shouldn't have been all caps (see e.g. https://github.com/ChromeDevTools/devtools-frontend/blob/51d3d758c57dc51d1864b3003de1fdda82963623/front_end/sdk/CSSRule.js#L70). We only touch the code that checks if a style was injected or came from the user-agent, but unsure if that was affecting the output of our font-size code...
bundle size form 512.65KB back down to 510.01KB :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is nice cleanup. and it also makes me uncomfortable. 😰
that's not a review :P |
523d474
to
61c6b93
Compare
❤️ this |
inspired by @patrickhulce's comment in #5946 (comment), took a look at some of our current uses of WebInspector and found some that could be trivially removed.