| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (C) 1999 Lars Knoll (knoll@kde.org) | 2 * (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Dirk Mueller (mueller@kde.org) | 3 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
| 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) | 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) |
| 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 // create anonymous layoutObject. | 167 // create anonymous layoutObject. |
| 168 // They should be switched to passing null and using setDocumentForAnonymous. | 168 // They should be switched to passing null and using setDocumentForAnonymous. |
| 169 if (node && node->isDocumentNode()) | 169 if (node && node->isDocumentNode()) |
| 170 setDocumentForAnonymous(toDocument(node)); | 170 setDocumentForAnonymous(toDocument(node)); |
| 171 | 171 |
| 172 setIsText(); | 172 setIsText(); |
| 173 | 173 |
| 174 view()->frameView()->incrementVisuallyNonEmptyCharacterCount(m_text.length()); | 174 view()->frameView()->incrementVisuallyNonEmptyCharacterCount(m_text.length()); |
| 175 } | 175 } |
| 176 | 176 |
| 177 #if ENABLE(ASSERT) | 177 #if DCHECK_IS_ON() |
| 178 | 178 |
| 179 LayoutText::~LayoutText() { | 179 LayoutText::~LayoutText() { |
| 180 ASSERT(!m_firstTextBox); | 180 ASSERT(!m_firstTextBox); |
| 181 ASSERT(!m_lastTextBox); | 181 ASSERT(!m_lastTextBox); |
| 182 } | 182 } |
| 183 | 183 |
| 184 #endif | 184 #endif |
| 185 | 185 |
| 186 bool LayoutText::isTextFragment() const { | 186 bool LayoutText::isTextFragment() const { |
| 187 return false; | 187 return false; |
| (...skipping 1754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1942 return maxOffset; | 1942 return maxOffset; |
| 1943 } | 1943 } |
| 1944 | 1944 |
| 1945 unsigned LayoutText::resolvedTextLength() const { | 1945 unsigned LayoutText::resolvedTextLength() const { |
| 1946 int len = 0; | 1946 int len = 0; |
| 1947 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) | 1947 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) |
| 1948 len += box->len(); | 1948 len += box->len(); |
| 1949 return len; | 1949 return len; |
| 1950 } | 1950 } |
| 1951 | 1951 |
| 1952 #if ENABLE(ASSERT) | 1952 #if DCHECK_IS_ON() |
| 1953 | 1953 |
| 1954 void LayoutText::checkConsistency() const { | 1954 void LayoutText::checkConsistency() const { |
| 1955 #ifdef CHECK_CONSISTENCY | 1955 #ifdef CHECK_CONSISTENCY |
| 1956 const InlineTextBox* prev = nullptr; | 1956 const InlineTextBox* prev = nullptr; |
| 1957 for (const InlineTextBox* child = m_firstTextBox; child; | 1957 for (const InlineTextBox* child = m_firstTextBox; child; |
| 1958 child = child->nextTextBox()) { | 1958 child = child->nextTextBox()) { |
| 1959 ASSERT(child->getLineLayoutItem().isEqual(this)); | 1959 ASSERT(child->getLineLayoutItem().isEqual(this)); |
| 1960 ASSERT(child->prevTextBox() == prev); | 1960 ASSERT(child->prevTextBox() == prev); |
| 1961 prev = child; | 1961 prev = child; |
| 1962 } | 1962 } |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2006 LayoutRect rect = LayoutRect( | 2006 LayoutRect rect = LayoutRect( |
| 2007 IntRect(firstRunX(), firstRunY(), linesBox.width(), linesBox.height())); | 2007 IntRect(firstRunX(), firstRunY(), linesBox.width(), linesBox.height())); |
| 2008 LayoutBlock* block = containingBlock(); | 2008 LayoutBlock* block = containingBlock(); |
| 2009 if (block && hasTextBoxes()) | 2009 if (block && hasTextBoxes()) |
| 2010 block->adjustChildDebugRect(rect); | 2010 block->adjustChildDebugRect(rect); |
| 2011 | 2011 |
| 2012 return rect; | 2012 return rect; |
| 2013 } | 2013 } |
| 2014 | 2014 |
| 2015 } // namespace blink | 2015 } // namespace blink |
| OLD | NEW |