| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
| 3 * Copyright (C) 2008, 2009, 2010, 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2008, 2009, 2010, 2011 Google Inc. All rights reserved. |
| 4 * Copyright (C) 2011 Igalia S.L. | 4 * Copyright (C) 2011 Igalia S.L. |
| 5 * Copyright (C) 2011 Motorola Mobility. All rights reserved. | 5 * Copyright (C) 2011 Motorola Mobility. All rights reserved. |
| 6 * | 6 * |
| 7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
| 8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
| 9 * are met: | 9 * are met: |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 template<typename Strategy> | 266 template<typename Strategy> |
| 267 StyledMarkupTraverser<Strategy>::StyledMarkupTraverser(StyledMarkupAccumulator*
accumulator, Node* lastClosed) | 267 StyledMarkupTraverser<Strategy>::StyledMarkupTraverser(StyledMarkupAccumulator*
accumulator, Node* lastClosed) |
| 268 : m_accumulator(accumulator) | 268 : m_accumulator(accumulator) |
| 269 , m_lastClosed(lastClosed) | 269 , m_lastClosed(lastClosed) |
| 270 , m_wrappingStyle(nullptr) | 270 , m_wrappingStyle(nullptr) |
| 271 { | 271 { |
| 272 if (!m_accumulator) { | 272 if (!m_accumulator) { |
| 273 ASSERT(!m_lastClosed); | 273 ASSERT(!m_lastClosed); |
| 274 return; | 274 return; |
| 275 } | 275 } |
| 276 ASSERT(m_lastClosed); | 276 if (!m_lastClosed) |
| 277 return; |
| 277 ContainerNode* parent = Strategy::parent(*m_lastClosed); | 278 ContainerNode* parent = Strategy::parent(*m_lastClosed); |
| 278 if (!parent) | 279 if (!parent) |
| 279 return; | 280 return; |
| 280 m_wrappingStyle = EditingStyle::wrappingStyleForSerialization(parent, should
Annotate()); | 281 m_wrappingStyle = EditingStyle::wrappingStyleForSerialization(parent, should
Annotate()); |
| 281 } | 282 } |
| 282 | 283 |
| 283 template<typename Strategy> | 284 template<typename Strategy> |
| 284 Node* StyledMarkupTraverser<Strategy>::traverse(Node* startNode, Node* pastEnd) | 285 Node* StyledMarkupTraverser<Strategy>::traverse(Node* startNode, Node* pastEnd) |
| 285 { | 286 { |
| 286 WillBeHeapVector<RawPtrWillBeMember<ContainerNode>> ancestorsToClose; | 287 WillBeHeapVector<RawPtrWillBeMember<ContainerNode>> ancestorsToClose; |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 if (element.isHTMLElement() && shouldAnnotate()) | 486 if (element.isHTMLElement() && shouldAnnotate()) |
| 486 inlineStyle->mergeStyleFromRulesForSerialization(&toHTMLElement(element)
); | 487 inlineStyle->mergeStyleFromRulesForSerialization(&toHTMLElement(element)
); |
| 487 | 488 |
| 488 return inlineStyle; | 489 return inlineStyle; |
| 489 } | 490 } |
| 490 | 491 |
| 491 template class StyledMarkupSerializer<EditingStrategy>; | 492 template class StyledMarkupSerializer<EditingStrategy>; |
| 492 template class StyledMarkupSerializer<EditingInComposedTreeStrategy>; | 493 template class StyledMarkupSerializer<EditingInComposedTreeStrategy>; |
| 493 | 494 |
| 494 } // namespace blink | 495 } // namespace blink |
| OLD | NEW |