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

Side by Side Diff: Source/core/layout/line/InlineIterator.h

Issue 1328633002: Fix nested 'unicode-bidi: isolate' can cause infinite loop (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add const (eae's nit) Created 5 years, 3 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
« no previous file with comments | « Source/core/layout/BidiRunForLine.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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, 2009, 2010 Apple Inc. All right r eserved. 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010 Apple Inc. All right r eserved.
4 * Copyright (C) 2010 Google Inc. All rights reserved. 4 * Copyright (C) 2010 Google Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 525
526 static inline LineLayoutItem highestContainingIsolateWithinRoot(LineLayoutItem o bject, LineLayoutItem root) 526 static inline LineLayoutItem highestContainingIsolateWithinRoot(LineLayoutItem o bject, LineLayoutItem root)
527 { 527 {
528 ASSERT(object); 528 ASSERT(object);
529 LineLayoutItem containingIsolateObj = 0; 529 LineLayoutItem containingIsolateObj = 0;
530 while (object && object != root) { 530 while (object && object != root) {
531 if (isIsolatedInline(object)) 531 if (isIsolatedInline(object))
532 containingIsolateObj = object; 532 containingIsolateObj = object;
533 533
534 object = object.parent(); 534 object = object.parent();
535 ASSERT(object);
535 } 536 }
536 return containingIsolateObj; 537 return containingIsolateObj;
537 } 538 }
538 539
539 static inline unsigned numberOfIsolateAncestors(const InlineIterator& iter) 540 static inline unsigned numberOfIsolateAncestors(const InlineIterator& iter)
540 { 541 {
541 LineLayoutItem object = iter.object(); 542 LineLayoutItem object = iter.object();
542 if (!object) 543 if (!object)
543 return 0; 544 return 0;
544 unsigned count = 0; 545 unsigned count = 0;
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 m_sor = m_eor; 742 m_sor = m_eor;
742 } 743 }
743 744
744 m_direction = WTF::Unicode::OtherNeutral; 745 m_direction = WTF::Unicode::OtherNeutral;
745 m_status.eor = WTF::Unicode::OtherNeutral; 746 m_status.eor = WTF::Unicode::OtherNeutral;
746 } 747 }
747 748
748 } 749 }
749 750
750 #endif // InlineIterator_h 751 #endif // InlineIterator_h
OLDNEW
« no previous file with comments | « Source/core/layout/BidiRunForLine.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698