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

Unified Diff: Source/core/layout/LayoutThemeMac.mm

Issue 1186523004: Rename adjustPaintInvalidationRect and related to addVisualOverflow (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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/LayoutThemeMac.h ('k') | Source/modules/accessibility/AXObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutThemeMac.mm
diff --git a/Source/core/layout/LayoutThemeMac.mm b/Source/core/layout/LayoutThemeMac.mm
index 088610be7e2ffe5c2811bec995cce646fa989b1c..2d4b6324a9a8f429bec43a92580a65b64784aa62 100644
--- a/Source/core/layout/LayoutThemeMac.mm
+++ b/Source/core/layout/LayoutThemeMac.mm
@@ -458,9 +458,9 @@ bool LayoutThemeMac::isControlStyled(const ComputedStyle& style, const AuthorSty
return LayoutTheme::isControlStyled(style, authorStyle);
}
-void LayoutThemeMac::adjustPaintInvalidationRect(const LayoutObject* o, IntRect& r)
+void LayoutThemeMac::addVisualOverflow(const LayoutObject& object, IntRect& rect)
{
- ControlPart part = o->style()->appearance();
+ ControlPart part = object.style()->appearance();
#if USE(NEW_THEME)
switch (part) {
@@ -470,22 +470,22 @@ void LayoutThemeMac::adjustPaintInvalidationRect(const LayoutObject* o, IntRect&
case SquareButtonPart:
case ButtonPart:
case InnerSpinButtonPart:
- return LayoutTheme::adjustPaintInvalidationRect(o, r);
+ return LayoutTheme::addVisualOverflow(object, rect);
default:
break;
}
#endif
- float zoomLevel = o->style()->effectiveZoom();
+ float zoomLevel = object.style()->effectiveZoom();
if (part == MenulistPart) {
- setPopupButtonCellState(o, r);
+ setPopupButtonCellState(&object, rect);
IntSize size = popupButtonSizes()[[popupButton() controlSize]];
size.setHeight(size.height() * zoomLevel);
- size.setWidth(r.width());
- r = ThemeMac::inflateRect(r, size, popupButtonMargins(), zoomLevel);
+ size.setWidth(rect.width());
+ rect = ThemeMac::inflateRect(rect, size, popupButtonMargins(), zoomLevel);
} else if (part == SliderThumbHorizontalPart || part == SliderThumbVerticalPart) {
- r.setHeight(r.height() + sliderThumbShadowBlur);
+ rect.setHeight(rect.height() + sliderThumbShadowBlur);
}
}
@@ -868,20 +868,20 @@ void LayoutThemeMac::adjustMenuListButtonStyle(ComputedStyle& style, Element*) c
style.setLineHeight(ComputedStyle::initialLineHeight());
}
-void LayoutThemeMac::setPopupButtonCellState(const LayoutObject* o, const IntRect& r)
+void LayoutThemeMac::setPopupButtonCellState(const LayoutObject* object, const IntRect& rect)
{
NSPopUpButtonCell* popupButton = this->popupButton();
// Set the control size based off the rectangle we're painting into.
- setControlSize(popupButton, popupButtonSizes(), r.size(), o->style()->effectiveZoom());
+ setControlSize(popupButton, popupButtonSizes(), rect.size(), object->style()->effectiveZoom());
// Update the various states we respond to.
- updateActiveState(popupButton, o);
- updateCheckedState(popupButton, o);
- updateEnabledState(popupButton, o);
- updatePressedState(popupButton, o);
+ updateActiveState(popupButton, object);
+ updateCheckedState(popupButton, object);
+ updateEnabledState(popupButton, object);
+ updatePressedState(popupButton, object);
if (![popupButton respondsToSelector:@selector(drawFocusRingMaskWithFrame:inView:)])
- updateFocusedState(popupButton, o);
+ updateFocusedState(popupButton, object);
}
const IntSize* LayoutThemeMac::menuListSizes() const
« no previous file with comments | « Source/core/layout/LayoutThemeMac.h ('k') | Source/modules/accessibility/AXObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698