Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Eliminate DeprecatedPtrList from RenderBlock
https://bugs.webkit.org/show_bug.cgi?id=54972 Patch by Benjamin Poulain <ikipou@gmail.com> on 2011-02-27 Reviewed by Darin Adler. Source/JavaScriptCore: Add methods find() and contains() using an adaptor to ListHashSet. Those method are like the one of HashSet, they allow to find objects based on a different key than the one used to define the set. Add convenience methods for direct access to the head and tail of the list. Those methods are providing similar API/behavior as Vector. * wtf/ListHashSet.h: (WTF::::first): (WTF::::last): (WTF::::removeLast): (WTF::ListHashSetTranslatorAdapter::hash): (WTF::ListHashSetTranslatorAdapter::equal): (WTF::::find): (WTF::::contains): Source/WebCore: Refactor RenderBlock to get rid of the DeprecatedPtrList. The floating objects are stored in a ListHashSet. Refactoring covered by existing test. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::~RenderBlock): (WebCore::RenderBlock::addOverflowFromFloats): (WebCore::RenderBlock::repaintOverhangingFloats): (WebCore::RenderBlock::paintFloats): (WebCore::RenderBlock::selectionGaps): (WebCore::RenderBlock::insertFloatingObject): (WebCore::RenderBlock::removeFloatingObject): (WebCore::RenderBlock::removeFloatingObjectsBelow): (WebCore::RenderBlock::positionNewFloats): (WebCore::RenderBlock::positionNewFloatOnLine): (WebCore::RenderBlock::logicalLeftOffsetForLine): (WebCore::RenderBlock::logicalRightOffsetForLine): (WebCore::RenderBlock::nextFloatLogicalBottomBelow): (WebCore::RenderBlock::lowestFloatLogicalBottom): (WebCore::RenderBlock::clearFloats): (WebCore::RenderBlock::addOverhangingFloats): (WebCore::RenderBlock::addIntrudingFloats): (WebCore::RenderBlock::containsFloat): (WebCore::RenderBlock::hitTestFloats): (WebCore::RenderBlock::adjustForBorderFit): * rendering/RenderBlock.h: (WebCore::RenderBlock::FloatingObjectHashFunctions::hash): (WebCore::RenderBlock::FloatingObjectHashFunctions::equal): (WebCore::RenderBlock::FloatingObjectHashTranslator::hash): (WebCore::RenderBlock::FloatingObjectHashTranslator::equal): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::layoutInlineChildren): (WebCore::RenderBlock::matchedEndLine): Canonical link: https://commits.webkit.org/69734@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@79817 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Benjamin Poulain
authored and
Benjamin Poulain
committed
Feb 27, 2011
1 parent
3dd9956
commit b479930db7a17518a1e82974bbfe4e99fb5dba53
Showing
6 changed files
with
316 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.