Chromium Code Reviews| Index: pdf/pdfium/pdfium_engine.cc |
| diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc |
| index 87f8d65dc90e3a09695495146564febe52b6ce6c..3b98ced26f5cb0292e65c9ff81b39f94c62accf8 100644 |
| --- a/pdf/pdfium/pdfium_engine.cc |
| +++ b/pdf/pdfium/pdfium_engine.cc |
| @@ -1863,7 +1863,9 @@ bool PDFiumEngine::OnMouseMove(const pp::MouseInputEvent& event) { |
| selection_.push_back(PDFiumRange(pages_[page_index], 0, char_index)); |
| } else { |
| // Selecting into the previous page. |
| - selection_[last].SetCharCount(-selection_[last].char_index()); |
| + // As char_index starts from 0 so char count should be set one more than |
|
Lei Zhang
2015/01/16 07:01:23
I would write this as:
The selection's char_index
Deepak
2015/01/16 07:10:39
Done.
|
| + // char_index. |
| + selection_[last].SetCharCount(-(selection_[last].char_index() + 1)); |
| // First make sure that there are no gaps in selection, i.e. if mousedown on |
| // page three but we only get mousemove over page one, we want page two. |