Skip to content

Commit

Permalink
Revert of RenderFlexibleBox should be treated as a candidate for visi…
Browse files Browse the repository at this point in the history
…ble position. (patchset #1 id:1 of https://codereview.chromium.org/897633002/)

Reason for revert:
Revert for now until the fix is ready. Will also be reverted on release branch.

Original issue's description:
> RenderFlexibleBox should be treated as a candidate for visible position.
> 
> Visible selection in an editable area is recalculated whenever an inner value of div is changed.
> If the inner value is empty, the visible selection recalculated with DeleteSelectionCommand::m_endingPostion
> is not correct. Because RenderBlockFlow is only considered but not RenderFlexibleBox in Position::isCandidate
> so that a calculated ending VisiblePosition for an editable div having ‘display : flex’ goes weird
> and VisibleSelection is empty accordingly.
> 
> BUG=450617
> 
> Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=189482

TBR=sigbjornf@opera.com,rego@igalia.com,shivamidow@gmail.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=450617

Review URL: https://codereview.chromium.org/1060113002

git-svn-id: svn://svn.chromium.org/blink/trunk@193212 bbb929c8-8fbe-4397-9dbb-9b2b20218538
  • Loading branch information
eaenet committed Apr 6, 2015
1 parent 34b64f0 commit dfbb008
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 54 deletions.

This file was deleted.

46 changes: 0 additions & 46 deletions LayoutTests/fast/events/key-events-in-editable-flexbox.html

This file was deleted.

2 changes: 1 addition & 1 deletion Source/core/dom/Position.cpp
Expand Up @@ -891,7 +891,7 @@ bool Position::isCandidate() const
if (isHTMLHtmlElement(*m_anchorNode))
return false;

if (renderer->isLayoutBlockFlow() || renderer->isFlexibleBox() || renderer->isLayoutGrid()) {
if (renderer->isLayoutBlockFlow() || renderer->isLayoutGrid()) {
if (toLayoutBlock(renderer)->logicalHeight() || isHTMLBodyElement(*m_anchorNode)) {
if (!Position::hasRenderedNonAnonymousDescendantsWithHeight(renderer))
return atFirstEditingPositionForNode() && !Position::nodeIsUserSelectNone(deprecatedNode());
Expand Down

0 comments on commit dfbb008

Please sign in to comment.