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 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
836 if ((o->isText() && boundingBoxLogicalHeight(o, toRenderText(o)->lin
esBoundingBox())) | 836 if ((o->isText() && boundingBoxLogicalHeight(o, toRenderText(o)->lin
esBoundingBox())) |
837 || (o->isBox() && toRenderBox(o)->pixelSnappedLogicalHeight()) | 837 || (o->isBox() && toRenderBox(o)->pixelSnappedLogicalHeight()) |
838 || (o->isRenderInline() && isEmptyInline(o) && boundingBoxLogica
lHeight(o, toRenderInline(o)->linesBoundingBox()))) | 838 || (o->isRenderInline() && isEmptyInline(o) && boundingBoxLogica
lHeight(o, toRenderInline(o)->linesBoundingBox()))) |
839 return true; | 839 return true; |
840 } | 840 } |
841 return false; | 841 return false; |
842 } | 842 } |
843 | 843 |
844 bool Position::nodeIsUserSelectNone(Node* node) | 844 bool Position::nodeIsUserSelectNone(Node* node) |
845 { | 845 { |
846 return node && node->renderer() && node->renderer()->style()->userSelect() =
= SELECT_NONE; | 846 return node && node->renderer() && node->renderer()->style()->userSelect() =
= SELECT_NONE && node->renderer()->style()->userModify() == READ_ONLY; |
847 } | 847 } |
848 | 848 |
849 ContainerNode* Position::findParent(const Node* node) | 849 ContainerNode* Position::findParent(const Node* node) |
850 { | 850 { |
851 return node->parentNode(); | 851 return node->parentNode(); |
852 } | 852 } |
853 | 853 |
854 #if ENABLE(USERSELECT_ALL) | 854 #if ENABLE(USERSELECT_ALL) |
855 bool Position::nodeIsUserSelectAll(const Node* node) | 855 bool Position::nodeIsUserSelectAll(const Node* node) |
856 { | 856 { |
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1391 pos.showTreeForThis(); | 1391 pos.showTreeForThis(); |
1392 } | 1392 } |
1393 | 1393 |
1394 void showTree(const WebCore::Position* pos) | 1394 void showTree(const WebCore::Position* pos) |
1395 { | 1395 { |
1396 if (pos) | 1396 if (pos) |
1397 pos->showTreeForThis(); | 1397 pos->showTreeForThis(); |
1398 } | 1398 } |
1399 | 1399 |
1400 #endif | 1400 #endif |
OLD | NEW |