Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: Source/core/editing/markup.cpp

Issue 423673002: Use tighter typing in editing: EditingStyle (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove isHTMLElement() check Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/editing/RemoveFormatCommand.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 appendAttribute(out, element, *it, 0); 306 appendAttribute(out, element, *it, 0);
307 } 307 }
308 } 308 }
309 309
310 if (shouldOverrideStyleAttr) { 310 if (shouldOverrideStyleAttr) {
311 RefPtrWillBeRawPtr<EditingStyle> newInlineStyle = nullptr; 311 RefPtrWillBeRawPtr<EditingStyle> newInlineStyle = nullptr;
312 312
313 if (shouldApplyWrappingStyle(element)) { 313 if (shouldApplyWrappingStyle(element)) {
314 newInlineStyle = m_wrappingStyle->copy(); 314 newInlineStyle = m_wrappingStyle->copy();
315 newInlineStyle->removePropertiesInElementDefaultStyle(&element); 315 newInlineStyle->removePropertiesInElementDefaultStyle(&element);
316 newInlineStyle->removeStyleConflictingWithStyleOfNode(&element); 316 newInlineStyle->removeStyleConflictingWithStyleOfElement(&element);
317 } else 317 } else
318 newInlineStyle = EditingStyle::create(); 318 newInlineStyle = EditingStyle::create();
319 319
320 if (element.isStyledElement() && element.inlineStyle()) 320 if (element.isStyledElement() && element.inlineStyle())
321 newInlineStyle->overrideWithStyle(element.inlineStyle()); 321 newInlineStyle->overrideWithStyle(element.inlineStyle());
322 322
323 if (shouldAnnotateOrForceInline) { 323 if (shouldAnnotateOrForceInline) {
324 if (shouldAnnotate()) 324 if (shouldAnnotate())
325 newInlineStyle->mergeStyleFromRulesForSerialization(&toHTMLEleme nt(element)); 325 newInlineStyle->mergeStyleFromRulesForSerialization(&toHTMLEleme nt(element));
326 326
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
1109 node->document().updateLayoutIgnorePendingStylesheets(); 1109 node->document().updateLayoutIgnorePendingStylesheets();
1110 1110
1111 StyledMarkupAccumulator accumulator(0, ResolveAllURLs, AnnotateForNavigation Transition, nullptr, 0); 1111 StyledMarkupAccumulator accumulator(0, ResolveAllURLs, AnnotateForNavigation Transition, nullptr, 0);
1112 accumulator.serializeNodes(node, NodeTraversal::nextSkippingChildren(*node)) ; 1112 accumulator.serializeNodes(node, NodeTraversal::nextSkippingChildren(*node)) ;
1113 1113
1114 static const char* documentMarkup = "<!DOCTYPE html><meta name=\"viewport\" content=\"width=device-width, user-scalable=0\">"; 1114 static const char* documentMarkup = "<!DOCTYPE html><meta name=\"viewport\" content=\"width=device-width, user-scalable=0\">";
1115 return documentMarkup + accumulator.takeResults(); 1115 return documentMarkup + accumulator.takeResults();
1116 } 1116 }
1117 1117
1118 } 1118 }
OLDNEW
« no previous file with comments | « Source/core/editing/RemoveFormatCommand.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698