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

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

Issue 897633002: RenderFlexibleBox should be treated as a candidate for visible position. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « LayoutTests/fast/events/key-events-in-editable-flexbox-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 // associated renderer returns isText() true, e.g. RenderSVGInlineText. 848 // associated renderer returns isText() true, e.g. RenderSVGInlineText.
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->isRenderBlockFlow()) { 858 if (renderer->isRenderBlockFlow() || renderer->isFlexibleBox()) {
Manuel Rego 2015/02/10 22:31:37 I think this is failing for grid too. Could you fi
Manuel Rego 2015/02/10 22:43:24 Mmmm, I've just realized that this won't make any
859 if (toRenderBlock(renderer)->logicalHeight() || isHTMLBodyElement(*m_anc horNode)) { 859 if (toRenderBlock(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
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
OLDNEW
« no previous file with comments | « LayoutTests/fast/events/key-events-in-editable-flexbox-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698