diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2013-09-13 12:51:20 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-19 20:50:05 +0200 |
commit | d441d6f39bb846989d95bcf5caf387b42414718d (patch) | |
tree | e367e64a75991c554930278175d403c072de6bb8 /Source/WebCore/html/HTMLViewSourceDocument.cpp | |
parent | 0060b2994c07842f4c59de64b5e3e430525c4b90 (diff) | |
download | qtwebkit-d441d6f39bb846989d95bcf5caf387b42414718d.tar.gz |
Import Qt5x2 branch of QtWebkit for Qt 5.2
Importing a new snapshot of webkit.
Change-Id: I2d01ad12cdc8af8cb015387641120a9d7ea5f10c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'Source/WebCore/html/HTMLViewSourceDocument.cpp')
-rw-r--r-- | Source/WebCore/html/HTMLViewSourceDocument.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/Source/WebCore/html/HTMLViewSourceDocument.cpp b/Source/WebCore/html/HTMLViewSourceDocument.cpp index abf243836..e5cd64b69 100644 --- a/Source/WebCore/html/HTMLViewSourceDocument.cpp +++ b/Source/WebCore/html/HTMLViewSourceDocument.cpp @@ -99,24 +99,24 @@ void HTMLViewSourceDocument::addSource(const String& source, HTMLToken& token) createContainingTable(); switch (token.type()) { - case HTMLTokenTypes::Uninitialized: + case HTMLToken::Uninitialized: ASSERT_NOT_REACHED(); break; - case HTMLTokenTypes::DOCTYPE: + case HTMLToken::DOCTYPE: processDoctypeToken(source, token); break; - case HTMLTokenTypes::EndOfFile: + case HTMLToken::EndOfFile: if (!m_tbody->hasChildNodes()) addLine(String()); break; - case HTMLTokenTypes::StartTag: - case HTMLTokenTypes::EndTag: + case HTMLToken::StartTag: + case HTMLToken::EndTag: processTagToken(source, token); break; - case HTMLTokenTypes::Comment: + case HTMLToken::Comment: processCommentToken(source, token); break; - case HTMLTokenTypes::Character: + case HTMLToken::Character: processCharacterToken(source, token); break; } @@ -135,7 +135,7 @@ void HTMLViewSourceDocument::processTagToken(const String& source, HTMLToken& to { m_current = addSpanWithClassName("webkit-html-tag"); - AtomicString tagName(token.name().data(), token.name().size()); + AtomicString tagName(token.name()); unsigned index = 0; HTMLToken::AttributeList::const_iterator iter = token.attributes().begin(); @@ -147,19 +147,19 @@ void HTMLViewSourceDocument::processTagToken(const String& source, HTMLToken& to break; } - AtomicString name(iter->m_name.data(), iter->m_name.size()); - String value = StringImpl::create8BitIfPossible(iter->m_value.data(), iter->m_value.size()); + AtomicString name(iter->name); + String value = StringImpl::create8BitIfPossible(iter->value); - index = addRange(source, index, iter->m_nameRange.m_start - token.startIndex(), ""); - index = addRange(source, index, iter->m_nameRange.m_end - token.startIndex(), "webkit-html-attribute-name"); + index = addRange(source, index, iter->nameRange.start - token.startIndex(), ""); + index = addRange(source, index, iter->nameRange.end - token.startIndex(), "webkit-html-attribute-name"); if (tagName == baseTag && name == hrefAttr) m_current = addBase(value); - index = addRange(source, index, iter->m_valueRange.m_start - token.startIndex(), ""); + index = addRange(source, index, iter->valueRange.start - token.startIndex(), ""); bool isLink = name == srcAttr || name == hrefAttr; - index = addRange(source, index, iter->m_valueRange.m_end - token.startIndex(), "webkit-html-attribute-value", isLink, tagName == aTag, value); + index = addRange(source, index, iter->valueRange.end - token.startIndex(), "webkit-html-attribute-value", isLink, tagName == aTag, value); ++iter; } @@ -278,7 +278,7 @@ int HTMLViewSourceDocument::addRange(const String& source, int start, int end, c } addText(text, className); if (!className.isEmpty() && m_current != m_tbody) - m_current = static_cast<Element*>(m_current->parentNode()); + m_current = toElement(m_current->parentNode()); return end; } |