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

Unified Diff: Source/core/html/shadow/SliderThumbElement.cpp

Issue 926193003: Move rendering/RenderBox to layout/LayoutBox. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/forms/TextFieldInputType.cpp ('k') | Source/core/html/shadow/SpinButtonElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/shadow/SliderThumbElement.cpp
diff --git a/Source/core/html/shadow/SliderThumbElement.cpp b/Source/core/html/shadow/SliderThumbElement.cpp
index c4ce1d092d2dce4e1361fb5f81dade12664de7f6..9b3cdd68d7f7ae000dcb275a95ee39c577ef6eb4 100644
--- a/Source/core/html/shadow/SliderThumbElement.cpp
+++ b/Source/core/html/shadow/SliderThumbElement.cpp
@@ -118,31 +118,31 @@ void SliderThumbElement::setPositionFromPoint(const LayoutPoint& point)
RefPtrWillBeRawPtr<HTMLInputElement> input(hostInput());
Element* trackElement = input->closedShadowRoot()->getElementById(ShadowElementNames::sliderTrack());
- if (!input->renderer() || !renderBox() || !trackElement->renderBox())
+ if (!input->renderer() || !layoutBox() || !trackElement->layoutBox())
return;
LayoutPoint offset = roundedLayoutPoint(input->renderer()->absoluteToLocal(FloatPoint(point), UseTransforms));
bool isVertical = hasVerticalAppearance(input.get());
- bool isLeftToRightDirection = renderBox()->style()->isLeftToRightDirection();
+ bool isLeftToRightDirection = layoutBox()->style()->isLeftToRightDirection();
LayoutUnit trackSize;
LayoutUnit position;
LayoutUnit currentPosition;
// We need to calculate currentPosition from absolute points becaue the
- // renderer for this node is usually on a layer and renderBox()->x() and
+ // renderer for this node is usually on a layer and layoutBox()->x() and
// y() are unusable.
// FIXME: This should probably respect transforms.
- LayoutPoint absoluteThumbOrigin = renderBox()->absoluteBoundingBoxRectIgnoringTransforms().location();
+ LayoutPoint absoluteThumbOrigin = layoutBox()->absoluteBoundingBoxRectIgnoringTransforms().location();
LayoutPoint absoluteSliderContentOrigin = roundedLayoutPoint(input->renderer()->localToAbsolute());
IntRect trackBoundingBox = trackElement->renderer()->absoluteBoundingBoxRectIgnoringTransforms();
IntRect inputBoundingBox = input->renderer()->absoluteBoundingBoxRectIgnoringTransforms();
if (isVertical) {
- trackSize = trackElement->renderBox()->contentHeight() - renderBox()->size().height();
- position = offset.y() - renderBox()->size().height() / 2 - trackBoundingBox.y() + inputBoundingBox.y() - renderBox()->marginBottom();
+ trackSize = trackElement->layoutBox()->contentHeight() - layoutBox()->size().height();
+ position = offset.y() - layoutBox()->size().height() / 2 - trackBoundingBox.y() + inputBoundingBox.y() - layoutBox()->marginBottom();
currentPosition = absoluteThumbOrigin.y() - absoluteSliderContentOrigin.y();
} else {
- trackSize = trackElement->renderBox()->contentWidth() - renderBox()->size().width();
- position = offset.x() - renderBox()->size().width() / 2 - trackBoundingBox.x() + inputBoundingBox.x();
- position -= isLeftToRightDirection ? renderBox()->marginLeft() : renderBox()->marginRight();
+ trackSize = trackElement->layoutBox()->contentWidth() - layoutBox()->size().width();
+ position = offset.x() - layoutBox()->size().width() / 2 - trackBoundingBox.x() + inputBoundingBox.x();
+ position -= isLeftToRightDirection ? layoutBox()->marginLeft() : layoutBox()->marginRight();
currentPosition = absoluteThumbOrigin.x() - absoluteSliderContentOrigin.x();
}
position = std::max<LayoutUnit>(0, std::min(position, trackSize));
« no previous file with comments | « Source/core/html/forms/TextFieldInputType.cpp ('k') | Source/core/html/shadow/SpinButtonElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698