summaryrefslogtreecommitdiffstats
path: root/WebKit/android
Commit message (Collapse)AuthorAgeFilesLines
* Hook chromium logging up in WebKitKristian Monsen2010-11-044-0/+116
| | | | Change-Id: Ide08371e0bc8f74ef80fe25d416623bd03ac6038
* Add support for file uploads in WebKitKristian Monsen2010-11-047-62/+60
| | | | | | | | | | This also moves some of the android file handling to Java so it is not duplicated in both places. This CL needs https://android-git.corp.google.com/g/#change,77400 in frameworks/base Change-Id: I90c1726e6c323a9de3fd64f2e6feef4b64171053
* Merge Chromium at r63472 : WebKit fixes.Iain Merrick2010-11-031-1/+1
| | | | | | | | | | Chromium now uses protocol buffers so we need libprotobuf. See http://src.chromium.org/viewvc/chrome?view=rev&revision=63221 HttpCache takes an extra constructor argument. See http://src.chromium.org/viewvc/chrome?view=rev&revision=61789 Change-Id: I5e78b0de9a8ff86040b13212455eb37a4ed0e39e
* Merge "Unref the picture instead of deleting it"Cary Clark2010-11-031-1/+10
|\
| * Unref the picture instead of deleting itCary Clark2010-11-031-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Add volume mute key."Jeff Brown2010-11-021-1/+2
|\ \
| * | Add volume mute key.Jeff Brown2010-11-011-1/+2
| |/ | | | | | | | | | | | | Also fixed incorrect keycode constant for numpad parens. Bug: 2912307 Change-Id: I65d02ca1c131638ea70f333bf06982747f34223c
* | Set the page background color in BaseLayerAndroidNicolas Roard2010-11-021-0/+11
| | | | | | | | | | | | This allows us to show the correct background even if the tiles aren't yet painted. Change-Id: Ia3ef97770aadb5f64490e44f20110ea21578ccd0
* | Update the layers onlyNicolas Roard2010-11-013-16/+56
|/ | | | | | | | C++ counterpart to https://android-git.corp.google.com/g/#change,77500 Bug:2975990 Change-Id: I3b8fd27f991d6776059a15eef36d0c9a7b44f9bb
* Fix WebCoreStringToJString() to not delete the local reference to the new ↵Steve Block2010-11-0112-131/+94
| | | | | | | | | | | | | 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
* Merge changes I28fb1392,I6b881465Steve Block2010-10-291-1/+56
|\ | | | | | | | | | | * changes: CookieManager.getCookie() should return null rather than the empty string Hook up remaining CookieManager methods
| * CookieManager.getCookie() should return null rather than the empty stringSteve Block2010-10-291-1/+1
| | | | | | | | | | | | | | This is to match the behaviour of the Android Java HTTP stack. Bug: 3116410 Change-Id: I28fb1392c36754a7c2fd78bc76281db8318a1056
| * Hook up remaining CookieManager methodsSteve Block2010-10-291-0/+55
| | | | | | | | | | | | | | | | | | | | hasCookies(), removeExpiredCookie(), removeSessionCookie() and setCookie() Requires a change to frameworks/base ... https://android-git.corp.google.com/g/76898 Bug: 3116410 Change-Id: I6b881465f78e090ed29b215785c4018119ccc5d8
* | Notify WebKit of redirects in the Chrome HTTP stack.Iain Merrick2010-10-293-13/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In this CL we just defer the redirect until WebKit has had a chance to check it, and potentially cancel it. There's a comment in the old code asking what to do if we're given a bad request. Looks like this should never happen; it's a DCHECK in Chrome so I've turned it into an ASSERT here. We only follow redirects if WebKit does not modify the URL (this is the same behaviour as Chrome). Change-Id: I0c8b8cd61c501527a29dda5aca521a7df4a3ccef
* | Merge "Allow Gmail attachments to be viewed."Iain Merrick2010-10-296-33/+90
|\ \
| * | Allow Gmail attachments to be viewed.Iain Merrick2010-10-286-33/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When displaying attachments, WebKit calls downloadFile() on an Android-specific URL. This was crashing because it expected to have a URLRequest available; however, there's a different code path in WebRequest.cpp for Android URLs that doesn't create a URLRequest. This CL hoists the implementation of downloadFile() into WebUrlLoaderClient, and gets the necessary headers from the WebResponse object in didReceiveResponse (which should always be called before downloadFile). Gmail appends the MIME type to the URL after a ? separator, and we have to extract this to display the file correctly. Tests: - Can display .txt attachments in Gmail (now fixed) - Can download .apk files (checking for regressions) Change-Id: I966220977972da7a2de29e663d7781b1de0e6fd4
* | | Clear chromium side autofill profiles when java syncs a null profile.Ben Murdoch2010-10-293-0/+24
| | | | | | | | | | | | | | | | | | | | | This implements the native code needed to support the deletion of a profile through the editor UI. Change-Id: I7966551324d709612bff7cafeaf8a2cf93c218f0
* | | Merge "allow contained draws to identify a link"Cary Clark2010-10-281-10/+15
|\ \ \ | |/ / |/| |
| * | allow contained draws to identify a linkCary Clark2010-10-281-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first cut of rewriting hiding and clipping links if they are obscured by a subsequent draw looks for the contained text to find the original link in the picture. Some links contain only bitmaps, and others, like text fields, may contain nothing at all. To identify these, look for bitmaps, and to cover the text field case, look for a background erase. These draws can be used to identify where the link is in the picture. Because bitmaps and background erases can also obscure links, distinguish between draws that are contained by the link from those that overlap it. bug:3120589 Change-Id: Ied8fe2378f27253a162f5f9636f5ade12ce6013c
* | | Merge "CookieManager.getCookie() should include HTTP-only cookies"Steve Block2010-10-281-1/+3
|\ \ \ | | |/ | |/|
| * | CookieManager.getCookie() should include HTTP-only cookiesSteve Block2010-10-281-1/+3
| | | | | | | | | | | | | | | | | | This matches the behaviour of the Android Java HTTP stack Change-Id: I280e524a849dc93bae54795543b1440c3be98c27
* | | Use Tasks for WebRequest -> WebUrlLoaderClient callbacks.Iain Merrick2010-10-285-184/+106
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | We were using some hand-rolled boilerplate for inter-thread communication, with all data packed into the same LoaderData struct. This CL uses the Chromium utility function NewRunnableMethod to pack up the parameters, so the callback methods don't have to be static and can have different parameters. Also using smart pointers wherever possible. Testing: manually verified that both synchronous and asynchronous requests work correctly with no leaks. Will also do stress-testing to check for race conditions. Change-Id: I934a2ee795138f8eee43803a94bb7494ee73031d
* | Make sure we delete local references to jclass objectsSteve Block2010-10-2815-13/+74
| | | | | | | | Change-Id: I1b398bd0a84ce366eb2e686e5f14335d7aa5ed31
* | Fix for split text bug.Nicolas Roard2010-10-271-1/+1
| | | | | | | | | | | | Bug:3134026 Change-Id: I0ccaf27b8ede58603aeb2284c56527d4fe0a589b (cherry picked from commit ca3a75fc3f9712c15e4a84ebcfd48699963896bb)
* | Merge "Fix a missing namespace in WebCache"Steve Block2010-10-271-3/+5
|\ \
| * | Fix a missing namespace in WebCacheSteve Block2010-10-271-3/+5
| | | | | | | | | | | | Change-Id: I6d1bf42b3f5a81b24613ca4c62ba4e02400a63b0
* | | Merge "Hook up CookieManager.getCookie() for Chromium HTTP stack"Steve Block2010-10-271-10/+34
|\ \ \ | |/ /
| * | Hook up CookieManager.getCookie() for Chromium HTTP stackSteve Block2010-10-271-10/+34
| | | | | | | | | | | | | | | | | | | | | | | | Requires a change to frameworks/base ... https://android-git.corp.google.com/g/76605 Bug: 3116410 Change-Id: I1b66c1ac9f9aaf5388ad1da92f54b1f16d4a3626
* | | Merge "Hook up CookieManager.acceptCookie() and setAcceptCookie() for the ↵Steve Block2010-10-275-2/+70
|\ \ \ | |/ / | | | | | | Chromium HTTP stack"
| * | Hook up CookieManager.acceptCookie() and setAcceptCookie() for the Chromium ↵Steve Block2010-10-275-2/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HTTP stack We also update PlatformBridge::cookiesEnabled() to query the Chromium HTTP stack directly. This avoids calling CookieClient::cookiesEnabled(), which calls the Java CookieManager::acceptCookie() which in turns calls back to native code. Also requires a change to frameworks/base ... https://android-git.corp.google.com/g/76065 Bug: 3116410 Change-Id: Id853463f3bcef76b220e8c44dd2b30c0d6752624
* | | Merge "Fix some problems in WebCoreFrameBridge when using JNIEnv::NewString()"Steve Block2010-10-271-21/+18
|\ \ \
| * | | Fix some problems in WebCoreFrameBridge when using JNIEnv::NewString()Steve Block2010-10-271-21/+18
| |/ / | | | | | | | | | | | | | | | | | | - Remove superfluous casts to unsigned short* - Avoid converting from Unicode to UTF8 and back Change-Id: Ib7cbc610f1b27ecd52082bf412afa7c7b3fec4b2
* | | Update playback state after full screen video return.Shimeng (Simon) Wang2010-10-271-0/+1
| |/ |/| | | | | | | | | | | | | This change will correctly update the play/pause button when a full screen video is returned in the middle. issue:3102273 Change-Id: Icf5e9194393fa30dd6d9195045df21480842aa6b
* | rewrite select text and others for layersCary Clark2010-10-2710-127/+247
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Update Chromium HTTP stack to get database and cache paths from ↵Steve Block2010-10-272-22/+16
| | | | | | | | | | | | | | | | | | | | | CookieSyncManager Currently these paths are obtained from the BrowserFrame via JNI. However, the paths are not synced to the BrowserFrame until the WebCore thread has started up. This means that if the WebRequestContext is created on the IO thread, the paths may not be available. This change moves the paths from BrowserFrame to CookieSyncManager to avoid the need to wait for the WebCore thread. Note that the new methods may be called on either the UI or WebCore threads, so are synchronised. Requires a change to frameworks/base ... https://android-git.corp.google.com/g/76580 Change-Id: I61f88772d13901d66892118c79db3cac412e6bd1
* Fix WebRequestContext::get() to be threadsafeSteve Block2010-10-273-0/+16
| | | | | | | This allows the method to be called from both the WebCore thread and the UI thread, as required to hook up CookieManager. Change-Id: I895d14909b14f0baba77fb2cb75926d9103ee01f
* Fixes style in WebRequestContextSteve Block2010-10-279-57/+66
| | | | | | | | | | | | | | | 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
* Fix build break.Iain Merrick2010-10-271-1/+1
| | | | | | Missing edit in I50da7599, ended up on the wrong CL. Change-Id: I4d4c6713fbfe30cdc8cdf0e733c4725b33a09673
* Only AV formats should be handled by MediaPlayer (C++ side)Iain Merrick2010-10-273-8/+8
| | | | | | Fixing JNI bindings. See Java-side change for details (Id39b770b). Change-Id: I50da7599475476ebaaf9609f44e13fbdf212c90e
* Fix random crashes when HW acceleration is turned on.Nicolas Roard2010-10-261-1/+10
| | | | | | Bug:3107362 Change-Id: I354a07369056e696deed7458a4f4e14d54b7f6c8
* Fix potential crash in Nav Cache code introduced by WebKit mergeBen Murdoch2010-10-264-43/+44
| | | | | | | | The refactoring in the nav cache code caused by the recent merge to webkit r70209 can crash. Fix that. Bug: 3132882 Change-Id: I98b605ae2fdf24cf0f25adc919f2dbba581abef0
* Update selection after keypresses.Leon Scroggins2010-10-261-4/+6
| | | | | Bug:3054784 Change-Id: I5430969dc532feea10a960eb4117b3a3108ed702
* Merge Webkit at r70209: StringBuilder.h moved to WTF.Ben Murdoch2010-10-261-1/+1
| | | | | | See http://trac.webkit.org/changeset/69594 Change-Id: I17d01eae838c03ac198dd8b0df3717d058806aca
* Merge Webkit at r70209: ImageColorSpace type no longer exists.Ben Murdoch2010-10-261-3/+3
| | | | | | | | It has been replaced with ColorSpace. Also DeviceColorSpace has been renamed ColorSpaceDeviceRGB. See http://trac.webkit.org/changeset/70143 Change-Id: Ib603dcef04dcfa51fca142d8b3d03689a18e110f
* Merge Webkit at r70209: DeprecatedInputType is now private.Ben Murdoch2010-10-263-21/+33
| | | | | | | | See http://trac.webkit.org/changeset/68749 Bug: 3132882 Change-Id: I51dfa144c5c289c759caa48e7dedc9020b7d8f12
* Merge "Remove unused dispatchDidLoadResourceByXMLHttpRequest"Ben Murdoch2010-10-252-5/+0
|\
| * Remove unused dispatchDidLoadResourceByXMLHttpRequestBen Murdoch2010-10-252-5/+0
| | | | | | | | | | | | See http://trac.webkit.org/changeset/57210 Change-Id: I82ddff6e4d04e2c36dad2518e4e27a695728bc95
* | Hide details of private browsing for URLRequestContext from Chromium ↵Steve Block2010-10-251-1/+6
| | | | | | | | | | | | AutoFill code Change-Id: I58a388ecf16b2af4f1cd31afb39d0aa6c5c44a24
* | Add a JNI method to determine which HTTP stack is in useSteve Block2010-10-251-1/+10
|/ | | | | | | | | This will be required when hooking up CookieManager to the Chromium stack, as we need to decide in Java whether or not to call into native code. Bug: 3116410 Change-Id: I4e148ad2c38a6e5771912dc419f52c8098027958
* Fix for ALT_HTTP build breakKristian Monsen2010-10-221-0/+2
| | | | | | | Was broken by this CL: https://android-git.corp.google.com/g/#change,75473 Change-Id: I6f60fd1e19eafe84f9d2f72f556493a25c2caf0e