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

Side by Side Diff: Source/core/rendering/RenderBox.cpp

Issue 59963002: Unable to delete the first and the last characters of a contenteditable div with display: table. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Adding new method to preserve old behavior. Created 7 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 4309 matching lines...) Expand 10 before | Expand all | Expand 10 after
4320 4320
4321 if (extraWidthToEndOfLine) 4321 if (extraWidthToEndOfLine)
4322 *extraWidthToEndOfLine = x() + width() - rect.maxX(); 4322 *extraWidthToEndOfLine = x() + width() - rect.maxX();
4323 4323
4324 // Move to local coords 4324 // Move to local coords
4325 rect.moveBy(-location()); 4325 rect.moveBy(-location());
4326 4326
4327 // FIXME: Border/padding should be added for all elements but this workaroun d 4327 // FIXME: Border/padding should be added for all elements but this workaroun d
4328 // is needed because we use offsets inside an "atomic" element to represent 4328 // is needed because we use offsets inside an "atomic" element to represent
4329 // positions before and after the element in deprecated editing offsets. 4329 // positions before and after the element in deprecated editing offsets.
4330 if (node() && !(editingIgnoresContent(node()) || isTableElement(node()))) { 4330 if (node() && !(editingIgnoresContent(node()) || isRenderedTable(node()))) {
4331 rect.setX(rect.x() + borderLeft() + paddingLeft()); 4331 rect.setX(rect.x() + borderLeft() + paddingLeft());
4332 rect.setY(rect.y() + paddingTop() + borderTop()); 4332 rect.setY(rect.y() + paddingTop() + borderTop());
4333 } 4333 }
4334 4334
4335 if (!isHorizontalWritingMode()) 4335 if (!isHorizontalWritingMode())
4336 return rect.transposedRect(); 4336 return rect.transposedRect();
4337 4337
4338 return rect; 4338 return rect;
4339 } 4339 }
4340 4340
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
4980 return 0; 4980 return 0;
4981 4981
4982 if (!layoutState && !flowThreadContainingBlock()) 4982 if (!layoutState && !flowThreadContainingBlock())
4983 return 0; 4983 return 0;
4984 4984
4985 RenderBlock* containerBlock = containingBlock(); 4985 RenderBlock* containerBlock = containingBlock();
4986 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); 4986 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop();
4987 } 4987 }
4988 4988
4989 } // namespace WebCore 4989 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698