PassRefPtr<StringImpl> LayoutTextFragment::originalText() const
{
    RefPtr<StringImpl> result = completeText();
    if (!result)
        return nullptr;
    return result->substring(start(), fragmentLength());
}
示例#2
0
UChar LayoutTextFragment::previousCharacter() const {
  if (start()) {
    StringImpl* original = completeText().get();
    if (original && start() <= original->length())
      return (*original)[start() - 1];
  }

  return LayoutText::previousCharacter();
}