| Index: Source/core/editing/htmlediting.cpp
|
| diff --git a/Source/core/editing/htmlediting.cpp b/Source/core/editing/htmlediting.cpp
|
| index 8b5e040f7fb0d12d1e820f6ee2dadde554a62a8c..496aeecdaf3127f8fafa783f224e94d9b0b2de2f 100644
|
| --- a/Source/core/editing/htmlediting.cpp
|
| +++ b/Source/core/editing/htmlediting.cpp
|
| @@ -964,7 +964,7 @@ unsigned numEnclosingMailBlockquotes(const Position& p)
|
| {
|
| unsigned num = 0;
|
| for (Node* n = p.deprecatedNode(); n; n = n->parentNode())
|
| - if (isMailBlockquote(n))
|
| + if (isMailHTMLBlockquoteElement(n))
|
| num++;
|
|
|
| return num;
|
| @@ -1000,12 +1000,13 @@ void updatePositionForNodeRemoval(Position& position, Node& node)
|
| }
|
| }
|
|
|
| -bool isMailBlockquote(const Node *node)
|
| +bool isMailHTMLBlockquoteElement(const Node* node)
|
| {
|
| - if (!node || !node->hasTagName(blockquoteTag))
|
| + if (!node || !node->isHTMLElement())
|
| return false;
|
|
|
| - return toElement(node)->getAttribute("type") == "cite";
|
| + const HTMLElement& element = toHTMLElement(*node);
|
| + return element.hasTagName(blockquoteTag) && element.getAttribute("type") == "cite";
|
| }
|
|
|
| int caretMinOffset(const Node* n)
|
| @@ -1164,17 +1165,21 @@ bool areIdenticalElements(const Node* first, const Node* second)
|
|
|
| bool isNonTableCellHTMLBlockElement(const Node* node)
|
| {
|
| - return node->hasTagName(listingTag)
|
| - || node->hasTagName(olTag)
|
| - || node->hasTagName(preTag)
|
| - || node->hasTagName(tableTag)
|
| - || node->hasTagName(ulTag)
|
| - || node->hasTagName(xmpTag)
|
| - || node->hasTagName(h1Tag)
|
| - || node->hasTagName(h2Tag)
|
| - || node->hasTagName(h3Tag)
|
| - || node->hasTagName(h4Tag)
|
| - || node->hasTagName(h5Tag);
|
| + if (!node->isHTMLElement())
|
| + return false;
|
| +
|
| + const HTMLElement& element = toHTMLElement(*node);
|
| + return element.hasTagName(listingTag)
|
| + || element.hasTagName(olTag)
|
| + || element.hasTagName(preTag)
|
| + || element.hasTagName(tableTag)
|
| + || element.hasTagName(ulTag)
|
| + || element.hasTagName(xmpTag)
|
| + || element.hasTagName(h1Tag)
|
| + || element.hasTagName(h2Tag)
|
| + || element.hasTagName(h3Tag)
|
| + || element.hasTagName(h4Tag)
|
| + || element.hasTagName(h5Tag);
|
| }
|
|
|
| Position adjustedSelectionStartForStyleComputation(const VisibleSelection& selection)
|
|
|