Commit 6c242be7 authored by eric@webkit.org's avatar eric@webkit.org

2010-05-29 Laszlo Gombos <laszlo.1.gombos@nokia.com>

        Reviewed by Darin Adler.

        Remove set but never used variables
        https://bugs.webkit.org/show_bug.cgi?id=35252

        No new tests as there is no new functionality.

        * accessibility/AccessibilityRenderObject.cpp:
        (WebCore::lastChildConsideringContinuation):
        * css/CSSFontSelector.cpp:
        (WebCore::CSSFontSelector::addFontFaceRule):
        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseFontFaceUnicodeRange):
        * editing/InsertParagraphSeparatorCommand.cpp:
        (WebCore::InsertParagraphSeparatorCommand::doApply):
        * loader/appcache/ApplicationCacheStorage.cpp:
        (WebCore::ApplicationCacheStorage::loadManifestHostHashes):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleWheelEvent):
        * page/animation/AnimationBase.cpp:
        (WebCore::AnimationBase::getTimeToNextEvent):
        * rendering/AutoTableLayout.cpp:
        (WebCore::AutoTableLayout::recalcColumn):
        (WebCore::AutoTableLayout::layout):
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::calcInlinePrefWidths):
        * rendering/RenderSVGResourceClipper.cpp:
        (WebCore::RenderSVGResourceClipper::createClipData):
        * storage/DatabaseTracker.cpp:
        (WebCore::DatabaseTracker::canEstablishDatabase):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60408 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent b6a287f8
