| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This reverts commit c7911ffd666a7e73131dfd68919b769086a093e0.
|
|
|
|
| |
This reverts commit 27dd9e051d0960e985cb677bfc1ce20531ac0456.
|
|
|
|
|
|
|
|
|
|
| |
Turn off iframe expansion and record iframes in a composited layer.
Fix navigation by tracking iframe layers if needed. Remove the logic to add
focused nodes to the last tracked layer as it is not needed and might add nodes
to the wrong layer.
Bug: 3219076, 3211666, 3201077, 3194321
Change-Id: Ifc0b83102438255db7e4b62ad260f50ebbdb0e50
|
|
|
|
|
|
|
|
|
|
|
| |
This is part of a frameworks/base change.
Use the composite root bounds for the inval region when updating the UI picture.
This fixes several drawing issues with outdated pictures.
Bug: 3022562
Change-Id: Ic28cfbbe381fdd59368a6d83bb73b01df912b530
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove PlatformBridge::updateLayers and instead call layersDraw from
ChromeClientAndroid during a requested sync.
Instead of LayerAndroid having knowledge of scrolling pictures, use multiple
layers (background, mask, foreground).
Update navigation to use the new structure. Always record nodes in absolute,
unscrolled coordinates. Do not track layers unless the node has a composited
layer and a last child. Check for composited parents when adding to tracked
layers as well.
TODO:
* developer.android.com doesn't completely work with navigation due to some
nodes being clipped out.
* BaseLayerAndroid needs to be able to operate with a matrix other than
identity.
* nested fixed position elements do not draw correctly.
* nested overflow layers haven't been tested.
Change-Id: I0e2bd37612341e8884d68153ab36194cb2dc1eeb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Radio and checkbox input types draw only a bitmap in
their navigation bounds, and require some special treatment.
Never treat them as transparent.
Use the slop box instead of the exact box when detecting
them, since our asset may be larger than the space webkit
provides.
Also, fix a debug test if the layer is null.
bug:3215174
Change-Id: I3b573e3aa215268390db2d58435ac47115804ed7
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug:3085564
In order to line up the WebTextView text with the page's text,
we need to know the line spacing attribute stored in the DOM.
Requires a change in frameworks/base:
https://android-git.corp.google.com/g/#change,80646
Change-Id: I539454df318826233496ffcd140ba1d6e396a4a0
|
|
|
|
|
|
|
|
|
| |
After the CachedFrame is built, it may replace the previous
node. Replace the indices stored in the CachedFrame and in the
CachedNode with the index from the overwritten node.
bug:3201246
Change-Id: Ia70f4f2c1f8009db2370e723bc8631e4a3873e75
|
|
|
|
|
|
|
|
| |
Bug:3085564
Requires a change in frameworks/base: https://android-git.corp.google.com/g/#change,79591
Change-Id: Iaf3ebc405fca349e23bebb113228c4b550e6b88e
|
|
|
|
|
|
|
|
| |
Fix a few extra copies of KURL and String. Added more characters to the list of
allowable mailbox characters.
Bug: 3038103
Change-Id: I49bd3ba9c628a70e7e1633d16fc329d64613dbf1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a page has layers, it causes the main body of the
page to become a layer as well. The scroll position
of the WebView must be applied to the layer to
translate the cursor rings correctly for hit-testing.
Today, applying the scroll position of the WebView
screws up overflow scrolling. Until this gets figured
out, skip using the scroll position in CacheFrame
adjust() and unadjust().
The position of the layer, and all of its parent layers,
should be considered when adjusting the rectangle
bounds contained by that layer. Before, only the
child layer's position was considered.
The clip used by scrollable divs may be initialized
but never set. If it is empty, ignore it, rather than
clipping out all content.
In CacheBuilder, remove a couple of unnecessary
lines -- the CacheInput initialization clears all
members.
In SelectText, reverse the order of the xfer mode
and paint objects to remove a Skia ref count assert.
In CachedInput, make the debug printout current.
Overall, added more debugging output (turned
off by default).
bug:3030370
Change-Id: Ic19c24b3bf33d081a1d0c1f8c06601dcb56ae881
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: 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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If two nodes have the same coordinates, one is deleted.
If either has focus, the focus needs to be transfered
to the other, and the focus index recomputed, so the
index won't point to the wrong node.
If the two nodes are at the end of the list, the
index may point off the end of the array, subsequently
crashing on access.
This is a possible security issue.
Change-Id: I1ca934074637fbf68e40318fbc354e28c6b474ba
http://b/3043268
|
| |
| |
| |
| |
| |
| |
| |
| | |
Also, fix some debug info to sync up with latest
webkit.
Change-Id: Iea8f019619b701fc2d3267228b9412379334b66e
http://b/3074179
|
| |
| |
| |
| |
| |
| | |
See http://trac.webkit.org/changeset/67660
Change-Id: Ia3c17881d27919b20d62a47218cdb95293736b2e
|
| |
| |
| |
| |
| |
| |
| |
| | |
InputType renamed to DeprecatedInputType
See http://trac.webkit.org/changeset/67903
Change-Id: I9efb9889588523dd2b9489809fb2c44bd799d2ba
|
| |
| |
| |
| |
| |
| |
| | |
The internal representation of column rects was changed in
http://trac.webkit.org/changeset/66903
Change-Id: I774c9fc487c0c88f7dec60e90f4096ba3cf657a7
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The nav cache builds the cursor ring by collecting the bounds of
the text and images contained by the clickable node. The clip
described by the parent node is available when the bounds are
collected.
The current code clips the text. Generalize this to clip the
images also.
Also, print whether the node is transparent in the node dumper.
Change-Id: I44d6cbacb95211f191cf11b6abd5273e0712930f
http://b/2463829
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This allows web pages to have fine-grain control over the appearance
of the rings drawn around nodes.
Generated links (email, addresses, phone numbers) are no longer
given unique colors. To preserve this feature, a separate change
could add an HTML extension similar to vlink to provide the cursor
ring defintions for theses links. The mechanism implemented below
isn't appropriate since these links don't necessarily correspond to
single DOM nodes or other DOM elements.
------------
CSS examples
------------
The CSS to specify the ring looks like:
-webkit-ring-fill-color:rgba(0,0,255,0.4);
-webkit-ring-inner-width:2 px;
-webkit-ring-outer-width:3.5 px;
-webkit-ring-outset: 8 px;
-webkit-ring-pressed-inner-color:rgba(0,0,255,0.8);
-webkit-ring-pressed-outer-color:rgba(0,0,127,0.3);
-webkit-ring-radius: 10 px;
-webkit-ring-selected-inner-color:rgba(63,63,255,0.8);
-webkit-ring-selected-outer-color:rgba(63,63,127,0.3);
and may be alternately defined with a property shortcut:
-webkit-ring:rgba(255,0,0,0.4) 5px 7px
rgba(255,0,0,0.8) rgba(127,0,0,0.3) 20px
rgba(255,63,63,0.8) rgba(127,63,63,0.3);
--------------------
Property definitions
--------------------
A vertical cross-section of the ring corresponds to these
parameters as shown:
______
R / ___O_ R = corner radius
/ / __I_ o I = inner ring
/ / / _O_ ^ O = outer ring
| | | / F | F = fill
|O|I|O| L o = outset
| | | \_F_ | L = original link
\ \ \__O_ V
\ \___I_ o
R \____O_
The fill color specifies what to draw inside the ring
when the link is followed. The fill area consists of the
original link area plus the outset.
The inner and outer widths specify the stoke width of the inner
and outer rings, respectively. The widths may be specified in
fractional pixels. The implementation captures 4 bits of the
fraction.
The outset specifies the distance from the edge of the original
link to the rings' center. Both rings are drawn at the same center
location.
The radius specifies the curvature of the corners at the center
of the rings.
-------------
Data lifetime
-------------
The selected colors specify the colors of the inner and outer
rings when the trackball or D-pad hovers over the link. The
pressed colors specify the colors of the rings when the
trackball center is pressed or the link is tapped.
The CSS data is recorded in the RenderStyle when the DOM
is parsed. The widths are scaled up by 16 to preserve the fraction.
When the nav cache is built, the CSS style information is
recorded in the CachedColor class. Only unique style sets
are recorded; many CachedNode instances can share the same
CachedColor instance.
When the cursor ring is drawn, the CachedColor is
retrieved by getting the index from the CachedNode, and
looking up the entry in the CachedFrame. The widths are
scaled down by 16 since Lengths are stored by the webkit as
integers.
----------
File Edits
----------
WebCore/Android.derived.mk
- Build the CSS data property tables by concatentating
Android specific data and optionally SVG data.
WebCore/config.h
- Add switch for these rings. This switch is meant
as a convenience for finding the code in WebKit
that was added to enable this feature. Since the
old code in DrawCursor has been removed, it does
not revert to the old behavior if the switch is
turned off.
WebCore/css/AndroidCSSPropertyNames.in
- The new ring properties, plus an old one we
added before.
WebCore/css/CSSComputedStyleDeclaration.cpp
WebCore/css/CSSMutableStyleDeclaration.cpp
WebCore/css/CSSParser.cpp
WebCore/css/CSSStyleSelector.cpp
- I can guess what these functions are for as
well as anyone, but I really don't know. Do
I need all of them? Do I need to modify
Mutable at all?
WebCore/css/CSSPropertyNames.in
- Moved Android addition to AndroidCSSPropertyNames.in
WebCore/platform/graphics/Color.h
- Added initial color values here.
WebCore/platform/graphics/android/android_graphics.*
- This draws the cursor ring. The code that draws
'synthetic' links has been discarded.
WebCore/rendering/style/RenderStyle.h
- Functions to get, set, and initialize the style
data.
WebCore/rendering/style/StyleRareInheritedData.*
- The storage for the style data and an equivalence
function.
WebKit/Android.mk
- Added CachedColor to the build.
WebKit/android/nav/CacheBuilder.cpp
- Record the color from the DOM into the cache.
WebKit/android/nav/CachedColor.*
- Store the cached color info.
WebKit/android/nav/CachedFrame.*
- Where the array of colors is stored.
WebKit/android/nav/CachedNode.*
- Where the index to the colors is stored.
Change-Id: Ia3a931f41d6545e47678e245aafe7c84d4658f94
http://b/2603197
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Set the foreground clip after drawing. Use the absolute bounds to
compute the local foreground clip in order to compensate for any
outline.
Consolidate the check for overflow scrolling into RenderLayer.
Request a compositing update after computing the scroll dimensions.
Only change the foregroundRect of the layer during paint so that the
outline rect (and background/layerBounds) are correct.
Draw the outline as part of the background phase. During painting of
a layer, scroll to (0,0), paint, then scroll back.
When clicking on an element in a layer, scroll to the position of the
element but do not scroll back. This makes text input fields visible
to the tree and will properly update when typing. Record the original
scroll position of layers in order to offset the bounds of nodes when
checking the nav cache. Make sure to reset all cached layers during
setRootLayer. Otherwise we were reaching into layers from the wrong
thread.
Change-Id: Id9827ec461989b0869a8252d4d2563ecd12c5fac
|
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| | |
This reverts commit 0ed6485271097ecf1b4cf4e790f9cfdbb57d921c.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This allows web pages to have fine-grain control over the appearance
of the rings drawn around nodes.
Generated links (email, addresses, phone numbers) are no longer
given unique colors. To preserve this feature, a separate change
could add an HTML extension similar to vlink to provide the cursor
ring defintions for theses links. The mechanism implemented below
isn't appropriate since these links don't necessarily correspond to
single DOM nodes or other DOM elements.
------------
CSS examples
------------
The CSS to specify the ring looks like:
-webkit-ring-fill-color:rgba(0,0,255,0.4);
-webkit-ring-inner-width:2 px;
-webkit-ring-outer-width:3.5 px;
-webkit-ring-outset: 8 px;
-webkit-ring-pressed-inner-color:rgba(0,0,255,0.8);
-webkit-ring-pressed-outer-color:rgba(0,0,127,0.3);
-webkit-ring-radius: 10 px;
-webkit-ring-selected-inner-color:rgba(63,63,255,0.8);
-webkit-ring-selected-outer-color:rgba(63,63,127,0.3);
and may be alternately defined with a property shortcut:
-webkit-ring:rgba(255,0,0,0.4) 5px 7px
rgba(255,0,0,0.8) rgba(127,0,0,0.3) 20px
rgba(255,63,63,0.8) rgba(127,63,63,0.3);
--------------------
Property definitions
--------------------
A vertical cross-section of the ring corresponds to these
parameters as shown:
______
R / ___O_ R = corner radius
/ / __I_ o I = inner ring
/ / / _O_ ^ O = outer ring
| | | / F | F = fill
|O|I|O| L o = outset
| | | \_F_ | L = original link
\ \ \__O_ V
\ \___I_ o
R \____O_
The fill color specifies what to draw inside the ring
when the link is followed. The fill area consists of the
original link area the outset.
The inner and outer widths specify the stoke width of the inner
and outer rings, respectively. The widths may be specified in
fractional pixels. The implementation captures 4 bits of the
fraction.
The outset specifies the distance from the edge of the original
link to the rings' center. Both rings are drawn at the same center
location.
The radius specifies the curvature of the corners at the center
of the rings.
-------------
Data lifetime
-------------
The selected colors specify the colors of the inner and outer
rings when the trackball or D-pad hovers over the link. The
pressed colors specify the colors of the rings when the
trackball center is pressed or the link is tapped.
The CSS data is recorded in the RenderStyle when the DOM
is parsed. The widths are scaled up by 16 to preserve the fraction.
When the nav cache is built, the CSS style information is
recorded in the CachedColor class. Only unique style sets
are recorded; many CachedNode instances can share the same
CachedColor instance.
When the cursor ring is drawn, the CachedColor is
retrieved by getting the index from the CachedNode, and
looking up the entry in the CachedFrame. The widths are
scaled down by 16 since Lengths are stored by the webkit as
integers.
----------
File Edits
----------
WebCore/Android.derived.mk
- Build the CSS data property tables by concatentating
Android specific data and optionally SVG data.
WebCore/config.h
- Add switch for these rings. This switch is meant
as a convenience for finding the code in WebKit
that was added to enable this feature. Since the
old code in DrawCursor has been removed, it does
not revert to the old behavior if the switch is
turned off.
WebCore/css/AndroidCSSPropertyNames.in
- The new ring properties, plus an old one we
added before.
WebCore/css/CSSComputedStyleDeclaration.cpp
WebCore/css/CSSMutableStyleDeclaration.cpp
WebCore/css/CSSParser.cpp
WebCore/css/CSSStyleSelector.cpp
- I can guess what these functions are for as
well as anyone, but I really don't know. Do
I need all of them? Do I need to modify
Mutable at all?
WebCore/css/CSSPropertyNames.in
- Moved Android addition to AndroidCSSPropertyNames.in
WebCore/platform/graphics/Color.h
- Added initial color values here.
WebCore/platform/graphics/android/android_graphics.*
- This draws the cursor ring. The code that draws
'synthetic' links has been discarded.
WebCore/rendering/style/RenderStyle.h
- Functions to get, set, and initialize the style
data.
WebCore/rendering/style/StyleRareInheritedData.*
- The storage for the style data and an equivalence
function.
WebKit/Android.mk
- Added CachedColor to the build.
WebKit/android/nav/CacheBuilder.cpp
- Record the color from the DOM into the cache.
WebKit/android/nav/CachedColor.*
- Store the cached color info.
WebKit/android/nav/CachedFrame.*
- Where the array of colors is stored.
WebKit/android/nav/CachedNode.*
- Where the index to the colors is stored.
Change-Id: Ia3a931f41d6545e47678e245aafe7c84d4658f94
http://b/2603197
|
| |
| |
| |
| |
| |
| | |
WebKit. See http://trac.webkit.org/changeset/63638
Change-Id: I97784c98b694f28804421637716afa649aa09a6e
|
| |
| |
| |
| |
| |
| |
| |
| | |
Also, fix a couple of minor changes in debugging code to
stay sync'd with webkit.
Change-Id: If4263bab97715e2a2d12f06f2359554740bf5dbc
http://b/2816549
|
| |
| |
| |
| |
| |
| |
| |
| | |
RenderBlock::columnGap() is now public
See http://trac.webkit.org/changeset/59784
Change-Id: I06ab20401e79c8b9c8104bb6a81c5891ef36d717
|
| |
| |
| |
| |
| |
| | |
See http://trac.webkit.org/changeset/59956
Change-Id: If1839f65ad960250c7dda5b565bd47278aa7df14
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A PictureSet contains a list of pictures. Each picture draws
part of the screen. If the picture contains a Canvas element,
the corresponding bitmap is not shared.
Small partial invalidates can create a dozen or so pictures,
each of which may be quite small, a few hundred bytes. But
the bitmap referenced by the picture may be large, several
meg.
The backing bitmap is unique to the Canvas element. Since
a canvas rarely benefits from small updates, disable the
partial invalidates if CacheBuilder detects a canvas.
Change-Id: I5761667db3d037d7363dcb01f8a26f7f62e2eabc
http://b/2678787
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This adds additional content to the nav cache dump,
and cleans up a few formatting problems. This has no
effect on code that does not have nav cache debugging
enabled.
Change-Id: Ice2c4bb33138a8ddc96739d95ead58fbe328bfa8
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|
|
|
|
|
|
|
| |
If a cache node is both in a layer and contains a layer, don't
add it the second time.
Change-Id: I45cc302e234565bfbc87649ca503f515b1f487e8
http://b/2543736
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Settings object now has an on-demand flag for plugins (this was to avoid
more edits to webkit code). If plugins are on-demand and a plugin is installed
that can handle the content, insert a placeholder widget. If the user clicks on
the placeholder, the plugin will be enabled.
The widget currently does not clip the context correctly. It only clips based on
the widget frame. This is due to a bug (already filed) where the scroll offset
is producing bad clip rectangles.
Requires a framework change.
Bug: 2411524
Change-Id: If3931da8da2339a2385ae78b609c49fa069892ab
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Nodes in layers need to know where they are relative to the layers
so that the cursor rings are correctly positioned as the layer
moves (in document coordinates). In addition to tracking the
global offset to make the coordinates relative to any parent
frames, the node is offset relative to the body.
Sometimes layers have zero height or width; in this case, don't
treat them as clips.
Change-Id: Id2811c31a4a0674d316aadda210570ec93311013
http://b/2503096
|
|
|
|
| |
http://b/2420076
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A layer may be inside or outside of an anchor. If it is inside,
the corresponding CachedNode has already been created, but is
being tracked. These tracked nodes need their layer and unclipped
bits set. For now, node in layers are assumed to draw last in
their layer, and aren't obscured by other drawing.
We may allow nodes in layers to be obscured one day. Preparing
for that, translate the layer picture by its global position
when testing to see if the node is hidden.
Fix debugging by allowing CachedLayer to see inside LayerAndroid.
http://b/2453974
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
This fix prevents a crash in http://webkit.org/blog-files/leaves/
http://b/2369549
|
|
|
|
|
|
|
|
|
|
|
| |
- get rid of the FloatPoint interface in LayerAndroid;
use (x, y) instead
- make CachedFrame a friend of CachedRoot and CacheBuilder
a friend of CachedNode so they alone can access private fields.
- assume the LayerAndroid picture can sometimes be null.
If it is, use the main page's picture instead.
http://b/2369549
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
The current boundary condition for a state without a trailing
zip code is a couple of spaces or a non-alphanumeric character,
like punctuation. Add allowing the end of the text node as
a termination condition.
Fixes http://b/2384326
|
|
|
|
|
|
| |
Fix for http://b/issue?id=2361658
Requires a change to frameworks/base.
|
|
|
|
|
|
|
| |
Previously, we were storing the label info each time we build the
navigation cache.
Requires a change to frameworks/base.
|
|
|
|
|
|
| |
Fix for http://b/issue?id=2331526
Requires a change to frameworks/base.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- WebKit/android/jni/WebViewCore.cpp
- WebKit/android/jni/WebViewCore.h
Add validNodeAndBounds() to determine if the clicked cached
node is good. First check to see if the pointer
to the frame and node still exist in the DOM. If
they do, see if the hit test bounds they point
to is the same as when the cache was recorded.
- WebKit/android/nav/CacheBuilder.cpp
- WebKit/android/nav/CachedNode.h
Record the original absolute bounds for later
comparison.
- WebKit/android/nav/CacheBuilder.h
Make getAreaRect() public so it can be called by
validation.
- WebKit/android/nav/WebView.cpp
Enhance motionUp() with additional validation:
use pointInNavCache() to see if there's a cached node;
wait for message from webkit to see if bounds is unchanged;
then use motionUp() to pass the original or altered click.
This is a two-part change with frameworks/base.
Fixes http://b/2249425
|