Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2008, 2009 Apple 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 814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 825 | 825 |
| 826 if (!embeddingStyle) { | 826 if (!embeddingStyle) { |
| 827 styleWithoutEmbedding = style->copy(); | 827 styleWithoutEmbedding = style->copy(); |
| 828 embeddingStyle = styleWithoutEmbedding->extractAndRemoveTextDirection(); | 828 embeddingStyle = styleWithoutEmbedding->extractAndRemoveTextDirection(); |
| 829 } | 829 } |
| 830 fixRangeAndApplyInlineStyle(embeddingStyle, embeddingApplyStart, | 830 fixRangeAndApplyInlineStyle(embeddingStyle, embeddingApplyStart, |
| 831 embeddingApplyEnd, editingState); | 831 embeddingApplyEnd, editingState); |
| 832 if (editingState->isAborted()) | 832 if (editingState->isAborted()) |
| 833 return; | 833 return; |
| 834 | 834 |
| 835 document().updateStyleAndLayoutIgnorePendingStylesheets(); | |
|
yosin_UTC9
2016/10/12 07:32:00
How about moving updateStyleAndLayoutXXX() to just
Xiaocheng
2016/10/12 07:45:56
The call at L803 seems pretty normal to me. The ne
| |
| 835 styleToApply = styleWithoutEmbedding; | 836 styleToApply = styleWithoutEmbedding; |
| 836 } | 837 } |
| 837 } | 838 } |
| 838 | 839 |
| 839 fixRangeAndApplyInlineStyle(styleToApply, start, end, editingState); | 840 fixRangeAndApplyInlineStyle(styleToApply, start, end, editingState); |
| 840 if (editingState->isAborted()) | 841 if (editingState->isAborted()) |
| 841 return; | 842 return; |
| 842 | 843 |
| 843 // Remove dummy style spans created by splitting text elements. | 844 // Remove dummy style spans created by splitting text elements. |
| 844 cleanupUnstyledAppleStyleSpans(startDummySpanAncestor, editingState); | 845 cleanupUnstyledAppleStyleSpans(startDummySpanAncestor, editingState); |
| (...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2027 | 2028 |
| 2028 DEFINE_TRACE(ApplyStyleCommand) { | 2029 DEFINE_TRACE(ApplyStyleCommand) { |
| 2029 visitor->trace(m_style); | 2030 visitor->trace(m_style); |
| 2030 visitor->trace(m_start); | 2031 visitor->trace(m_start); |
| 2031 visitor->trace(m_end); | 2032 visitor->trace(m_end); |
| 2032 visitor->trace(m_styledInlineElement); | 2033 visitor->trace(m_styledInlineElement); |
| 2033 CompositeEditCommand::trace(visitor); | 2034 CompositeEditCommand::trace(visitor); |
| 2034 } | 2035 } |
| 2035 | 2036 |
| 2036 } // namespace blink | 2037 } // namespace blink |
| OLD | NEW |