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

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

Issue 1301933002: Move a static member function nodeIsUserSelectNone() out from PositionAlgorithm template class (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-19T17:33:44 Move out from class Created 5 years, 4 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 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 if (o->nonPseudoNode()) { 812 if (o->nonPseudoNode()) {
813 if ((o->isText() && boundingBoxLogicalHeight(o, toLayoutText(o)->lin esBoundingBox())) 813 if ((o->isText() && boundingBoxLogicalHeight(o, toLayoutText(o)->lin esBoundingBox()))
814 || (o->isBox() && toLayoutBox(o)->pixelSnappedLogicalHeight()) 814 || (o->isBox() && toLayoutBox(o)->pixelSnappedLogicalHeight())
815 || (o->isLayoutInline() && isEmptyInline(LineLayoutItem(o)) && b oundingBoxLogicalHeight(o, toLayoutInline(o)->linesBoundingBox()))) 815 || (o->isLayoutInline() && isEmptyInline(LineLayoutItem(o)) && b oundingBoxLogicalHeight(o, toLayoutInline(o)->linesBoundingBox())))
816 return true; 816 return true;
817 } 817 }
818 } 818 }
819 return false; 819 return false;
820 } 820 }
821 821
822 template <typename Strategy> 822 bool nodeIsUserSelectNone(Node* node)
823 bool PositionAlgorithm<Strategy>::nodeIsUserSelectNone(Node* node)
824 { 823 {
825 return node && node->layoutObject() && !node->layoutObject()->isSelectable() ; 824 return node && node->layoutObject() && !node->layoutObject()->isSelectable() ;
826 } 825 }
827 826
828 template <typename Strategy> 827 template <typename Strategy>
829 bool PositionAlgorithm<Strategy>::nodeIsUserSelectAll(const Node* node) 828 bool PositionAlgorithm<Strategy>::nodeIsUserSelectAll(const Node* node)
830 { 829 {
831 return RuntimeEnabledFeatures::userSelectAllEnabled() && node && node->layou tObject() && node->layoutObject()->style()->userSelect() == SELECT_ALL; 830 return RuntimeEnabledFeatures::userSelectAllEnabled() && node && node->layou tObject() && node->layoutObject()->style()->userSelect() == SELECT_ALL;
832 } 831 }
833 832
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 1351
1353 void showTree(const blink::Position* pos) 1352 void showTree(const blink::Position* pos)
1354 { 1353 {
1355 if (pos) 1354 if (pos)
1356 pos->showTreeForThis(); 1355 pos->showTreeForThis();
1357 else 1356 else
1358 fprintf(stderr, "Cannot showTree for (nil)\n"); 1357 fprintf(stderr, "Cannot showTree for (nil)\n");
1359 } 1358 }
1360 1359
1361 #endif 1360 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698