Streamline ListHashSet use in floating object code
Created attachment 355614 [details] Patch
Comment on attachment 355614 [details] Patch Clearing flags on attachment: 355614 Committed r238504: <https://trac.webkit.org/changeset/238504>
All reviewed patches have been landed. Closing bug.
<rdar://problem/46250861>
Comment on attachment 355614 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=355614&action=review > Source/WebCore/rendering/FloatingObjects.cpp:349 > void FloatingObjects::remove(FloatingObject* floatingObject) Since this won’t work with null, probably change this to take a reference at some point. > Source/WebCore/rendering/FloatingObjects.cpp:351 > + ASSERT((m_set.contains(floatingObject))); Would like to remove the extra set of parentheses here, too. > Source/WebCore/rendering/FloatingObjects.h:122 > + static unsigned hash(PtrType key) { return PtrHash<RenderBox*>::hash(&key->renderer()); } > + static bool equal(PtrType a, PtrType b) { return &a->renderer() == &b->renderer(); } Could we have used reference types here instead of pointer types? I’m not thrilled with functions that use "pointers that are known to never be null". We’d have to add some * at the various call sites, but I think that’s better than having the dereferencing hidden inside the functions.