Clean up LazyLoadImageObserver to match LazyLoadFrameObserver, inspired by the review of bug 215442. Specifically remove the friend declaration and create function, rename m_lazyLoadImageObserver to make its use more clear and therefore remove the comment about it.
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].
<rdar://problem/68795266>