| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
If the picture is not provided, use the findInner case to find the layer at the
given position.
Change-Id: I811c1c4d631086832a3a32038834117a1c4e9601
|
| |
|
|
|
|
|
|
| |
Bug:3085564
Requires a change in frameworks/base: https://android-git.corp.google.com/g/#change,79591
Change-Id: Iaf3ebc405fca349e23bebb113228c4b550e6b88e
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The DOM version number is used to know when the
nav cache is out of date. Webkit changes the version
when DOM attributes change, but not when the CSS
style property changes.
Tracking the style version fixes Google properties like
the 'Options' menu that is available on mobile
devices after a search.
Additionally, fix a crash if the root layer doesn't
exist. And, rebuild the nav cache always on touch.
bug:2628448
Change-Id: I50aa258c1b057ac7deed00f6eca37c0ee323efcf
|
| |
|
|
|
| |
bug: 3166223
Change-Id: I5c18b76ac19119c3620636ce5d3b33892e18f523
|
| |
|
|
| |
Change-Id: Ic4d4866302645edb6c0a457ef6d0bd1d8f9cf484
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a couple of bugs related to layers
and hardware acceleration.
The picture used by select text is now accessed
asynchronously from the UI thread. The UI thread
now unrefs it rather than deleting it outright.
The layer position may not be up to date when
the cursor rings are drawn, so update them if
the cursor ring is in a layer.
bug:3112657
bug:3030370
Change-Id: I99d07175ec30dcba895a26cf1d44bc0364430793
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
jstring
The JNI spec allows for local objects to be GC'ed before the JNI frame
returns, so this is dangerous.
Also rename the method to WtfStringToJstring() to match the existing
jstringToWtfString() and update call sites to JNIEnv::NewString() to
make use of it.
Change-Id: I84aa25ba1aca2aee346bf6e3d83a58afc3a95219
|
| |
|
|
| |
Change-Id: I1b398bd0a84ce366eb2e686e5f14335d7aa5ed31
|
| |
|
|
|
|
| |
Bug:3134026
Change-Id: I0ccaf27b8ede58603aeb2284c56527d4fe0a589b
(cherry picked from commit ca3a75fc3f9712c15e4a84ebcfd48699963896bb)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Layers contain pictures, and draw them offset from the top of
the page. Several readers of pictures need to account for this
displacement when computing what part of the picture intersects
a tap on the screen.
The tap may not correspond to the first layer that intersects
it, so all layers must be checked to find the best match. The
root layer usually draws everywhere, so for a match to correspond
to the root, the match must additionally intersect text.
Layers may create offscreen bitmaps when drawing to correctly
alpha blend the results to the screen, but this causes the items
in the bitmap to draw to an unexpected location when the picture
is treated as a spatial database. To get around this, call the
SkCanvas::save() from the overridden saveLayer() to push and
pop the canvas layer state without creating an offscreen.
WebCore/platform/graphics/android/LayerAndroid.cpp
WebCore/platform/graphics/android/LayerAndroid.h
- In find(), iterate through all children, instead of stopping
on the first match.
- Check to see if the child actually draws at the desired location,
and if it draws text there as well.
- Specify a slop factor to allow for inaccuracies in touch.
- Check the root for text before checking the children.
WebKit/android/nav/CachedFrame.cpp
WebKit/android/nav/CachedFrame.h
- Modify the (x,y) co-ordinate by the layer's offset, when
finding the picture corresponding to a point.
WebKit/android/nav/CachedLayer.cpp
WebKit/android/nav/CachedLayer.h
- More plumbing to adjust the point if the picture is contained
in an offset layer.
WebKit/android/nav/CachedRoot.cpp
WebKit/android/nav/CachedRoot.h
- Correct the (x,y) locations by the layer offset.
- Add some debugging (disabled by default)
WebKit/android/nav/ParsedCanvas.h
- One stop shopping that calls save() from saveLayer().
- Reset the bounder to null to balance its ref count.
WebKit/android/nav/SelectText.cpp
WebKit/android/nav/SelectText.h
- Rearrange the way pictures are tracked. Record the picture
corresponding to the input location when the selection starts,
requiring that the picture remain unchanged as the selection
extends.
- Only draw adornments for when the corresponding picture is
drawn. This fixes a Gmail specific problem, where the layers
come and go as the page scrolls.
- Always use the supplied visible bounds instead of computing
it from the canvas.
- Correct location points by layer offsets.
- Add to the picture ref count so it can't be deleted during
selection.
WebKit/android/nav/WebView.cpp
- Simplify visibleRect code.
- Simplify all SelectText interfaces.
bug:3114609
Change-Id: I43dc3252fc86c4b6500edcd650126b2559f530e3
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously this file used Chromium style, as it extends a Chromium
class. However, I think it's best to switch to WebKit style to prevent
Chromium style from leaking into the rest of WebKit.
Also switches static member methods to file-scope static functions
where possible.
Finally, return WebRequestContext* rather than URLRequestContext* to
allow us to call methods in the derived class. this will be required
to hook up CookieManager.
Change-Id: Ifdca62230a3728e338904ef1b9b392640af06a92
|
| |
|
|
|
|
| |
Bug:3107362
Change-Id: I354a07369056e696deed7458a4f4e14d54b7f6c8
|
| |
|
|
|
|
|
|
| |
The refactoring in the nav cache code caused by the recent merge
to webkit r70209 can crash. Fix that.
Bug: 3132882
Change-Id: I98b605ae2fdf24cf0f25adc919f2dbba581abef0
|
| |
|
|
|
|
|
|
| |
See http://trac.webkit.org/changeset/68749
Bug: 3132882
Change-Id: I51dfa144c5c289c759caa48e7dedc9020b7d8f12
|
| |
|
|
| |
Change-Id: I1aba39bdcf217bff751e42d2a335cd230b8193f7
|
| |
|
|
|
|
|
|
|
|
|
| |
Bug:3108852
Do not scroll if nativeFindAll is called with the same string
and the current match location has not changed.
Requires a change to frameworks/base.
Change-Id: Id3f104d91a0061f1d007b54a8fdd188b239e7970
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Google search suggestions are drawn in a popup
menu (a div with a small amount of transparency).
This can partially or complete obscure links underneath the popup,
and can present touchable targets which may be much larger than
the text contained by the link.
CachedRoot::checkRings() determines if a larger bounding box
can be used for the ring around the link.
CachedRoot::maskIfHidden() determines if the ring needs to be
cut down in size because it is only partially visible, or fully
obscured.
Both routines share the implementation that gathers information
about the link, which uses RingCanvas to parse the picture, and
RingCheck to build layers describing the text and rectangles
drawn in the area around the ring.
The basic strategy is to find the text contained by the link
under consideration, and see if subsequent drawing obscures the
text, or if other text would be enclosed by enlarging the ring.
Since maskIfHidden() works better now than before, this CL
enabled checking for hidden links when recomputing the current
selection after the picture updates.
It also checks to see if the link can be larger when
maskIfHidden() determines that it is unclipped.
Also, if a tap is inside the larger ring, but not on the text
itself, treat that as a valid hit. (In CachedFrame::findBestHitAt)
And, this fixes CacheBuilder debugging code, and the CacheBuilder
array crasher described by bug: 3043268
bug: 2661613
Change-Id: I751f6539f6c840889a58de8c4611364442b3e37c
|
| |
|
|
| |
Change-Id: I8516c4f39a38e236d0bff38a91fe8657cfcf8ad4
|
| |\
| |
| |
| | |
Change-Id: I5e5460ec4afde9a229c3f73255f4d40322eb7166
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bug:3085564
They are used by WebView.java to align the WebTextView's
text positioning with the page below. This allows the
selection and insertion arrow handlers to line up better
with the actual selection on the page.
Requires a change in frameworks/base:
https://android-git.corp.google.com/g/#change,73565
Change-Id: Ia100286016a780abd5f30e32975f8ad566a6ed74
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(Change imported by hand from master, based on
https://android-git.corp.google.com/g/#change,53489 )
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: I28a815375345d842f79464edbf0cb3a2019b7fe8
http://b/2626451
|
| | |
| |
| |
| |
| |
| | |
This is a two-parts CL, Its counterpart is https://android-git.corp.google.com/g/#change,64863
Change-Id: I40fcf3b7b6d28b887b101219c973070aeefbb777
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This updates the strorage locations to better match those used by the
Android HTTP stack.
Corresponding frameworks/base change is
https://android-git.corp.google.com/g/70644
Bug: 3039536
Change-Id: I49162eb4d47791d4f42996650cc88bcf4aa2e330
|
| | |
| |
| |
| | |
Change-Id: Ib55ef570b181afc99991afb55b6880b7a13f69a7
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
WebView::motionUp() got the latest nav cache, extracted
some nodes from it with findAt(), then called setNavBounds()
which got a newer cache. The older cache node was sent
to CachedRoot::setCursor() which crashed trying to use
the state pointer.
The flaw was that, although motionUp requests the newest
cache up front, and then setNavBounds() requests the stale
cache, in rare circumstances it can receive a newer cache
as well.
The fix is to replace the setNavBounds() function with a
direct call on the valid cache.
Change-Id: If23ee9222f2b701d916911f4b667185f1c3d3d18
http://b/2316138
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Clear the pressed state for buttons when the cursor is
shown indefinitely, and set look for the pressed cursor
state when recording the button colors.
Change-Id: I78095ec9a7580c372c66b83913447b8214a6a432
http://b/2135321
|
| | |
| |
| |
| |
| | |
issue:2884022
Change-Id: I471fca7296ca233bc4d9e1c75d173094265c9a9f
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Removed old code and state that used to allow for the cursor
ring to be different if a synthetic link was pressed, state
that allowed the ring to animate, and state that attempted to
show the ring until the link it represented was replaced by
a new page.
The new code
- shows the cursor ring indefinitely when the trackball or dpad is moved
- shows the cursor for 500 ms when the trackball or dpad is clicked
or if the screen is tapped.
This is separate from logic that attempts to select whether to
show the cursor ring at all; this merely chooses how long to
show the cursor ring when the cursor changes.
Requires a companion change in frameworks/base
Change-Id: I309abe346f6b67ed3b665aaa79c367f4599bf1cd
http://b/2135321
|
| | |
| |
| |
| |
| |
| | |
These moved to <wtf/text> in http://trac.webkit.org/changeset/65077
Change-Id: Ie234f1a09013e48a5241d9e240c5b2e85ca75125
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Originally written in response to bug 2835685, which was
fixed in
https://android-git.corp.google.com/g/#change,61059
WebViewCore.cpp:
Send a message to clear the text input/remove the soft
keyboard if the click results in no text input field
being in focus.
WebView.cpp:
Remove the old checks to clear the WebTextView, which
is now done in WebViewCore.cpp. This makes clearing it
consistent with the checks for opening the WebTextView.
Change-Id: I06ba7aadc95302c90af67da16edccd46896fcdbf
|
| | |
| |
| |
| |
| |
| | |
See http://trac.webkit.org/changeset/65021
Change-Id: I779a8ec0c3e1e0aed8f8d1894cfc1e5ca33ee549
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
EventHandler:
* Added IgnoreClipping in order to touch nodes that are clipped
out.
android_graphics:
* Remember the absolute bounds of the node for invals.
RenderBox:
* Fix a compiler warning.
RenderLayer:
* Do not record the entire layer contents unless the scroll
dimensions are larger than the client dimensions.
* Change isSelfPaintingLayer to check for an overflow clip
instead of the scrollable dimensions since it can be too
early to check at this point.
RenderLayerCompositor:
* Same as RenderLayer for checking the overflow clip.
WebViewCore:
* Scroll the containing layer to the node bounds and offset the
mouse position if scrolled. Once the mouse event is processed,
restore the layer to 0,0.
CacheBuilder:
* The body position is no longer used.
* Do not clip out nodes if the layer is scrollable.
CachedFrame:
* Add unadjustBounds to restore adjusted bounds to their original
position (fixed position elements).
* Call unadjustBounds when a node has been found. This new set of
bounds is passed over to WebViewCore to handle clicks.
* Reject empty node bounds.
CachedLayer:
* Document adjustBounds and add unadjustBounds. Add in the scroll
position to the node bounds.
CachedRoot:
* Unadjust the mouse bounds.
WebView:
* Unadjust the mouse bounds and use the absolute bounds of the ring
during inval.
Bug: 1566791
Change-Id: Ia55f2cbb61869087176d3ff61882e40324614c6a
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Force a composite layer when the style says the content is scrollable.
Record the border and background in the main content picture. When
the contents of the layer are bigger than the size, record the
foreground contents in a separate picture which is clipped by the
border and size.
When updating the base layer, remember the scroll position of each
layer and update the new layer with the same position.
Bug: 1566791
Change-Id: If440e4f215db6bda9df32a781d754d1f5a238162
|
| |\ \
| |/
| |
| |
| |
| |
| | |
Merge commit 'b47b5d4ad21fc9f19fc8e6c0f453032658cad4cf'
* commit 'b47b5d4ad21fc9f19fc8e6c0f453032658cad4cf':
Migrate to new keycode constants in keycodes.h.
|
| | |
| |
| |
| | |
Change-Id: I523d6fab2964cec4610424f6fd7bbe86d38b7306
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Cherry-picked from master.
This CL has a corresponding java counterpart (https://android-git.corp.google.com/g/#change,51150).
Bug:2665696
Change-Id: I408a3e2f089a491c340e0f9eb8633870dae84997
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
one SkLayer tree. The BaseLayerAndroid is the root
of the composite layers and it has the PictureSet
as its base content.
Before, WebViewCore uses m_contentMutex and both UI
and WebCore threads access the m_content. Now we use
the layer approach. When WebCore thread updates its
content in recordContent, it creates a new BaseLayerAndroid
and copy both PictureSet and composite layers into it.
Then it is sent to be consumed by UI thread.
Clean up sync layer in both ChromeClientAndroid and
GraphicsLayerAndroid.
splitContent can be a little tricky with this change.
Now UI has its own copy of PictureSet. When it takes
too long to draw, it will send a request to WebCore
to split the PictureSet. When it is done, a copy of
the new PictureSet will be sent back to UI.
There is a matching change in framework/base
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|