History log of /external/webkit/WebKit/android/nav/CacheBuilder.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c55376b5c400a21391d42fa36dde78f836f9a2ba 12-Mar-2010 Cary Clark <cary@android.com> adjust cache layer position by offsets

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
/external/webkit/WebKit/android/nav/CacheBuilder.h
be4ea5d07252747b3faad9dd63d4bebe79f24db3 19-Feb-2010 Cary Clark <cary@android.com> fix nav layer bugs

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
/external/webkit/WebKit/android/nav/CacheBuilder.h
f4cefb9302ee62602c19cdfbdb6cc1fbdf540953 27-Jan-2010 Cary Clark <cary@android.com> Add UI considerations to layers

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.
/external/webkit/WebKit/android/nav/CacheBuilder.h
d4924af12855cd19162ba1442a6055664c98ca32 11-Dec-2009 Cary Clark <cary@android.com> check to see if nav cache is up to date on tap

- 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
/external/webkit/WebKit/android/nav/CacheBuilder.h
1d330120b6c2ee2d3f1c25300d0e3d446ef8c640 03-Dec-2009 Cary Clark <cary@android.com> move input-related fields out of CachedNode to expand

Some of the fields in CachedNode are relevant only to input
fields and text areas. Move these into their own vector
so that we can add more data without making all CacheNodes
bigger.

Remove CacheNode entries that are no longer used, or can
be consolidated into the node type. Alphabetize some interfaces
and implementations. Update the debugging output.

part of http://b/2299660
/external/webkit/WebKit/android/nav/CacheBuilder.h
a0428a863bd79d20e416d6d981d0120bd1569edf 30-Nov-2009 Cary Clark <cary@android.com> navigate preferably between children of the same parent

The nav cache attempts to take advantage of the order that
the dom is walked to know when multiple nodes have the same
parent. The old implementation doesn't always work, and a
simpler non-cached version makes more sense.

The algorithm now walks nodes until the parent has more than
one child, and assigns that parent as the 'parent group'. On
the other end, nodes with no parent group are never allowed
to get preferential matching treatment.
/external/webkit/WebKit/android/nav/CacheBuilder.h
3298a7d84b96ade73c6b170671711a8f2792ae59 13-Nov-2009 Steve Block <steveblock@google.com> Fixes license headers for all files in WebKit/android, other than those in stl/.

These files have not yet been upstreamed to webkit.org.
WebKit requires either a BSD-style or LGPL 2.1 license for all code.
We use a BSD-style 2-clause license for Android-specific files that will be upstreamed to webkit.org.

This change adds licenses where absent or simply fixes the names of copyright holders in the license
text to 'THE COPYRIGHT OWNER' and cleans up formatting.

Files in stl/ currently use licenses other than BSD-style and will require more careful treatment.

Change-Id: I67ad4b8932e432d3eaaeecdfeb0d09418496228d
/external/webkit/WebKit/android/nav/CacheBuilder.h
bbab1c84ba835d6d9591ea291ceebe8dcce2d343 06-Oct-2009 Cary Clark <cary@android.com> address detection may look at uninitialized memory

Address detection on web pages creates arrays of pointers to
words, and compares them against a set of permitted street types.
This change adds the array of end pointers so that the check
does not look past the end of the word.

Fixes http://b/issue?id=2166591
/external/webkit/WebKit/android/nav/CacheBuilder.h
8e9932d793b751bd6a2c1150bf273867f40c5f55 17-Jun-2009 Cary Clark <cary@android.com> add WebView.FindAddress option to ignore case sensitivity

New public interface is set @hide for now. Old interface
uses the new one.

Requires a companion change to frameworks/base
http://b/issue?id=1649036
/external/webkit/WebKit/android/nav/CacheBuilder.h
46dfee13b2bec1b39f46c138df565b2207ccbc86 29-May-2009 Cary Clark <cary@android.com> in the browser, make the trackball more like a mouse

Older code treated the trackball as a four way dpad with
equivalents to moving up, down, left and right by generating
arrow key events. This change makes the trackball solely
generate mousemove events.

The old arrow keys in turn were mapped to be as close as
possible to tab-key events that moved the focus. The new
model leaves focus-changes to the DOM.

Clicking the dpad is distinguished from pressing the enter
key to be more compatible with desktop-authored web pages.
/external/webkit/WebKit/android/nav/CacheBuilder.h
805e9335952da33d9af0f1ec5c07bc5568feb312 22-Apr-2009 Leon Scroggins <scroggo@google.com> Fix some unexpected cases of image maps.

Fix for buganizer issue 1800613: Image map not accessible. We were attempting to cache associtations of <area> elements to their RenderImages so we would not have to search for them. However, we were storing them in CacheBuilder. When we search for them, we search in the <area> element's frame, even though when we built the cache, we stored it in the main frame. Another issue arose on a page where <area> elements show up before their RenderImages. In this case, we were storing an empty rectangle for the bounds, and caching the associations afterwards, when it was too late. In order to clean up/simplify things, while fixing both bugs, I have changed validNode into a static function which takes the starting Frame as a parameter. Any time we need to find the rectangle of an <area> element, we have to traverse the DOM to find its associated RenderImage. This may be slower, but it will always get the correct answer. In the future, we may need to investigate a universal location for caching the associations for better performance.
/external/webkit/WebKit/android/nav/CacheBuilder.h
2a3569183f13cadd01db35cacddd4c8d60169aa6 20-Apr-2009 Cary Clark <cary@android.com> remove obsolete browser nav cache debug dump

The render tree has changed and the old dump logic
no longer compiles. This output isn't used anymore, so
remove it.
/external/webkit/WebKit/android/nav/CacheBuilder.h
8f72e70a9fd78eec56623b3a62e68f16b7b27e28 11-Apr-2009 Feng Qian <> AI 145796: Land the WebKit merge @r42026.

Automated import of CL 145796
/external/webkit/WebKit/android/nav/CacheBuilder.h
635860845790a19bf50bbc51ba8fb66a96dde068 05-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@136594
/external/webkit/WebKit/android/nav/CacheBuilder.h
8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/external/webkit/WebKit/android/nav/CacheBuilder.h
648161bb0edfc3d43db63caed5cc5213bc6cb78f 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/external/webkit/WebKit/android/nav/CacheBuilder.h
498e5e4ad10920a9cfae6fdb7ffb19a6ed936ba7 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
/external/webkit/WebKit/android/nav/CacheBuilder.h
7a355dabbffb876b2e08cf63ac4fc28a39c19c6a 16-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@126645
/external/webkit/WebKit/android/nav/CacheBuilder.h
e933faefa1e899dbd5bf371f499cc682aff46c83 10-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@125939
/external/webkit/WebKit/android/nav/CacheBuilder.h
1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/external/webkit/WebKit/android/nav/CacheBuilder.h