OLD | NEW |
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 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 template <typename Strategy> |
823 bool PositionAlgorithm<Strategy>::nodeIsUserSelectNone(Node* node) | |
824 { | |
825 return node && node->layoutObject() && !node->layoutObject()->isSelectable()
; | |
826 } | |
827 | |
828 template <typename Strategy> | |
829 bool PositionAlgorithm<Strategy>::nodeIsUserSelectAll(const Node* node) | 823 bool PositionAlgorithm<Strategy>::nodeIsUserSelectAll(const Node* node) |
830 { | 824 { |
831 return RuntimeEnabledFeatures::userSelectAllEnabled() && node && node->layou
tObject() && node->layoutObject()->style()->userSelect() == SELECT_ALL; | 825 return RuntimeEnabledFeatures::userSelectAllEnabled() && node && node->layou
tObject() && node->layoutObject()->style()->userSelect() == SELECT_ALL; |
832 } | 826 } |
833 | 827 |
834 template <typename Strategy> | 828 template <typename Strategy> |
835 Node* PositionAlgorithm<Strategy>::rootUserSelectAllForNode(Node* node) | 829 Node* PositionAlgorithm<Strategy>::rootUserSelectAllForNode(Node* node) |
836 { | 830 { |
837 if (!node || !nodeIsUserSelectAll(node)) | 831 if (!node || !nodeIsUserSelectAll(node)) |
838 return 0; | 832 return 0; |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1352 | 1346 |
1353 void showTree(const blink::Position* pos) | 1347 void showTree(const blink::Position* pos) |
1354 { | 1348 { |
1355 if (pos) | 1349 if (pos) |
1356 pos->showTreeForThis(); | 1350 pos->showTreeForThis(); |
1357 else | 1351 else |
1358 fprintf(stderr, "Cannot showTree for (nil)\n"); | 1352 fprintf(stderr, "Cannot showTree for (nil)\n"); |
1359 } | 1353 } |
1360 | 1354 |
1361 #endif | 1355 #endif |
OLD | NEW |