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 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
884 // associated renderer returns isText() true, e.g. LayoutSVGInlineText. | 884 // associated renderer returns isText() true, e.g. LayoutSVGInlineText. |
885 return false; | 885 return false; |
886 } | 886 } |
887 | 887 |
888 if (isRenderedHTMLTableElement(deprecatedNode()) || editingIgnoresContent(de precatedNode())) | 888 if (isRenderedHTMLTableElement(deprecatedNode()) || editingIgnoresContent(de precatedNode())) |
889 return (atFirstEditingPositionForNode() || atLastEditingPositionForNode( )) && !nodeIsUserSelectNone(deprecatedNode()->parentNode()); | 889 return (atFirstEditingPositionForNode() || atLastEditingPositionForNode( )) && !nodeIsUserSelectNone(deprecatedNode()->parentNode()); |
890 | 890 |
891 if (isHTMLHtmlElement(*m_anchorNode)) | 891 if (isHTMLHtmlElement(*m_anchorNode)) |
892 return false; | 892 return false; |
893 | 893 |
894 if (renderer->isLayoutBlockFlow() || renderer->isFlexibleBox() || renderer-> isLayoutGrid()) { | 894 if (renderer->isLayoutBlockFlow() || (renderer->isFlexibleBox() && m_anchorN ode->hasEditableStyle()) || renderer->isLayoutGrid()) { |
pdr.
2015/04/06 18:25:46
I'm not an expert in this area but this fix looks
| |
895 if (toLayoutBlock(renderer)->logicalHeight() || isHTMLBodyElement(*m_anc horNode)) { | 895 if (toLayoutBlock(renderer)->logicalHeight() || isHTMLBodyElement(*m_anc horNode)) { |
896 if (!Position::hasRenderedNonAnonymousDescendantsWithHeight(renderer )) | 896 if (!Position::hasRenderedNonAnonymousDescendantsWithHeight(renderer )) |
897 return atFirstEditingPositionForNode() && !Position::nodeIsUserS electNone(deprecatedNode()); | 897 return atFirstEditingPositionForNode() && !Position::nodeIsUserS electNone(deprecatedNode()); |
898 return m_anchorNode->hasEditableStyle() && !Position::nodeIsUserSele ctNone(deprecatedNode()) && atEditingBoundary(); | 898 return m_anchorNode->hasEditableStyle() && !Position::nodeIsUserSele ctNone(deprecatedNode()) && atEditingBoundary(); |
899 } | 899 } |
900 } else { | 900 } else { |
901 LocalFrame* frame = m_anchorNode->document().frame(); | 901 LocalFrame* frame = m_anchorNode->document().frame(); |
902 bool caretBrowsing = frame->settings() && frame->settings()->caretBrowsi ngEnabled(); | 902 bool caretBrowsing = frame->settings() && frame->settings()->caretBrowsi ngEnabled(); |
903 return (caretBrowsing || m_anchorNode->hasEditableStyle()) && !Position: :nodeIsUserSelectNone(deprecatedNode()) && atEditingBoundary(); | 903 return (caretBrowsing || m_anchorNode->hasEditableStyle()) && !Position: :nodeIsUserSelectNone(deprecatedNode()) && atEditingBoundary(); |
904 } | 904 } |
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1366 pos.showTreeForThis(); | 1366 pos.showTreeForThis(); |
1367 } | 1367 } |
1368 | 1368 |
1369 void showTree(const blink::Position* pos) | 1369 void showTree(const blink::Position* pos) |
1370 { | 1370 { |
1371 if (pos) | 1371 if (pos) |
1372 pos->showTreeForThis(); | 1372 pos->showTreeForThis(); |
1373 } | 1373 } |
1374 | 1374 |
1375 #endif | 1375 #endif |
OLD | NEW |