| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |\
| |
| |
| |
| |
| |
| | |
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
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Also, fix a couple of minor changes in debugging code to
stay sync'd with webkit.
Change-Id: If4263bab97715e2a2d12f06f2359554740bf5dbc
http://b/2816549
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
| |
| |
| |
| |
| | |
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
|
| |\ \
| | |
| | |
| | | |
function iwht gcc-4.6, gcc complains that "error: 'GlyphSet::GlyphSet' names the constructor, not the type"."
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If compile this function iwht gcc-4.6, gcc complains that
"error: 'GlyphSet::GlyphSet' names the constructor, not the type".
Change-Id: I34f3a66dc33f8dca93e4c0db1d87236bf3efc6ae
Tested:
With the patch, gcc-4.4.0 is still working correctly.
With the patch, gcc-4.6 works well too.
|
| |\ \ \ |
|
| | |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| |\ \ \
| |/ /
|/| | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The implementation of init() calls bzero, which is defined
in CachedPrefix.h. if CachedInput.h is included directly
bzero may not be defined. It is always defined for
CachedInput.cpp.
http://b/2535696
enter the commit message for your changes. Lines starting
Change-Id: I995498cd4bc611f0f1a45aadf27a1fd330e62410
|
| |\ \ \
| | |/
| |/| |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
A node may be transparent if the body of the node is drawn earlier.
In this case, the node may not be tested to see if it has been
occluded by later drawing, since no drawing inside the scope of
the node is actually visible. So, skip the hidden test for
transparent nodes.
Change-Id: Ib748e9e7b86252f791ee68198d1d794fb4591a88
http://b/2582455
|
| |\ \ \
| |/ /
| | /
| |/
|/| |
end or try invalid frames" into froyo
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |\ \
| |/
|/| |
|
| | |
| |
| |
| |
| | |
Change-Id: I513c7bb5278202447ae8a270b4f30d699fd4dda6
http://2535696
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The hit test on the nav cache returns a node/frame pair.
It looks for the closest hit, but gives priority to a direct
hit. Track the frame associated with the direct hit
separately, so that the correct node/frame pair is returned.
Change-Id: Icb1e3de4a0aad3c6dd9b2b81669f9c7bbb260282
http://b/2316138
|
| |\ \
| | |
| | |
| | | |
textfield." into froyo
|
| | |/
| |
| |
| |
| |
| |
| |
| | |
Fixes http://b/issue?id=2559070
Requires a change to frameworks/base.
Change-Id: I450cb8ee109e9a1f38a7290032fb3ca948dcc71a
|
| |/
|
|
|
|
| |
Fix b/2558960
Change-Id: I1cc723913ab1e3eccb21eb60ab2fe2a458eb420c
|
| |
|
|
|
|
|
|
| |
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
|
| |\
| |
| |
| | |
positioning issues."
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
companion fix in framework/base
Change-Id: I7d9191ea9c95dafac7f7e91a70d02c7d055c6967
http://b/2521087
|
| |
|
|
|
| |
Change-Id: Iab6a64aec5f146e8b0286d1249d353567b49ea49
http://b/2515977
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When considering whether a match is contained by the current clip,
do not outset it first. Check to see if it is contained by the
clip, and then add the outset so the drawn rectangle is larger.
Fix for http://b/issue?id=2507893
Change-Id: I900d92432d412396e8c5b9e9e341085656ed0a2f
|