summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/android')
-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
3 files changed, 8 insertions, 11 deletions
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;