Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: Source/core/platform/text/BidiResolver.h

Issue 25373008: BidiResolver should not try to reverse runs when the run count is zero (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add missed layout test Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2006, 2007, 2008 Apple Inc. All right reserved. 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008 Apple Inc. All right reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 m_emptyRun = false; 567 m_emptyRun = false;
568 m_sor = m_current; 568 m_sor = m_current;
569 m_eor = Iterator(); 569 m_eor = Iterator();
570 while (m_current != end && !m_current.atEnd()) { 570 while (m_current != end && !m_current.atEnd()) {
571 m_eor = m_current; 571 m_eor = m_current;
572 increment(); 572 increment();
573 } 573 }
574 m_direction = override == VisualLeftToRightOverride ? LeftToRight : Righ tToLeft; 574 m_direction = override == VisualLeftToRightOverride ? LeftToRight : Righ tToLeft;
575 appendRun(); 575 appendRun();
576 m_runs.setLogicallyLastRun(m_runs.lastRun()); 576 m_runs.setLogicallyLastRun(m_runs.lastRun());
577 if (override == VisualRightToLeftOverride) 577 if (override == VisualRightToLeftOverride && m_runs.runCount())
578 m_runs.reverseRuns(0, m_runs.runCount() - 1); 578 m_runs.reverseRuns(0, m_runs.runCount() - 1);
579 return; 579 return;
580 } 580 }
581 581
582 m_emptyRun = true; 582 m_emptyRun = true;
583 583
584 m_eor = Iterator(); 584 m_eor = Iterator();
585 585
586 m_last = m_current; 586 m_last = m_current;
587 bool lastParagraphEnded = false; 587 bool lastParagraphEnded = false;
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 } 951 }
952 952
953 m_runs.setLogicallyLastRun(m_runs.lastRun()); 953 m_runs.setLogicallyLastRun(m_runs.lastRun());
954 reorderRunsFromLevels(); 954 reorderRunsFromLevels();
955 endOfLine = Iterator(); 955 endOfLine = Iterator();
956 } 956 }
957 957
958 } // namespace WebCore 958 } // namespace WebCore
959 959
960 #endif // BidiResolver_h 960 #endif // BidiResolver_h
OLDNEW
« no previous file with comments | « LayoutTests/fast/text/bidi-reverse-runs-crash-expected.txt ('k') | Source/core/platform/text/BidiRunList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698