[Chromium] Add HarfBuzzShaperBase class
authorbashi@chromium.org <bashi@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Feb 2012 07:00:03 +0000 (07:00 +0000)
committerbashi@chromium.org <bashi@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Feb 2012 07:00:03 +0000 (07:00 +0000)
commit3ead8604f889b81aa2f0d98978c7211c8b3351d9
tree94ecd139dd61507685b16b49f5f2a4792363c4a5
parent9f8f5e2a9749ced1a8c353ba5f62cbba08fb46ee
[Chromium] Add HarfBuzzShaperBase class
https://bugs.webkit.org/show_bug.cgi?id=79336

Extract a part of ComplexTextControllerHarfBuzz class as
HarfBuzzShaperBase class. This patch intends to share the code between
old HarfBuzz and HarfBuzz-ng.

Reviewed by Tony Chang.

No new tests. No behavior change. Existing tests in fast/text should pass.

* PlatformBlackBerry.cmake: Added HarfBuzzShaperBase.cpp.
* WebCore.gyp/WebCore.gyp: Added HarfBuzzShaperBase.(cpp|h).
* WebCore.gypi: Ditto.
* platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
(WebCore::ComplexTextController::ComplexTextController): Removed redundant arguments.
(WebCore::ComplexTextController::nextScriptRun): Use m_normalizedBuffer and m_normalizedBufferLength instead of m_run.
(WebCore::ComplexTextController::setupFontForScriptRun): Ditto.
(WebCore::ComplexTextController::setGlyphPositions): Ditto.
* platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.h:
(ComplexTextController):
* platform/graphics/harfbuzz/FontHarfBuzz.cpp:
(WebCore::Font::drawComplexText): Removed redundant arguments of ComplexTextController constructor.
(WebCore::Font::floatWidthForComplexText): Ditto.
(WebCore::Font::offsetForPositionForComplexText): Ditto.
(WebCore::Font::selectionRectForComplexText): Ditto.
* platform/graphics/harfbuzz/HarfBuzzShaperBase.cpp: Added.
(WebCore):
(WebCore::HarfBuzzShaperBase::HarfBuzzShaperBase):
(WebCore::normalizeSpacesAndMirrorChars):
(WebCore::HarfBuzzShaperBase::setNormalizedBuffer):
(WebCore::HarfBuzzShaperBase::isWordEnd):
(WebCore::HarfBuzzShaperBase::determineWordBreakSpacing):
(WebCore::HarfBuzzShaperBase::setPadding):
* platform/graphics/harfbuzz/HarfBuzzShaperBase.h: Added.
(WebCore):
(HarfBuzzShaperBase):
(WebCore::HarfBuzzShaperBase::~HarfBuzzShaperBase):
(WebCore::HarfBuzzShaperBase::isCodepointSpace):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108733 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/PlatformBlackBerry.cmake
Source/WebCore/WebCore.gyp/WebCore.gyp
Source/WebCore/WebCore.gypi
Source/WebCore/platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp
Source/WebCore/platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.h
Source/WebCore/platform/graphics/harfbuzz/FontHarfBuzz.cpp
Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaperBase.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaperBase.h [new file with mode: 0644]