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

Side by Side Diff: Source/core/layout/line/BreakingContextInlineHeaders.h

Issue 1159623007: Don't auto-wrap <svg:text> (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | « LayoutTests/svg/text/white-space-no-autowrap-expected.html ('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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ight reserved. 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ight reserved.
4 * Copyright (C) 2010 Google Inc. All rights reserved. 4 * Copyright (C) 2010 Google Inc. All rights reserved.
5 * Copyright (C) 2013 Adobe Systems Incorporated. 5 * Copyright (C) 2013 Adobe Systems Incorporated.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 inline void BreakingContext::initializeForCurrentObject() 241 inline void BreakingContext::initializeForCurrentObject()
242 { 242 {
243 m_currentStyle = m_current.object()->style(); 243 m_currentStyle = m_current.object()->style();
244 m_nextObject = bidiNextSkippingEmptyInlines(m_block, m_current.object()); 244 m_nextObject = bidiNextSkippingEmptyInlines(m_block, m_current.object());
245 if (m_nextObject && m_nextObject->parent() && !m_nextObject->parent()->isDes cendantOf(m_current.object()->parent())) 245 if (m_nextObject && m_nextObject->parent() && !m_nextObject->parent()->isDes cendantOf(m_current.object()->parent()))
246 m_includeEndWidth = true; 246 m_includeEndWidth = true;
247 247
248 m_currWS = m_current.object()->isReplaced() ? m_current.object()->parent()-> style()->whiteSpace() : m_currentStyle->whiteSpace(); 248 m_currWS = m_current.object()->isReplaced() ? m_current.object()->parent()-> style()->whiteSpace() : m_currentStyle->whiteSpace();
249 m_lastWS = m_lastObject->isReplaced() ? m_lastObject->parent()->style()->whi teSpace() : m_lastObject->style()->whiteSpace(); 249 m_lastWS = m_lastObject->isReplaced() ? m_lastObject->parent()->style()->whi teSpace() : m_lastObject->style()->whiteSpace();
250 250
251 m_autoWrap = ComputedStyle::autoWrap(m_currWS); 251 bool isSVGText = m_current.object()->isSVGInlineText();
252 m_autoWrap = !isSVGText && ComputedStyle::autoWrap(m_currWS);
252 m_autoWrapWasEverTrueOnLine = m_autoWrapWasEverTrueOnLine || m_autoWrap; 253 m_autoWrapWasEverTrueOnLine = m_autoWrapWasEverTrueOnLine || m_autoWrap;
253 254
254 m_preservesNewline = m_current.object()->isSVGInlineText() ? false : Compute dStyle::preserveNewline(m_currWS); 255 m_preservesNewline = !isSVGText && ComputedStyle::preserveNewline(m_currWS);
255 256
256 m_collapseWhiteSpace = ComputedStyle::collapseWhiteSpace(m_currWS); 257 m_collapseWhiteSpace = ComputedStyle::collapseWhiteSpace(m_currWS);
257 } 258 }
258 259
259 inline void BreakingContext::increment() 260 inline void BreakingContext::increment()
260 { 261 {
261 // Clear out our character space bool, since inline <pre>s don't collapse wh itespace 262 // Clear out our character space bool, since inline <pre>s don't collapse wh itespace
262 // with adjacent inline normal/nowrap spans. 263 // with adjacent inline normal/nowrap spans.
263 if (!m_collapseWhiteSpace) 264 if (!m_collapseWhiteSpace)
264 m_currentCharacterIsSpace = false; 265 m_currentCharacterIsSpace = false;
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 899
899 if (style.textIndentType() == TextIndentHanging) 900 if (style.textIndentType() == TextIndentHanging)
900 shouldIndentText = shouldIndentText == IndentText ? DoNotIndentText : In dentText; 901 shouldIndentText = shouldIndentText == IndentText ? DoNotIndentText : In dentText;
901 902
902 return shouldIndentText; 903 return shouldIndentText;
903 } 904 }
904 905
905 } 906 }
906 907
907 #endif // BreakingContextInlineHeaders_h 908 #endif // BreakingContextInlineHeaders_h
OLDNEW
« no previous file with comments | « LayoutTests/svg/text/white-space-no-autowrap-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698