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

Side by Side Diff: Source/modules/accessibility/AXInlineTextBox.cpp

Issue 1072273006: Oilpan: Prepare moving AXObject to heap (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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) 2013, Google Inc. All rights reserved. 2 * Copyright (C) 2013, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 , m_inlineTextBox(inlineTextBox) 45 , m_inlineTextBox(inlineTextBox)
46 { 46 {
47 } 47 }
48 48
49 AXInlineTextBox::~AXInlineTextBox() 49 AXInlineTextBox::~AXInlineTextBox()
50 { 50 {
51 if (m_axObjectCache && m_inlineTextBox) 51 if (m_axObjectCache && m_inlineTextBox)
52 m_axObjectCache->remove(m_inlineTextBox.get()); 52 m_axObjectCache->remove(m_inlineTextBox.get());
53 } 53 }
54 54
55 PassRefPtr<AXInlineTextBox> AXInlineTextBox::create(PassRefPtr<AbstractInlineTex tBox> inlineTextBox, AXObjectCacheImpl* axObjectCache) 55 PassRefPtrWillBeRawPtr<AXInlineTextBox> AXInlineTextBox::create(PassRefPtr<Abstr actInlineTextBox> inlineTextBox, AXObjectCacheImpl* axObjectCache)
56 { 56 {
57 return adoptRef(new AXInlineTextBox(inlineTextBox, axObjectCache)); 57 return adoptRefWillBeNoop(new AXInlineTextBox(inlineTextBox, axObjectCache)) ;
58 } 58 }
59 59
60 void AXInlineTextBox::init() 60 void AXInlineTextBox::init()
61 { 61 {
62 } 62 }
63 63
64 void AXInlineTextBox::detach() 64 void AXInlineTextBox::detach()
65 { 65 {
66 m_inlineTextBox = nullptr; 66 m_inlineTextBox = nullptr;
67 m_axObjectCache = 0; 67 m_axObjectCache = nullptr;
68 AXObject::detach(); 68 AXObject::detach();
69 } 69 }
70 70
71 LayoutRect AXInlineTextBox::elementRect() const 71 LayoutRect AXInlineTextBox::elementRect() const
72 { 72 {
73 if (!m_inlineTextBox) 73 if (!m_inlineTextBox)
74 return LayoutRect(); 74 return LayoutRect();
75 75
76 return m_inlineTextBox->bounds(); 76 return m_inlineTextBox->bounds();
77 } 77 }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 case AbstractInlineTextBox::TopToBottom: 151 case AbstractInlineTextBox::TopToBottom:
152 return AccessibilityTextDirectionTopToBottom; 152 return AccessibilityTextDirectionTopToBottom;
153 case AbstractInlineTextBox::BottomToTop: 153 case AbstractInlineTextBox::BottomToTop:
154 return AccessibilityTextDirectionBottomToTop; 154 return AccessibilityTextDirectionBottomToTop;
155 } 155 }
156 156
157 return AccessibilityTextDirectionLeftToRight; 157 return AccessibilityTextDirectionLeftToRight;
158 } 158 }
159 159
160 } // namespace blink 160 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698