| 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 return false; | 183 return false; |
| 184 } | 184 } |
| 185 | 185 |
| 186 void LayoutText::styleDidChange(StyleDifference diff, const LayoutStyle* oldStyl
e) | 186 void LayoutText::styleDidChange(StyleDifference diff, const LayoutStyle* oldStyl
e) |
| 187 { | 187 { |
| 188 // There is no need to ever schedule paint invalidations from a style change
of a text run, since | 188 // There is no need to ever schedule paint invalidations from a style change
of a text run, since |
| 189 // we already did this for the parent of the text run. | 189 // we already did this for the parent of the text run. |
| 190 // We do have to schedule layouts, though, since a style change can force us
to | 190 // We do have to schedule layouts, though, since a style change can force us
to |
| 191 // need to relayout. | 191 // need to relayout. |
| 192 if (diff.needsFullLayout()) { | 192 if (diff.needsFullLayout()) { |
| 193 setNeedsLayoutAndPrefWidthsRecalc(); | 193 setNeedsLayoutAndPrefWidthsRecalc(LayoutInvalidationReason::StyleChange)
; |
| 194 m_knownToHaveNoOverflowAndNoFallbackFonts = false; | 194 m_knownToHaveNoOverflowAndNoFallbackFonts = false; |
| 195 } | 195 } |
| 196 | 196 |
| 197 const LayoutStyle& newStyle = styleRef(); | 197 const LayoutStyle& newStyle = styleRef(); |
| 198 ETextTransform oldTransform = oldStyle ? oldStyle->textTransform() : TTNONE; | 198 ETextTransform oldTransform = oldStyle ? oldStyle->textTransform() : TTNONE; |
| 199 ETextSecurity oldSecurity = oldStyle ? oldStyle->textSecurity() : TSNONE; | 199 ETextSecurity oldSecurity = oldStyle ? oldStyle->textSecurity() : TSNONE; |
| 200 if (oldTransform != newStyle.textTransform() || oldSecurity != newStyle.text
Security()) | 200 if (oldTransform != newStyle.textTransform() || oldSecurity != newStyle.text
Security()) |
| 201 transformText(); | 201 transformText(); |
| 202 | 202 |
| 203 // This is an optimization that kicks off font load before layout. | 203 // This is an optimization that kicks off font load before layout. |
| (...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1424 ASSERT(text); | 1424 ASSERT(text); |
| 1425 | 1425 |
| 1426 if (!force && equal(m_text.impl(), text.get())) | 1426 if (!force && equal(m_text.impl(), text.get())) |
| 1427 return; | 1427 return; |
| 1428 | 1428 |
| 1429 setTextInternal(text); | 1429 setTextInternal(text); |
| 1430 // If preferredLogicalWidthsDirty() of an orphan child is true, LayoutObject
ChildList:: | 1430 // If preferredLogicalWidthsDirty() of an orphan child is true, LayoutObject
ChildList:: |
| 1431 // insertChildNode() fails to set true to owner. To avoid that, we call | 1431 // insertChildNode() fails to set true to owner. To avoid that, we call |
| 1432 // setNeedsLayoutAndPrefWidthsRecalc() only if this LayoutText has parent. | 1432 // setNeedsLayoutAndPrefWidthsRecalc() only if this LayoutText has parent. |
| 1433 if (parent()) | 1433 if (parent()) |
| 1434 setNeedsLayoutAndPrefWidthsRecalc(); | 1434 setNeedsLayoutAndPrefWidthsRecalc(LayoutInvalidationReason::TextChanged)
; |
| 1435 m_knownToHaveNoOverflowAndNoFallbackFonts = false; | 1435 m_knownToHaveNoOverflowAndNoFallbackFonts = false; |
| 1436 | 1436 |
| 1437 if (AXObjectCache* cache = document().existingAXObjectCache()) | 1437 if (AXObjectCache* cache = document().existingAXObjectCache()) |
| 1438 cache->textChanged(this); | 1438 cache->textChanged(this); |
| 1439 } | 1439 } |
| 1440 | 1440 |
| 1441 void LayoutText::dirtyOrDeleteLineBoxesIfNeeded(bool fullLayout) | 1441 void LayoutText::dirtyOrDeleteLineBoxesIfNeeded(bool fullLayout) |
| 1442 { | 1442 { |
| 1443 if (fullLayout) | 1443 if (fullLayout) |
| 1444 deleteTextBoxes(); | 1444 deleteTextBoxes(); |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1893 } | 1893 } |
| 1894 | 1894 |
| 1895 void LayoutText::invalidateDisplayItemClients(const LayoutBoxModelObject& paintI
nvalidationContainer) const | 1895 void LayoutText::invalidateDisplayItemClients(const LayoutBoxModelObject& paintI
nvalidationContainer) const |
| 1896 { | 1896 { |
| 1897 LayoutObject::invalidateDisplayItemClients(paintInvalidationContainer); | 1897 LayoutObject::invalidateDisplayItemClients(paintInvalidationContainer); |
| 1898 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) | 1898 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) |
| 1899 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(DisplayI
temClientData(*box, DisplayItemClientData::NoDebugName)); | 1899 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(DisplayI
temClientData(*box, DisplayItemClientData::NoDebugName)); |
| 1900 } | 1900 } |
| 1901 | 1901 |
| 1902 } // namespace blink | 1902 } // namespace blink |
| OLD | NEW |