<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:bdakin@apple.com" title="Beth Dakin <bdakin@apple.com>"> <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@apple.com" title="Beth Dakin <bdakin@apple.com>"> <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">> Comment on <span class=""><a href="attachment.cgi?id=287811&action=diff" name="attach_287811" title="Patch">attachment 287811</a> <a href="attachment.cgi?id=287811&action=edit" title="Patch">[details]</a></span>
> Patch
>
> View in context:
> <a href="https://bugs.webkit.org/attachment.cgi?id=287811&action=review">https://bugs.webkit.org/attachment.cgi?id=287811&action=review</a>
>
> r=me assuming you fix builds & tests and stuff.</span >
Thanks!
<span class="quote">>
> > Source/WebCore/editing/FrameSelection.cpp:2386
> > + client->updateEditorStateAfterLayoutIfNeeded();
>
> Instead of saying IfNeeded, can we explicitly say IfEditabilityChanged to
> make semantics clear?
> </span >
Yes, fixed.
<span class="quote">> > Source/WebCore/page/EditorClient.h:187
> > +
> > + virtual void updateEditorStateAfterLayoutIfNeeded() = 0;
>
> We should add this right at where didChangeSelectionAndUpdateLayout is
> declared.
> </span >
Moved.
<span class="quote">> > Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp:557
> > +void WebEditorClient::updateEditorStateAfterLayoutIfNeeded()
> > +{
> > + m_page->updateEditorStateAfterLayoutIfNeeded();
> > +}
> > +
>
> Ditto about defining this next to didChangeSelectionAndUpdateLayout.
> </span >
Moved.
<span class="quote">> > Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.h:172
> > + void updateEditorStateAfterLayoutIfNeeded() final;
> > +
>
> Ditto about the location.
> </span >
Moved.
<span class="quote">> > Source/WebKit2/WebProcess/WebPage/WebPage.cpp:910
> > + EditorStateIsContentEditable editorStateIsContentEditable = frame.selection().selection().isContentEditable() ? EditorStateIsContentEditable::Yes : EditorStateIsContentEditable::No;
>
> This doesn't detect the case when the value changes between plaintextonly
> and true.
> It's probably not a big deal but you can check that condition by checking
> both isContentEditable and isContentRichlyEditable.
> You might wanna add FIXME for now.
> </span >
OH, good point. FIXME for now.
<span class="quote">> > Source/WebKit2/WebProcess/WebPage/WebPage.h:1479
> > + EditorStateIsContentEditable m_lastEditorStateWasContentEditable { EditorStateIsContentEditable::Unset };
>
> 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>