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

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

Issue 1140153006: Remove Navigation Transitions from Blink. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Removed layout tests. Created 5 years, 7 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/HTMLInterchange.h ('k') | Source/core/editing/StyledMarkupSerializer.cpp » ('j') | 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 newInlineStyle = EditingStyle::create(); 173 newInlineStyle = EditingStyle::create();
174 } 174 }
175 175
176 if (element.isStyledElement() && element.inlineStyle()) 176 if (element.isStyledElement() && element.inlineStyle())
177 newInlineStyle->overrideWithStyle(element.inlineStyle()); 177 newInlineStyle->overrideWithStyle(element.inlineStyle());
178 178
179 if (shouldAnnotateOrForceInline) { 179 if (shouldAnnotateOrForceInline) {
180 if (shouldAnnotate()) 180 if (shouldAnnotate())
181 newInlineStyle->mergeStyleFromRulesForSerialization(&toHTMLEleme nt(element)); 181 newInlineStyle->mergeStyleFromRulesForSerialization(&toHTMLEleme nt(element));
182 182
183 if (&element == m_highestNodeToBeSerialized && m_shouldAnnotate == A nnotateForNavigationTransition)
184 newInlineStyle->addAbsolutePositioningFromElement(element);
185
186 if (addDisplayInline) 183 if (addDisplayInline)
187 newInlineStyle->forceInline(); 184 newInlineStyle->forceInline();
188 185
189 // If the node is not fully selected by the range, then we don't wan t to keep styles that affect its relationship to the nodes around it 186 // If the node is not fully selected by the range, then we don't wan t to keep styles that affect its relationship to the nodes around it
190 // only the ones that affect it and the nodes within it. 187 // only the ones that affect it and the nodes within it.
191 if (rangeFullySelectsNode == DoesNotFullySelectNode && newInlineStyl e->style()) 188 if (rangeFullySelectsNode == DoesNotFullySelectNode && newInlineStyl e->style())
192 newInlineStyle->style()->removeProperty(CSSPropertyFloat); 189 newInlineStyle->style()->removeProperty(CSSPropertyFloat);
193 } 190 }
194 191
195 if (!newInlineStyle->isEmpty()) { 192 if (!newInlineStyle->isEmpty()) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 243
247 bool StyledMarkupAccumulator::shouldApplyWrappingStyle(const Node& node) const 244 bool StyledMarkupAccumulator::shouldApplyWrappingStyle(const Node& node) const
248 { 245 {
249 // TODO(hajimehoshi): Use Strategy 246 // TODO(hajimehoshi): Use Strategy
250 return m_highestNodeToBeSerialized && m_highestNodeToBeSerialized->parentNod e() == node.parentNode() 247 return m_highestNodeToBeSerialized && m_highestNodeToBeSerialized->parentNod e() == node.parentNode()
251 && m_wrappingStyle && m_wrappingStyle->style(); 248 && m_wrappingStyle && m_wrappingStyle->style();
252 } 249 }
253 250
254 bool StyledMarkupAccumulator::shouldAnnotate() const 251 bool StyledMarkupAccumulator::shouldAnnotate() const
255 { 252 {
256 return m_shouldAnnotate == AnnotateForInterchange || m_shouldAnnotate == Ann otateForNavigationTransition; 253 return m_shouldAnnotate == AnnotateForInterchange;
257 } 254 }
258 255
259 } // namespace blink 256 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/editing/HTMLInterchange.h ('k') | Source/core/editing/StyledMarkupSerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698