Summary: | Clean up LazyLoadImageObserver | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Rob Buis <rbuis> | ||||||
Component: | Images | Assignee: | Rob Buis <rbuis> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | cdumez, changseok, darin, esprehn+autocc, ews-watchlist, gyuyoung.kim, kangil.han, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Rob Buis
2020-09-12 07:38:18 PDT
Created attachment 408594 [details]
Patch
Comment on attachment 408594 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=408594&action=review > Source/WebCore/html/LazyLoadImageObserver.h:46 > + RefPtr<IntersectionObserver> m_lazyLoadImageIntersectionObserver; You made this name longer, but I might have gone the opposite direction. Given that this is the intersection observer in the class LazyLoadImageObserver, obviously it’s the one for lazily loading image, so I would leave the words "lazy", "load", and "image" out of the name. I might even just call it m_observer, given the narrow context of being the only data member of this particular class. A longer name isn’t really helpful to understand what this is for. Created attachment 408645 [details]
Patch
Comment on attachment 408594 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=408594&action=review >> Source/WebCore/html/LazyLoadImageObserver.h:46 >> + RefPtr<IntersectionObserver> m_lazyLoadImageIntersectionObserver; > > You made this name longer, but I might have gone the opposite direction. Given that this is the intersection observer in the class LazyLoadImageObserver, obviously it’s the one for lazily loading image, so I would leave the words "lazy", "load", and "image" out of the name. I might even just call it m_observer, given the narrow context of being the only data member of this particular class. A longer name isn’t really helpful to understand what this is for. Interesting. I think you are right, given the class name the member var name was too long and contained duplicate information. Fixed now, also for LazyLoadFrameObserver to be consistent. Committed r266991: <https://trac.webkit.org/changeset/266991> All reviewed patches have been landed. Closing bug and clearing flags on attachment 408645 [details]. |