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

Side by Side Diff: third_party/WebKit/Source/core/layout/line/BreakingContext.cpp

Issue 2614883007: Change computed style enums to be prefixed with 'k'. (Closed)
Patch Set: Rebase on ToT. Created 3 years, 11 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
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. 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
4 * All right reserved. 4 * All right reserved.
5 * Copyright (C) 2010 Google Inc. All rights reserved. 5 * Copyright (C) 2010 Google Inc. All rights reserved.
6 * Copyright (C) 2013 Adobe Systems Incorporated. 6 * Copyright (C) 2013 Adobe Systems Incorporated.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 13 matching lines...) Expand all
24 24
25 #include "core/layout/line/BreakingContextInlineHeaders.h" 25 #include "core/layout/line/BreakingContextInlineHeaders.h"
26 26
27 namespace blink { 27 namespace blink {
28 28
29 InlineIterator BreakingContext::handleEndOfLine() { 29 InlineIterator BreakingContext::handleEndOfLine() {
30 if (m_lineBreak == m_resolver.position() && 30 if (m_lineBreak == m_resolver.position() &&
31 (!m_lineBreak.getLineLayoutItem() || 31 (!m_lineBreak.getLineLayoutItem() ||
32 !m_lineBreak.getLineLayoutItem().isBR())) { 32 !m_lineBreak.getLineLayoutItem().isBR())) {
33 // we just add as much as possible 33 // we just add as much as possible
34 if (m_blockStyle->whiteSpace() == EWhiteSpace::Pre && !m_current.offset()) { 34 if (m_blockStyle->whiteSpace() == EWhiteSpace::kPre &&
35 !m_current.offset()) {
35 m_lineBreak.moveTo(m_lastObject, 36 m_lineBreak.moveTo(m_lastObject,
36 m_lastObject.isText() ? m_lastObject.length() : 0); 37 m_lastObject.isText() ? m_lastObject.length() : 0);
37 } else if (m_lineBreak.getLineLayoutItem()) { 38 } else if (m_lineBreak.getLineLayoutItem()) {
38 // Don't ever break in the middle of a word if we can help it. 39 // Don't ever break in the middle of a word if we can help it.
39 // There's no room at all. We just have to be on this line, 40 // There's no room at all. We just have to be on this line,
40 // even though we'll spill out. 41 // even though we'll spill out.
41 m_lineBreak.moveTo(m_current.getLineLayoutItem(), m_current.offset()); 42 m_lineBreak.moveTo(m_current.getLineLayoutItem(), m_current.offset());
42 } 43 }
43 } 44 }
44 45
(...skipping 19 matching lines...) Expand all
64 m_lineBreak.setOffset(m_lineBreak.offset() - 1); 65 m_lineBreak.setOffset(m_lineBreak.offset() - 1);
65 m_lineBreak.increment(); 66 m_lineBreak.increment();
66 } while (!m_lineBreak.atEnd() && 67 } while (!m_lineBreak.atEnd() &&
67 isEmptyInline(m_lineBreak.getLineLayoutItem())); 68 isEmptyInline(m_lineBreak.getLineLayoutItem()));
68 } 69 }
69 70
70 return m_lineBreak; 71 return m_lineBreak;
71 } 72 }
72 73
73 } // namespace blink 74 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698