| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010 Apple 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 30 matching lines...) Expand all Loading... |
| 41 { | 41 { |
| 42 ASSERT(scrollbar); | 42 ASSERT(scrollbar); |
| 43 } | 43 } |
| 44 | 44 |
| 45 void AXScrollbar::detachFromParent() | 45 void AXScrollbar::detachFromParent() |
| 46 { | 46 { |
| 47 m_scrollbar = nullptr; | 47 m_scrollbar = nullptr; |
| 48 AXMockObject::detachFromParent(); | 48 AXMockObject::detachFromParent(); |
| 49 } | 49 } |
| 50 | 50 |
| 51 PassRefPtr<AXScrollbar> AXScrollbar::create(Scrollbar* scrollbar, AXObjectCacheI
mpl* axObjectCache) | 51 PassRefPtrWillBeRawPtr<AXScrollbar> AXScrollbar::create(Scrollbar* scrollbar, AX
ObjectCacheImpl* axObjectCache) |
| 52 { | 52 { |
| 53 return adoptRef(new AXScrollbar(scrollbar, axObjectCache)); | 53 return adoptRefWillBeNoop(new AXScrollbar(scrollbar, axObjectCache)); |
| 54 } | 54 } |
| 55 | 55 |
| 56 LayoutRect AXScrollbar::elementRect() const | 56 LayoutRect AXScrollbar::elementRect() const |
| 57 { | 57 { |
| 58 if (!m_scrollbar) | 58 if (!m_scrollbar) |
| 59 return LayoutRect(); | 59 return LayoutRect(); |
| 60 | 60 |
| 61 return LayoutRect(m_scrollbar->frameRect()); | 61 return LayoutRect(m_scrollbar->frameRect()); |
| 62 } | 62 } |
| 63 | 63 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 if (!m_scrollbar) | 102 if (!m_scrollbar) |
| 103 return; | 103 return; |
| 104 | 104 |
| 105 if (!m_scrollbar->scrollableArea()) | 105 if (!m_scrollbar->scrollableArea()) |
| 106 return; | 106 return; |
| 107 | 107 |
| 108 float newValue = value * m_scrollbar->maximum(); | 108 float newValue = value * m_scrollbar->maximum(); |
| 109 m_scrollbar->scrollableArea()->scrollToOffsetWithoutAnimation(m_scrollbar->o
rientation(), newValue); | 109 m_scrollbar->scrollableArea()->scrollToOffsetWithoutAnimation(m_scrollbar->o
rientation(), newValue); |
| 110 } | 110 } |
| 111 | 111 |
| 112 DEFINE_TRACE(AXScrollbar) |
| 113 { |
| 114 AXMockObject::trace(visitor); |
| 115 visitor->trace(m_scrollbar); |
| 116 } |
| 117 |
| 112 } // namespace blink | 118 } // namespace blink |
| OLD | NEW |