| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
See http://trac.webkit.org/changeset/65021
Change-Id: I779a8ec0c3e1e0aed8f8d1894cfc1e5ca33ee549
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the selected text visual order doesn't match the picture
order, the text is selected spacially. The rectangle described
by the start and end points limits what text is selected.
This can fail when the rectangle described is too narrow to
enclose all the lines between the top and bottom. This change
extends the lines by including the text adjacent to the start
and end when computing the limit bounds.
And:
- Refactor the code so that drawing the region and selecting
the text can share this logic.
- Add slashes as characters that prevent inserting spaces at
the ends of lines. (ASCII characters space, dash, slash, and
backslash cause lines to wrap.)
- Narrow the error term for detecting spaces. The 1/2 value
before inserted spaces incorrectly.
Change-Id: I645f38dc246c61b1bc7c94e61553e5e6e36e3f85
http://b/2817635
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Usually, the text on a webpage is drawn from top to bottom but
sometimes it is drawn out of order. In these cases the picture
finds the select end before it finds the select start.
When the select start and end are ordered, all of the text in
the picture between the two are selected. This allows selecting
all of the text on the page, even if the start isn't spacially
before the end.
When the select start and end are flipped, select the text
spacially between the two.
The flipped page scenario was found by
http://code.google.com/p/android/issues/detail?id=8533
Change-Id: Ia22d49396d68fefc3d64fad438c4b0c02f668c1c
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change 'select all' to begin with the first character and end
with the last rather than relying on the top left and bottom
right. The old algorithm failed for pages broken into multiple
columns.
Similarly, capture the text from the beginning selection to the
ending selection, rather than relying on the characters contained
by the selection region.
Reduce the gap required to add a linebreak from twice the
lineheight to 1.5x the lineheight.
Change-Id: Ib90a719ea3353feeaa3a6cc692d0dd9cff498cb5
http://b/262451
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
SelectText now permits incremental extension of the selection
using either touch or trackball data. SelectText adds word selection
and select all interfaces.
SelectText has been rewritten to do a better job of finding space
characters and selecting text outside of the visible window.
Companion changes in frameworks/base and packages/apps/Browser
Change-Id: I917a14124a41a3c9bd72ffa48fe36e55e7c4e543
http://b/2626451
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Text is copied from the picture in visual left-to-right order.
Reverse right-to-left substrings before returning the result.
This algorithm for reversal is also used by webkit to draw
text, and has the same limitations.
This fixes text pasted into the title bar, but does not work
correctly for text pasted into an input field -- LTR text is
placed incorrectly -- but that's another bug.
Change-Id: I4709b74e32495d4b77d33910ac8da34d4a88edd0
http://b/2525085
|
| |
|
|
|
|
| |
See http://trac.webkit.org/changeset/56825
Change-Id: I8ba6a9685dcd1d8c4dec3400fba81e19fcbfe74d
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The earlier method of using bounding boxes does not work if the
characters have sufficiently large kerning, such as 'A Java' or
sufficiently small kerning, such as '16'.
Also, don't add spaces after hyphens or dashes, and detect
baseline changes correctly. Reset the first space condition once
text is clipped out.
http://b/2457350
http://b/2165553
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Drawing elements that appear atop or below layers need to be
drawn both in the proper order and with the correct canvas to
respect clipping and the matrix.
Drawing the find results, text selection, or the cursor ring,
interleaves with any layers that may be drawn. The main picture
is treated as owned by a LayerAndroid so each component can
decide when to draw.
This change leave the main picture in WebViewCore.cpp, and
draws everything else in WebView.cpp -- in the future, additional
refactoring can put all drawing in one place.
The logic of what to draw is still in WebView.java, but the
actual drawing calls are now triggered inside the layer code.
Android.mk
- Add rule to trigger building without layers from buildspec.mk.
LayerAndroid.*
- Replace FindOnPage reference with abstract DrawExtra class to
draw adornments in the layers' canvas context.
- Add a LayerAndroid constructor to create a dummy layer with a
SkPicture* and a uniqueId==-1 so that extras can detect when
they are drawn by the main picture.
android_graphics.*
- Move cursor ring drawing out of WebView.cpp to here.
- Separate cursor ring setup from actual drawing.
- Get the cursor ring metrics in local coordinates.
ChromeClientAndroid.cpp
- Fix compiler warnings.
WebViewCore.*
- Move updateCursorBounds from WebView.cpp. This permits it to
be called from CursorRing::setup.
CachedFrame.*
CachedNode.*
CachedLayer.*
- Add local bounds getters.
CachedRoot.h
- Move class FindCanvas to the android namespace.
DrawExtra.h
- Add an abstract class called by LayerAndroid to optionally
draw extra elements in its canvas context.
FindCanvas.*
SelectText.*
- Refactor drawing to draw in layers context.
WebView.cpp
- Move drawing from WebView.java.
- Remove selection code to SelectText.cpp.
- Use inverseScale to simplify viewPort metrics.
- Simplify layer root so java doesn't need to know about it.
Requires companion change in frameworks/base
http://b/2457316
http://b/2454127
http://b/2454149
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
These files have not yet been upstreamed to webkit.org.
WebKit requires either a BSD-style or LGPL 2.1 license for all code.
We use a BSD-style 2-clause license for Android-specific files that will be upstreamed to webkit.org.
This change adds licenses where absent or simply fixes the names of copyright holders in the license
text to 'THE COPYRIGHT OWNER' and cleans up formatting.
Files in stl/ currently use licenses other than BSD-style and will require more careful treatment.
Change-Id: I67ad4b8932e432d3eaaeecdfeb0d09418496228d
|
| | |
|
| | |
|
| | |
|
| |
|