<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:bdakin&#64;apple.com" title="Beth Dakin &lt;bdakin&#64;apple.com&gt;"> <span class="fn">Beth Dakin</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Need to updateEditorState if an element change edit-ability without changing selection"
   href="https://bugs.webkit.org/show_bug.cgi?id=161546">bug 161546</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Need to updateEditorState if an element change edit-ability without changing selection"
   href="https://bugs.webkit.org/show_bug.cgi?id=161546#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Need to updateEditorState if an element change edit-ability without changing selection"
   href="https://bugs.webkit.org/show_bug.cgi?id=161546">bug 161546</a>
              from <span class="vcard"><a class="email" href="mailto:bdakin&#64;apple.com" title="Beth Dakin &lt;bdakin&#64;apple.com&gt;"> <span class="fn">Beth Dakin</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=161546#c4">comment #4</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=287811&amp;action=diff" name="attach_287811" title="Patch">attachment 287811</a> <a href="attachment.cgi?id=287811&amp;action=edit" title="Patch">[details]</a></span>
&gt; Patch
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=287811&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=287811&amp;action=review</a>
&gt; 
&gt; r=me assuming you fix builds &amp; tests and stuff.</span >

Thanks!

<span class="quote">&gt; 
&gt; &gt; Source/WebCore/editing/FrameSelection.cpp:2386
&gt; &gt; +        client-&gt;updateEditorStateAfterLayoutIfNeeded();
&gt; 
&gt; Instead of saying IfNeeded, can we explicitly say IfEditabilityChanged to
&gt; make semantics clear?
&gt; </span >

Yes, fixed.

<span class="quote">&gt; &gt; Source/WebCore/page/EditorClient.h:187
&gt; &gt; +
&gt; &gt; +    virtual void updateEditorStateAfterLayoutIfNeeded() = 0;
&gt; 
&gt; We should add this right at where didChangeSelectionAndUpdateLayout is
&gt; declared.
&gt; </span >

Moved.

<span class="quote">&gt; &gt; Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp:557
&gt; &gt; +void WebEditorClient::updateEditorStateAfterLayoutIfNeeded()
&gt; &gt; +{
&gt; &gt; +    m_page-&gt;updateEditorStateAfterLayoutIfNeeded();
&gt; &gt; +}
&gt; &gt; +
&gt; 
&gt; Ditto about defining this next to didChangeSelectionAndUpdateLayout.
&gt; </span >

Moved.

<span class="quote">&gt; &gt; Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.h:172
&gt; &gt; +    void updateEditorStateAfterLayoutIfNeeded() final;
&gt; &gt; +
&gt; 
&gt; Ditto about the location.
&gt; </span >

Moved.

<span class="quote">&gt; &gt; Source/WebKit2/WebProcess/WebPage/WebPage.cpp:910
&gt; &gt; +    EditorStateIsContentEditable editorStateIsContentEditable = frame.selection().selection().isContentEditable() ? EditorStateIsContentEditable::Yes : EditorStateIsContentEditable::No;
&gt; 
&gt; This doesn't detect the case when the value changes between plaintextonly
&gt; and true.
&gt; It's probably not a big deal but you can check that condition by checking
&gt; both isContentEditable and isContentRichlyEditable.
&gt; You might wanna add FIXME for now.
&gt; </span >

OH, good point. FIXME for now.

<span class="quote">&gt; &gt; Source/WebKit2/WebProcess/WebPage/WebPage.h:1479
&gt; &gt; +    EditorStateIsContentEditable m_lastEditorStateWasContentEditable { EditorStateIsContentEditable::Unset };
&gt; 
&gt; Should we just make this mutable instead of removing const from editorState?</span >

Yeah, sure!

<a href="https://trac.webkit.org/changeset/205381">https://trac.webkit.org/changeset/205381</a></pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>