diff options
author | Cary Clark <cary@android.com> | 2010-11-01 17:25:39 -0400 |
---|---|---|
committer | Cary Clark <cary@android.com> | 2010-11-04 15:24:24 -0400 |
commit | 527fb7b2ce688a9d6731ecee454005918a4b966e (patch) | |
tree | 7df367117785882d78091e90affa77dd72a7a0bf /WebCore/platform/graphics/android/LayerAndroid.cpp | |
parent | 6be0d5f748267d7691c09a458651f0a2d8f9affc (diff) | |
download | external_webkit-527fb7b2ce688a9d6731ecee454005918a4b966e.zip external_webkit-527fb7b2ce688a9d6731ecee454005918a4b966e.tar.gz external_webkit-527fb7b2ce688a9d6731ecee454005918a4b966e.tar.bz2 |
Adjust layers when parent layer scrolls
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
Diffstat (limited to 'WebCore/platform/graphics/android/LayerAndroid.cpp')
-rw-r--r-- | WebCore/platform/graphics/android/LayerAndroid.cpp | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/WebCore/platform/graphics/android/LayerAndroid.cpp b/WebCore/platform/graphics/android/LayerAndroid.cpp index 5210171..f88401c 100644 --- a/WebCore/platform/graphics/android/LayerAndroid.cpp +++ b/WebCore/platform/graphics/android/LayerAndroid.cpp @@ -342,10 +342,12 @@ void LayerAndroid::findInner(LayerAndroidFindState& state) const bounds(&localBounds); if (!localBounds.contains(x, y)) return; - if (!m_recordingPicture) - return; - if (!state.drew(m_recordingPicture, localBounds)) - return; + if (!m_foregroundPicture) { + if (!m_recordingPicture) + return; + if (!state.drew(m_recordingPicture, localBounds)) + return; + } state.setBest(this); // set last match (presumably on top) } @@ -688,8 +690,19 @@ void LayerAndroid::dumpLayers(FILE* file, int indentLevel) const } if (m_recordingPicture) { - writeIntVal(file, indentLevel + 1, "picture width", m_recordingPicture->width()); - writeIntVal(file, indentLevel + 1, "picture height", m_recordingPicture->height()); + writeIntVal(file, indentLevel + 1, "m_recordingPicture.width", m_recordingPicture->width()); + writeIntVal(file, indentLevel + 1, "m_recordingPicture.height", m_recordingPicture->height()); + } + + if (m_foregroundPicture) { + writeIntVal(file, indentLevel + 1, "m_foregroundPicture.width", m_foregroundPicture->width()); + writeIntVal(file, indentLevel + 1, "m_foregroundPicture.height", m_foregroundPicture->height()); + writeFloatVal(file, indentLevel + 1, "m_foregroundClip.fLeft", m_foregroundClip.fLeft); + writeFloatVal(file, indentLevel + 1, "m_foregroundClip.fTop", m_foregroundClip.fTop); + writeFloatVal(file, indentLevel + 1, "m_foregroundClip.fRight", m_foregroundClip.fRight); + writeFloatVal(file, indentLevel + 1, "m_foregroundClip.fBottom", m_foregroundClip.fBottom); + writeFloatVal(file, indentLevel + 1, "m_foregroundLocation.fX", m_foregroundLocation.fX); + writeFloatVal(file, indentLevel + 1, "m_foregroundLocation.fY", m_foregroundLocation.fY); } if (countChildren()) { |