Make InsertText command not to split SPAN element containing TAB character
Before this patch, "InsertText" command splits SPAN element containing TAB
character when inserting text into it.
For example:
Before: <span>	a|c</span>
Command: insertText "B"
After: <span>	a</span>B|<span>c</span>
This behavior is introduced by the patch[1], which replaces
"class=apple-tab-span" to "style=white-space:pre".
This patch changes |IsTabHTMLSpanElement()| to check "white-space:pre" CSS
property to make "InsertText" command not to split SPAN element containing
TAB character with "white-space: pre".
Note: "apple-tab-span" CSS class is MacOS specific feature[2]. On MacOS,
UITextView puts following HTML into pasteboard:
<style>.Apple-Tab-Span { white-space: pre; }</style>
<span class=Apple-Tab-Span>	</span>
[1] http://crrev.com/2718543003 Remove EditingAppleTabSpan class handling
[2] https://www.cocoanetics.com/2013/06/apple-tab-span/
Bug: 741826
Change-Id: I42d8d388e306b613fbe8ffa614b9e974db254c22
Reviewed-on: https://chromium-review.googlesource.com/697044
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: 
Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506683}
Showing
Please register or sign in to comment