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

Side by Side Diff: Source/core/layout/LayoutListBox.cpp

Issue 977113003: Rename renderer() to layoutObject(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase to master Created 5 years, 9 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) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved.
3 * 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 3 * 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 HTMLSelectElement* select = selectElement(); 106 HTMLSelectElement* select = selectElement();
107 if (!select) 107 if (!select)
108 return 0; 108 return 0;
109 Element* baseItem = ElementTraversal::firstChild(*select); 109 Element* baseItem = ElementTraversal::firstChild(*select);
110 if (!baseItem) 110 if (!baseItem)
111 return defaultItemHeight(); 111 return defaultItemHeight();
112 if (isHTMLOptGroupElement(baseItem)) 112 if (isHTMLOptGroupElement(baseItem))
113 baseItem = &toHTMLOptGroupElement(baseItem)->optGroupLabelElement(); 113 baseItem = &toHTMLOptGroupElement(baseItem)->optGroupLabelElement();
114 else if (!isHTMLOptionElement(baseItem)) 114 else if (!isHTMLOptionElement(baseItem))
115 return defaultItemHeight(); 115 return defaultItemHeight();
116 LayoutObject* baseItemRenderer = baseItem->renderer(); 116 LayoutObject* baseItemRenderer = baseItem->layoutObject();
117 if (!baseItemRenderer) 117 if (!baseItemRenderer)
118 return defaultItemHeight(); 118 return defaultItemHeight();
119 if (!baseItemRenderer || !baseItemRenderer->isBox()) 119 if (!baseItemRenderer || !baseItemRenderer->isBox())
120 return defaultItemHeight(); 120 return defaultItemHeight();
121 return toLayoutBox(baseItemRenderer)->size().height(); 121 return toLayoutBox(baseItemRenderer)->size().height();
122 } 122 }
123 123
124 void LayoutListBox::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTop, Logi calExtentComputedValues& computedValues) const 124 void LayoutListBox::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTop, Logi calExtentComputedValues& computedValues) const
125 { 125 {
126 LayoutUnit height = itemHeight() * size(); 126 LayoutUnit height = itemHeight() * size();
(...skipping 23 matching lines...) Expand all
150 void LayoutListBox::scrollToRect(const LayoutRect& rect) 150 void LayoutListBox::scrollToRect(const LayoutRect& rect)
151 { 151 {
152 if (hasOverflowClip()) { 152 if (hasOverflowClip()) {
153 ASSERT(layer()); 153 ASSERT(layer());
154 ASSERT(layer()->scrollableArea()); 154 ASSERT(layer()->scrollableArea());
155 layer()->scrollableArea()->exposeRect(rect, ScrollAlignment::alignToEdge IfNeeded, ScrollAlignment::alignToEdgeIfNeeded); 155 layer()->scrollableArea()->exposeRect(rect, ScrollAlignment::alignToEdge IfNeeded, ScrollAlignment::alignToEdgeIfNeeded);
156 } 156 }
157 } 157 }
158 158
159 } // namespace blink 159 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698