Commit 9c4dacca authored by ddkilzer@apple.com's avatar ddkilzer@apple.com

2009-07-10 Shinichiro Hamaji <hamaji@chromium.org>

        Reviewed by David Kilzer.

        WebKit needs a style linting tool
        https://bugs.webkit.org/show_bug.cgi?id=25884

        Fix bunch of style issues by autofix of cpplint.
        This patch is created to demonstrate the autofix of cpplint.py.

        No new testcases because it's a style fix

        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseMediaQuery):
        (WebCore::CSSParser::validUnit):
        (WebCore::CSSParser::parseValue):
        (WebCore::skipCommaInDashboardRegion):
        (WebCore::CSSParser::parseDashboardRegions):
        (WebCore::ShadowParseContext::commitValue):
        (WebCore::ShadowParseContext::commitLength):
        (WebCore::ShadowParseContext::commitColor):
        (WebCore::BorderImageParseContext::commitNumber):
        (WebCore::BorderImageParseContext::commitWidth):
        (WebCore::BorderImageParseContext::commitRule):
        (WebCore::BorderImageParseContext::commitBorderImage):
        (WebCore::CSSParser::lex):
        (WebCore::CSSParser::text):
        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::applyProperty):
        * css/MediaList.cpp:
        (WebCore::MediaList::deleteMedium):
        * css/MediaQuery.h:
        * css/MediaQueryEvaluator.cpp:
        (WebCore::parseAspectRatio):
        * css/MediaQueryEvaluator.h:
        * css/MediaQueryExp.h:
        (WebCore::MediaQueryExp::operator==):
        * css/WebKitCSSMatrix.h:
        * dom/Comment.h:
        * dom/Document.cpp:
        (WebCore::Document::setFocusedNode):
        * dom/Document.h:
        (WebCore::Document::setHasDashboardRegions):
        * dom/DocumentFragment.cpp:
        (WebCore::DocumentFragment::nodeName):
        * dom/DocumentFragment.h:
        * dom/DynamicNodeList.h:
        * dom/EditingText.h:
        * dom/Element.cpp:
        (WebCore::Element::dispatchAttrAdditionEvent):
        * dom/NamedAttrMap.cpp:
        (WebCore::NamedNodeMap::item):
        * dom/Node.cpp:
        (WebCore::Node::nodeValue):
        (WebCore::Node::nodeIndex):
        * dom/NodeRareData.h:
        (WebCore::NodeListsNodeData::create):
        * dom/Notation.h:
        * dom/ProcessingInstruction.h:
        * dom/Range.cpp:
        (WebCore::Range::processContents):
        * dom/StyledElement.cpp:
        (WebCore::toHex):
        * dom/XMLTokenizerLibxml2.cpp:
        (WebCore::PendingCallbacks::PendingStartElementNSCallback::~PendingStartElementNSCallback):
        (WebCore::PendingCallbacks::PendingStartElementNSCallback::call):
        (WebCore::PendingCallbacks::):
        (WebCore::OffsetBuffer::readOutBytes):
        (WebCore::handleElementNamespaces):
        (WebCore::handleElementAttributes):
        (WebCore::attributesStartElementNsHandler):
        * dom/XMLTokenizerQt.cpp:
        (WebCore::attributesStartElementNsHandler):
        (WebCore::XMLTokenizer::parseStartElement):
        * editing/ApplyStyleCommand.cpp:
        (WebCore::ApplyStyleCommand::applyInlineStyle):
        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::removeNode):
        * editing/Editor.cpp:
        (WebCore::Editor::pasteAsPlainText):
        * editing/SelectionController.cpp:
        (WebCore::SelectionController::directionOfEnclosingBlock):
        * editing/SmartReplaceICU.cpp:
        (WebCore::addAllCodePoints):
        * history/HistoryItem.cpp:
        (WebCore::HistoryItem::icon):
        (WebCore::HistoryItem::adoptVisitCounts):
        * html/CanvasStyle.cpp:
        (WebCore::CanvasStyle::applyFillColor):
        * html/HTMLAnchorElement.cpp:
        (WebCore::HTMLAnchorElement::setActive):
        (WebCore::HTMLAnchorElement::isLiveLink):
        * html/HTMLAppletElement.h:
        * html/HTMLAudioElement.h:
        * html/HTMLBRElement.h:
        * html/HTMLBaseElement.h:
        * html/HTMLBaseFontElement.h:
        * html/HTMLDListElement.h:
        * html/HTMLDirectoryElement.h:
        * html/HTMLFieldSetElement.cpp:
        (WebCore::HTMLFieldSetElement::HTMLFieldSetElement):
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::reset):
        * html/HTMLHRElement.cpp:
        (WebCore::HTMLHRElement::parseMappedAttribute):
        * html/HTMLHeadElement.h:
        * html/HTMLHtmlElement.h:
        * html/HTMLImageElement.h:
        (WebCore::HTMLImageElement::setLoadManually):
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::selection):
        * html/HTMLIsIndexElement.h:
        * html/HTMLMarqueeElement.cpp:
        * html/HTMLMediaElement.h:
        (WebCore::HTMLMediaElement::):
        * html/HTMLMenuElement.h:
        * html/HTMLMetaElement.h:
        * html/HTMLModElement.h:
        * html/HTMLOListElement.h:
        * html/HTMLOptionElement.cpp:
        (WebCore::HTMLOptionElement::childrenChanged):
        * html/HTMLParamElement.h:
        * html/HTMLQuoteElement.h:
        * html/HTMLStyleElement.h:
        * html/HTMLTableCaptionElement.h:
        * html/HTMLTableCellElement.h:
        * html/HTMLTableColElement.h:
        * html/HTMLTableSectionElement.cpp:
        (WebCore::HTMLTableSectionElement::deleteRow):
        * html/HTMLTitleElement.h:
        * html/HTMLTokenizer.cpp:
        (WebCore::HTMLTokenizer::parseNonHTMLText):
        (WebCore::HTMLTokenizer::parseEntity):
        (WebCore::HTMLTokenizer::parseTag):
        (WebCore::HTMLTokenizer::write):
        * html/HTMLUListElement.h:
        * html/HTMLVideoElement.h:
        * html/TimeRanges.h:
        (WebCore::TimeRanges::Range::Range):
        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::enableResourceTracking):
        (WebCore::InspectorController::disableResourceTracking):
        * inspector/InspectorFrontend.cpp:
        (WebCore::InspectorFrontend::newInspectorJSONObject):
        * page/Console.cpp:
        (WebCore::Console::addMessage):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleMousePressEvent):
        (WebCore::EventHandler::selectCursor):
        (WebCore::EventHandler::defaultKeyboardEventHandler):
        * page/Frame.cpp:
        (WebCore::Frame::jsDefaultStatusBarText):
        * page/android/DragControllerAndroid.cpp:
        (WebCore::DragController::dragOperation):
        * page/android/EventHandlerAndroid.cpp:
        (WebCore::EventHandler::tabsToAllControls):
        (WebCore::EventHandler::eventActivatedView):
        * page/animation/AnimationController.cpp:
        (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
        * page/gtk/DragControllerGtk.cpp:
        (WebCore::DragController::dragOperation):
        * page/qt/DragControllerQt.cpp:
        * page/win/DragControllerWin.cpp:
        (WebCore::DragController::isCopyKeyDown):
        * page/win/FrameWin.h:
        * rendering/RenderSlider.cpp:
        (WebCore::RenderSlider::mouseEventOffsetToThumb):
        * rendering/style/RenderStyle.h:
        (WebCore::InheritedFlags::setVerticalAlignLength):
        (WebCore::InheritedFlags::setUnicodeBidi):
        (WebCore::InheritedFlags::setCursor):
        * rendering/style/RenderStyleConstants.h:
        (WebCore::):
        * rendering/style/SVGRenderStyleDefs.h:
        * rendering/style/StyleInheritedData.h:
        (WebCore::StyleInheritedData::operator!=):
        * storage/DatabaseTask.h:
        * svg/GradientAttributes.h:
        * svg/LinearGradientAttributes.h:
        * svg/PatternAttributes.h:
        * svg/RadialGradientAttributes.h:
        * svg/SVGAnimatedPathData.h:
        * svg/SVGAnimatedPoints.h:
        * svg/SVGAnimationElement.h:
        * svg/SVGClipPathElement.h:
        * svg/SVGElementInstance.h:
        * svg/SVGFEBlendElement.cpp:
        (WebCore::SVGFEBlendElement::build):
        * svg/SVGFEBlendElement.h:
        * svg/SVGFEColorMatrixElement.cpp:
        (WebCore::SVGFEColorMatrixElement::build):
        * svg/SVGFEComponentTransferElement.cpp:
        (WebCore::SVGFEComponentTransferElement::build):
        * svg/SVGFECompositeElement.cpp:
        (WebCore::SVGFECompositeElement::build):
        * svg/SVGFEDiffuseLightingElement.cpp:
        (WebCore::SVGFEDiffuseLightingElement::build):
        * svg/SVGFEDisplacementMapElement.cpp:
        (WebCore::SVGFEDisplacementMapElement::build):
        * svg/SVGFEDistantLightElement.h:
        * svg/SVGFEFloodElement.cpp:
        (WebCore::SVGFEFloodElement::build):
        * svg/SVGFEFloodElement.h:
        * svg/SVGFEFuncAElement.h:
        * svg/SVGFEFuncBElement.h:
        * svg/SVGFEFuncGElement.h:
        * svg/SVGFEFuncRElement.h:
        * svg/SVGFEGaussianBlurElement.cpp:
        (WebCore::SVGFEGaussianBlurElement::build):
        * svg/SVGFEImageElement.cpp:
        (WebCore::SVGFEImageElement::build):
        * svg/SVGFEMergeElement.cpp:
        (WebCore::SVGFEMergeElement::build):
        * svg/SVGFEOffsetElement.cpp:
        (WebCore::SVGFEOffsetElement::build):
        * svg/SVGFEPointLightElement.h:
        * svg/SVGFESpecularLightingElement.cpp:
        (WebCore::SVGFESpecularLightingElement::build):
        * svg/SVGFESpotLightElement.h:
        * svg/SVGFETileElement.cpp:
        (WebCore::SVGFETileElement::build):
        * svg/SVGLineElement.cpp:
        (WebCore::SVGLineElement::parseMappedAttribute):
        * svg/SVGList.h:
        * svg/SVGListTraits.h:
        (WebCore::):
        * svg/SVGMPathElement.h:
        * svg/SVGMetadataElement.h:
        * svg/SVGParserUtilities.cpp:
        (WebCore::SVGPathParser::parseSVG):
        (WebCore::SVGPathParser::calculateArc):
        * svg/SVGPathElement.h:
        * svg/SVGPathSegClosePath.h:
        * svg/SVGSVGElement.h:
        * svg/SVGSetElement.h:
        * svg/SVGSwitchElement.h:
        * svg/SVGTextPathElement.cpp:
        (WebCore::SVGTextPathElement::parseMappedAttribute):
        * svg/SVGTextPathElement.h:
        * svg/SVGTitleElement.h:
        * svg/SVGTransformable.cpp:
        (WebCore::):
        * svg/SVGViewSpec.cpp:
        (WebCore::):
        * svg/animation/SMILTime.cpp:
        (WebCore::operator+):
        (WebCore::operator-):
        (WebCore::operator*):
        * svg/animation/SVGSMILElement.h:
        * svg/graphics/SVGResource.cpp:
        (WebCore::clientMap):
        * wml/WMLPostfieldElement.cpp:
        (WebCore::WMLPostfieldElement::value):
        * wml/WMLSetvarElement.cpp:
        (WebCore::WMLSetvarElement::value):
        * workers/WorkerRunLoop.cpp:
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::dropProtection):
        * xml/XPathPath.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45747 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 2edf14c4
