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

Side by Side Diff: third_party/WebKit/Source/core/editing/Position.cpp

Issue 2668903003: Replace WTF::emptyString{16Bit}() with a static global (Closed)
Patch Set: Replace WTF::emptyString{16Bit}() with a static global 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) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 case PositionAnchorType::BeforeChildren: 593 case PositionAnchorType::BeforeChildren:
594 return "beforeChildren"; 594 return "beforeChildren";
595 case PositionAnchorType::AfterChildren: 595 case PositionAnchorType::AfterChildren:
596 return "afterChildren"; 596 return "afterChildren";
597 case PositionAnchorType::BeforeAnchor: 597 case PositionAnchorType::BeforeAnchor:
598 return "beforeAnchor"; 598 return "beforeAnchor";
599 case PositionAnchorType::AfterAnchor: 599 case PositionAnchorType::AfterAnchor:
600 return "afterAnchor"; 600 return "afterAnchor";
601 } 601 }
602 NOTREACHED(); 602 NOTREACHED();
603 return emptyString(); 603 return emptyString;
604 } 604 }
605 605
606 #ifndef NDEBUG 606 #ifndef NDEBUG
607 607
608 template <typename Strategy> 608 template <typename Strategy>
609 void PositionTemplate<Strategy>::showTreeForThis() const { 609 void PositionTemplate<Strategy>::showTreeForThis() const {
610 if (!anchorNode()) 610 if (!anchorNode())
611 return; 611 return;
612 LOG(INFO) << "\n" 612 LOG(INFO) << "\n"
613 << anchorNode()->toTreeStringForThis().utf8().data() 613 << anchorNode()->toTreeStringForThis().utf8().data()
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 } 672 }
673 673
674 void showTree(const blink::Position* pos) { 674 void showTree(const blink::Position* pos) {
675 if (pos) 675 if (pos)
676 pos->showTreeForThis(); 676 pos->showTreeForThis();
677 else 677 else
678 LOG(INFO) << "Cannot showTree for <null>"; 678 LOG(INFO) << "Cannot showTree for <null>";
679 } 679 }
680 680
681 #endif 681 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698