Index: Source/core/rendering/svg/SVGTextQuery.cpp |
diff --git a/Source/core/rendering/svg/SVGTextQuery.cpp b/Source/core/rendering/svg/SVGTextQuery.cpp |
index fe7f7c08c3b9c361b9321c7fc1b1a00aac61f0bf..4afa87da1dc90624c8b4e4153ffdb109be8cb079 100644 |
--- a/Source/core/rendering/svg/SVGTextQuery.cpp |
+++ b/Source/core/rendering/svg/SVGTextQuery.cpp |
@@ -119,8 +119,6 @@ void SVGTextQuery::collectTextBoxesInFlowBox(InlineFlowBox* flowBox) |
bool SVGTextQuery::executeQuery(Data* queryData, ProcessTextFragmentCallback fragmentCallback) const |
{ |
- ASSERT(!m_textBoxes.isEmpty()); |
- |
unsigned processedCharacters = 0; |
unsigned textBoxCount = m_textBoxes.size(); |
@@ -260,9 +258,6 @@ bool SVGTextQuery::numberOfCharactersCallback(Data*, const SVGTextFragment&) con |
unsigned SVGTextQuery::numberOfCharacters() const |
{ |
- if (m_textBoxes.isEmpty()) |
- return 0; |
- |
Data data; |
executeQuery(&data, &SVGTextQuery::numberOfCharactersCallback); |
return data.processedCharacters; |
@@ -287,9 +282,6 @@ bool SVGTextQuery::textLengthCallback(Data* queryData, const SVGTextFragment& fr |
float SVGTextQuery::textLength() const |
{ |
- if (m_textBoxes.isEmpty()) |
- return 0; |
- |
TextLengthData data; |
executeQuery(&data, &SVGTextQuery::textLengthCallback); |
return data.textLength; |
@@ -326,9 +318,6 @@ bool SVGTextQuery::subStringLengthCallback(Data* queryData, const SVGTextFragmen |
float SVGTextQuery::subStringLength(unsigned startPosition, unsigned length) const |
{ |
- if (m_textBoxes.isEmpty()) |
- return 0; |
- |
SubStringLengthData data(startPosition, length); |
executeQuery(&data, &SVGTextQuery::subStringLengthCallback); |
return data.subStringLength; |
@@ -375,9 +364,6 @@ bool SVGTextQuery::startPositionOfCharacterCallback(Data* queryData, const SVGTe |
FloatPoint SVGTextQuery::startPositionOfCharacter(unsigned position) const |
{ |
- if (m_textBoxes.isEmpty()) |
- return FloatPoint(); |
- |
StartPositionOfCharacterData data(position); |
executeQuery(&data, &SVGTextQuery::startPositionOfCharacterCallback); |
return data.startPosition; |
@@ -422,9 +408,6 @@ bool SVGTextQuery::endPositionOfCharacterCallback(Data* queryData, const SVGText |
FloatPoint SVGTextQuery::endPositionOfCharacter(unsigned position) const |
{ |
- if (m_textBoxes.isEmpty()) |
- return FloatPoint(); |
- |
EndPositionOfCharacterData data(position); |
executeQuery(&data, &SVGTextQuery::endPositionOfCharacterCallback); |
return data.endPosition; |
@@ -465,9 +448,6 @@ bool SVGTextQuery::rotationOfCharacterCallback(Data* queryData, const SVGTextFra |
float SVGTextQuery::rotationOfCharacter(unsigned position) const |
{ |
- if (m_textBoxes.isEmpty()) |
- return 0; |
- |
RotationOfCharacterData data(position); |
executeQuery(&data, &SVGTextQuery::rotationOfCharacterCallback); |
return data.rotation; |
@@ -523,9 +503,6 @@ bool SVGTextQuery::extentOfCharacterCallback(Data* queryData, const SVGTextFragm |
FloatRect SVGTextQuery::extentOfCharacter(unsigned position) const |
{ |
- if (m_textBoxes.isEmpty()) |
- return FloatRect(); |
- |
ExtentOfCharacterData data(position); |
executeQuery(&data, &SVGTextQuery::extentOfCharacterCallback); |
return data.extent; |
@@ -568,9 +545,6 @@ bool SVGTextQuery::characterNumberAtPositionCallback(Data* queryData, const SVGT |
int SVGTextQuery::characterNumberAtPosition(const FloatPoint& position) const |
{ |
- if (m_textBoxes.isEmpty()) |
- return -1; |
- |
CharacterNumberAtPositionData data(position); |
if (!executeQuery(&data, &SVGTextQuery::characterNumberAtPositionCallback)) |
return -1; |