Skip to content

Commit

Permalink
Avoid doing 2 hash lookups if we override RenderBox's logical width /…
Browse files Browse the repository at this point in the history
… height

https://bugs.webkit.org/show_bug.cgi?id=79591

Reviewed by Antonio Gomes.

Refactoring only.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::clearOverrideSize):
Instead of doing one hash lookup as part of hasOverride{Height|Width}, let's
just directly call HashMap::remove that will do the lookup instead.


Canonical link: https://commits.webkit.org/96793@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109028 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Julien Chaffraix committed Feb 27, 2012
1 parent 51d50d1 commit 75ca704
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
14 changes: 14 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,17 @@
2012-02-27 Julien Chaffraix <jchaffraix@webkit.org>

Avoid doing 2 hash lookups if we override RenderBox's logical width / height
https://bugs.webkit.org/show_bug.cgi?id=79591

Reviewed by Antonio Gomes.

Refactoring only.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::clearOverrideSize):
Instead of doing one hash lookup as part of hasOverride{Height|Width}, let's
just directly call HashMap::remove that will do the lookup instead.

2012-02-27 Adam Klein <adamk@chromium.org>

Move WebCore-internal DOM notification methods from Node to ContainerNode where appropriate
Expand Down
4 changes: 2 additions & 2 deletions Source/WebCore/rendering/RenderBox.cpp
Expand Up @@ -795,9 +795,9 @@ void RenderBox::setOverrideWidth(LayoutUnit width)

void RenderBox::clearOverrideSize()
{
if (hasOverrideHeight())
if (gOverrideHeightMap)
gOverrideHeightMap->remove(this);
if (hasOverrideWidth())
if (gOverrideWidthMap)
gOverrideWidthMap->remove(this);
}

Expand Down

0 comments on commit 75ca704

Please sign in to comment.