Add enclosing block restriction while inserting unordered list in table
This patch adds a restriction in |HighestEnclosingNodeOfType| to not cross the enclosing block. This is useful so we can get the "outer" block node without crossing block boundaries as that function only breaks when the loop hits the editable boundary or the parent element has an inline style(as we pass |IsInline| to it). This is useful in cases like <div contenteditable><i><table><tr> <td>Please |put cursor here</td></tr></table></i></div> where | is the selection position. When execCommand("insertUnorderedList") is called the markup ends up as shown below: <div contenteditable><i><table><tr><td><ul><li> |Please put cursor here</li></ul></td></tr></table></i></div>. Test: run_web_tests web_tests/editing/deleting/listify-paragraph-inside-table-cell.html Bug: 1016530 Change-Id: I51f19b35e69fcf57f2c583e6a521e6460e7cb305 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2433025Reviewed-by:Yoshifumi Inoue <yosin@chromium.org> Commit-Queue: Anupam Snigdha <snianu@microsoft.com> Cr-Commit-Position: refs/heads/master@{#811103}
Showing
Please register or sign in to comment