[Webkit-unassigned] [Bug 27038] htmlediting.cpp needs more utility functions to fix the bug 26816

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 7 15:09:39 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=27038





--- Comment #7 from Julie Parent <jparent at google.com>  2009-07-07 15:09:39 PDT ---
(From update of attachment 32395)
> Index: WebCore/editing/htmlediting.cpp
> ===================================================================
> --- WebCore/editing/htmlediting.cpp	(revision 45564)
> +++ WebCore/editing/htmlediting.cpp	(working copy)
> @@ -207,6 +207,15 @@ Element* editableRootForPosition(const P
>      return node->rootEditableElement();
>  }
>  
> +// Find the unsplittable element enclosing the specified position.
> +// The returned element is either table cell or root editable node.

Sorry I wasn't more clear before.  I asked for function level comments because
it wasn't clear to me from the function names what they should/should not be
used for.  These comments only repeat the function names, which isn't much more
useful.  For example, what does it mean to be an unsplittable element?

> +Element* unsplittableElementForPosition(const Position& p)
> +{
> +    Element* enclosingCell = static_cast<Element*>(enclosingNodeOfType(p, &isTableCell));
> +    
> +    return enclosingCell ? enclosingCell : editableRootForPosition(p);
> +}

This isn't quite right - what if the editableRoot is inside of the td?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list