2009-07-10 Shinichiro Hamaji <hamaji@chromium.org>
Reviewed by David Kilzer.
WebKit needs a style linting tool
https://bugs.webkit.org/show_bug.cgi?id=25884
Fix bunch of style issues by autofix of cpplint.
This patch is created to demonstrate the autofix of cpplint.py.
No new testcases because it's a style fix
* css/CSSParser.cpp:
(WebCore::CSSParser::parseMediaQuery):
(WebCore::CSSParser::validUnit):
(WebCore::CSSParser::parseValue):
(WebCore::skipCommaInDashboardRegion):
(WebCore::CSSParser::parseDashboardRegions):
(WebCore::ShadowParseContext::commitValue):
(WebCore::ShadowParseContext::commitLength):
(WebCore::ShadowParseContext::commitColor):
(WebCore::BorderImageParseContext::commitNumber):
(WebCore::BorderImageParseContext::commitWidth):
(WebCore::BorderImageParseContext::commitRule):
(WebCore::BorderImageParseContext::commitBorderImage):
(WebCore::CSSParser::lex):
(WebCore::CSSParser::text):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* css/MediaList.cpp:
(WebCore::MediaList::deleteMedium):
* css/MediaQuery.h:
* css/MediaQueryEvaluator.cpp:
(WebCore::parseAspectRatio):
* css/MediaQueryEvaluator.h:
* css/MediaQueryExp.h:
(WebCore::MediaQueryExp::operator==):
* css/WebKitCSSMatrix.h:
* dom/Comment.h:
* dom/Document.cpp:
(WebCore::Document::setFocusedNode):
* dom/Document.h:
(WebCore::Document::setHasDashboardRegions):
* dom/DocumentFragment.cpp:
(WebCore::DocumentFragment::nodeName):
* dom/DocumentFragment.h:
* dom/DynamicNodeList.h:
* dom/EditingText.h:
* dom/Element.cpp:
(WebCore::Element::dispatchAttrAdditionEvent):
* dom/NamedAttrMap.cpp:
(WebCore::NamedNodeMap::item):
* dom/Node.cpp:
(WebCore::Node::nodeValue):
(WebCore::Node::nodeIndex):
* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::create):
* dom/Notation.h:
* dom/ProcessingInstruction.h:
* dom/Range.cpp:
(WebCore::Range::processContents):
* dom/StyledElement.cpp:
(WebCore::toHex):
* dom/XMLTokenizerLibxml2.cpp:
(WebCore::PendingCallbacks::PendingStartElementNSCallback::~PendingStartElementNSCallback):
(WebCore::PendingCallbacks::PendingStartElementNSCallback::call):
(WebCore::PendingCallbacks::):
(WebCore::OffsetBuffer::readOutBytes):
(WebCore::handleElementNamespaces):
(WebCore::handleElementAttributes):
(WebCore::attributesStartElementNsHandler):
* dom/XMLTokenizerQt.cpp:
(WebCore::attributesStartElementNsHandler):
(WebCore::XMLTokenizer::parseStartElement):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyInlineStyle):
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::removeNode):
* editing/Editor.cpp:
(WebCore::Editor::pasteAsPlainText):
* editing/SelectionController.cpp:
(WebCore::SelectionController::directionOfEnclosingBlock):
* editing/SmartReplaceICU.cpp:
(WebCore::addAllCodePoints):
* history/HistoryItem.cpp:
(WebCore::HistoryItem::icon):
(WebCore::HistoryItem::adoptVisitCounts):
* html/CanvasStyle.cpp:
(WebCore::CanvasStyle::applyFillColor):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::setActive):
(WebCore::HTMLAnchorElement::isLiveLink):
* html/HTMLAppletElement.h:
* html/HTMLAudioElement.h:
* html/HTMLBRElement.h:
* html/HTMLBaseElement.h:
* html/HTMLBaseFontElement.h:
* html/HTMLDListElement.h:
* html/HTMLDirectoryElement.h:
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::HTMLFieldSetElement):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::reset):
* html/HTMLHRElement.cpp:
(WebCore::HTMLHRElement::parseMappedAttribute):
* html/HTMLHeadElement.h:
* html/HTMLHtmlElement.h:
* html/HTMLImageElement.h:
(WebCore::HTMLImageElement::setLoadManually):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::selection):
* html/HTMLIsIndexElement.h:
* html/HTMLMarqueeElement.cpp:
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::):
* html/HTMLMenuElement.h:
* html/HTMLMetaElement.h:
* html/HTMLModElement.h:
* html/HTMLOListElement.h:
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::childrenChanged):
* html/HTMLParamElement.h:
* html/HTMLQuoteElement.h:
* html/HTMLStyleElement.h:
* html/HTMLTableCaptionElement.h:
* html/HTMLTableCellElement.h:
* html/HTMLTableColElement.h:
* html/HTMLTableSectionElement.cpp:
(WebCore::HTMLTableSectionElement::deleteRow):
* html/HTMLTitleElement.h:
* html/HTMLTokenizer.cpp:
(WebCore::HTMLTokenizer::parseNonHTMLText):
(WebCore::HTMLTokenizer::parseEntity):
(WebCore::HTMLTokenizer::parseTag):
(WebCore::HTMLTokenizer::write):
* html/HTMLUListElement.h:
* html/HTMLVideoElement.h:
* html/TimeRanges.h:
(WebCore::TimeRanges::Range::Range):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::enableResourceTracking):
(WebCore::InspectorController::disableResourceTracking):
* inspector/InspectorFrontend.cpp:
(WebCore::InspectorFrontend::newInspectorJSONObject):
* page/Console.cpp:
(WebCore::Console::addMessage):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::selectCursor):
(WebCore::EventHandler::defaultKeyboardEventHandler):
* page/Frame.cpp:
(WebCore::Frame::jsDefaultStatusBarText):
* page/android/DragControllerAndroid.cpp:
(WebCore::DragController::dragOperation):
* page/android/EventHandlerAndroid.cpp:
(WebCore::EventHandler::tabsToAllControls):
(WebCore::EventHandler::eventActivatedView):
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
* page/gtk/DragControllerGtk.cpp:
(WebCore::DragController::dragOperation):
* page/qt/DragControllerQt.cpp:
* page/win/DragControllerWin.cpp:
(WebCore::DragController::isCopyKeyDown):
* page/win/FrameWin.h:
* rendering/RenderSlider.cpp:
(WebCore::RenderSlider::mouseEventOffsetToThumb):
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::setVerticalAlignLength):
(WebCore::InheritedFlags::setUnicodeBidi):
(WebCore::InheritedFlags::setCursor):
* rendering/style/RenderStyleConstants.h:
(WebCore::):
* rendering/style/SVGRenderStyleDefs.h:
* rendering/style/StyleInheritedData.h:
(WebCore::StyleInheritedData::operator!=):
* storage/DatabaseTask.h:
* svg/GradientAttributes.h:
* svg/LinearGradientAttributes.h:
* svg/PatternAttributes.h:
* svg/RadialGradientAttributes.h:
* svg/SVGAnimatedPathData.h:
* svg/SVGAnimatedPoints.h:
* svg/SVGAnimationElement.h:
* svg/SVGClipPathElement.h:
* svg/SVGElementInstance.h:
* svg/SVGFEBlendElement.cpp:
(WebCore::SVGFEBlendElement::build):
* svg/SVGFEBlendElement.h:
* svg/SVGFEColorMatrixElement.cpp:
(WebCore::SVGFEColorMatrixElement::build):
* svg/SVGFEComponentTransferElement.cpp:
(WebCore::SVGFEComponentTransferElement::build):
* svg/SVGFECompositeElement.cpp:
(WebCore::SVGFECompositeElement::build):
* svg/SVGFEDiffuseLightingElement.cpp:
(WebCore::SVGFEDiffuseLightingElement::build):
* svg/SVGFEDisplacementMapElement.cpp:
(WebCore::SVGFEDisplacementMapElement::build):
* svg/SVGFEDistantLightElement.h:
* svg/SVGFEFloodElement.cpp:
(WebCore::SVGFEFloodElement::build):
* svg/SVGFEFloodElement.h:
* svg/SVGFEFuncAElement.h:
* svg/SVGFEFuncBElement.h:
* svg/SVGFEFuncGElement.h:
* svg/SVGFEFuncRElement.h:
* svg/SVGFEGaussianBlurElement.cpp:
(WebCore::SVGFEGaussianBlurElement::build):
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::build):
* svg/SVGFEMergeElement.cpp:
(WebCore::SVGFEMergeElement::build):
* svg/SVGFEOffsetElement.cpp:
(WebCore::SVGFEOffsetElement::build):
* svg/SVGFEPointLightElement.h:
* svg/SVGFESpecularLightingElement.cpp:
(WebCore::SVGFESpecularLightingElement::build):
* svg/SVGFESpotLightElement.h:
* svg/SVGFETileElement.cpp:
(WebCore::SVGFETileElement::build):
* svg/SVGLineElement.cpp:
(WebCore::SVGLineElement::parseMappedAttribute):
* svg/SVGList.h:
* svg/SVGListTraits.h:
(WebCore::):
* svg/SVGMPathElement.h:
* svg/SVGMetadataElement.h:
* svg/SVGParserUtilities.cpp:
(WebCore::SVGPathParser::parseSVG):
(WebCore::SVGPathParser::calculateArc):
* svg/SVGPathElement.h:
* svg/SVGPathSegClosePath.h:
* svg/SVGSVGElement.h:
* svg/SVGSetElement.h:
* svg/SVGSwitchElement.h:
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::parseMappedAttribute):
* svg/SVGTextPathElement.h:
* svg/SVGTitleElement.h:
* svg/SVGTransformable.cpp:
(WebCore::):
* svg/SVGViewSpec.cpp:
(WebCore::):
* svg/animation/SMILTime.cpp:
(WebCore::operator+):
(WebCore::operator-):
(WebCore::operator*):
* svg/animation/SVGSMILElement.h:
* svg/graphics/SVGResource.cpp:
(WebCore::clientMap):
* wml/WMLPostfieldElement.cpp:
(WebCore::WMLPostfieldElement::value):
* wml/WMLSetvarElement.cpp:
(WebCore::WMLSetvarElement::value):
* workers/WorkerRunLoop.cpp:
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::dropProtection):
* xml/XPathPath.h:
2009-07-10 Eric Carlson <eric.carlson@apple.com>
Reviewed by Simon Fraser.
......
......@@ -347,7 +347,7 @@ bool CSSParser::parseMediaQuery(MediaList* queries, const String& string)
m_mediaQuery = 0;
// can't use { because tokenizer state switches from mediaquery to initial state when it sees { token.
// instead insert one " " (which is WHITESPACE in CSSGrammar.y)
setupParser ("@-webkit-mediaquery ", string, "} ");
setupParser("@-webkit-mediaquery ", string, "} ");
cssyyparse(this);
bool ok = false;
......@@ -408,7 +408,7 @@ bool CSSParser::validUnit(CSSParserValue* value, Units unitflags, bool strict)
return false;
bool b = false;
switch(value->unit) {
switch (value->unit) {
case CSSPrimitiveValue::CSS_NUMBER:
b = (unitflags & FNumber);
if (!b && ((unitflags & (FLength | FAngle | FTime)) && (value->fValue == 0 || !strict))) {
......@@ -1049,7 +1049,7 @@ bool CSSParser::parseValue(int propId, bool important)
} else {
RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
bool is_valid = true;
while(is_valid && value) {
while (is_valid && value) {
switch (value->id) {
case CSSValueBlink:
break;
......@@ -2577,7 +2577,7 @@ bool CSSParser::parseAnimationProperty(int propId, RefPtr<CSSValue>& result)
#define DASHBOARD_REGION_NUM_PARAMETERS 6
#define DASHBOARD_REGION_SHORT_NUM_PARAMETERS 2
static CSSParserValue* skipCommaInDashboardRegion (CSSParserValueList *args)
static CSSParserValue* skipCommaInDashboardRegion(CSSParserValueList *args)
{
if (args->size() == (DASHBOARD_REGION_NUM_PARAMETERS*2-1) ||
args->size() == (DASHBOARD_REGION_SHORT_NUM_PARAMETERS*2-1)) {
......@@ -2632,7 +2632,7 @@ bool CSSParser::parseDashboardRegions(int propId, bool important)
int numArgs = args->size();
if ((numArgs != DASHBOARD_REGION_NUM_PARAMETERS && numArgs != (DASHBOARD_REGION_NUM_PARAMETERS*2-1)) &&
(numArgs != DASHBOARD_REGION_SHORT_NUM_PARAMETERS && numArgs != (DASHBOARD_REGION_SHORT_NUM_PARAMETERS*2-1))){
(numArgs != DASHBOARD_REGION_SHORT_NUM_PARAMETERS && numArgs != (DASHBOARD_REGION_SHORT_NUM_PARAMETERS*2-1))) {
valid = false;
break;
}
......@@ -2648,7 +2648,7 @@ bool CSSParser::parseDashboardRegions(int propId, bool important)
// Second arg is a type.
arg = args->next();
arg = skipCommaInDashboardRegion (args);
arg = skipCommaInDashboardRegion(args);
if (arg->unit != CSSPrimitiveValue::CSS_IDENT) {
valid = false;
break;
......@@ -2678,7 +2678,7 @@ bool CSSParser::parseDashboardRegions(int propId, bool important)
int i;
for (i = 0; i < 4; i++) {
arg = args->next();
arg = skipCommaInDashboardRegion (args);
arg = skipCommaInDashboardRegion(args);
valid = arg->id == CSSValueAuto || validUnit(arg, FLength, m_strict);
if (!valid)
......@@ -3439,7 +3439,8 @@ struct ShadowParseContext {
bool allowLength() { return allowX || allowY || allowBlur; }
void commitValue() {
void commitValue()
{
// Handle the ,, case gracefully by doing nothing.
if (x || y || blur || color) {
if (!values)
......@@ -3455,7 +3456,8 @@ struct ShadowParseContext {
allowY = allowBlur = false;
}
void commitLength(CSSParserValue* v) {
void commitLength(CSSParserValue* v)
{
RefPtr<CSSPrimitiveValue> val = CSSPrimitiveValue::create(v->fValue, (CSSPrimitiveValue::UnitTypes)v->unit);
if (allowX) {
......@@ -3472,7 +3474,8 @@ struct ShadowParseContext {
}
}
void commitColor(PassRefPtr<CSSPrimitiveValue> val) {
void commitColor(PassRefPtr<CSSPrimitiveValue> val)
{
color = val;
allowColor = false;
if (allowX)
......@@ -3604,8 +3607,7 @@ bool CSSParser::parseReflect(int propId, bool important)
return true;
}
struct BorderImageParseContext
{
struct BorderImageParseContext {
BorderImageParseContext()
: m_allowBreak(false)
, m_allowNumber(false)
......@@ -3627,7 +3629,8 @@ struct BorderImageParseContext
bool allowRule() const { return m_allowRule; }
void commitImage(PassRefPtr<CSSValue> image) { m_image = image; m_allowNumber = true; }
void commitNumber(CSSParserValue* v) {
void commitNumber(CSSParserValue* v)
{
PassRefPtr<CSSPrimitiveValue> val = CSSPrimitiveValue::create(v->fValue, (CSSPrimitiveValue::UnitTypes)v->unit);
if (!m_top)
m_top = val;
......@@ -3644,7 +3647,8 @@ struct BorderImageParseContext
m_allowNumber = !m_left;
}
void commitSlash() { m_allowBreak = m_allowSlash = m_allowNumber = false; m_allowWidth = true; }
void commitWidth(CSSParserValue* val) {
void commitWidth(CSSParserValue* val)
{
if (!m_borderTop)
m_borderTop = val;
else if (!m_borderRight)
......@@ -3659,14 +3663,16 @@ struct BorderImageParseContext
m_allowBreak = m_allowRule = true;
m_allowWidth = !m_borderLeft;
}
void commitRule(int keyword) {
void commitRule(int keyword)
{
if (!m_horizontalRule)
m_horizontalRule = keyword;
else if (!m_verticalRule)
m_verticalRule = keyword;
m_allowRule = !m_verticalRule;
}
PassRefPtr<CSSValue> commitBorderImage(CSSParser* p, bool important) {
PassRefPtr<CSSValue> commitBorderImage(CSSParser* p, bool important)
{
// We need to clone and repeat values for any omissions.
if (!m_right) {
m_right = CSSPrimitiveValue::create(m_top->getDoubleValue(), (CSSPrimitiveValue::UnitTypes)m_top->primitiveType());
......@@ -4292,7 +4298,7 @@ int CSSParser::lex(void* yylvalWithoutType)
int length;
UChar* t = text(&length);
switch(token) {
switch (token) {
case WHITESPACE:
case SGML_CD:
case INCLUDES:
......@@ -4375,7 +4381,7 @@ UChar* CSSParser::text(int *length)
{
UChar* start = yytext;
int l = yyleng;
switch(yyTok) {
switch (yyTok) {
case STRING:
l--;
/* nobreak */
......
......@@ -3438,7 +3438,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
}
int width = 0;
if (primitiveValue && primitiveValue->getIdent() == CSSValueNormal){
if (primitiveValue && primitiveValue->getIdent() == CSSValueNormal) {
width = 0;
} else {
if (!primitiveValue)
......@@ -4956,7 +4956,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
int type = primitiveValue->primitiveType();
if (CSSPrimitiveValue::isUnitTypeLength(type))
l = Length(primitiveValue->computeLengthIntForLength(style(), zoomFactor), Fixed);
else if(type == CSSPrimitiveValue::CSS_PERCENTAGE)
else if (type == CSSPrimitiveValue::CSS_PERCENTAGE)
l = Length(primitiveValue->getDoubleValue(), Percent);
else
return;
......@@ -5026,7 +5026,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
int type = primitiveValue->primitiveType();
if (CSSPrimitiveValue::isUnitTypeLength(type))
l = Length(primitiveValue->computeLengthIntForLength(style(), zoomFactor), Fixed);
else if(type == CSSPrimitiveValue::CSS_PERCENTAGE)
else if (type == CSSPrimitiveValue::CSS_PERCENTAGE)
l = Length(primitiveValue->getDoubleValue(), Percent);
else
return;
......
......@@ -139,7 +139,7 @@ void MediaList::deleteMedium(const String& oldMedium, ExceptionCode& ec)
ec = NOT_FOUND_ERR;
if (oldQuery) {
for(size_t i = 0; i < m_queries.size(); ++i) {
for (size_t i = 0; i < m_queries.size(); ++i) {
MediaQuery* a = m_queries[i];
if (*a == *oldQuery) {
m_queries.remove(i);
......
......@@ -34,8 +34,7 @@
namespace WebCore {
class MediaQueryExp;
class MediaQuery
{
class MediaQuery {
public:
enum Restrictor {
Only, Not, None
......
......@@ -162,7 +162,7 @@ bool MediaQueryEvaluator::eval(const MediaList* mediaList, CSSStyleSelector* sty
static bool parseAspectRatio(CSSValue* value, int& h, int& v)
{
if (value->isValueList()){
if (value->isValueList()) {
CSSValueList* valueList = static_cast<CSSValueList*>(value);
if (valueList->length() == 3) {
CSSValue* i0 = valueList->itemWithoutBoundsCheck(0);
......
......@@ -49,8 +49,7 @@ class MediaQueryExp;
* the device characteristics are not known. This can be used to prune the loading
* of stylesheets to only those which are probable to match.
*/
class MediaQueryEvaluator
{
class MediaQueryEvaluator {
public:
/** Creates evaluator which evaluates only simple media queries
* Evaluator returns true for "all", and returns value of \mediaFeatureResult
......
......@@ -36,8 +36,7 @@
namespace WebCore {
class CSSParserValueList;
class MediaQueryExp
{
class MediaQueryExp {
public:
MediaQueryExp(const AtomicString& mediaFeature, CSSParserValueList* values);
~MediaQueryExp();
......@@ -46,7 +45,8 @@ public:
CSSValue* value() const { return m_value.get(); }
bool operator==(const MediaQueryExp& other) const {
bool operator==(const MediaQueryExp& other) const
{
return (other.m_mediaFeature == m_mediaFeature)
&& ((!other.m_value && !m_value)
|| (other.m_value && m_value && other.m_value->cssText() == m_value->cssText()));
......
......@@ -149,7 +149,7 @@ protected:
WebKitCSSMatrix();
WebKitCSSMatrix(const WebKitCSSMatrix&);
WebKitCSSMatrix(const TransformationMatrix&);
WebKitCSSMatrix(const String&, ExceptionCode& );
WebKitCSSMatrix(const String&, ExceptionCode&);
TransformationMatrix m_matrix;
};
......
......@@ -29,8 +29,7 @@
namespace WebCore {
class Comment : public CharacterData
{
class Comment : public CharacterData {
public:
Comment(Document*, const String &_text);
Comment(Document*);
......
......@@ -2604,7 +2604,7 @@ bool Document::setFocusedNode(PassRefPtr<Node> newFocusedNode)
else
view()->setFocus();
}
}
}
#if PLATFORM(MAC) && !PLATFORM(CHROMIUM)
if (!focusChangeBlocked && m_focusedNode && AXObjectCache::accessibilityEnabled())
......
......@@ -224,7 +224,7 @@ public:
}
virtual PassRefPtr<Element> createElement(const AtomicString& tagName, ExceptionCode&);
PassRefPtr<DocumentFragment> createDocumentFragment ();
PassRefPtr<DocumentFragment> createDocumentFragment();
PassRefPtr<Text> createTextNode(const String& data);
PassRefPtr<Comment> createComment(const String& data);
PassRefPtr<CDATASection> createCDATASection(const String& data, ExceptionCode&);
......@@ -403,7 +403,7 @@ public:
PassRefPtr<CSSStyleDeclaration> createCSSStyleDeclaration();
PassRefPtr<EditingText> createEditingTextNode(const String&);
virtual void recalcStyle( StyleChange = NoChange );
virtual void recalcStyle(StyleChange = NoChange);
virtual void updateStyleIfNeeded();
void updateLayout();
void updateLayoutIgnorePendingStylesheets();
......@@ -990,7 +990,7 @@ public:
void setDashboardRegionsDirty(bool f) { m_dashboardRegionsDirty = f; }
bool dashboardRegionsDirty() const { return m_dashboardRegionsDirty; }
bool hasDashboardRegions () const { return m_hasDashboardRegions; }
void setHasDashboardRegions (bool f) { m_hasDashboardRegions = f; }
void setHasDashboardRegions(bool f) { m_hasDashboardRegions = f; }
const Vector<DashboardRegionValue>& dashboardRegions() const;
void setDashboardRegions(const Vector<DashboardRegionValue>&);
#endif
......
......@@ -34,7 +34,7 @@ DocumentFragment::DocumentFragment(Document *doc) : ContainerNode(doc)
String DocumentFragment::nodeName() const
{
return "#document-fragment";
return "#document-fragment";
}
Node::NodeType DocumentFragment::nodeType() const
......
......@@ -30,8 +30,7 @@
namespace WebCore {
class DocumentFragment : public ContainerNode
{
class DocumentFragment : public ContainerNode {
public:
DocumentFragment(Document*);
......
......@@ -37,7 +37,7 @@ namespace WebCore {
class DynamicNodeList : public NodeList {
public:
struct Caches : RefCounted<Caches>{
struct Caches : RefCounted<Caches> {
static PassRefPtr<Caches> create();
void reset();
......