| Index: Source/core/editing/htmlediting.cpp
|
| diff --git a/Source/core/editing/htmlediting.cpp b/Source/core/editing/htmlediting.cpp
|
| index 08fecaa38404e3b71bcc208e5a2df6077399a8d5..bd9eef7e1f8b471f9f8b92270ccbc05ac8cb231a 100644
|
| --- a/Source/core/editing/htmlediting.cpp
|
| +++ b/Source/core/editing/htmlediting.cpp
|
| @@ -336,11 +336,11 @@ Element* enclosingBlock(Node* node, EditingBoundaryCrossingRule rule)
|
|
|
| Element* enclosingBlockFlowElement(Node& node)
|
| {
|
| - if (node.isBlockFlowElement())
|
| + if (isBlockFlowElement(node))
|
| return &toElement(node);
|
|
|
| for (Node* n = node.parentNode(); n; n = n->parentNode()) {
|
| - if (n->isBlockFlowElement() || isHTMLBodyElement(*n))
|
| + if (isBlockFlowElement(*n) || isHTMLBodyElement(*n))
|
| return toElement(n);
|
| }
|
| return 0;
|
| @@ -1199,6 +1199,12 @@ bool isNonTableCellHTMLBlockElement(const Node* node)
|
| || element.hasTagName(h5Tag);
|
| }
|
|
|
| +bool isBlockFlowElement(const Node& node)
|
| +{
|
| + RenderObject* renderer = node.renderer();
|
| + return node.isElementNode() && renderer && renderer->isRenderBlockFlow();
|
| +}
|
| +
|
| Position adjustedSelectionStartForStyleComputation(const VisibleSelection& selection)
|
| {
|
| // This function is used by range style computations to avoid bugs like:
|
|
|