2010-05-29 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Reviewed by Darin Adler.
Remove set but never used variables
https://bugs.webkit.org/show_bug.cgi?id=35252
No new tests as there is no new functionality.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::lastChildConsideringContinuation):
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseFontFaceUnicodeRange):
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::doApply):
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::loadManifestHostHashes):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleWheelEvent):
* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::getTimeToNextEvent):
* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::recalcColumn):
(WebCore::AutoTableLayout::layout):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::calcInlinePrefWidths):
* rendering/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::createClipData):
* storage/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::canEstablishDatabase):
2010-05-29 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r60405.
......
......@@ -155,7 +155,7 @@ static inline RenderObject* firstChildConsideringContinuation(RenderObject* rend
static inline RenderObject* lastChildConsideringContinuation(RenderObject* renderer)
{
RenderObject* lastChild = renderer->lastChild();
RenderObject* prev = renderer;
RenderObject* prev;
RenderObject* cur = renderer;
if (!cur->isRenderInline() && !cur->isRenderBlock())
......
......@@ -231,7 +231,6 @@ void CSSFontSelector::addFontFaceRule(const CSSFontFaceRule* fontFaceRule)
int srcLength = srcList->length();
bool foundLocal = false;
bool foundSVGFont = false;
for (int i = 0; i < srcLength; i++) {
......@@ -257,7 +256,6 @@ void CSSFontSelector::addFontFaceRule(const CSSFontFaceRule* fontFaceRule)
}
} else {
source = new CSSFontFaceSource(item->resource());
foundLocal = true;
}
if (!fontFace)
......
......@@ -3568,9 +3568,8 @@ bool CSSParser::parseFontFaceSrc()
bool CSSParser::parseFontFaceUnicodeRange()
{
RefPtr<CSSValueList> values = CSSValueList::createCommaSeparated();
CSSParserValue* currentValue;
bool failed = false;
while ((currentValue = m_valueList->current())) {
while (m_valueList->current()) {
if (m_valueList->current()->unit != CSSPrimitiveValue::CSS_UNICODE_RANGE) {
failed = true;
break;
......
......@@ -214,7 +214,6 @@ void InsertParagraphSeparatorCommand::doApply()
// Handle case when position is in the last visible position in its block,
// including when the block is empty.
if (isLastInBlock) {
bool shouldApplyStyleAfterInsertion = true;
if (nestNewBlock) {
if (isFirstInBlock && !lineBreakExistsAtVisiblePosition(visiblePos)) {
// The block is empty. Create an empty block to
......@@ -227,11 +226,8 @@ void InsertParagraphSeparatorCommand::doApply()
} else {
// We can get here if we pasted a copied portion of a blockquote with a newline at the end and are trying to paste it
// into an unquoted area. We then don't want the newline within the blockquote or else it will also be quoted.
if (Node* highestBlockquote = highestEnclosingNodeOfType(canonicalPos, &isMailBlockquote)) {
if (Node* highestBlockquote = highestEnclosingNodeOfType(canonicalPos, &isMailBlockquote))
startBlock = static_cast<Element*>(highestBlockquote);
// When inserting the newline after the blockquote, we don't want to apply the original style after the insertion
shouldApplyStyleAfterInsertion = false;
}
// Most of the time we want to stay at the nesting level of the startBlock (e.g., when nesting within lists). However,
// for div nodes, this can result in nested div tags that are hard to break out of.
......
......@@ -171,8 +171,7 @@ void ApplicationCacheStorage::loadManifestHostHashes()
if (statement.prepare() != SQLResultOk)
return;
int result;
while ((result = statement.step()) == SQLResultRow)
while (statement.step() == SQLResultRow)
m_cacheHostSet.add(static_cast<unsigned>(statement.getColumnInt64(0)));
}
......
......@@ -1914,7 +1914,6 @@ bool EventHandler::handleWheelEvent(PlatformWheelEvent& e)
Node* node;
bool isOverWidget;
bool didSetLatchedNode = false;
HitTestRequest request(HitTestRequest::ReadOnly);
HitTestResult result(vPoint);
......@@ -1924,7 +1923,6 @@ bool EventHandler::handleWheelEvent(PlatformWheelEvent& e)
if (!m_latchedWheelEventNode) {
m_latchedWheelEventNode = result.innerNode();
m_widgetIsLatched = result.isOverWidget();
didSetLatchedNode = true;
}
node = m_latchedWheelEventNode.get();
......
......@@ -1226,10 +1226,6 @@ double AnimationBase::progress(double scale, double offset, const TimingFunction
void AnimationBase::getTimeToNextEvent(double& time, bool& isLooping) const
{
// Decide when the end or loop event needs to fire
double totalDuration = -1;
if (m_animation->iterationCount() > 0)
totalDuration = m_animation->duration() * m_animation->iterationCount();
const double elapsedDuration = max(beginAnimationUpdateTime() - m_startTime, 0.0);
double durationLeft = 0;
double nextIterationTime = m_totalDuration;
......
......@@ -64,7 +64,6 @@ void AutoTableLayout::recalcColumn(int effCol)
else if (child->isTableSection()) {
RenderTableSection* section = toRenderTableSection(child);
int numRows = section->numRows();
RenderTableCell* last = 0;
for (int i = 0; i < numRows; i++) {
RenderTableSection::CellStruct current = section->cellAt(i, effCol);
RenderTableCell* cell = current.cell;
......@@ -133,7 +132,6 @@ void AutoTableLayout::recalcColumn(int effCol)
l.maxWidth = max(l.maxWidth, 1);
insertSpanCell(cell);
}
last = cell;
}
}
}
......@@ -509,7 +507,6 @@ void AutoTableLayout::layout()
calcEffectiveWidth();
bool havePercent = false;
bool haveRelative = false;
int totalRelative = 0;
int numAuto = 0;
int numFixed = 0;
......@@ -531,7 +528,6 @@ void AutoTableLayout::layout()
totalPercent += width.rawValue();
break;
case Relative:
haveRelative = true;
totalRelative += width.value();
break;
case Fixed:
......
......@@ -4326,7 +4326,6 @@ void RenderBlock::calcInlinePrefWidths()
InlineMinMaxIterator childIterator(this);
bool addedTextIndent = false; // Only gets added in once.
RenderObject* prevFloat = 0;
RenderObject* previousLeaf = 0;
while (RenderObject* child = childIterator.next()) {
autoWrap = child->isReplaced() ? child->parent()->style()->autoWrap() :
child->style()->autoWrap();
......@@ -4554,8 +4553,6 @@ void RenderBlock::calcInlinePrefWidths()
}
oldAutoWrap = autoWrap;
if (!child->isRenderInline())
previousLeaf = child;
}
if (style()->collapseWhiteSpace())
......
......@@ -184,9 +184,7 @@ bool RenderSVGResourceClipper::createClipData(ClipperData* clipperData, const Fl
maskContext->translate(-repaintRect.x(), -repaintRect.y());
// clipPath can also be clipped by another clipPath.
bool clipperGetsClipped = false;
if (RenderSVGResourceClipper* clipper = getRenderSVGResourceById<RenderSVGResourceClipper>(this->document(), style()->svgStyle()->clipperResource())) {
clipperGetsClipped = true;
if (!clipper->applyClippingToContext(this, objectBoundingBox, repaintRect, maskContext)) {
maskContext->restore();
return false;
......
......@@ -141,7 +141,6 @@ bool DatabaseTracker::canEstablishDatabase(ScriptExecutionContext* context, cons
ProposedDatabase details;
unsigned long long requirement;
unsigned long long tempUsage;
{
MutexLocker lockDatabase(m_databaseGuard);
Locker<OriginQuotaManager> quotaManagerLocker(originQuotaManager());
......@@ -161,7 +160,6 @@ bool DatabaseTracker::canEstablishDatabase(ScriptExecutionContext* context, cons
// If the database will fit, allow its creation.
requirement = usage + max(1UL, estimatedSize);
tempUsage = usage;
if (requirement < usage) {
doneCreatingDatabase(origin, name);
return false; // If the estimated size is so big it causes an overflow, don't allow creation.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment