[Webkit-unassigned] [Bug 7360] Styling spans not removed after deleting all content

bugzilla-daemon at opendarwin.org bugzilla-daemon at opendarwin.org
Fri Mar 3 13:02:16 PST 2006


http://bugzilla.opendarwin.org/show_bug.cgi?id=7360





------- Comment #6 from Graham.Dennis at gmail.com  2006-03-03 13:02 PDT -------
I've had a look at this, and the problem seems to be caused when
DeleteSelectionCommand::calculateTypingStyleAfterDelete applies the typing
style to the placeholder element. However, I can't figure out how to calculate
the correct style. Consider the following two cases:
1: Type three lines, bold all three, and delete the text in the middle line.
2: Type three lines, bold just the first and third lines, and delete the text
in the middle line.
In case 1, after moving the caret away and back again, new text on the second
line should be bold. In case 2, after moving the caret away and back again, new
text on the second line should not be bold. In HTML, it will be difficult to
tell the difference between case 1 and case 2 because all tags must be nested,
and because the newlines aren't <br/>'s, but each paragraph is a block element,
there must be a boldface tag for each line separately. So how can we tell the
difference between these cases in HTML? For the given two cases, it looks like
one solution might be to use the current typing style (this is what is done in
the code at present), but consider a third case:
3: Type three lines, bold all three, unbold the middle line, now delete the
text in the middle line.
In this case, after clicking away and back again, the text should be bold,
which is not the previous typing style.
Ideas anyone?


-- 
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list