[Webkit-unassigned] [Bug 100453] contentEditable: Style of List Item Leaks Through After List End

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 2 22:04:45 PDT 2013


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





--- Comment #8 from Vani Hegde <vani.hegde at samsung.com>  2013-08-02 22:04:28 PST ---
(In reply to comment #5)
> (From update of attachment 208022 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=208022&action=review
> 
> > Source/WebCore/ChangeLog:25
> > +        it would be wrong to apply this to new block which is not <li>.
> 
> Why?

Since the style has been specified particularly for <li>, wouldn't it be wrong to apply it to non <li> elements?

This example will describe it better
http://jsfiddle.net/rpkMM/
Please observe the behavior in firefox and IE.

> 
> > Source/WebCore/ChangeLog:31
> > +        If style present in <li> is due to 1, it would be wrong to apply
> > +        this to new <li>.
> 
> Why?
Example 1:
http://jsfiddle.net/JWdxC/

When we consider this example
<ul style=color:blue>
    <li>1</li> <ul style=color:red><li>a</li><li><br></li></ul>
    <li>2</li>
</ul>

Outer <ul> has a different style than that of inner <ul>. When we break out of an empty <li> present in inner <ul>, we will be creating new <li> which would be now part of outer <ul>. Shouldn't we apply the style of outer <ul> to this newly created <li>?
This is the behavior we see in firefox and this seems right.
On the other hand, we still retain the style of inner <ul> for new <li>, which apparently is part of outer <ul>

In this scenario, not passing on the style seems more appropriate.

Example 2:
But if we consider below example,
<ul>
    <li>1</li> <ul><li>a</li><li style=color:red><br></li></ul>
    <li>2</li>

</ul>

it becomes little tricky.  Here the behavior is not quite obvious and is debatable.

-- 
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