summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore
diff options
context:
space:
mode:
authorCary Clark <cary@android.com>2009-12-23 13:22:37 -0500
committerCary Clark <cary@android.com>2010-01-05 10:30:55 -0500
commit5e5962825729a211e093fd615ddc9e5b0bec10bd (patch)
treea5e0ed4609ddd62d7574da231e2d88ec9886789a /JavaScriptCore
parent8c8c7b43f311d492d2c13ee68bc91875262ae072 (diff)
downloadexternal_webkit-5e5962825729a211e093fd615ddc9e5b0bec10bd.zip
external_webkit-5e5962825729a211e093fd615ddc9e5b0bec10bd.tar.gz
external_webkit-5e5962825729a211e093fd615ddc9e5b0bec10bd.tar.bz2
extract selected text from the picture
The deleted code extracted the selected text from the WebKit DOM by looking for text in the render tree that matched the selection region. This has never worked well. The replacement approach matches the glyphs in the picture instead. - WebViewCore.* Remove getSelection() and supporting routines. Part of the deleted code looked for punctuation between segments to add space characters that might not be present in the markup. There's no equivalent in the replacement code; it uses spacial gaps to detect the need to add extra spaces. - SelectText.* Match the text to the selected region and convert the glyph to unicode. The tricky part is that spaces need to be inserted into the string when there are gaps in the text. - WebView.cpp Return the selection as a string to the java caller instead of a region. To convert the glyphs into text, a companion change was made to external/skia. To update the UI thread/webkit thread messaging, a companion change was also made to frameworks/base. Fixes http://b/2166748
Diffstat (limited to 'JavaScriptCore')
0 files changed, 0 insertions, 0 deletions