diff options
| author | Cary Clark <cary@android.com> | 2009-12-02 12:12:19 -0500 |
|---|---|---|
| committer | Cary Clark <cary@android.com> | 2009-12-02 12:12:19 -0500 |
| commit | 3aa3fc5b4d5035705efc875f74d8378ec75e54db (patch) | |
| tree | 3cbe9cc1b6be8a5071458225bd49c5720f8bcd49 /WebKit/android | |
| parent | fb77ce99397e423500cc148c206ffe89796091fb (diff) | |
| download | external_webkit-3aa3fc5b4d5035705efc875f74d8378ec75e54db.zip external_webkit-3aa3fc5b4d5035705efc875f74d8378ec75e54db.tar.gz external_webkit-3aa3fc5b4d5035705efc875f74d8378ec75e54db.tar.bz2 | |
skip nodes when building nav cache if parents are clipped out
This is a fairly conservative fix, since it actually checks to
see if a parent element is clipped out, rather than the bounds
of the element itself.
fixes http://b/2291936
Diffstat (limited to 'WebKit/android')
| -rw-r--r-- | WebKit/android/nav/CacheBuilder.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/WebKit/android/nav/CacheBuilder.cpp b/WebKit/android/nav/CacheBuilder.cpp index 58be0e8..c77f7fc 100644 --- a/WebKit/android/nav/CacheBuilder.cpp +++ b/WebKit/android/nav/CacheBuilder.cpp @@ -1194,10 +1194,14 @@ void CacheBuilder::BuildFrame(Frame* root, Frame* frame, clip.intersect(parentClip); hasClip = true; } - if (hasClip && !clip.isEmpty() && cachedNode.clip(clip) == false) { - cachedNode.setBounds(clip); - cachedNode.cursorRings().append(clip); - isUnclipped = true; + if (hasClip) { + if (clip.isEmpty()) + continue; // skip this node if completely clipped out + else if (cachedNode.clip(clip) == false) { + cachedNode.setBounds(clip); + cachedNode.cursorRings().append(clip); + isUnclipped = true; + } } cachedNode.setNavableRects(); cachedNode.setChildFrameIndex(-1); |
