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

Side by Side Diff: third_party/WebKit/Source/platform/text/BidiResolver.h

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 if (!needsToApplyL1Rule(runs)) 546 if (!needsToApplyL1Rule(runs))
547 return; 547 return;
548 548
549 Run* trailingSpaceRun = runs.logicallyLastRun(); 549 Run* trailingSpaceRun = runs.logicallyLastRun();
550 550
551 int firstSpace = findFirstTrailingSpaceAtRun(trailingSpaceRun); 551 int firstSpace = findFirstTrailingSpaceAtRun(trailingSpaceRun);
552 if (firstSpace == trailingSpaceRun->stop()) 552 if (firstSpace == trailingSpaceRun->stop())
553 return; 553 return;
554 554
555 bool shouldReorder = 555 bool shouldReorder =
556 trailingSpaceRun != (m_paragraphDirectionality == TextDirection::kLtr 556 trailingSpaceRun !=
557 ? runs.lastRun() 557 (m_paragraphDirectionality == TextDirection::kLtr ? runs.lastRun()
558 : runs.firstRun()); 558 : runs.firstRun());
559 if (firstSpace != trailingSpaceRun->start()) { 559 if (firstSpace != trailingSpaceRun->start()) {
560 BidiContext* baseContext = context(); 560 BidiContext* baseContext = context();
561 while (BidiContext* parent = baseContext->parent()) 561 while (BidiContext* parent = baseContext->parent())
562 baseContext = parent; 562 baseContext = parent;
563 563
564 m_trailingSpaceRun = addTrailingRun( 564 m_trailingSpaceRun = addTrailingRun(
565 runs, firstSpace, trailingSpaceRun->m_stop, trailingSpaceRun, 565 runs, firstSpace, trailingSpaceRun->m_stop, trailingSpaceRun,
566 baseContext, m_paragraphDirectionality); 566 baseContext, m_paragraphDirectionality);
567 ASSERT(m_trailingSpaceRun); 567 ASSERT(m_trailingSpaceRun);
568 trailingSpaceRun->m_stop = firstSpace; 568 trailingSpaceRun->m_stop = firstSpace;
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
1216 template <class Iterator, class Run, class IsolatedRun> 1216 template <class Iterator, class Run, class IsolatedRun>
1217 MidpointState<Iterator> 1217 MidpointState<Iterator>
1218 BidiResolver<Iterator, Run, IsolatedRun>::midpointStateForIsolatedRun( 1218 BidiResolver<Iterator, Run, IsolatedRun>::midpointStateForIsolatedRun(
1219 Run& run) { 1219 Run& run) {
1220 return m_midpointStateForIsolatedRun.take(&run); 1220 return m_midpointStateForIsolatedRun.take(&run);
1221 } 1221 }
1222 1222
1223 } // namespace blink 1223 } // namespace blink
1224 1224
1225 #endif // BidiResolver_h 1225 #endif // BidiResolver_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/testing/weburl_loader_mock.cc ('k') | third_party/WebKit/Source/platform/text/Character.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698