| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved. | 2  * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved. | 
| 3  * | 3  * | 
| 4  * Redistribution and use in source and binary forms, with or without | 4  * Redistribution and use in source and binary forms, with or without | 
| 5  * modification, are permitted provided that the following conditions | 5  * modification, are permitted provided that the following conditions | 
| 6  * are met: | 6  * are met: | 
| 7  * 1. Redistributions of source code must retain the above copyright | 7  * 1. Redistributions of source code must retain the above copyright | 
| 8  *    notice, this list of conditions and the following disclaimer. | 8  *    notice, this list of conditions and the following disclaimer. | 
| 9  * 2. Redistributions in binary form must reproduce the above copyright | 9  * 2. Redistributions in binary form must reproduce the above copyright | 
| 10  *    notice, this list of conditions and the following disclaimer in the | 10  *    notice, this list of conditions and the following disclaimer in the | 
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 93 | 93 | 
| 94     if (wasEndOfParagraph && !isEndOfParagraph(lastParagraphInBlockNode) && !isS
     tartOfParagraph(lastParagraphInBlockNode)) | 94     if (wasEndOfParagraph && !isEndOfParagraph(lastParagraphInBlockNode) && !isS
     tartOfParagraph(lastParagraphInBlockNode)) | 
| 95         insertBlockPlaceholder(lastParagraphInBlockNode); | 95         insertBlockPlaceholder(lastParagraphInBlockNode); | 
| 96 } | 96 } | 
| 97 | 97 | 
| 98 Element* FormatBlockCommand::elementForFormatBlockCommand(Range* range) | 98 Element* FormatBlockCommand::elementForFormatBlockCommand(Range* range) | 
| 99 { | 99 { | 
| 100     if (!range) | 100     if (!range) | 
| 101         return 0; | 101         return 0; | 
| 102 | 102 | 
| 103     Node* commonAncestor = range->commonAncestorContainer(IGNORE_EXCEPTION_STATE
     ); | 103     Node* commonAncestor = range->commonAncestorContainer(IGNORE_EXCEPTION); | 
| 104     while (commonAncestor && !isElementForFormatBlock(commonAncestor)) | 104     while (commonAncestor && !isElementForFormatBlock(commonAncestor)) | 
| 105         commonAncestor = commonAncestor->parentNode(); | 105         commonAncestor = commonAncestor->parentNode(); | 
| 106 | 106 | 
| 107     if (!commonAncestor) | 107     if (!commonAncestor) | 
| 108         return 0; | 108         return 0; | 
| 109 | 109 | 
| 110     Element* rootEditableElement = range->startContainer()->rootEditableElement(
     ); | 110     Element* rootEditableElement = range->startContainer()->rootEditableElement(
     ); | 
| 111     if (!rootEditableElement || commonAncestor->contains(rootEditableElement)) | 111     if (!rootEditableElement || commonAncestor->contains(rootEditableElement)) | 
| 112         return 0; | 112         return 0; | 
| 113 | 113 | 
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 154             return n; | 154             return n; | 
| 155         if (isBlock(n)) | 155         if (isBlock(n)) | 
| 156             lastBlock = n; | 156             lastBlock = n; | 
| 157         if (isListElement(n)) | 157         if (isListElement(n)) | 
| 158             return n->parentNode()->rendererIsEditable() ? n->parentNode() : n; | 158             return n->parentNode()->rendererIsEditable() ? n->parentNode() : n; | 
| 159     } | 159     } | 
| 160     return lastBlock; | 160     return lastBlock; | 
| 161 } | 161 } | 
| 162 | 162 | 
| 163 } | 163 } | 
| OLD | NEW | 
|---|