| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
See http://trac.webkit.org/changeset/56825
Change-Id: I8ba6a9685dcd1d8c4dec3400fba81e19fcbfe74d
|
| |
|
|
|
|
|
| |
This CL has a corresponding java counterpart (https://android-git.corp.google.com/g/#change,51150).
Bug:2665696
Change-Id: I397100ac1b7ea9e0ecf799902d9ba04fba970cce
|
| |
|
|
|
|
|
|
| |
Part of fix for issue 2663680
Requires a change to frameworks/base.
Change-Id: I79e460867973cbfcb3105d46058de705877f0aa9
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
WebViewCore.cpp:
Open the keyboard when a contentEditable element is put
into focus by a click.
In key(), return whether the selection changed if a contentEditable
element is in focus.
CacheBuilder.cpp:
Add root contentEditable elements to the navigation tree.
CachedNode.h:
Include contentEditable elements as elements that want key events.
CachedNodeType.h
Add a type for contentEditable.
WebView.cpp:
Do not call setFollowedLink for contentEditable, so that the orange
selection ring stays around the field.
Add a check to determine whether the page should handle shift and
arrow keys.
Bug 1788820
Caveats:
Does not ensure that the caret remains on screen. Frame::revealSelection
is called, but we ignore it for other reasons. Need to investigate that.
The cursor will blink if the contentEditable node has focus, even if the
user has not clicked on it or has moved to a different input field. Further,
while in this state, the user can input text.
Requires a change to frameworks/base
Change-Id: Ife39254f46dcc1046a075eee2fda6cf4879b4ee8
|
| |
|
|
|
|
|
|
|
|
| |
Add a CachedNodeType for <select> elements. If the cursor node is
a <select> element, do not call setFollowedLink, which would hide
the cursor ring.
Bug 1694023
Change-Id: I2df2e70391b5f5969683b71b1e69bc24cba8946f
|
| |
|
|
|
|
|
|
|
|
|
| |
Rewrote nextTextField() to check range and frame, and
to more resemble other node walkers.
Caller no longer passes uninitialized frame in focused
case, and looks at parent frames after the target node.
Change-Id: I7ea9dffb75d28bdd9d71d83921058feca6baf928
http://b/2607250
|
| |
|
|
|
|
|
|
| |
Fixes http://b/issue?id=2559070
Requires a change to frameworks/base.
Change-Id: I450cb8ee109e9a1f38a7290032fb3ca948dcc71a
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug:2526966 Bug:1818168
The current rendering code exposes some issues with the fact that we have
fixed layers in the layers hierarchy -- parents transformations are also applied
to the fixed layers, which is not what we want (fixed layers should be applied
on the original canvas, with the original transform -- e.g. toolbar present or not --
but no more).
One previously discussed solution was to move the fixed layers to their own hierarchy;
but doing so would mean to also redo all the z-index management that we already have
in the current system. The simplest way is therefore to use the original matrix (the
canvas' matrix) when we have a fixed layer. The way we do this is by inserting a new
LayerAndroid before the LayerAndroid root, setting the matrix of that new root to be
the canvas' matrix. The drawing is then unaffected, but we can ask skia to draw using
the root's matrix.
The second issue solved in the CL is some positioning troubles; layers may have
different dimensions than their render view, and the previous code was considering that
the views were always drawn at the origin in the layer. By removing the parents layers
transforms, this is not the case anymore, and we therefore need to take the render view
offset into account. Finally there is some additional debug code in LayerAndroid.
Change-Id: Id353ad3dfd9808252643f0e4f0140dde67480719
|
| |
|
|
|
|
|
| |
companion fix in framework/base
Change-Id: I7d9191ea9c95dafac7f7e91a70d02c7d055c6967
http://b/2521087
|
| |
|
|
|
| |
Change-Id: Iab6a64aec5f146e8b0286d1249d353567b49ea49
http://b/2515977
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The problem was twofold:
- webkit didn't create composited layers of the children div unless they were
intersecting with the fixed layer
- the children divs layers are siblings, not children of the fixed layer
The solution is to:
1/ mark layers as needed to be composited if their ancestor is a
fixed element (in RenderLayerCompositor)
2/ as the GraphicsLayer/LayerAndroid hierarchy is based on the RenderLayer
hierarchy (z-order..) and not the display hierarchy, we need to a way of
updating the position of the contained layers when a fixed layer move.
We do that by:
- marking layers contained in a fixed layer as being linked to the
fixed layer (GraphicsLayerAndroid::syncFixedDescendants), and set the
offset between the layer and the fixed layer.
- when pushing the layers tree to the UI side, we ensure that such layers
are linked to their corresponding fixed layer
(LayerAndroid::ensureFixedLayersForDescendants)
- when we draw, we do a first pass to update the fixed layers position
(LayerAndroid::updateFixedLayersPositions) then update the rest of the
layers (LayerAndroid::updatePositions). The layers that are linked
to the fixed layers will then update their position relative to it,
using the original offset between the fixed layer and the layer.
Bug:2470701
Change-Id: I512966df94de6a5f84aff335c5d09b3f027bc2c3
|
| |
|
|
| |
Change-Id: I4994cb5dc61cb845db76060fbd7680f6f5f9ab88
|
| |
|
|
|
|
|
|
|
|
|
| |
Make native LayerAndroid::subtractLayers visible to java so
the layers can be removed from the visible portion of the screen
when computing how much to scroll.
companion fix in frameworks/base
Change-Id: I3bc0760aaeb515415e90996ec1257d24f9f8705a
http://b/2453841
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LayerAndroid.*
- Add a utility that takes the given rectangle and subtracts
layers that overlay it.
FindCanvas.*
- Add function that returns if the current match is on the
main page or in a layer.
WebView.cpp
- Add jni caller for WebView.java calcOurContentVisibleRect.
Call it instead of getVisibleRect, which has the side effect
of sending messages back to webkit.
- Remove jni caller for getViewMetrics, since it is redundant.
- Only call scrollRectOnScreen for non-layers.
companion fix in framework/base
http://b/2485168
|
| |
|
|
|
|
|
|
|
|
| |
Separate out state when find is up and is empty.
Request a scroll when setting a match, rather than when drawing.
Don't draw if there's no match.
Companion fix in frameworks/base
http://b/2370069
|
| |
|
|
|
|
|
|
|
| |
Also no longer differentiate between textfields and areas for the purpose
of the next action.
Part of fix for http://b/issue?id=2478052
Requires a change to frameworks/base
|
| |
|
|
| |
dump layers contents in displayTree.txt
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| | |
|
| |
|
|
|
|
|
| |
Clip the nodes inside the layer to the layer's bounds
Don't crash if the layer with the matching id can't be found.
http://b/2453945
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Remove calls to clearTextEntry during a touch/press, and move them to
the end.
Requires a change to frameworks/base
Fix for http://b/issue?id=2340871
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
companion fix is in framework/base
With fixed layers, parts of the web page are now
in motion relative to the document when the page
scrolls. Many routines that formerly read static
coordinates need to compute locations. In some cases,
new computations are cached for speed -- for instance,
the current cursor position is cached when it is
frequently compared.
The cursor rings and other drawing elements like
finding text on the page now to be drawn in the correct
order so that they appear both under and over layers.
There's quite a bit more work to be done. Major
pieces are drawing the text selection in the correct
order, and computing locations based on nest layers.
With this checkin, only the position of the child-
most layer is considered when computing bounds.
http://b/2369549
JavaScriptCore/wtf/Platform.h
- Turn compositing on. All routines that
reference LayerAndroid are bracketed by this
condition.
WebCore/platform/graphics/android/LayerAndroid.h
WebCore/platform/graphics/android/LayerAndroid.cpp
- Add a unique id to each layer. The unique id is
used to associate a layer created when the DOM is
parsed in the webkit thread with its copy in the
UI thread.
- Add: draw the text found on the page, as a call
out in the primary draw. The call out must follow
the drawing the layers' contents to show the found
text correctly. Note that this adds a new slot with
identical contents in every child LayerAndroid. In
a future optimization, a RootLayerAndroid could hold
data common for all child layers.
- Add: clipArea(), which returns an array of rectangles
describing the clip for this LayerAndroid and its
children. Generally, this is the part of the webpage
which is covered by one or more fixed layers.
- Add: find(FloatPoint) that returns the deepest layer
that contains this point. This is used to match taps
to the layer that is tapped on.
- Add: draw all layer pictures and identify
which layer is being drawn. This is used to analyze
the picture contents for finding and selecting text.
- Add: find the layer that matches a given id; this is
used to map cached DOM node data back to the layer
that contains it.
- Fix up includes, delete unused interfaces
WebKit/android/jni/WebViewCore.h
WebKit/android/jni/WebViewCore.cpp
- Remove local mRootLayer; use the one in WebView.cpp
instead (which is in sync with WebView.java)
WebKit/Android.mk
WebKit/android/nav/CachedLayer.h
WebKit/android/nav/CachedLayer.cpp
- CacheLayer associates the cached node with the
LayerAndroid instance. It contains the index to the
node in the cached frame, the LayerAndroid's unique id,
and the spacial offset of the node within the layer
when the DOM information was captured. It also caches
a pointer to the LayerAndroid instance.
CacheLayer computes the node's location each time
it is called, since the fixed layer may be constantly
moving relative to the document's coordinates.
WebKit/android/nav/CacheBuilder.h
WebKit/android/nav/CacheBuilder.cpp
- Track the active layer while building the nav cache.
The 'Tracker' structs were refactored to share common
code, and a new 'LayerTracker' struct identifies when
the node walker is inside a layer.
- Added code to dump layer information for debugging.
- Note that CachedNode::cursorRingsPtr can only be called
during nav data construction
- The cache builder can limit or exclude nodes that
are clipped out -- but until I have more understanding
of layer clipping, treat contained nodes as unclipped.
WebKit/android/nav/CachedDebug.h
- Add a variant that can dump either to a log file
or the console including the function it was dumped from.
WebKit/android/nav/CachedFrame.h
WebKit/android/nav/CachedFrame.cpp
- Add an array of CacheLayer instances.
- Protect bounds from direct access since they must
always be computed.
- Remove misnamed focus parameter from many routines
since the cursor node can be read from the root frame.
- Add: adjustBounds(), which computes the bounds as the
layer moves.
- Add: checkRings(), which gets the appropriate picture
for the node.
- Remove disabled code
- Find the layer list for the matching node by
using a binary search
- Add: resetLayers() to reset the LayerAndroid pointer
in CachedLayers when the layer world changes.
WebKit/android/nav/CachedHistory.h
WebKit/android/nav/CachedHistory.cpp
- Update history data to have matching frame and node
WebKit/android/nav/CachedNode.h
WebKit/android/nav/CachedNode.cpp
- Refactor functions that directly read coordinates
to compute them. In some cases, pass the frame in so
that the layer coordinates can be found.
- Add a bit to note that the node belongs to a layer.
- Remove duplicate bounds interfaces.
- Add methods to get cursor ring data at runtime.
- Update debugging info.
WebKit/android/nav/CachedRoot.h
WebKit/android/nav/CachedRoot.cpp
- Isolate direct picture access so that the layer
picture can be returned.
- Add knowledge of how the base is covered by layers.
- Add a pointer to the root LayerAndroid.
- delete disabled code.
- Move the cursor ring into view if it is obscured
by a layer (this isn't totally working)
- Before finding the next node to move to, set
up 'cursor cache' data, including the visible picture.
WebKit/android/nav/FindCanvas.h
WebKit/android/nav/FindCanvas.cpp
- Move find code here so that it can be called from
layers.
WebKit/android/nav/WebView.cpp
- Add java interface to get viewport metrics on demand.
- Pass frame with the node.
- Remove the find on page code (now in FindCanvas).
- Compute focus rings instead of reading them directly.
- Transfer layer id when getting new nav cache.
- Set up root LayerAndroid.
- Add utility to track if cursor is in a layer.
- Simplify drawLayers() to use common view metrics.
|
| | |
|
| |
|
|
| |
saving the layres tree in /sdcard/layersTree.plist)
|
| | |
|
| |
|
|
|
|
| |
This code was written because we previously only had one action
button on the IME for textfields. Now that textfields can always
have a next button, we no longer need it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fix bug http://b/2394813
This is a two-parts CL (need a java modif)
- The main leak is in WebView.cpp -- nativeUpdateLayers could
bail out if the root layer was nil, without deallocating the vector
of updates.
- fix a leak in LayerAndroid::evaluateAnimations()
- adoptRef() for the contentLayer in GraphicsLayerAndroid
- simplify AndroidAnimation: remove the reference to the layer
(the layer already has a reference to AndroidAnimation)
- modify the AndroidAnimation copy() methods to return directly
a PassRefPtr, for consistency.
|
| |
|
|
| |
Fixes http://b/issue?id=2359748
|
| |
|
|
|
|
|
|
|
|
|
| |
jni_utility_private to JNIUtility and JNIUtilityPrivate
See http://trac.webkit.org/changeset/53497
This is required to sync the Android tree with webkit.org to allow unforking in WebCore/bridge.
This change required updating headers in Android-specific files in WebCore and WebKit.
Change-Id: I4b80eb3eadcff66cbd261aa6ccef0f37927250b1
|
| |\
| |
| |
| |
| |
| |
| | |
Merge commit '93f808abccaf6f09c5c0226c01942c3be445031a'
* commit '93f808abccaf6f09c5c0226c01942c3be445031a':
Add proper support for fixed position elements
|
| | |
| |
| |
| |
| |
| |
| | |
this is two-part change, see http://android-git.corp.google.com/g/#change,37092 for the java counterpart.
This CL implements fixed position elements (css position: fixed) using layers, supporting pixels and percent lengths.
It addresses http://b/1914365
|
| |\ \
| |/
| |
| |
| |
| |
| |
| |
| | |
CachedNode pointers." into eclair-mr2
Merge commit 'ddd2f469835ed5402cb3edfa6c2865536011fbab'
* commit 'ddd2f469835ed5402cb3edfa6c2865536011fbab':
Compare Node pointers rather than CachedNode pointers.
|
| | |
| |
| |
| | |
Fixes http://b/issue?id=2369028
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Before, the slop parameter was set to zero if the node was
invalid, and used to skip searching for the node. Now, the
cache is rebuilt on the java side before the C side is
called.
requires a companion fix in frameworks/base
fixes http://b/2362334
|
| |\ \
| |/ |
|
| | |
| |
| |
| |
| |
| | |
Fix for http://b/issue?id=2361658
Requires a change to frameworks/base.
|
| |\ \
| |/
| |
| |
| |
| |
| | |
Merge commit 'e44f974f1d7e25a2823901e0f34c04aa924b7527'
* commit 'e44f974f1d7e25a2823901e0f34c04aa924b7527':
In motionUp, update the CachedHistory's mMouseBounds.
|
| | |
| |
| |
| |
| |
| | |
mMouseBounds is later used to determine the point of clicking.
Fixes http://b/issue?id=2313991
|
| |\ \
| |/
| |
| |
| |
| |
| | |
Merge commit '6864ec3c0bb8b5cc0dfa126546419113e946661a'
* commit '6864ec3c0bb8b5cc0dfa126546419113e946661a':
remove unused jni interfaces
|
| | |
| |
| |
| | |
companion change is in frameworks/base
|
| |\ \
| |/ |
|
| | |
| |
| |
| |
| |
| |
| | |
Previously, we were storing the label info each time we build the
navigation cache.
Requires a change to frameworks/base.
|
| |\ \
| |/
| |
| |
| |
| |
| | |
Merge commit '3146e9ee4d8f6114a97ceb01d6fd54db77d99538'
* commit '3146e9ee4d8f6114a97ceb01d6fd54db77d99538':
Store label information to be used for hint text.
|
| | |
| |
| |
| |
| |
| | |
Fix for http://b/issue?id=2331526
Requires a change to frameworks/base.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | | |
|
| |\ \
| |/ |
|