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 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
848 // associated renderer returns isText() true, e.g. LayoutSVGInlineText. | 848 // associated renderer returns isText() true, e.g. LayoutSVGInlineText. |
849 return false; | 849 return false; |
850 } | 850 } |
851 | 851 |
852 if (isRenderedHTMLTableElement(deprecatedNode()) || editingIgnoresContent(de
precatedNode())) | 852 if (isRenderedHTMLTableElement(deprecatedNode()) || editingIgnoresContent(de
precatedNode())) |
853 return (atFirstEditingPositionForNode() || atLastEditingPositionForNode(
)) && !nodeIsUserSelectNone(deprecatedNode()->parentNode()); | 853 return (atFirstEditingPositionForNode() || atLastEditingPositionForNode(
)) && !nodeIsUserSelectNone(deprecatedNode()->parentNode()); |
854 | 854 |
855 if (isHTMLHtmlElement(*m_anchorNode)) | 855 if (isHTMLHtmlElement(*m_anchorNode)) |
856 return false; | 856 return false; |
857 | 857 |
858 if (renderer->isLayoutBlockFlow() || renderer->isFlexibleBox()) { | 858 if (renderer->isLayoutBlockFlow() || renderer->isFlexibleBox() || renderer->
isLayoutGrid()) { |
859 if (toLayoutBlock(renderer)->logicalHeight() || isHTMLBodyElement(*m_anc
horNode)) { | 859 if (toLayoutBlock(renderer)->logicalHeight() || isHTMLBodyElement(*m_anc
horNode)) { |
860 if (!Position::hasRenderedNonAnonymousDescendantsWithHeight(renderer
)) | 860 if (!Position::hasRenderedNonAnonymousDescendantsWithHeight(renderer
)) |
861 return atFirstEditingPositionForNode() && !Position::nodeIsUserS
electNone(deprecatedNode()); | 861 return atFirstEditingPositionForNode() && !Position::nodeIsUserS
electNone(deprecatedNode()); |
862 return m_anchorNode->hasEditableStyle() && !Position::nodeIsUserSele
ctNone(deprecatedNode()) && atEditingBoundary(); | 862 return m_anchorNode->hasEditableStyle() && !Position::nodeIsUserSele
ctNone(deprecatedNode()) && atEditingBoundary(); |
863 } | 863 } |
864 } else { | 864 } else { |
865 LocalFrame* frame = m_anchorNode->document().frame(); | 865 LocalFrame* frame = m_anchorNode->document().frame(); |
866 bool caretBrowsing = frame->settings() && frame->settings()->caretBrowsi
ngEnabled(); | 866 bool caretBrowsing = frame->settings() && frame->settings()->caretBrowsi
ngEnabled(); |
867 return (caretBrowsing || m_anchorNode->hasEditableStyle()) && !Position:
:nodeIsUserSelectNone(deprecatedNode()) && atEditingBoundary(); | 867 return (caretBrowsing || m_anchorNode->hasEditableStyle()) && !Position:
:nodeIsUserSelectNone(deprecatedNode()) && atEditingBoundary(); |
868 } | 868 } |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1313 pos.showTreeForThis(); | 1313 pos.showTreeForThis(); |
1314 } | 1314 } |
1315 | 1315 |
1316 void showTree(const blink::Position* pos) | 1316 void showTree(const blink::Position* pos) |
1317 { | 1317 { |
1318 if (pos) | 1318 if (pos) |
1319 pos->showTreeForThis(); | 1319 pos->showTreeForThis(); |
1320 } | 1320 } |
1321 | 1321 |
1322 #endif | 1322 #endif |
OLD | NEW |