<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[180809] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/180809">180809</a></dd>
<dt>Author</dt> <dd>rniwa@webkit.org</dd>
<dt>Date</dt> <dd>2015-02-27 18:41:12 -0800 (Fri, 27 Feb 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Node::hasEditableStyle and isEditablePosition have too many options
https://bugs.webkit.org/show_bug.cgi?id=142078

Reviewed by Andreas Kling.

Moved the code that dealt with accessibility to htmlediting.cpp from Node. This patch introduces
new editing helper functions hasEditableStyle and isEditableNode for this purpose.

Also removed UserSelectAllTreatment from isContentEditable's arguments in the favor of using
newly extracted computeEditability in call sites that specify this option since isContentEditable
is a public DOM API.

No new tests since there should be no observable behavior changes.

* accessibility/AXObjectCache.h: Removed the declaration of an undefined function.

* dom/Element.cpp:
(WebCore::Element::shouldUseInputMethod): Uses newly added computeEditability.

* dom/Node.cpp:
(WebCore::Node::isContentEditable): Ditto. No longer takes UserSelectAllTreatment as an argument.
(WebCore::Node::isContentRichlyEditable): Ditto.
(WebCore::Node::computeEditability): Renamed from hasEditableStyle to avoid the confusion with
a helper function of the same name. Added ShouldUpdateStyle as an argument to optionally update
style tree. Also returns tri-state Editability enum instead of returning a boolean based on
the value of EditableLevel argument.
(WebCore::Node::isEditableToAccessibility): Moved to htmlediting.cpp.
(WebCore::Node::willRespondToMouseClickEvents): Uses newly added computeEditability.
(WebCore::Node::rootEditableElement): Moved to htmlediting.cpp.

* dom/Node.h: No longer includes EditingBoundary.h.
(WebCore::Node::isContentEditable):
(WebCore::Node::hasEditableStyle): No longer takes EditableType as an argument.
(WebCore::Node::hasRichlyEditableStyle): Ditto.

* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::removeInlineStyleFromElement): Uses newly added isEditableNode.
(WebCore::ApplyStyleCommand::surroundNodeRangeWithElement): Ditto.
* editing/DeleteFromTextNodeCommand.cpp:
(WebCore::DeleteFromTextNodeCommand::doApply): Ditto.
* editing/FrameSelection.cpp:
(WebCore::CaretBase::invalidateCaretRect): Ditto.
* editing/InsertNodeBeforeCommand.cpp:
(WebCore::InsertNodeBeforeCommand::doApply): Ditto.
(WebCore::InsertNodeBeforeCommand::doUnapply): Ditto.
* editing/RemoveNodeCommand.cpp:
(WebCore::RemoveNodeCommand::doApply): Ditto.

* editing/VisibleSelection.cpp:
(WebCore::VisibleSelection::hasEditableStyle): Since this is the only caller of isEditablePosition
which sets DoNotUpdateStyle, directly call hasEditableStyle on the container node instead. This was
not possible prior to <a href="http://trac.webkit.org/projects/webkit/changeset/180726">r180726</a> because isEditablePosition had to move out of tables.

* editing/VisibleUnits.cpp:
(WebCore::previousLeafWithSameEditability): Uses newly added hasEditableStyle.
(WebCore::nextLeafWithSameEditability): Ditto.
(WebCore::rootEditableOrDocumentElement): Extracted from previousLinePosition. Use helper functions
in htmlediting.cpp instead of member functions of Node since they no longer support EditableType.
(WebCore::previousLinePosition):
(WebCore::nextLinePosition):

* editing/htmlediting.cpp:
(WebCore::highestEditableRoot): Uses newly added hasEditableStyle.
(WebCore::isEditableToAccessibility): Moved from Node.
(WebCore::computeEditability): Extracted from isEditablePosition.
(WebCore::hasEditableStyle): Added.
(WebCore::isEditableNode): Added.
(WebCore::isEditablePosition): Now calls computeEditability.
(WebCore::isRichlyEditablePosition): No longer takes EditableType since that variant was never used.
(WebCore::editableRootForPosition): Moved the code from Node::rootEditableElement.

