Commit 8a51692e authored by timothy@apple.com's avatar timothy@apple.com

Disallow the deletion UI for elements that have any overflow clipping.

        Also disallow the UI for the body element it isn't practical to delete,
        and the deletion UI would be clipped.

        <rdar://problem/6840161> Deletion UI can be clipped by some
        elements (with overflow: hidden)

        Reviewed by Darin Adler.

        * editing/DeleteButtonController.cpp:
        (WebCore::isDeletableElement):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43118 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 009544b9
2009-05-01 Timothy Hatcher <timothy@apple.com>
Disallow the deletion UI for elements that have any overflow clipping.
Also disallow the UI for the body element it isn't practical to delete,
and the deletion UI would be clipped.
<rdar://problem/6840161> Deletion UI can be clipped by some
elements (with overflow: hidden)
Reviewed by Darin Adler.
* editing/DeleteButtonController.cpp:
(WebCore::isDeletableElement):
2009-05-01 Timothy Hatcher <timothy@apple.com>
Decrease the minimum height for deleteable elements to 16px, and increase the
......@@ -77,6 +77,15 @@ static bool isDeletableElement(const Node* node)
if (!renderer || !renderer->isBox())
return false;
// Disallow the body element since it isn't practical to delete, and the deletion UI would be clipped.
if (node->hasTagName(bodyTag))
return false;
// Disallow elements with any overflow clip, since the deletion UI would be clipped as well. <rdar://problem/6840161>
if (renderer->hasOverflowClip())
return false;
// Disallow Mail blockquotes since the deletion UI would get in the way of editing for these.
if (isMailBlockquote(node))
return false;
......@@ -91,7 +100,7 @@ static bool isDeletableElement(const Node* node)
if (renderer->isTable())
return true;
if (node->hasTagName(ulTag) || node->hasTagName(olTag))
if (node->hasTagName(ulTag) || node->hasTagName(olTag) || node->hasTagName(iframeTag))
return true;
if (renderer->isPositioned())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment