summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/WebCore/platform/graphics/android/android_graphics.cpp3
-rw-r--r--Source/WebKit/android/nav/FindCanvas.cpp2
-rw-r--r--Source/WebKit/android/nav/SelectText.cpp9
-rw-r--r--Source/WebKit/android/nav/WebView.cpp8
4 files changed, 10 insertions, 12 deletions
diff --git a/Source/WebCore/platform/graphics/android/android_graphics.cpp b/Source/WebCore/platform/graphics/android/android_graphics.cpp
index 57f1b41..c8b7f59 100644
--- a/Source/WebCore/platform/graphics/android/android_graphics.cpp
+++ b/Source/WebCore/platform/graphics/android/android_graphics.cpp
@@ -54,7 +54,8 @@ void CursorRing::draw(SkCanvas* canvas, LayerAndroid* layer, IntRect* inval)
}
#if USE(ACCELERATED_COMPOSITING)
int layerId = m_node->isInLayer() ? m_frame->layer(m_node)->uniqueId() : -1;
- if (layer->uniqueId() != layerId)
+ int drawingLayerId = layer ? layer->uniqueId() : -1;
+ if (drawingLayerId != layerId)
return;
#endif
if (canvas->quickReject(m_bounds, SkCanvas::kAA_EdgeType)) {
diff --git a/Source/WebKit/android/nav/FindCanvas.cpp b/Source/WebKit/android/nav/FindCanvas.cpp
index a61b73b..35d31cd 100644
--- a/Source/WebKit/android/nav/FindCanvas.cpp
+++ b/Source/WebKit/android/nav/FindCanvas.cpp
@@ -571,7 +571,7 @@ void FindOnPage::draw(SkCanvas* canvas, LayerAndroid* layer, IntRect* inval) {
}
if (!m_hasCurrentLocation || !m_matches || !m_matches->size())
return;
- int layerId = layer->uniqueId();
+ int layerId = layer ? layer->uniqueId() : -1;
if (m_findIndex >= m_matches->size())
m_findIndex = 0;
const MatchInfo& matchInfo = (*m_matches)[m_findIndex];
diff --git a/Source/WebKit/android/nav/SelectText.cpp b/Source/WebKit/android/nav/SelectText.cpp
index 2035fbb..0f4ff23 100644
--- a/Source/WebKit/android/nav/SelectText.cpp
+++ b/Source/WebKit/android/nav/SelectText.cpp
@@ -1412,14 +1412,11 @@ SelectText::~SelectText()
void SelectText::draw(SkCanvas* canvas, LayerAndroid* layer, IntRect* inval)
{
- if (m_layerId != layer->uniqueId())
+ int drawingLayerId = layer ? layer->uniqueId() : -1;
+ if (m_layerId != drawingLayerId)
return;
- // reset m_picture to match m_layerId
- SkSafeUnref(m_picture);
- m_picture = layer->picture();
- SkSafeRef(m_picture);
DBG_NAV_LOGD("m_extendSelection=%d m_drawPointer=%d layer [%d]",
- m_extendSelection, m_drawPointer, layer->uniqueId());
+ m_extendSelection, m_drawPointer, drawingLayerId);
if (m_extendSelection)
drawSelectionRegion(canvas, inval);
if (m_drawPointer)
diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp
index 9bf95e5..0d8a716 100644
--- a/Source/WebKit/android/nav/WebView.cpp
+++ b/Source/WebKit/android/nav/WebView.cpp
@@ -581,10 +581,10 @@ PictureSet* draw(SkCanvas* canvas, SkColor bgColor, int extras, bool split)
m_baseLayer->setMatrix(canvas->getTotalMatrix());
canvas->resetMatrix();
m_baseLayer->draw(canvas);
- if (extra) {
- IntRect dummy; // inval area, unused for now
- extra->draw(canvas, compositeLayer, &dummy);
- }
+ }
+ if (extra) {
+ IntRect dummy; // inval area, unused for now
+ extra->draw(canvas, compositeLayer, &dummy);
}
#endif
return ret;