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

Unified Diff: Source/core/layout/LayoutThemeDefault.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/layout/LayoutTheme.cpp ('k') | Source/core/layout/LayoutTreeAsText.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutThemeDefault.cpp
diff --git a/Source/core/layout/LayoutThemeDefault.cpp b/Source/core/layout/LayoutThemeDefault.cpp
index d8d8f25d5f6b9d6c85c6791c6b4565da1f370c78..475ad8bbc8765784dee8f6e4f3c2fdd73661be1a 100644
--- a/Source/core/layout/LayoutThemeDefault.cpp
+++ b/Source/core/layout/LayoutThemeDefault.cpp
@@ -348,7 +348,7 @@ bool LayoutThemeDefault::paintMenuList(LayoutObject* o, const PaintInfo& i, cons
WebThemeEngine::ExtraParams extraParams;
extraParams.menuList.arrowY = middle;
- const RenderBox* box = toRenderBox(o);
+ const LayoutBox* box = toLayoutBox(o);
// Match Chromium Win behaviour of showing all borders if any are shown.
extraParams.menuList.hasBorder = box->borderRight() || box->borderLeft() || box->borderTop() || box->borderBottom();
extraParams.menuList.hasBorderRadius = o->style()->hasBorderRadius();
@@ -399,7 +399,7 @@ bool LayoutThemeDefault::paintMenuListButton(LayoutObject* o, const PaintInfo& i
extraParams.menuList.fillContentArea = false;
if (useMockTheme()) {
- const RenderBox* box = toRenderBox(o);
+ const LayoutBox* box = toLayoutBox(o);
// The size and position of the drop-down button is different between
// the mock theme and the regular aura theme.
int spacingTop = box->borderTop() + box->paddingTop();
@@ -620,18 +620,18 @@ bool LayoutThemeDefault::paintSearchFieldCancelButton(LayoutObject* cancelButton
LayoutObject* baseRenderer = input ? input->renderer() : cancelButtonObject;
if (!baseRenderer->isBox())
return false;
- RenderBox* inputRenderBox = toRenderBox(baseRenderer);
- LayoutRect inputContentBox = inputRenderBox->contentBoxRect();
+ LayoutBox* inputLayoutBox = toLayoutBox(baseRenderer);
+ LayoutRect inputContentBox = inputLayoutBox->contentBoxRect();
// Make sure the scaled button stays square and will fit in its parent's box.
LayoutUnit cancelButtonSize = std::min(inputContentBox.width(), std::min<LayoutUnit>(inputContentBox.height(), r.height()));
// Calculate cancel button's coordinates relative to the input element.
// Center the button vertically. Round up though, so if it has to be one pixel off-center, it will
// be one pixel closer to the bottom of the field. This tends to look better with the text.
- LayoutRect cancelButtonRect(cancelButtonObject->offsetFromAncestorContainer(inputRenderBox).width(),
+ LayoutRect cancelButtonRect(cancelButtonObject->offsetFromAncestorContainer(inputLayoutBox).width(),
inputContentBox.y() + (inputContentBox.height() - cancelButtonSize + 1) / 2,
cancelButtonSize, cancelButtonSize);
- IntRect paintingRect = convertToPaintingRect(inputRenderBox, cancelButtonObject, cancelButtonRect, r);
+ IntRect paintingRect = convertToPaintingRect(inputLayoutBox, cancelButtonObject, cancelButtonRect, r);
DEFINE_STATIC_REF(Image, cancelImage, (Image::loadPlatformResource("searchCancel")));
DEFINE_STATIC_REF(Image, cancelPressedImage, (Image::loadPlatformResource("searchCancelPressed")));
@@ -665,18 +665,18 @@ bool LayoutThemeDefault::paintSearchFieldResultsDecoration(LayoutObject* magnifi
LayoutObject* baseRenderer = input ? input->renderer() : magnifierObject;
if (!baseRenderer->isBox())
return false;
- RenderBox* inputRenderBox = toRenderBox(baseRenderer);
- LayoutRect inputContentBox = inputRenderBox->contentBoxRect();
+ LayoutBox* inputLayoutBox = toLayoutBox(baseRenderer);
+ LayoutRect inputContentBox = inputLayoutBox->contentBoxRect();
// Make sure the scaled decoration stays square and will fit in its parent's box.
LayoutUnit magnifierSize = std::min(inputContentBox.width(), std::min<LayoutUnit>(inputContentBox.height(), r.height()));
// Calculate decoration's coordinates relative to the input element.
// Center the decoration vertically. Round up though, so if it has to be one pixel off-center, it will
// be one pixel closer to the bottom of the field. This tends to look better with the text.
- LayoutRect magnifierRect(magnifierObject->offsetFromAncestorContainer(inputRenderBox).width(),
+ LayoutRect magnifierRect(magnifierObject->offsetFromAncestorContainer(inputLayoutBox).width(),
inputContentBox.y() + (inputContentBox.height() - magnifierSize + 1) / 2,
magnifierSize, magnifierSize);
- IntRect paintingRect = convertToPaintingRect(inputRenderBox, magnifierObject, magnifierRect, r);
+ IntRect paintingRect = convertToPaintingRect(inputLayoutBox, magnifierObject, magnifierRect, r);
DEFINE_STATIC_REF(Image, magnifierImage, (Image::loadPlatformResource("searchMagnifier")));
paintInfo.context->drawImage(magnifierImage, paintingRect);
« no previous file with comments | « Source/core/layout/LayoutTheme.cpp ('k') | Source/core/layout/LayoutTreeAsText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698