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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 appendAttribute(out, element, *it, 0); | 301 appendAttribute(out, element, *it, 0); |
302 } | 302 } |
303 } | 303 } |
304 | 304 |
305 if (shouldOverrideStyleAttr) { | 305 if (shouldOverrideStyleAttr) { |
306 RefPtrWillBeRawPtr<EditingStyle> newInlineStyle = nullptr; | 306 RefPtrWillBeRawPtr<EditingStyle> newInlineStyle = nullptr; |
307 | 307 |
308 if (shouldApplyWrappingStyle(element)) { | 308 if (shouldApplyWrappingStyle(element)) { |
309 newInlineStyle = m_wrappingStyle->copy(); | 309 newInlineStyle = m_wrappingStyle->copy(); |
310 newInlineStyle->removePropertiesInElementDefaultStyle(&element); | 310 newInlineStyle->removePropertiesInElementDefaultStyle(&element); |
311 newInlineStyle->removeStyleConflictingWithStyleOfNode(&element); | 311 newInlineStyle->removeStyleConflictingWithStyleOfElement(&element); |
312 } else | 312 } else |
313 newInlineStyle = EditingStyle::create(); | 313 newInlineStyle = EditingStyle::create(); |
314 | 314 |
315 if (element.isStyledElement() && element.inlineStyle()) | 315 if (element.isStyledElement() && element.inlineStyle()) |
316 newInlineStyle->overrideWithStyle(element.inlineStyle()); | 316 newInlineStyle->overrideWithStyle(element.inlineStyle()); |
317 | 317 |
318 if (shouldAnnotateOrForceInline) { | 318 if (shouldAnnotateOrForceInline) { |
319 if (shouldAnnotate()) | 319 if (shouldAnnotate()) |
320 newInlineStyle->mergeStyleFromRulesForSerialization(&toHTMLEleme
nt(element)); | 320 newInlineStyle->mergeStyleFromRulesForSerialization(&toHTMLEleme
nt(element)); |
321 | 321 |
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1112 node->document().updateLayoutIgnorePendingStylesheets(); | 1112 node->document().updateLayoutIgnorePendingStylesheets(); |
1113 | 1113 |
1114 StyledMarkupAccumulator accumulator(0, ResolveAllURLs, AnnotateForNavigation
Transition, nullptr, 0); | 1114 StyledMarkupAccumulator accumulator(0, ResolveAllURLs, AnnotateForNavigation
Transition, nullptr, 0); |
1115 accumulator.serializeNodes(node, NodeTraversal::nextSkippingChildren(*node))
; | 1115 accumulator.serializeNodes(node, NodeTraversal::nextSkippingChildren(*node))
; |
1116 | 1116 |
1117 static const char* documentMarkup = "<!DOCTYPE html><meta name=\"viewport\"
content=\"width=device-width, user-scalable=0\">"; | 1117 static const char* documentMarkup = "<!DOCTYPE html><meta name=\"viewport\"
content=\"width=device-width, user-scalable=0\">"; |
1118 return documentMarkup + accumulator.takeResults(); | 1118 return documentMarkup + accumulator.takeResults(); |
1119 } | 1119 } |
1120 | 1120 |
1121 } | 1121 } |
OLD | NEW |