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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 PassRefPtr<AXScrollbar> AXScrollbar::create(Scrollbar* scrollbar, AXObjectCacheI
mpl* axObjectCache) | 51 PassRefPtr<AXScrollbar> AXScrollbar::create(Scrollbar* scrollbar, AXObjectCacheI
mpl* axObjectCache) |
52 { | 52 { |
53 return adoptRef(new AXScrollbar(scrollbar, axObjectCache)); | 53 return adoptRef(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 m_scrollbar->frameRect(); | 61 return LayoutRect(m_scrollbar->frameRect()); |
62 } | 62 } |
63 | 63 |
64 Document* AXScrollbar::document() const | 64 Document* AXScrollbar::document() const |
65 { | 65 { |
66 AXObject* parent = parentObject(); | 66 AXObject* parent = parentObject(); |
67 if (!parent) | 67 if (!parent) |
68 return 0; | 68 return 0; |
69 return parent->document(); | 69 return parent->document(); |
70 } | 70 } |
71 | 71 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 } // namespace blink | 112 } // namespace blink |
OLD | NEW |