Skip to content
Permalink
Browse files
Update uniteIfNonZero to use isZero.
https://bugs.webkit.org/show_bug.cgi?id=76637

Patch by Philip Rogers <pdr@google.com> on 2012-01-23
Reviewed by Darin Adler.

No new tests. (I found no existing codepath that would be affected by
this change but I think this change is still valuable in preventing
future bugs.)

* platform/graphics/FloatRect.cpp:
(WebCore::FloatRect::uniteIfNonZero):

The following change is a minor followup to
https://bugs.webkit.org/show_bug.cgi?id=76177#c12 and is not directly
related to the rest of this patch.
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::computeContainerBoundingBoxes):

Canonical link: https://commits.webkit.org/93677@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@105643 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
progers authored and webkit-commit-queue committed Jan 23, 2012
1 parent 441c9ef commit ef2edcc624aa0b79a7b69aa024ab8bbda3b85aef
Showing 3 changed files with 23 additions and 4 deletions.
@@ -1,3 +1,23 @@
2012-01-23 Philip Rogers <pdr@google.com>

Update uniteIfNonZero to use isZero.
https://bugs.webkit.org/show_bug.cgi?id=76637

Reviewed by Darin Adler.

No new tests. (I found no existing codepath that would be affected by
this change but I think this change is still valuable in preventing
future bugs.)

* platform/graphics/FloatRect.cpp:
(WebCore::FloatRect::uniteIfNonZero):

The following change is a minor followup to
https://bugs.webkit.org/show_bug.cgi?id=76177#c12 and is not directly
related to the rest of this patch.
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::computeContainerBoundingBoxes):

2012-01-23 Antti Koivisto <antti@apple.com>

Eliminate CSSElementStyleDeclaration
@@ -119,9 +119,9 @@ void FloatRect::uniteEvenIfEmpty(const FloatRect& other)
void FloatRect::uniteIfNonZero(const FloatRect& other)
{
// Handle empty special cases first.
if (!other.width() && !other.height())
if (other.isZero())
return;
if (!width() && !height()) {
if (isZero()) {
*this = other;
return;
}
@@ -190,8 +190,7 @@ void SVGRenderSupport::computeContainerBoundingBoxes(const RenderObject* contain
repaintBoundingBox.unite(transform.mapRect(current->repaintRectInLocalCoordinates()));
}

if (isFirstChild)
isFirstChild = false;
isFirstChild = false;
}
}

0 comments on commit ef2edcc

Please sign in to comment.