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

Side by Side Diff: Source/core/dom/Text.cpp

Issue 755613002: Fix assertion: !visualMetricsValues.isEmpty() in layoutTextOnLineOrPath (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 250
251 if (style.display() == NONE) 251 if (style.display() == NONE)
252 return false; 252 return false;
253 253
254 if (!containsOnlyWhitespace()) 254 if (!containsOnlyWhitespace())
255 return true; 255 return true;
256 256
257 if (!parent.canHaveWhitespaceChildren()) 257 if (!parent.canHaveWhitespaceChildren())
258 return false; 258 return false;
259 259
260 if (style.whiteSpace() == PRE_WRAP && parent.isSVG()) // pre-wrap in SVG nev er makes renderer.
kouhei (in TOK) 2014/12/09 09:15:23 Should we also care about pre/pre-line?
fs 2014/12/09 10:18:32 All cases in which the metrics builder will end up
261 return false;
262
260 if (style.preserveNewline()) // pre/pre-wrap/pre-line always make renderers. 263 if (style.preserveNewline()) // pre/pre-wrap/pre-line always make renderers.
261 return true; 264 return true;
262 265
263 const RenderObject* prev = NodeRenderingTraversal::previousSiblingRenderer(t his); 266 const RenderObject* prev = NodeRenderingTraversal::previousSiblingRenderer(t his);
264 if (prev && prev->isBR()) // <span><br/> <br/></span> 267 if (prev && prev->isBR()) // <span><br/> <br/></span>
265 return false; 268 return false;
266 269
267 if (parent.isRenderInline()) { 270 if (parent.isRenderInline()) {
268 // <span><div/> <div/></span> 271 // <span><div/> <div/></span>
269 if (prev && !prev->isInline()) 272 if (prev && !prev->isInline())
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 result.appendLiteral("; "); 404 result.appendLiteral("; ");
402 result.appendLiteral("value="); 405 result.appendLiteral("value=");
403 result.append(s); 406 result.append(s);
404 } 407 }
405 408
406 strncpy(buffer, result.toString().utf8().data(), length - 1); 409 strncpy(buffer, result.toString().utf8().data(), length - 1);
407 } 410 }
408 #endif 411 #endif
409 412
410 } // namespace blink 413 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698