| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * Copyright (C) 2008, 2009, 2010, 2011 Google Inc. All rights reserved. | 4 * Copyright (C) 2008, 2009, 2010, 2011 Google Inc. All rights reserved. |
| 5 * Copyright (C) 2011 Igalia S.L. | 5 * Copyright (C) 2011 Igalia S.L. |
| 6 * Copyright (C) 2011 Motorola Mobility. All rights reserved. | 6 * Copyright (C) 2011 Motorola Mobility. All rights reserved. |
| 7 * | 7 * |
| 8 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
| 9 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
| 10 * are met: | 10 * are met: |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 next = Strategy::nextSkippingChildren(*n); | 355 next = Strategy::nextSkippingChildren(*n); |
| 356 // Don't skip over pastEnd. | 356 // Don't skip over pastEnd. |
| 357 if (pastEnd && Strategy::isDescendantOf(*pastEnd, *n)) | 357 if (pastEnd && Strategy::isDescendantOf(*pastEnd, *n)) |
| 358 next = pastEnd; | 358 next = pastEnd; |
| 359 } else { | 359 } else { |
| 360 // Add the node to the markup if we're not skipping the descendants | 360 // Add the node to the markup if we're not skipping the descendants |
| 361 appendStartMarkup(*n); | 361 appendStartMarkup(*n); |
| 362 | 362 |
| 363 // If node has no children, close the tag now. | 363 // If node has no children, close the tag now. |
| 364 if (Strategy::hasChildren(*n)) { | 364 if (Strategy::hasChildren(*n)) { |
| 365 ancestorsToClose.append(toContainerNode(n)); | 365 ancestorsToClose.push_back(toContainerNode(n)); |
| 366 continue; | 366 continue; |
| 367 } | 367 } |
| 368 appendEndMarkup(*n); | 368 appendEndMarkup(*n); |
| 369 lastClosed = n; | 369 lastClosed = n; |
| 370 } | 370 } |
| 371 } | 371 } |
| 372 | 372 |
| 373 // If we didn't insert open tag and there's no more siblings or we're at the | 373 // If we didn't insert open tag and there's no more siblings or we're at the |
| 374 // end of the traversal, take care of ancestors. | 374 // end of the traversal, take care of ancestors. |
| 375 // FIXME: What happens if we just inserted open tag and reached the end? | 375 // FIXME: What happens if we just inserted open tag and reached the end? |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 if (element.isHTMLElement() && shouldAnnotate()) | 538 if (element.isHTMLElement() && shouldAnnotate()) |
| 539 inlineStyle->mergeStyleFromRulesForSerialization(&toHTMLElement(element)); | 539 inlineStyle->mergeStyleFromRulesForSerialization(&toHTMLElement(element)); |
| 540 | 540 |
| 541 return inlineStyle; | 541 return inlineStyle; |
| 542 } | 542 } |
| 543 | 543 |
| 544 template class StyledMarkupSerializer<EditingStrategy>; | 544 template class StyledMarkupSerializer<EditingStrategy>; |
| 545 template class StyledMarkupSerializer<EditingInFlatTreeStrategy>; | 545 template class StyledMarkupSerializer<EditingInFlatTreeStrategy>; |
| 546 | 546 |
| 547 } // namespace blink | 547 } // namespace blink |
| OLD | NEW |