Remove many instances where we are setting selection unnecessarily. Instead, only
set the selection due to a click, touch, or inserting a character. A touch will
now set the selection properly, rather than at the beginning/end, fixing
http://b/issue?id=1650395 Also fixes http://b/issue?id=2208188
Requires a change to external/webkit.
Previously we were keeping our own state in the UI thread to
determine when to send events to the plugin. This change removes
that logic and uses the document focus to determine when events
are to be sent. This also fixes problems with the plugins
occasionally not receiving lose focus events.
see bug http://b/2033843
Explicitly draw the region and pointer from java.
Set up the starting selection criteria from both hard keyboard
and menu 'Select Text'.
Add invalidate() to show transition from arrow to ibeam
immediately, and to dismiss copy region immediately.
partially fixes http://b/issue?id=1667690
Fixes http://b/issue?id=2210234
Consolidate center key/trackball presses on input fields, and show
soft keyboard if the field is not readonly. Also rename the method
for a center press, and pass a click rather than a touch. Requires
a change in external/webkit.
When pressing the trackball on a text input field, do not call
setFollowedLink, which results in the cursor ring disappearing and
the WebTextView being torn down. Fixes http://b/issue?id=2210127
While Leon mulls over how to rewrite WebTextView to
handle webkit driven focus changes, these fixes make
the current code slightly more stable.
Keep track of when keyDown is sent again so that the
WebTextView won't be rebuilt in that case.
Don't clear the cursor from WebTextView if the there's
no native focus pointer.
Only set the selection to its initial state once when
passing events down to webkit.
partially fixes http://b/issue?id=2201049
Merge commit 'f8e3ac851959efbd21da930a802f8efb65ccec5b' into eclair-mr2
* commit 'f8e3ac851959efbd21da930a802f8efb65ccec5b':
In onKeyUp for DPAD_CENTER, show the IME for text input.
0 height to get the exact height. But if the View system
doesn't think the WebView dimension changed, even we
call requestLayout, we won't get onSizeChanged. So
we never notify the WebKit about the final view size.
If updateLayout is true, which is probable because that
we set the height to be 0 to WebKit, just call requestLayout()
even the meansured height / width is matching the
content height / width.
Fix http://b/issue?id=2162991
If the typed key doesn't go with the current text area, clear
the focus so the key won't return to that text area. However,
don't clear the focus if it is already off the old text area.
fixes http://b/issue?id=2201049
Fix for http://b/issue?id=2186188. Keep track of <optgroup> labels
separately from disabled <option> labels. Requires a change to
external/webkit.
In CheckedTextView, if the CheckMarkDrawable is set to null,
remove it.
WebView.mHeldMotionless should only be set to MOTIONLESS_FALSE
if some scrolling occurs, even in the case where motion is discarded
by snap-scroll mode.
Refactoring the code allows the code to be smaller, and provides
a single point where scrollBy() is called while dragging.
This doesn't change the snap-scroll logic in any way.
related to http://b/issue?id=2092446
Make movement of text selection arrow and I-beam respond to
both trackball and d-pad. Make the 'click' action work for
both trackball-up and d-pad center.
fixes http://b/issue?id=2186069
* changes:
If openOrCreateDatabase() throws an exception, delete the old db and re-do it. If it still fails, something bad happens, like the directory may have the different permission. Let it throw as WebView needs the db.
Since references can be queued in another thread, the first entry in the pool
could have been queued after processPoolLocked. Check for null and create a new
chunk if the check fails.
The fix relaxes our processing of the content-disposition header by allowing unquoted filenames, and adds the m4v type to the MIME type map incase the content-disposition header was not specified.
Change-Id: Iaab0c5b17991a2c05eff5db01babe084444fd3b7
* Fixes#2192935
* Exchange attachment handling depends on MimeTypeMap to determine the
mime type of attachments based on their file extension
Change-Id: I44bbc36d7a5aa0800f072553274346d4547f8d4c
This fix is alrady in mr2. It does not affect sholes --
this is a trackball only bug.
The selection caret and arrow now take the scale factor and
the height of the title bar into account when preparing the
canvas for drawing.
Clicking the trackball at the end of selecting text no longer
sends a click event.
Requires a companion fix in external/webkit
Fixes http://b/issue?id=2187591
If a single ByteArrayBuilder accumulates many chunks, it is possible that many
of those chunks will not be reused and will just take up memory in the pool. If
the pool is shared across all instances, fewer chunks need to be allocated. This
allows a site like http://www.606studios.com/bendisboard/showthread.php?t=170286
to load without crashing due to OOM.
The shared pool contains SoftReferences to each chunk. If the vm feels memory
pressure, it is allowed to mark these references for collection. Before
accessing the pool of chunks, I remove any queued references from the pool.
Cleanup ByteArrayBuilder a little by removing unused methods and fields.
Document some synchronization spots in LoadListener and add a lock when
downloading a certificate.
Bug: 1637965
Part of a fix for http://b/issue?id=2159869. The request to show
the soft input has been moved to nativeTextInputMotionUp, where it
can check if the input field is readOnly. This way it is also
handled by shortPressOnTextField, for when a user shortpresses
on the field.
Added more checks where it is possible to call a native function
after creating a WebView but before the native side is initialized.
These cases can be triggered by the monkey.
Fixes http://b/issue?id=2187719
This fix should be considered for passion mr1, but
does not affect sholes -- this is a trackball only bug.
The selection caret and arrow now take the scale factor and
the height of the title bar into account when preparing the
canvas for drawing.
Clicking the trackball at the end of selecting text no longer
sends a click event.
Requires a companion fix in external/webkit
Fixes http://b/issue?id=2187591
Some artifacts show up when dragging, but since the screen is in
motion, they're usually go unnoticed. If one quits moving, the
artifacts are more visible.
Some devices generate fractional movement data while the
screen is touched and held steady; others do not. Also, mouse-based
implementations will not generate random fractional movements. If
the device generates movements, invalidate the screen to transition
once from unfiltered to filtered drawing.
For the case that the device does not generate movements, fire a
timer when the screen is drawn and a drag is in progress to detect
that there is no drag motion.
The timer fires if the dragged screen is unmoved for 100 ms, then
invalidates so the next redraw uses filtering to remove the artifacts,
and starts a continuous timer to keep the scrollbar awake until
the drag ends or there is more drag motion.
When detecting that there is no effective movement on a noisy device,
use the original fractional deltas instead of the integer ones to
detect sub 1 pixel differences.
This was tested on the emulator (no noise) and a sapphire (noise)
to make sure that events load the queue only when required.
fixes http://b/issue?id=2092446
the old db and re-do it. If it still fails, something
bad happens, like the directory may have the different
permission. Let it throw as WebView needs the db.
Fix http://b/issue?id=2179339
Since the caller expects the data to fit within a certain amount of
space, do not copy into the buffer if the data exceeds that space.
Requires a change to external/webkit
Merge commit '2e778c176d17c295f475141bddda9dca5cd65fce' into eclair-mr2
* commit '2e778c176d17c295f475141bddda9dca5cd65fce':
Continue caching "POST" result so that we won't get
Select plugin using focusCandidate rather than cursor
calls. This allows the detecting plugin objects that
have received focus but don't have the cursor ring
on them.
Remove 'inval rect' from debugging printfs, since it
happens a lot, and allow 'request keyboard' to be
visible.
Implement java side of file upload. Requires changes to external/
webkit to not break; requires changes to packages/apps/Browser
before it actually is used.
Fix http://b/issue?id=675743
When the focus bounds is changed by webkit, reflect that
change on the UI side in the WebTextView. On the WebCore
side, add the focus-changed state to the Draw record,
which is sent whenever a new picture is recorded.
On the WebView side, set a bit when receiving the Draw
record, and check that bit when the picture is first drawn.
This additional delay is required so that the bit isn't
checked until after the new nav cache is swapped in.
If the bit is set when the draw occurs, clear it, and
set up the WebTextView's bounds.
companion change in external/webkit
fixes http://b/issue?id=2118781