#3240: Font style not correct with existed style
-----------------------------------+----------------------------------------
Reporter: garry.yao | Owner: garry.yao
Type: Bug | Status: assigned
Priority: Normal | Milestone: CKEditor 3.0
Component: General | Version:
Keywords: Confirmed IBM Review- |
-----------------------------------+----------------------------------------
Changes (by martinkou):
* keywords: Confirmed IBM Review? => Confirmed IBM Review-
Comment:
1. The performance optimization of using native compareDocumentPosition()
is a good idea - CKEDITOR.dom.node::getPosition() is used in a DFS-like
while loop in the style plugin, so performance is important there.
2. I can see you copied John Resig's compareDocumentPosition() adaptor
for IE here: http://ejohn.org/blog/comparing-document-position/. The
values returned are correct.. But please format the code better:
{{{
// e.g. If we followed John Resig's indenting... which doesn't necessarily
make sense.
function standard( a, b )
{
return a.compareDocumentPosition ?
a.compareDocumentPosition( b ) :
a.contains ?
( a != b && a.contains( b ) &&
CKEDITOR.POSITION_CONTAINS ) +
( a != b && b.contains( a ) &&
CKEDITOR.POSITION_IS_CONTAINED ) +
( a.sourceIndex >= 0 && b.sourceIndex >= 0
?
( a.sourceIndex < b.sourceIndex &&
CKEDITOR.POSITION_PRECEDING ) +
( a.sourceIndex > b.sourceIndex &&
CKEDITOR.POSITION_FOLLOWING ) :
CKEDITOR.POSITION_DISCONNECTED ) +
CKEDITOR.POSITION_IDENTICAL :
CKEDITOR.POSITION_IDENTICAL;
}
}}}
So, Review- based on minor code readability issues. The patch is otherwise
very good.
--
Ticket URL: <http://dev.fckeditor.net/ticket/3240#comment:12>
FCKeditor <http://www.fckeditor.net/>
The text editor for Internet
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac