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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 if (convertBlocksToInlines() && isEnclosingBlock(&node)) | 398 if (convertBlocksToInlines() && isEnclosingBlock(&node)) |
399 inlineStyle->forceInline(); | 399 inlineStyle->forceInline(); |
400 return inlineStyle; | 400 return inlineStyle; |
401 } | 401 } |
402 | 402 |
403 template<typename Strategy> | 403 template<typename Strategy> |
404 void StyledMarkupTraverser<Strategy>::appendStartMarkup(Node& node) | 404 void StyledMarkupTraverser<Strategy>::appendStartMarkup(Node& node) |
405 { | 405 { |
406 if (!m_accumulator) | 406 if (!m_accumulator) |
407 return; | 407 return; |
408 switch (node.nodeType()) { | 408 switch (node.getNodeType()) { |
409 case Node::TEXT_NODE: { | 409 case Node::TEXT_NODE: { |
410 Text& text = toText(node); | 410 Text& text = toText(node); |
411 if (text.parentElement() && isHTMLTextAreaElement(text.parentElement()))
{ | 411 if (text.parentElement() && isHTMLTextAreaElement(text.parentElement()))
{ |
412 m_accumulator->appendText(text); | 412 m_accumulator->appendText(text); |
413 break; | 413 break; |
414 } | 414 } |
415 RefPtrWillBeRawPtr<EditingStyle> inlineStyle = nullptr; | 415 RefPtrWillBeRawPtr<EditingStyle> inlineStyle = nullptr; |
416 if (shouldApplyWrappingStyle(text)) { | 416 if (shouldApplyWrappingStyle(text)) { |
417 inlineStyle = m_wrappingStyle->copy(); | 417 inlineStyle = m_wrappingStyle->copy(); |
418 // FIXME: <rdar://problem/5371536> Style rules that match pasted con
tent can change it's appearance | 418 // FIXME: <rdar://problem/5371536> Style rules that match pasted con
tent can change it's appearance |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 if (element.isHTMLElement() && shouldAnnotate()) | 474 if (element.isHTMLElement() && shouldAnnotate()) |
475 inlineStyle->mergeStyleFromRulesForSerialization(&toHTMLElement(element)
); | 475 inlineStyle->mergeStyleFromRulesForSerialization(&toHTMLElement(element)
); |
476 | 476 |
477 return inlineStyle; | 477 return inlineStyle; |
478 } | 478 } |
479 | 479 |
480 template class StyledMarkupSerializer<EditingStrategy>; | 480 template class StyledMarkupSerializer<EditingStrategy>; |
481 template class StyledMarkupSerializer<EditingInFlatTreeStrategy>; | 481 template class StyledMarkupSerializer<EditingInFlatTreeStrategy>; |
482 | 482 |
483 } // namespace blink | 483 } // namespace blink |
OLD | NEW |