Migrate BidiRunList and BidiRun to automatic memory management
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 2 Apr 2016 07:01:43 +0000 (07:01 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 2 Apr 2016 07:01:43 +0000 (07:01 +0000)
commit1c29cd2cce5e5c5a142b98fdc80ed3dc475453d4
treeb31565f2e68f8e3893f5b23658a0305e54507c25
parentf8f227e5dc2f6749f8ea0bfa3a451e8add096f67
Migrate BidiRunList and BidiRun to automatic memory management
https://bugs.webkit.org/show_bug.cgi?id=156123

Reviewed by Simon Fraser.

BidiRunList, BidiRun, and BidiCharacterRun have all been doing manual
"new"s and "delete"s for years. This patch migrates those classes to
using std::unique_ptr.

No new tests because there is no behavior change.

* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawBidiText):
* platform/text/BidiResolver.h:
(WebCore::BidiCharacterRun::BidiCharacterRun):
(WebCore::BidiCharacterRun::next):
(WebCore::BidiCharacterRun::takeNext):
(WebCore::BidiCharacterRun::setNext):
(WebCore::Subclass>::appendRunInternal):
* platform/text/BidiRunList.h:
(WebCore::BidiRunList::BidiRunList):
(WebCore::BidiRunList::firstRun):
(WebCore::BidiRunList<Run>::appendRun):
(WebCore::BidiRunList<Run>::prependRun):
(WebCore::BidiRunList<Run>::moveRunToEnd):
(WebCore::BidiRunList<Run>::moveRunToBeginning):
(WebCore::BidiRunList<Run>::replaceRunWithRuns):
(WebCore::BidiRunList<Run>::clear):
(WebCore::BidiRunList<Run>::reverseRuns):
(WebCore::BidiRunList<Run>::clearWithoutDestroyingRuns): Deleted.
(WebCore::BidiRunList<Run>::deleteRuns): Deleted.
* rendering/BidiRun.cpp:
(WebCore::BidiRun::takeNext):
* rendering/BidiRun.h:
(WebCore::BidiRun::next):
(WebCore::BidiRun::takeNext):
* rendering/InlineIterator.h:
(WebCore::addPlaceholderRunForIsolatedInline):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::createRun):
(WebCore::RenderBlockFlow::handleTrailingSpaces):
(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
* rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::skipLeadingWhitespace):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@198970 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/GraphicsContext.cpp
Source/WebCore/platform/text/BidiResolver.h
Source/WebCore/platform/text/BidiRunList.h
Source/WebCore/rendering/BidiRun.cpp
Source/WebCore/rendering/BidiRun.h
Source/WebCore/rendering/InlineIterator.h
Source/WebCore/rendering/RenderBlockLineLayout.cpp
Source/WebCore/rendering/line/LineBreaker.cpp