| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 fullySelectedRootStyle->style()->setProperty(CSSPropertyBack
groundImage, "url('" + fullySelectedRoot->getAttribute(backgroundAttr) + "')"); | 164 fullySelectedRootStyle->style()->setProperty(CSSPropertyBack
groundImage, "url('" + fullySelectedRoot->getAttribute(backgroundAttr) + "')"); |
| 165 | 165 |
| 166 if (fullySelectedRootStyle->style()) { | 166 if (fullySelectedRootStyle->style()) { |
| 167 // Reset the CSS properties to avoid an assertion error in a
ddStyleMarkup(). | 167 // Reset the CSS properties to avoid an assertion error in a
ddStyleMarkup(). |
| 168 // This assertion is caused at least when we select all text
of a <body> element whose | 168 // This assertion is caused at least when we select all text
of a <body> element whose |
| 169 // 'text-decoration' property is "inherit", and copy it. | 169 // 'text-decoration' property is "inherit", and copy it. |
| 170 if (!propertyMissingOrEqualToNone(fullySelectedRootStyle->st
yle(), CSSPropertyTextDecoration)) | 170 if (!propertyMissingOrEqualToNone(fullySelectedRootStyle->st
yle(), CSSPropertyTextDecoration)) |
| 171 fullySelectedRootStyle->style()->setProperty(CSSProperty
TextDecoration, CSSValueNone); | 171 fullySelectedRootStyle->style()->setProperty(CSSProperty
TextDecoration, CSSValueNone); |
| 172 if (!propertyMissingOrEqualToNone(fullySelectedRootStyle->st
yle(), CSSPropertyWebkitTextDecorationsInEffect)) | 172 if (!propertyMissingOrEqualToNone(fullySelectedRootStyle->st
yle(), CSSPropertyWebkitTextDecorationsInEffect)) |
| 173 fullySelectedRootStyle->style()->setProperty(CSSProperty
WebkitTextDecorationsInEffect, CSSValueNone); | 173 fullySelectedRootStyle->style()->setProperty(CSSProperty
WebkitTextDecorationsInEffect, CSSValueNone); |
| 174 markupAccumulator.wrapWithStyleNode(fullySelectedRootStyle->
style(), true); | 174 markupAccumulator.wrapWithStyleNode(fullySelectedRootStyle->
style()); |
| 175 } | 175 } |
| 176 } else { | 176 } else { |
| 177 // Since this node and all the other ancestors are not in the se
lection we want to set RangeFullySelectsNode to DoesNotFullySelectNode | 177 // Since this node and all the other ancestors are not in the se
lection we want to set RangeFullySelectsNode to DoesNotFullySelectNode |
| 178 // so that styles that affect the exterior of the node are not i
ncluded. | 178 // so that styles that affect the exterior of the node are not i
ncluded. |
| 179 markupAccumulator.wrapWithNode(*ancestor, StyledMarkupAccumulato
r::DoesNotFullySelectNode); | 179 markupAccumulator.wrapWithNode(*ancestor, StyledMarkupAccumulato
r::DoesNotFullySelectNode); |
| 180 } | 180 } |
| 181 | 181 |
| 182 if (ancestor == m_highestNodeToBeSerialized) | 182 if (ancestor == m_highestNodeToBeSerialized) |
| 183 break; | 183 break; |
| 184 } | 184 } |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 lastClosed = parent; | 287 lastClosed = parent; |
| 288 } | 288 } |
| 289 } | 289 } |
| 290 | 290 |
| 291 return lastClosed; | 291 return lastClosed; |
| 292 } | 292 } |
| 293 | 293 |
| 294 template class StyledMarkupSerializer<EditingStrategy>; | 294 template class StyledMarkupSerializer<EditingStrategy>; |
| 295 | 295 |
| 296 } // namespace blink | 296 } // namespace blink |
| OLD | NEW |