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

Side by Side Diff: Source/core/rendering/RenderText.cpp

Issue 640593002: Replace FINAL and OVERRIDE with their C++11 counterparts in Source/core/[css|rendering|clipboard] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased the patch Created 6 years, 2 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
« no previous file with comments | « Source/core/rendering/RenderTableSection.h ('k') | Source/core/rendering/RenderTextControl.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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 String text; 61 String text;
62 void* pointers[2]; 62 void* pointers[2];
63 }; 63 };
64 64
65 COMPILE_ASSERT(sizeof(RenderText) == sizeof(SameSizeAsRenderText), RenderText_sh ould_stay_small); 65 COMPILE_ASSERT(sizeof(RenderText) == sizeof(SameSizeAsRenderText), RenderText_sh ould_stay_small);
66 66
67 class SecureTextTimer; 67 class SecureTextTimer;
68 typedef HashMap<RenderText*, SecureTextTimer*> SecureTextTimerMap; 68 typedef HashMap<RenderText*, SecureTextTimer*> SecureTextTimerMap;
69 static SecureTextTimerMap* gSecureTextTimers = 0; 69 static SecureTextTimerMap* gSecureTextTimers = 0;
70 70
71 class SecureTextTimer FINAL : public TimerBase { 71 class SecureTextTimer final : public TimerBase {
72 public: 72 public:
73 SecureTextTimer(RenderText* renderText) 73 SecureTextTimer(RenderText* renderText)
74 : m_renderText(renderText) 74 : m_renderText(renderText)
75 , m_lastTypedCharacterOffset(-1) 75 , m_lastTypedCharacterOffset(-1)
76 { 76 {
77 } 77 }
78 78
79 void restartWithNewText(unsigned lastTypedCharacterOffset) 79 void restartWithNewText(unsigned lastTypedCharacterOffset)
80 { 80 {
81 m_lastTypedCharacterOffset = lastTypedCharacterOffset; 81 m_lastTypedCharacterOffset = lastTypedCharacterOffset;
82 if (Settings* settings = m_renderText->document().settings()) 82 if (Settings* settings = m_renderText->document().settings())
83 startOneShot(settings->passwordEchoDurationInSeconds(), FROM_HERE); 83 startOneShot(settings->passwordEchoDurationInSeconds(), FROM_HERE);
84 } 84 }
85 void invalidate() { m_lastTypedCharacterOffset = -1; } 85 void invalidate() { m_lastTypedCharacterOffset = -1; }
86 unsigned lastTypedCharacterOffset() { return m_lastTypedCharacterOffset; } 86 unsigned lastTypedCharacterOffset() { return m_lastTypedCharacterOffset; }
87 87
88 private: 88 private:
89 virtual void fired() OVERRIDE 89 virtual void fired() override
90 { 90 {
91 ASSERT(gSecureTextTimers->contains(m_renderText)); 91 ASSERT(gSecureTextTimers->contains(m_renderText));
92 m_renderText->setText(m_renderText->text().impl(), true /* forcing setti ng text as it may be masked later */); 92 m_renderText->setText(m_renderText->text().impl(), true /* forcing setti ng text as it may be masked later */);
93 } 93 }
94 94
95 RenderText* m_renderText; 95 RenderText* m_renderText;
96 int m_lastTypedCharacterOffset; 96 int m_lastTypedCharacterOffset;
97 }; 97 };
98 98
99 static void makeCapitalized(String* string, UChar previous) 99 static void makeCapitalized(String* string, UChar previous)
(...skipping 1763 matching lines...) Expand 10 before | Expand all | Expand 10 after
1863 } 1863 }
1864 secureTextTimer->restartWithNewText(lastTypedCharacterOffset); 1864 secureTextTimer->restartWithNewText(lastTypedCharacterOffset);
1865 } 1865 }
1866 1866
1867 PassRefPtr<AbstractInlineTextBox> RenderText::firstAbstractInlineTextBox() 1867 PassRefPtr<AbstractInlineTextBox> RenderText::firstAbstractInlineTextBox()
1868 { 1868 {
1869 return AbstractInlineTextBox::getOrCreate(this, m_firstTextBox); 1869 return AbstractInlineTextBox::getOrCreate(this, m_firstTextBox);
1870 } 1870 }
1871 1871
1872 } // namespace blink 1872 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderTableSection.h ('k') | Source/core/rendering/RenderTextControl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698