From 6c2af9490927c3c5959b5cb07461b646f8b32f6c Mon Sep 17 00:00:00 2001 From: Kristian Monsen Date: Fri, 21 May 2010 16:53:46 +0100 Subject: Merge WebKit at r59636: Initial merge by git Change-Id: I59b289c4e6b18425f06ce41cc9d34c522515de91 --- WebCore/rendering/RenderMeter.cpp | 62 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 WebCore/rendering/RenderMeter.cpp (limited to 'WebCore/rendering/RenderMeter.cpp') diff --git a/WebCore/rendering/RenderMeter.cpp b/WebCore/rendering/RenderMeter.cpp new file mode 100644 index 0000000..9dc6a26 --- /dev/null +++ b/WebCore/rendering/RenderMeter.cpp @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + */ + +#include "config.h" +#if ENABLE(METER_TAG) + +#include "RenderMeter.h" + +#include "HTMLMeterElement.h" +#include "RenderTheme.h" + +using namespace std; + +namespace WebCore { + +using namespace HTMLNames; + +RenderMeter::RenderMeter(HTMLMeterElement* element) + : RenderBlock(element) +{ +} + +void RenderMeter::layout() +{ + ASSERT(needsLayout()); + + LayoutRepainter repainter(*this, checkForRepaintDuringLayout()); + + calcWidth(); + calcHeight(); + + m_overflow.clear(); + + repainter.repaintAfterLayout(); + + setNeedsLayout(false); +} + +void RenderMeter::updateFromElement() +{ + repaint(); +} + +} // namespace WebCore +#endif -- cgit v1.1