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

Side by Side Diff: Source/core/rendering/RenderThemeChromiumMac.mm

Issue 14859003: Remove the compile time flag for DATALIST Element. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebasing after r150849 Created 7 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2009 Google, Inc. 3 * Copyright (C) 2008, 2009 Google, Inc.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 bounds.setY(r.y() + r.height() / 2 - zoomedTrackWidth / 2); 1415 bounds.setY(r.y() + r.height() / 2 - zoomedTrackWidth / 2);
1416 } else if (o->style()->appearance() == SliderVerticalPart) { 1416 } else if (o->style()->appearance() == SliderVerticalPart) {
1417 bounds.setWidth(zoomedTrackWidth); 1417 bounds.setWidth(zoomedTrackWidth);
1418 bounds.setX(r.x() + r.width() / 2 - zoomedTrackWidth / 2); 1418 bounds.setX(r.x() + r.width() / 2 - zoomedTrackWidth / 2);
1419 } 1419 }
1420 1420
1421 LocalCurrentGraphicsContext localContext(paintInfo.context); 1421 LocalCurrentGraphicsContext localContext(paintInfo.context);
1422 CGContextRef context = localContext.cgContext(); 1422 CGContextRef context = localContext.cgContext();
1423 CGColorSpaceRef cspace = deviceRGBColorSpaceRef(); 1423 CGColorSpaceRef cspace = deviceRGBColorSpaceRef();
1424 1424
1425 #if ENABLE(DATALIST_ELEMENT)
1426 paintSliderTicks(o, paintInfo, r); 1425 paintSliderTicks(o, paintInfo, r);
1427 #endif
1428 1426
1429 GraphicsContextStateSaver stateSaver(*paintInfo.context); 1427 GraphicsContextStateSaver stateSaver(*paintInfo.context);
1430 CGContextClipToRect(context, bounds); 1428 CGContextClipToRect(context, bounds);
1431 1429
1432 struct CGFunctionCallbacks mainCallbacks = { 0, TrackGradientInterpolate, NU LL }; 1430 struct CGFunctionCallbacks mainCallbacks = { 0, TrackGradientInterpolate, NU LL };
1433 RetainPtr<CGFunctionRef> mainFunction(AdoptCF, CGFunctionCreate(NULL, 1, NUL L, 4, NULL, &mainCallbacks)); 1431 RetainPtr<CGFunctionRef> mainFunction(AdoptCF, CGFunctionCreate(NULL, 1, NUL L, 4, NULL, &mainCallbacks));
1434 RetainPtr<CGShadingRef> mainShading; 1432 RetainPtr<CGShadingRef> mainShading;
1435 if (o->style()->appearance() == SliderVerticalPart) 1433 if (o->style()->appearance() == SliderVerticalPart)
1436 mainShading.adoptCF(CGShadingCreateAxial(cspace, CGPointMake(bounds.x(), bounds.maxY()), CGPointMake(bounds.maxX(), bounds.maxY()), mainFunction.get(), false, false)); 1434 mainShading.adoptCF(CGShadingCreateAxial(cspace, CGPointMake(bounds.x(), bounds.maxY()), CGPointMake(bounds.maxX(), bounds.maxY()), mainFunction.get(), false, false));
1437 else 1435 else
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1712 updateActiveState([search searchButtonCell], o); 1710 updateActiveState([search searchButtonCell], o);
1713 1711
1714 FloatRect localBounds = [search searchButtonRectForBounds:NSRect(input->rend erBox()->pixelSnappedBorderBoxRect())]; 1712 FloatRect localBounds = [search searchButtonRectForBounds:NSRect(input->rend erBox()->pixelSnappedBorderBoxRect())];
1715 localBounds = convertToPaintingRect(input->renderer(), o, localBounds, r); 1713 localBounds = convertToPaintingRect(input->renderer(), o, localBounds, r);
1716 1714
1717 [[search searchButtonCell] drawWithFrame:localBounds inView:documentViewFor( o)]; 1715 [[search searchButtonCell] drawWithFrame:localBounds inView:documentViewFor( o)];
1718 [[search searchButtonCell] setControlView:nil]; 1716 [[search searchButtonCell] setControlView:nil];
1719 return false; 1717 return false;
1720 } 1718 }
1721 1719
1722 #if ENABLE(DATALIST_ELEMENT)
1723 IntSize RenderThemeChromiumMac::sliderTickSize() const 1720 IntSize RenderThemeChromiumMac::sliderTickSize() const
1724 { 1721 {
1725 return IntSize(1, 3); 1722 return IntSize(1, 3);
1726 } 1723 }
1727 1724
1728 int RenderThemeChromiumMac::sliderTickOffsetFromTrackCenter() const 1725 int RenderThemeChromiumMac::sliderTickOffsetFromTrackCenter() const
1729 { 1726 {
1730 return -9; 1727 return -9;
1731 } 1728 }
1732 #endif
1733 1729
1734 const int sliderThumbWidth = 15; 1730 const int sliderThumbWidth = 15;
1735 const int sliderThumbHeight = 15; 1731 const int sliderThumbHeight = 15;
1736 1732
1737 void RenderThemeChromiumMac::adjustSliderThumbSize(RenderStyle* style, Element*) const 1733 void RenderThemeChromiumMac::adjustSliderThumbSize(RenderStyle* style, Element*) const
1738 { 1734 {
1739 float zoomLevel = style->effectiveZoom(); 1735 float zoomLevel = style->effectiveZoom();
1740 if (style->appearance() == SliderThumbHorizontalPart || style->appearance() == SliderThumbVerticalPart) { 1736 if (style->appearance() == SliderThumbHorizontalPart || style->appearance() == SliderThumbVerticalPart) {
1741 style->setWidth(Length(static_cast<int>(sliderThumbWidth * zoomLevel), F ixed)); 1737 style->setWidth(Length(static_cast<int>(sliderThumbWidth * zoomLevel), F ixed));
1742 style->setHeight(Length(static_cast<int>(sliderThumbHeight * zoomLevel), Fixed)); 1738 style->setHeight(Length(static_cast<int>(sliderThumbHeight * zoomLevel), Fixed));
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
1960 { 1956 {
1961 return RenderMediaControlsChromium::paintMediaControlsPart(MediaEnterFullscr eenButton, object, paintInfo, rect); 1957 return RenderMediaControlsChromium::paintMediaControlsPart(MediaEnterFullscr eenButton, object, paintInfo, rect);
1962 } 1958 }
1963 1959
1964 bool RenderThemeChromiumMac::paintMediaToggleClosedCaptionsButton(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect) 1960 bool RenderThemeChromiumMac::paintMediaToggleClosedCaptionsButton(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
1965 { 1961 {
1966 return RenderMediaControlsChromium::paintMediaControlsPart(MediaShowClosedCa ptionsButton, object, paintInfo, rect); 1962 return RenderMediaControlsChromium::paintMediaControlsPart(MediaShowClosedCa ptionsButton, object, paintInfo, rect);
1967 } 1963 }
1968 1964
1969 } // namespace WebCore 1965 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderThemeChromiumMac.h ('k') | Source/core/rendering/RenderThemeChromiumSkia.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698