void FloatRect::unite(const FloatRect& other) { // Handle empty special cases first. if (other.isEmpty()) return; if (isEmpty()) { *this = other; return; } uniteEvenIfEmpty(other); }
void IntRect::uniteIfNonZero(const IntRect& other) { // Handle empty special cases first. if (!other.width() && !other.height()) return; if (!width() && !height()) { *this = other; return; } uniteEvenIfEmpty(other); }