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

Side by Side Diff: third_party/WebKit/Source/core/dom/TreeScope.cpp

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) 2011 Google Inc. All Rights Reserved. 2 * Copyright (C) 2011 Google Inc. All Rights Reserved.
3 * Copyright (C) 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 if (child == child1) 440 if (child == child1)
441 return Node::kDocumentPositionFollowing; 441 return Node::kDocumentPositionFollowing;
442 } 442 }
443 443
444 return Node::kDocumentPositionPreceding; 444 return Node::kDocumentPositionPreceding;
445 } 445 }
446 } 446 }
447 447
448 // There was no difference between the two parent chains, i.e., one was a 448 // There was no difference between the two parent chains, i.e., one was a
449 // subset of the other. The shorter chain is the ancestor. 449 // subset of the other. The shorter chain is the ancestor.
450 return index1 < index2 450 return index1 < index2 ? Node::kDocumentPositionFollowing |
451 ? Node::kDocumentPositionFollowing | 451 Node::kDocumentPositionContainedBy
452 Node::kDocumentPositionContainedBy 452 : Node::kDocumentPositionPreceding |
453 : Node::kDocumentPositionPreceding | 453 Node::kDocumentPositionContains;
454 Node::kDocumentPositionContains;
455 } 454 }
456 455
457 const TreeScope* TreeScope::commonAncestorTreeScope( 456 const TreeScope* TreeScope::commonAncestorTreeScope(
458 const TreeScope& other) const { 457 const TreeScope& other) const {
459 HeapVector<Member<const TreeScope>, 16> thisChain; 458 HeapVector<Member<const TreeScope>, 16> thisChain;
460 for (const TreeScope* tree = this; tree; tree = tree->parentTreeScope()) 459 for (const TreeScope* tree = this; tree; tree = tree->parentTreeScope())
461 thisChain.push_back(tree); 460 thisChain.push_back(tree);
462 461
463 HeapVector<Member<const TreeScope>, 16> otherChain; 462 HeapVector<Member<const TreeScope>, 16> otherChain;
464 for (const TreeScope* tree = &other; tree; tree = tree->parentTreeScope()) 463 for (const TreeScope* tree = &other; tree; tree = tree->parentTreeScope())
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 visitor->trace(m_idTargetObserverRegistry); 528 visitor->trace(m_idTargetObserverRegistry);
530 visitor->trace(m_selection); 529 visitor->trace(m_selection);
531 visitor->trace(m_elementsById); 530 visitor->trace(m_elementsById);
532 visitor->trace(m_imageMapsByName); 531 visitor->trace(m_imageMapsByName);
533 visitor->trace(m_scopedStyleResolver); 532 visitor->trace(m_scopedStyleResolver);
534 visitor->trace(m_radioButtonGroupScope); 533 visitor->trace(m_radioButtonGroupScope);
535 visitor->trace(m_svgTreeScopedResources); 534 visitor->trace(m_svgTreeScopedResources);
536 } 535 }
537 536
538 } // namespace blink 537 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Text.cpp ('k') | third_party/WebKit/Source/core/dom/ViewportDescription.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698