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

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

Issue 1433253003: [Line Layout API] Convert AbstractInlineTextBox to new line layout API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove layoutObject() method Created 5 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/api/LineLayoutItem.h » ('j') | 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 * (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 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after
1863 SecureTextTimer* secureTextTimer = gSecureTextTimers->get(this); 1863 SecureTextTimer* secureTextTimer = gSecureTextTimers->get(this);
1864 if (!secureTextTimer) { 1864 if (!secureTextTimer) {
1865 secureTextTimer = new SecureTextTimer(this); 1865 secureTextTimer = new SecureTextTimer(this);
1866 gSecureTextTimers->add(this, secureTextTimer); 1866 gSecureTextTimers->add(this, secureTextTimer);
1867 } 1867 }
1868 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); 1868 secureTextTimer->restartWithNewText(lastTypedCharacterOffset);
1869 } 1869 }
1870 1870
1871 PassRefPtr<AbstractInlineTextBox> LayoutText::firstAbstractInlineTextBox() 1871 PassRefPtr<AbstractInlineTextBox> LayoutText::firstAbstractInlineTextBox()
1872 { 1872 {
1873 return AbstractInlineTextBox::getOrCreate(this, m_firstTextBox); 1873 return AbstractInlineTextBox::getOrCreate(LineLayoutText(this), m_firstTextB ox);
1874 } 1874 }
1875 1875
1876 void LayoutText::invalidateDisplayItemClients(const LayoutBoxModelObject& paintI nvalidationContainer, PaintInvalidationReason invalidationReason, const LayoutRe ct* paintInvalidationRect) const 1876 void LayoutText::invalidateDisplayItemClients(const LayoutBoxModelObject& paintI nvalidationContainer, PaintInvalidationReason invalidationReason, const LayoutRe ct* paintInvalidationRect) const
1877 { 1877 {
1878 LayoutObject::invalidateDisplayItemClients(paintInvalidationContainer, inval idationReason, paintInvalidationRect); 1878 LayoutObject::invalidateDisplayItemClients(paintInvalidationContainer, inval idationReason, paintInvalidationRect);
1879 1879
1880 // Use the paintInvalidationRect of LayoutText for inline boxes, which saves the cost to calculate paint invalidation rect 1880 // Use the paintInvalidationRect of LayoutText for inline boxes, which saves the cost to calculate paint invalidation rect
1881 // for every inline box. This won't cause more rasterization invalidations b ecause the whole LayoutText is being invalidated. 1881 // for every inline box. This won't cause more rasterization invalidations b ecause the whole LayoutText is being invalidated.
1882 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) { 1882 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) {
1883 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box, in validationReason, paintInvalidationRect); 1883 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box, in validationReason, paintInvalidationRect);
1884 if (box->truncation() != cNoTruncation) { 1884 if (box->truncation() != cNoTruncation) {
1885 if (EllipsisBox* ellipsisBox = box->root().ellipsisBox()) 1885 if (EllipsisBox* ellipsisBox = box->root().ellipsisBox())
1886 paintInvalidationContainer.invalidateDisplayItemClientOnBacking( *ellipsisBox, invalidationReason, paintInvalidationRect); 1886 paintInvalidationContainer.invalidateDisplayItemClientOnBacking( *ellipsisBox, invalidationReason, paintInvalidationRect);
1887 } 1887 }
1888 } 1888 }
1889 } 1889 }
1890 1890
1891 } // namespace blink 1891 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/api/LineLayoutItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698