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

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

Issue 952273006: Make the constructor of a LayoutRect from an IntRect explicit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/modules/accessibility/AXScrollView.cpp ('k') | Source/modules/accessibility/AXSpinButton.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698