RenderText: Access characters through m_text instead of caching data pointers separately.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 10 Feb 2013 13:44:02 +0000 (13:44 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 10 Feb 2013 13:44:02 +0000 (13:44 +0000)
commitee46df34be08d5d1102fb855e8c040777339cf90
treec9d87612423cbd386af68085811a71f35cb7a51f
parent868041a41a87782c67adef7702aadd66b9b15a92
RenderText: Access characters through m_text instead of caching data pointers separately.
<http://webkit.org/b/109357>

Reviewed by Antti Koivisto.

Go through RenderText::m_text.impl() instead of caching the character data pointer.
RenderText should never have a null String in m_text so it's safe to access impl() directly.
We have assertions for this since before.

Removing this pointer shrinks RenderText by 8 bytes, allowing it to fit into a snugger size class.
749 KB progression on Membuster3.

* rendering/RenderText.cpp:
(SameSizeAsRenderText):
(WebCore::RenderText::RenderText):
(WebCore::RenderText::setTextInternal):
* rendering/RenderText.h:
(WebCore::RenderText::is8Bit):
(WebCore::RenderText::characters8):
(WebCore::RenderText::characters16):
(WebCore::RenderText::characterAt):
(WebCore::RenderText::operator[]):
(RenderText):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142398 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderText.cpp
Source/WebCore/rendering/RenderText.h