* editing/htmlediting.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAXObjectCacheh">trunk/Source/WebCore/accessibility/AXObjectCache.h</a></li>
<li><a href="#trunkSourceWebCoredomElementcpp">trunk/Source/WebCore/dom/Element.cpp</a></li>
<li><a href="#trunkSourceWebCoredomNodecpp">trunk/Source/WebCore/dom/Node.cpp</a></li>
<li><a href="#trunkSourceWebCoredomNodeh">trunk/Source/WebCore/dom/Node.h</a></li>
<li><a href="#trunkSourceWebCoreeditingApplyStyleCommandcpp">trunk/Source/WebCore/editing/ApplyStyleCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingDeleteFromTextNodeCommandcpp">trunk/Source/WebCore/editing/DeleteFromTextNodeCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingFrameSelectioncpp">trunk/Source/WebCore/editing/FrameSelection.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingInsertNodeBeforeCommandcpp">trunk/Source/WebCore/editing/InsertNodeBeforeCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingRemoveNodeCommandcpp">trunk/Source/WebCore/editing/RemoveNodeCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingVisibleSelectioncpp">trunk/Source/WebCore/editing/VisibleSelection.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingVisibleUnitscpp">trunk/Source/WebCore/editing/VisibleUnits.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditinghtmleditingcpp">trunk/Source/WebCore/editing/htmlediting.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditinghtmleditingh">trunk/Source/WebCore/editing/htmlediting.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (180808 => 180809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-02-28 02:14:24 UTC (rev 180808)
+++ trunk/Source/WebCore/ChangeLog        2015-02-28 02:41:12 UTC (rev 180809)
</span><span class="lines">@@ -1,3 +1,78 @@
</span><ins>+2015-02-27  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
+
+        Node::hasEditableStyle and isEditablePosition have too many options
+        https://bugs.webkit.org/show_bug.cgi?id=142078
+
+        Reviewed by Andreas Kling.
+
+        Moved the code that dealt with accessibility to htmlediting.cpp from Node. This patch introduces
+        new editing helper functions hasEditableStyle and isEditableNode for this purpose.
+
+        Also removed UserSelectAllTreatment from isContentEditable's arguments in the favor of using
+        newly extracted computeEditability in call sites that specify this option since isContentEditable
+        is a public DOM API.
+
+        No new tests since there should be no observable behavior changes.
+
+        * accessibility/AXObjectCache.h: Removed the declaration of an undefined function.
+
+        * dom/Element.cpp:
+        (WebCore::Element::shouldUseInputMethod): Uses newly added computeEditability.
+
+        * dom/Node.cpp:
+        (WebCore::Node::isContentEditable): Ditto. No longer takes UserSelectAllTreatment as an argument.
+        (WebCore::Node::isContentRichlyEditable): Ditto.
+        (WebCore::Node::computeEditability): Renamed from hasEditableStyle to avoid the confusion with
+        a helper function of the same name. Added ShouldUpdateStyle as an argument to optionally update
+        style tree. Also returns tri-state Editability enum instead of returning a boolean based on
+        the value of EditableLevel argument.
+        (WebCore::Node::isEditableToAccessibility): Moved to htmlediting.cpp.
+        (WebCore::Node::willRespondToMouseClickEvents): Uses newly added computeEditability.
+        (WebCore::Node::rootEditableElement): Moved to htmlediting.cpp.
+
+        * dom/Node.h: No longer includes EditingBoundary.h.
+        (WebCore::Node::isContentEditable):
+        (WebCore::Node::hasEditableStyle): No longer takes EditableType as an argument.
+        (WebCore::Node::hasRichlyEditableStyle): Ditto.
+
+        * editing/ApplyStyleCommand.cpp:
+        (WebCore::ApplyStyleCommand::removeInlineStyleFromElement): Uses newly added isEditableNode.
+        (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement): Ditto.
+        * editing/DeleteFromTextNodeCommand.cpp:
+        (WebCore::DeleteFromTextNodeCommand::doApply): Ditto.
+        * editing/FrameSelection.cpp:
+        (WebCore::CaretBase::invalidateCaretRect): Ditto.
+        * editing/InsertNodeBeforeCommand.cpp:
+        (WebCore::InsertNodeBeforeCommand::doApply): Ditto.
+        (WebCore::InsertNodeBeforeCommand::doUnapply): Ditto.
+        * editing/RemoveNodeCommand.cpp:
+        (WebCore::RemoveNodeCommand::doApply): Ditto.
+
+        * editing/VisibleSelection.cpp:
+        (WebCore::VisibleSelection::hasEditableStyle): Since this is the only caller of isEditablePosition
+        which sets DoNotUpdateStyle, directly call hasEditableStyle on the container node instead. This was
+        not possible prior to r180726 because isEditablePosition had to move out of tables.
+
+        * editing/VisibleUnits.cpp:
+        (WebCore::previousLeafWithSameEditability): Uses newly added hasEditableStyle.
+        (WebCore::nextLeafWithSameEditability): Ditto.
+        (WebCore::rootEditableOrDocumentElement): Extracted from previousLinePosition. Use helper functions
+        in htmlediting.cpp instead of member functions of Node since they no longer support EditableType.
+        (WebCore::previousLinePosition):
+        (WebCore::nextLinePosition):
+
+        * editing/htmlediting.cpp:
+        (WebCore::highestEditableRoot): Uses newly added hasEditableStyle.
+        (WebCore::isEditableToAccessibility): Moved from Node.
+        (WebCore::computeEditability): Extracted from isEditablePosition.
+        (WebCore::hasEditableStyle): Added.
+        (WebCore::isEditableNode): Added.
+        (WebCore::isEditablePosition): Now calls computeEditability.
+        (WebCore::isRichlyEditablePosition): No longer takes EditableType since that variant was never used.
+        (WebCore::editableRootForPosition): Moved the code from Node::rootEditableElement.
+
+        * editing/htmlediting.h:
+
</ins><span class="cx"> 2015-02-27  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Make ActiveDOMObject::canSuspend() pure virtual
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAXObjectCacheh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AXObjectCache.h (180808 => 180809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AXObjectCache.h        2015-02-28 02:14:24 UTC (rev 180808)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.h        2015-02-28 02:41:12 UTC (rev 180809)
</span><span class="lines">@@ -146,7 +146,6 @@
</span><span class="cx">     void removeAXID(AccessibilityObject*);
</span><span class="cx">     bool isIDinUse(AXID id) const { return m_idsInUse.contains(id); }
</span><span class="cx"> 
</span><del>-    Element* rootAXEditableElement(Node*);
</del><span class="cx">     const Element* rootAXEditableElement(const Node*);
</span><span class="cx">     bool nodeIsTextControl(const Node*);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.cpp (180808 => 180809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.cpp        2015-02-28 02:14:24 UTC (rev 180808)
+++ trunk/Source/WebCore/dom/Element.cpp        2015-02-28 02:41:12 UTC (rev 180809)
</span><span class="lines">@@ -239,7 +239,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool Element::shouldUseInputMethod()
</span><span class="cx"> {
</span><del>-    return isContentEditable(UserSelectAllIsAlwaysNonEditable);
</del><ins>+    return computeEditability(UserSelectAllIsAlwaysNonEditable, ShouldUpdateStyle::Update) != Editability::ReadOnly;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool Element::dispatchMouseEvent(const PlatformMouseEvent&amp; platformEvent, const AtomicString&amp; eventType, int detail, Element* relatedTarget)
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Node.cpp (180808 => 180809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Node.cpp        2015-02-28 02:14:24 UTC (rev 180808)
+++ trunk/Source/WebCore/dom/Node.cpp        2015-02-28 02:41:12 UTC (rev 180809)
</span><span class="lines">@@ -537,16 +537,14 @@
</span><span class="cx">     return nullAtom;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool Node::isContentEditable(UserSelectAllTreatment treatment)
</del><ins>+bool Node::isContentEditable()
</ins><span class="cx"> {
</span><del>-    document().updateStyleIfNeeded();
-    return hasEditableStyle(Editable, treatment);
</del><ins>+    return computeEditability(UserSelectAllDoesNotAffectEditability, ShouldUpdateStyle::Update) != Editability::ReadOnly;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool Node::isContentRichlyEditable()
</span><span class="cx"> {
</span><del>-    document().updateStyleIfNeeded();
-    return hasEditableStyle(RichlyEditable, UserSelectAllIsAlwaysNonEditable);
</del><ins>+    return computeEditability(UserSelectAllIsAlwaysNonEditable, ShouldUpdateStyle::Update) == Editability::CanEditRichly;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Node::inspect()
</span><span class="lines">@@ -555,15 +553,18 @@
</span><span class="cx">         document().page()-&gt;inspectorController().inspect(this);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool Node::hasEditableStyle(EditableLevel editableLevel, UserSelectAllTreatment treatment) const
</del><ins>+Node::Editability Node::computeEditability(UserSelectAllTreatment treatment, ShouldUpdateStyle shouldUpdateStyle) const
</ins><span class="cx"> {
</span><ins>+    if (shouldUpdateStyle == ShouldUpdateStyle::Update)
+        document().updateStyleIfNeeded();
+
</ins><span class="cx">     if (!document().hasLivingRenderTree())
</span><del>-        return false;
</del><ins>+        return Editability::ReadOnly;
</ins><span class="cx">     if (document().frame() &amp;&amp; document().frame()-&gt;page() &amp;&amp; document().frame()-&gt;page()-&gt;isEditable() &amp;&amp; !containingShadowRoot())
</span><del>-        return true;
</del><ins>+        return Editability::CanEditRichly;
</ins><span class="cx"> 
</span><span class="cx">     if (isPseudoElement())
</span><del>-        return false;
</del><ins>+        return Editability::ReadOnly;
</ins><span class="cx"> 
</span><span class="cx">     // Ideally we'd call ASSERT(!needsStyleRecalc()) here, but
</span><span class="cx">     // ContainerNode::setFocus() calls setNeedsStyleRecalc(), so the assertion
</span><span class="lines">@@ -579,42 +580,24 @@
</span><span class="cx">         // Elements with user-select: all style are considered atomic
</span><span class="cx">         // therefore non editable.
</span><span class="cx">         if (treatment == UserSelectAllIsAlwaysNonEditable &amp;&amp; style-&gt;userSelect() == SELECT_ALL)
</span><del>-            return false;
</del><ins>+            return Editability::ReadOnly;
</ins><span class="cx"> #else
</span><span class="cx">         UNUSED_PARAM(treatment);
</span><span class="cx"> #endif
</span><span class="cx">         switch (style-&gt;userModify()) {
</span><span class="cx">         case READ_ONLY:
</span><del>-            return false;
</del><ins>+            return Editability::ReadOnly;
</ins><span class="cx">         case READ_WRITE:
</span><del>-            return true;
</del><ins>+            return Editability::CanEditRichly;
</ins><span class="cx">         case READ_WRITE_PLAINTEXT_ONLY:
</span><del>-            return editableLevel != RichlyEditable;
</del><ins>+            return Editability::CanEditPlainText;
</ins><span class="cx">         }
</span><span class="cx">         ASSERT_NOT_REACHED();
</span><del>-        return false;
</del><ins>+        return Editability::ReadOnly;
</ins><span class="cx">     }
</span><del>-    return false;
</del><ins>+    return Editability::ReadOnly;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool Node::isEditableToAccessibility(EditableLevel editableLevel) const
-{
-    if (hasEditableStyle(editableLevel))
-        return true;
-
-    // FIXME: Respect editableLevel for ARIA editable elements.
-    if (editableLevel == RichlyEditable)
-        return false;
-
-    ASSERT(AXObjectCache::accessibilityEnabled());
-    ASSERT(document().existingAXObjectCache());
-
-    if (AXObjectCache* cache = document().existingAXObjectCache())
-        return cache-&gt;rootAXEditableElement(this);
-
-    return false;
-}
-
</del><span class="cx"> RenderBox* Node::renderBox() const
</span><span class="cx"> {
</span><span class="cx">     RenderObject* renderer = this-&gt;renderer();
</span><span class="lines">@@ -1030,16 +1013,6 @@
</span><span class="cx">         || !parentNode()-&gt;isElementNode() || hasTagName(bodyTag));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Element* Node::rootEditableElement(EditableType editableType) const
-{
-    if (editableType == HasEditableAXRole) {
-        if (AXObjectCache* cache = document().existingAXObjectCache())
-            return const_cast&lt;Element*&gt;(cache-&gt;rootAXEditableElement(this));
-    }
-    
-    return rootEditableElement();
-}
-
</del><span class="cx"> Element* Node::rootEditableElement() const
</span><span class="cx"> {
</span><span class="cx">     Element* result = nullptr;
</span><span class="lines">@@ -2163,7 +2136,8 @@
</span><span class="cx">         return false;
</span><span class="cx">     if (downcast&lt;Element&gt;(*this).isDisabledFormControl())
</span><span class="cx">         return false;
</span><del>-    return isContentEditable(UserSelectAllIsAlwaysNonEditable) || hasEventListeners(eventNames().mouseupEvent) || hasEventListeners(eventNames().mousedownEvent) || hasEventListeners(eventNames().clickEvent) || hasEventListeners(eventNames().DOMActivateEvent);
</del><ins>+    return computeEditability(UserSelectAllIsAlwaysNonEditable, ShouldUpdateStyle::Update) != Editability::ReadOnly
+        || hasEventListeners(eventNames().mouseupEvent) || hasEventListeners(eventNames().mousedownEvent) || hasEventListeners(eventNames().clickEvent) || hasEventListeners(eventNames().DOMActivateEvent);
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Node.h (180808 => 180809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Node.h        2015-02-28 02:14:24 UTC (rev 180808)
+++ trunk/Source/WebCore/dom/Node.h        2015-02-28 02:41:12 UTC (rev 180809)
</span><span class="lines">@@ -25,7 +25,6 @@
</span><span class="cx"> #ifndef Node_h
</span><span class="cx"> #define Node_h
</span><span class="cx"> 
</span><del>-#include &quot;EditingBoundary.h&quot;
</del><span class="cx"> #include &quot;EventTarget.h&quot;
</span><span class="cx"> #include &quot;URLHash.h&quot;
</span><span class="cx"> #include &quot;LayoutRect.h&quot;
</span><span class="lines">@@ -313,7 +312,6 @@
</span><span class="cx"> 
</span><span class="cx">     bool isRootEditableElement() const;
</span><span class="cx">     WEBCORE_EXPORT Element* rootEditableElement() const;
</span><del>-    Element* rootEditableElement(EditableType) const;
</del><span class="cx"> 
</span><span class="cx">     // Called by the parser when this element's close tag is reached,
</span><span class="cx">     // signaling that all child tags have been parsed and added.
</span><span class="lines">@@ -358,35 +356,25 @@
</span><span class="cx">         UserSelectAllDoesNotAffectEditability,
</span><span class="cx">         UserSelectAllIsAlwaysNonEditable
</span><span class="cx">     };
</span><del>-    WEBCORE_EXPORT bool isContentEditable(UserSelectAllTreatment = UserSelectAllDoesNotAffectEditability);
</del><ins>+    WEBCORE_EXPORT bool isContentEditable();
</ins><span class="cx">     bool isContentRichlyEditable();
</span><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT void inspect();
</span><span class="cx"> 
</span><del>-    bool hasEditableStyle(EditableType editableType = ContentIsEditable, UserSelectAllTreatment treatment = UserSelectAllIsAlwaysNonEditable) const
</del><ins>+    bool hasEditableStyle(UserSelectAllTreatment treatment = UserSelectAllIsAlwaysNonEditable) const
</ins><span class="cx">     {
</span><del>-        switch (editableType) {
-        case ContentIsEditable:
-            return hasEditableStyle(Editable, treatment);
-        case HasEditableAXRole:
-            return isEditableToAccessibility(Editable);
-        }
-        ASSERT_NOT_REACHED();
-        return false;
</del><ins>+        return computeEditability(treatment, ShouldUpdateStyle::DoNotUpdate) != Editability::ReadOnly;
</ins><span class="cx">     }
</span><del>-
-    bool hasRichlyEditableStyle(EditableType editableType = ContentIsEditable) const
</del><ins>+    // FIXME: Replace every use of this function by helpers in htmlediting.h
+    bool hasRichlyEditableStyle() const
</ins><span class="cx">     {
</span><del>-        switch (editableType) {
-        case ContentIsEditable:
-            return hasEditableStyle(RichlyEditable, UserSelectAllIsAlwaysNonEditable);
-        case HasEditableAXRole:
-            return isEditableToAccessibility(RichlyEditable);
-        }
-        ASSERT_NOT_REACHED();
-        return false;
</del><ins>+        return computeEditability(UserSelectAllIsAlwaysNonEditable, ShouldUpdateStyle::DoNotUpdate) == Editability::CanEditRichly;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    enum class Editability { ReadOnly, CanEditPlainText, CanEditRichly };
+    enum class ShouldUpdateStyle { Update, DoNotUpdate };
+    WEBCORE_EXPORT Editability computeEditability(UserSelectAllTreatment, ShouldUpdateStyle) const;
+
</ins><span class="cx">     WEBCORE_EXPORT LayoutRect renderRect(bool* isReplaced);
</span><span class="cx">     IntRect pixelSnappedRenderRect(bool* isReplaced) { return snappedIntRect(renderRect(isReplaced)); }
</span><span class="cx"> 
</span><span class="lines">@@ -689,10 +677,6 @@
</span><span class="cx">     WEBCORE_EXPORT void removedLastRef();
</span><span class="cx">     bool hasTreeSharedParent() const { return !!parentNode(); }
</span><span class="cx"> 
</span><del>-    enum EditableLevel { Editable, RichlyEditable };
-    WEBCORE_EXPORT bool hasEditableStyle(EditableLevel, UserSelectAllTreatment = UserSelectAllIsAlwaysNonEditable) const;
-    WEBCORE_EXPORT bool isEditableToAccessibility(EditableLevel) const;
-
</del><span class="cx">     virtual void refEventTarget() override;
</span><span class="cx">     virtual void derefEventTarget() override;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingApplyStyleCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/ApplyStyleCommand.cpp (180808 => 180809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/ApplyStyleCommand.cpp        2015-02-28 02:14:24 UTC (rev 180808)
+++ trunk/Source/WebCore/editing/ApplyStyleCommand.cpp        2015-02-28 02:41:12 UTC (rev 180809)
</span><span class="lines">@@ -879,7 +879,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(element);
</span><span class="cx"> 
</span><del>-    if (!element-&gt;parentNode() || !element-&gt;parentNode()-&gt;isContentEditable(Node::UserSelectAllIsAlwaysNonEditable))
</del><ins>+    if (!element-&gt;parentNode() || !isEditableNode(*element-&gt;parentNode()))
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     if (isStyledInlineElementToRemove(element.get())) {
</span><span class="lines">@@ -1349,7 +1349,7 @@
</span><span class="cx">     RefPtr&lt;Node&gt; node = startNode;
</span><span class="cx">     while (node) {
</span><span class="cx">         RefPtr&lt;Node&gt; next = node-&gt;nextSibling();
</span><del>-        if (node-&gt;isContentEditable(Node::UserSelectAllIsAlwaysNonEditable)) {
</del><ins>+        if (isEditableNode(*node)) {
</ins><span class="cx">             removeNode(node);
</span><span class="cx">             appendNode(node, element);
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingDeleteFromTextNodeCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/DeleteFromTextNodeCommand.cpp (180808 => 180809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/DeleteFromTextNodeCommand.cpp        2015-02-28 02:14:24 UTC (rev 180808)
+++ trunk/Source/WebCore/editing/DeleteFromTextNodeCommand.cpp        2015-02-28 02:41:12 UTC (rev 180809)
</span><span class="lines">@@ -25,11 +25,12 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;DeleteFromTextNodeCommand.h&quot;
</span><ins>+
+#include &quot;AXObjectCache.h&quot;
</ins><span class="cx"> #include &quot;Document.h&quot;
</span><span class="cx"> #include &quot;ExceptionCodePlaceholder.h&quot;
</span><del>-
-#include &quot;AXObjectCache.h&quot;
</del><span class="cx"> #include &quot;Text.h&quot;
</span><ins>+#include &quot;htmlediting.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -48,7 +49,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_node);
</span><span class="cx"> 
</span><del>-    if (!m_node-&gt;isContentEditable(Node::UserSelectAllIsAlwaysNonEditable))
</del><ins>+    if (!isEditableNode(*m_node))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     ExceptionCode ec = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingFrameSelectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/FrameSelection.cpp (180808 => 180809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/FrameSelection.cpp        2015-02-28 02:14:24 UTC (rev 180808)
+++ trunk/Source/WebCore/editing/FrameSelection.cpp        2015-02-28 02:41:12 UTC (rev 180809)
</span><span class="lines">@@ -1453,7 +1453,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     if (RenderView* view = node-&gt;document().renderView()) {
</span><del>-        if (shouldRepaintCaret(view, node-&gt;isContentEditable(Node::UserSelectAllIsAlwaysNonEditable)))
</del><ins>+        if (shouldRepaintCaret(view, isEditableNode(*node)))
</ins><span class="cx">             repaintCaretForLocalRect(node, localCaretRectWithoutUpdate());
</span><span class="cx">     }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingInsertNodeBeforeCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/InsertNodeBeforeCommand.cpp (180808 => 180809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/InsertNodeBeforeCommand.cpp        2015-02-28 02:14:24 UTC (rev 180808)
+++ trunk/Source/WebCore/editing/InsertNodeBeforeCommand.cpp        2015-02-28 02:41:12 UTC (rev 180809)
</span><span class="lines">@@ -51,9 +51,9 @@
</span><span class="cx"> void InsertNodeBeforeCommand::doApply()
</span><span class="cx"> {
</span><span class="cx">     ContainerNode* parent = m_refChild-&gt;parentNode();
</span><del>-    if (!parent || (m_shouldAssumeContentIsAlwaysEditable == DoNotAssumeContentIsAlwaysEditable &amp;&amp; !parent-&gt;isContentEditable(Node::UserSelectAllIsAlwaysNonEditable)))
</del><ins>+    if (!parent || (m_shouldAssumeContentIsAlwaysEditable == DoNotAssumeContentIsAlwaysEditable &amp;&amp; !isEditableNode(*parent)))
</ins><span class="cx">         return;
</span><del>-    ASSERT(parent-&gt;isContentEditable(Node::UserSelectAllIsAlwaysNonEditable));
</del><ins>+    ASSERT(isEditableNode(*parent));
</ins><span class="cx"> 
</span><span class="cx">     parent-&gt;insertBefore(m_insertChild.get(), m_refChild.get(), IGNORE_EXCEPTION);
</span><span class="cx"> 
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx"> 
</span><span class="cx"> void InsertNodeBeforeCommand::doUnapply()
</span><span class="cx"> {
</span><del>-    if (!m_insertChild-&gt;isContentEditable(Node::UserSelectAllIsAlwaysNonEditable))
</del><ins>+    if (!isEditableNode(*m_insertChild))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // Need to notify this before actually deleting the text
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingRemoveNodeCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/RemoveNodeCommand.cpp (180808 => 180809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/RemoveNodeCommand.cpp        2015-02-28 02:14:24 UTC (rev 180808)
+++ trunk/Source/WebCore/editing/RemoveNodeCommand.cpp        2015-02-28 02:41:12 UTC (rev 180809)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #include &quot;ExceptionCodePlaceholder.h&quot;
</span><span class="cx"> #include &quot;Node.h&quot;
</span><span class="cx"> #include &quot;RenderElement.h&quot;
</span><ins>+#include &quot;htmlediting.h&quot;
</ins><span class="cx"> #include &lt;wtf/Assertions.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -46,9 +47,9 @@
</span><span class="cx"> {
</span><span class="cx">     ContainerNode* parent = m_node-&gt;parentNode();
</span><span class="cx">     if (!parent || (m_shouldAssumeContentIsAlwaysEditable == DoNotAssumeContentIsAlwaysEditable
</span><del>-        &amp;&amp; !parent-&gt;isContentEditable(Node::UserSelectAllIsAlwaysNonEditable) &amp;&amp; parent-&gt;renderer()))
</del><ins>+        &amp;&amp; !isEditableNode(*parent) &amp;&amp; parent-&gt;renderer()))
</ins><span class="cx">         return;
</span><del>-    ASSERT(parent-&gt;isContentEditable(Node::UserSelectAllIsAlwaysNonEditable) || !parent-&gt;renderer());
</del><ins>+    ASSERT(isEditableNode(*parent) || !parent-&gt;renderer());
</ins><span class="cx"> 
</span><span class="cx">     m_parent = parent;
</span><span class="cx">     m_refChild = m_node-&gt;nextSibling();
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingVisibleSelectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/VisibleSelection.cpp (180808 => 180809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/VisibleSelection.cpp        2015-02-28 02:14:24 UTC (rev 180808)
+++ trunk/Source/WebCore/editing/VisibleSelection.cpp        2015-02-28 02:41:12 UTC (rev 180809)
</span><span class="lines">@@ -643,7 +643,9 @@
</span><span class="cx"> 
</span><span class="cx"> bool VisibleSelection::hasEditableStyle() const
</span><span class="cx"> {
</span><del>-    return isEditablePosition(start(), ContentIsEditable, DoNotUpdateStyle);
</del><ins>+    if (Node* containerNode = start().containerNode())
+        return containerNode-&gt;hasEditableStyle();
+    return false;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool VisibleSelection::isContentRichlyEditable() const
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingVisibleUnitscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/VisibleUnits.cpp (180808 => 180809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/VisibleUnits.cpp        2015-02-28 02:14:24 UTC (rev 180808)
+++ trunk/Source/WebCore/editing/VisibleUnits.cpp        2015-02-28 02:41:12 UTC (rev 180809)
</span><span class="lines">@@ -48,25 +48,25 @@
</span><span class="cx"> 
</span><span class="cx"> static Node* previousLeafWithSameEditability(Node* node, EditableType editableType)
</span><span class="cx"> {
</span><del>-    bool editable = node-&gt;hasEditableStyle(editableType);
</del><ins>+    bool editable = hasEditableStyle(*node, editableType);
</ins><span class="cx">     node = previousLeafNode(node);
</span><span class="cx">     while (node) {
</span><del>-        if (editable == node-&gt;hasEditableStyle(editableType))
</del><ins>+        if (editable == hasEditableStyle(*node, editableType))
</ins><span class="cx">             return node;
</span><span class="cx">         node = previousLeafNode(node);
</span><span class="cx">     }
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static Node* nextLeafWithSameEditability(Node* node, EditableType editableType = ContentIsEditable)
</del><ins>+static Node* nextLeafWithSameEditability(Node* node, EditableType editableType)
</ins><span class="cx"> {
</span><span class="cx">     if (!node)
</span><span class="cx">         return nullptr;
</span><span class="cx">     
</span><del>-    bool editable = node-&gt;hasEditableStyle(editableType);
</del><ins>+    bool editable = hasEditableStyle(*node, editableType);
</ins><span class="cx">     node = nextLeafNode(node);
</span><span class="cx">     while (node) {
</span><del>-        if (editable == node-&gt;hasEditableStyle(editableType))
</del><ins>+        if (editable == hasEditableStyle(*node, editableType))
</ins><span class="cx">             return node;
</span><span class="cx">         node = nextLeafNode(node);
</span><span class="cx">     }
</span><span class="lines">@@ -935,6 +935,13 @@
</span><span class="cx">     return IntPoint(root.blockDirectionPointInLine(), lineDirectionPoint - absoluteBlockPoint.y());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static Element* rootEditableOrDocumentElement(Node&amp; node, EditableType editableType)
+{
+    if (hasEditableStyle(node, editableType))
+        return editableRootForPosition(firstPositionInOrBeforeNode(&amp;node), editableType);
+    return node.document().documentElement();
+}
+
</ins><span class="cx"> VisiblePosition previousLinePosition(const VisiblePosition&amp; visiblePosition, int lineDirectionPoint, EditableType editableType)
</span><span class="cx"> {
</span><span class="cx">     Position p = visiblePosition.deepEquivalent();
</span><span class="lines">@@ -984,7 +991,7 @@
</span><span class="cx">     // Could not find a previous line. This means we must already be on the first line.
</span><span class="cx">     // Move to the start of the content in this block, which effectively moves us
</span><span class="cx">     // to the start of the line we're on.
</span><del>-    Element* rootElement = node-&gt;hasEditableStyle(editableType) ? node-&gt;rootEditableElement(editableType) : node-&gt;document().documentElement();
</del><ins>+    Element* rootElement = rootEditableOrDocumentElement(*node, editableType);
</ins><span class="cx">     if (!rootElement)
</span><span class="cx">         return VisiblePosition();
</span><span class="cx">     return VisiblePosition(firstPositionInNode(rootElement), DOWNSTREAM);
</span><span class="lines">@@ -1042,7 +1049,7 @@
</span><span class="cx">     // Could not find a next line. This means we must already be on the last line.
</span><span class="cx">     // Move to the end of the content in this block, which effectively moves us
</span><span class="cx">     // to the end of the line we're on.
</span><del>-    Element* rootElement = node-&gt;hasEditableStyle(editableType) ? node-&gt;rootEditableElement(editableType) : node-&gt;document().documentElement();
</del><ins>+    Element* rootElement = rootEditableOrDocumentElement(*node, editableType);
</ins><span class="cx">     if (!rootElement)
</span><span class="cx">         return VisiblePosition();
</span><span class="cx">     return VisiblePosition(lastPositionInNode(rootElement), DOWNSTREAM);
</span></span></pre></div>
<a id="trunkSourceWebCoreeditinghtmleditingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/htmlediting.cpp (180808 => 180809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/htmlediting.cpp        2015-02-28 02:14:24 UTC (rev 180808)
+++ trunk/Source/WebCore/editing/htmlediting.cpp        2015-02-28 02:41:12 UTC (rev 180809)
</span><span class="lines">@@ -118,7 +118,7 @@
</span><span class="cx">         node = node-&gt;parentNode();
</span><span class="cx">         if (!node)
</span><span class="cx">             break;
</span><del>-        if (node-&gt;hasEditableStyle(editableType))
</del><ins>+        if (hasEditableStyle(*node, editableType))
</ins><span class="cx">             highestEditableRoot = node;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -141,19 +141,48 @@
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool isEditablePosition(const Position&amp; p, EditableType editableType, EUpdateStyle updateStyle)
</del><ins>+static bool isEditableToAccessibility(const Node&amp; node)
</ins><span class="cx"> {
</span><del>-    Node* node = p.containerNode();
-    if (!node)
</del><ins>+    ASSERT(AXObjectCache::accessibilityEnabled());
+    ASSERT(node.document().existingAXObjectCache());
+
+    if (AXObjectCache* cache = node.document().existingAXObjectCache())
+        return cache-&gt;rootAXEditableElement(&amp;node);
+
+    return false;
+}
+
+static bool computeEditability(const Node&amp; node, EditableType editableType, Node::ShouldUpdateStyle shouldUpdateStyle)
+{
+    if (node.computeEditability(Node::UserSelectAllIsAlwaysNonEditable, shouldUpdateStyle) != Node::Editability::ReadOnly)
+        return true;
+
+    switch (editableType) {
+    case ContentIsEditable:
</ins><span class="cx">         return false;
</span><del>-    if (updateStyle == UpdateStyle)
-        node-&gt;document().updateStyleIfNeeded();
-    else
-        ASSERT(updateStyle == DoNotUpdateStyle);
</del><ins>+    case HasEditableAXRole:
+        return isEditableToAccessibility(node);
+    }
+    ASSERT_NOT_REACHED();
+    return false;
+}
</ins><span class="cx"> 
</span><del>-    return node-&gt;hasEditableStyle(editableType);
</del><ins>+bool hasEditableStyle(const Node&amp; node, EditableType editableType)
+{
+    return computeEditability(node, editableType, Node::ShouldUpdateStyle::DoNotUpdate);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool isEditableNode(const Node&amp; node)
+{
+    return computeEditability(node, ContentIsEditable, Node::ShouldUpdateStyle::Update);
+}
+
+bool isEditablePosition(const Position&amp; position, EditableType editableType)
+{
+    Node* node = position.containerNode();
+    return node &amp;&amp; computeEditability(*node, editableType, Node::ShouldUpdateStyle::Update);
+}
+
</ins><span class="cx"> bool isAtUnsplittableElement(const Position&amp; pos)
</span><span class="cx"> {
</span><span class="cx">     Node* node = pos.containerNode();
</span><span class="lines">@@ -161,13 +190,12 @@
</span><span class="cx"> }
</span><span class="cx">     
</span><span class="cx">     
</span><del>-bool isRichlyEditablePosition(const Position&amp; p, EditableType editableType)
</del><ins>+bool isRichlyEditablePosition(const Position&amp; position)
</ins><span class="cx"> {
</span><del>-    Node* node = p.containerNode();
</del><ins>+    Node* node = position.containerNode();
</ins><span class="cx">     if (!node)
</span><span class="cx">         return false;
</span><del>-
-    return node-&gt;hasRichlyEditableStyle(editableType);
</del><ins>+    return node-&gt;hasRichlyEditableStyle();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Element* editableRootForPosition(const Position&amp; p, EditableType editableType)
</span><span class="lines">@@ -176,7 +204,15 @@
</span><span class="cx">     if (!node)
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><del>-    return node-&gt;rootEditableElement(editableType);
</del><ins>+    switch (editableType) {
+    case HasEditableAXRole:
+        if (AXObjectCache* cache = node-&gt;document().existingAXObjectCache())
+            return const_cast&lt;Element*&gt;(cache-&gt;rootAXEditableElement(node));
+        FALLTHROUGH;
+    case ContentIsEditable:
+        return node-&gt;rootEditableElement();
+    }
+    return 0;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // Finds the enclosing element until which the tree can be split.
</span></span></pre></div>
<a id="trunkSourceWebCoreeditinghtmleditingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/htmlediting.h (180808 => 180809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/htmlediting.h        2015-02-28 02:14:24 UTC (rev 180808)
+++ trunk/Source/WebCore/editing/htmlediting.h        2015-02-28 02:41:12 UTC (rev 180809)
</span><span class="lines">@@ -85,6 +85,9 @@
</span><span class="cx"> 
</span><span class="cx"> // boolean functions on Node
</span><span class="cx"> 
</span><ins>+bool hasEditableStyle(const Node&amp;, EditableType);
+bool isEditableNode(const Node&amp;);
+
</ins><span class="cx"> // FIXME: editingIgnoresContent, canHaveChildrenForEditing, and isAtomicNode
</span><span class="cx"> // should be renamed to reflect its usage.
</span><span class="cx"> 
</span><span class="lines">@@ -164,9 +167,8 @@
</span><span class="cx"> 
</span><span class="cx"> // boolean functions on Position
</span><span class="cx"> 
</span><del>-enum EUpdateStyle { UpdateStyle, DoNotUpdateStyle };
-WEBCORE_EXPORT bool isEditablePosition(const Position&amp;, EditableType = ContentIsEditable, EUpdateStyle = UpdateStyle);
-bool isRichlyEditablePosition(const Position&amp;, EditableType = ContentIsEditable);
</del><ins>+WEBCORE_EXPORT bool isEditablePosition(const Position&amp;, EditableType = ContentIsEditable);
+bool isRichlyEditablePosition(const Position&amp;);
</ins><span class="cx"> bool isFirstVisiblePositionInSpecialElement(const Position&amp;);
</span><span class="cx"> bool isLastVisiblePositionInSpecialElement(const Position&amp;);
</span><span class="cx"> bool lineBreakExistsAtPosition(const Position&amp;);
</span></span></pre>
</div>
</div>

</body>
</html>