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

Side by Side Diff: Source/core/rendering/RenderListBox.cpp

Issue 351213002: Change RenderObject::style(bool) to accept an enum instead (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Renamed enum to OwnOrFirstLineStyle, rebased and got rid of duplicate state on the stack in RootInl… Created 6 years, 5 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
« no previous file with comments | « Source/core/rendering/RenderListBox.h ('k') | Source/core/rendering/RenderListMarker.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 { 289 {
290 LayoutUnit height = itemHeight() * size() - rowSpacing; 290 LayoutUnit height = itemHeight() * size() - rowSpacing;
291 // FIXME: The item height should have been added before updateLogicalHeight was called to avoid this hack. 291 // FIXME: The item height should have been added before updateLogicalHeight was called to avoid this hack.
292 updateIntrinsicContentLogicalHeight(height); 292 updateIntrinsicContentLogicalHeight(height);
293 293
294 height += borderAndPaddingHeight(); 294 height += borderAndPaddingHeight();
295 295
296 RenderBox::computeLogicalHeight(height, logicalTop, computedValues); 296 RenderBox::computeLogicalHeight(height, logicalTop, computedValues);
297 } 297 }
298 298
299 int RenderListBox::baselinePosition(FontBaseline baselineType, bool firstLine, L ineDirectionMode lineDirection, LinePositionMode linePositionMode) const 299 int RenderListBox::baselinePosition(FontBaseline baselineType, OwnOrFirstLineSty le firstLine, LineDirectionMode lineDirection, LinePositionMode linePositionMode ) const
300 { 300 {
301 return RenderBox::baselinePosition(baselineType, firstLine, lineDirection, l inePositionMode) - baselineAdjustment; 301 return RenderBox::baselinePosition(baselineType, firstLine, lineDirection, l inePositionMode) - baselineAdjustment;
302 } 302 }
303 303
304 LayoutRect RenderListBox::itemBoundingBoxRectInternal(const LayoutPoint& additio nalOffset, int index) const 304 LayoutRect RenderListBox::itemBoundingBoxRectInternal(const LayoutPoint& additio nalOffset, int index) const
305 { 305 {
306 // For RTL, items start after the left-side vertical scrollbar. 306 // For RTL, items start after the left-side vertical scrollbar.
307 int scrollbarOffset = style()->shouldPlaceBlockDirectionScrollbarOnLogicalLe ft() ? verticalScrollbarWidth() : 0; 307 int scrollbarOffset = style()->shouldPlaceBlockDirectionScrollbarOnLogicalLe ft() ? verticalScrollbarWidth() : 0;
308 return LayoutRect(additionalOffset.x() + borderLeft() + paddingLeft() + scro llbarOffset, 308 return LayoutRect(additionalOffset.x() + borderLeft() + paddingLeft() + scro llbarOffset,
309 additionalOffset.y() + borderTop() + paddingTop() + itemHeight() * (inde x - m_indexOffset), 309 additionalOffset.y() + borderTop() + paddingTop() + itemHeight() * (inde x - m_indexOffset),
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 { 1018 {
1019 return itemBoundingBoxRectInternal(point, listIndexToRenderListBoxIndex(inde x)); 1019 return itemBoundingBoxRectInternal(point, listIndexToRenderListBoxIndex(inde x));
1020 } 1020 }
1021 1021
1022 bool RenderListBox::scrollToRevealElementAtListIndex(int index) 1022 bool RenderListBox::scrollToRevealElementAtListIndex(int index)
1023 { 1023 {
1024 return scrollToRevealElementAtListIndexInternal(listIndexToRenderListBoxInde x(index)); 1024 return scrollToRevealElementAtListIndexInternal(listIndexToRenderListBoxInde x(index));
1025 } 1025 }
1026 1026
1027 } // namespace WebCore 1027 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderListBox.h ('k') | Source/core/rendering/RenderListMarker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698