[webkit-reviews] review requested: [Bug 7245] caret does not display at the end of some lines in contenteditable divs : [Attachment 6592] patch 2

bugzilla-request-daemon at opendarwin.org bugzilla-request-daemon at opendarwin.org
Sat Feb 18 15:33:21 PST 2006


Graham Dennis <Graham.Dennis at gmail.com> has asked Justin Garcia
<justin.garcia at apple.com> for review:
Bug 7245: caret does not display at the end of some lines in contenteditable
divs
http://bugzilla.opendarwin.org/show_bug.cgi?id=7245

Attachment 6592: patch 2
http://bugzilla.opendarwin.org/attachment.cgi?id=6592&action=edit

------- Additional Comments from Graham Dennis <Graham.Dennis at gmail.com>
New patch.

In this patch, instead of modifying the inlineStyleDecl of an element, I've
modified setContentEditable (called by parseMappedAttribute) to add in the
editing CSS properties. I've modified Frame::applyEditingStyleToElement (and
removeEditingStyle) to simply call setContentEditable on the element. This way
the inline style doesn't get blown away. Also, this way, the editing style can
be overridden by the inline style of the element.

This patch breaks many layout tests as it adds a space to the end of each line
in a contentEditable div. The vast majority of the problems are simply adding a
space and increasing the width of the rendered element (or its parents).
However, for two layout tests, this is not the case:
fast/overflow/overflow-focus-ring
fast/text/justified-text-rect

For the overflow-focus-ring test, the periods change from being on a single
line to being on many lines. This is caused by the "word-wrap: break-word"
style.

For the justified-text-rect test, the test checks that text is justified
correctly, however "-khtml-nbsp-mode: space" interferes with this. To be
honest, I don't know what "-khtml-nbsp-mode: space" does and whether the layout
test needs to be changed, the patch, or something else.



More information about the webkit-reviews mailing list