LibWeb: Avoid copying viewport rect when converting length to pixels #15203
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I couldn't believe it myself but its apparently been over two years since I started contributing. Back then I had barely any knowledge of C++ (most of which came from watching Andreas' videos anyways), git and all the fun things that go into an operating system.
Since then I've learnt so much and met so many cool people - I'm incredibly grateful for it!
One of my first contributions was to implement the
v{w,h,min,max}
length units in LibWeb. In the review linus requested that I don't copy the viewport rect every time to read some simple int values from it. As I didn't know what a const reference was and had no clue about squashing commits Andreas simply let it go through.This pull request fixes this very minor performance issue. If it doesn't get merged due to being a micro optimization with no measured impact I'll happily contribute another change as my 100th commit, though it will not have any lore attached :^) :^)