Changeset 127649 in webkit


Ignore:
Timestamp:
Sep 5, 2012 2:50:21 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Make RenderStyle::colorIncludingFallback use private getters
https://bugs.webkit.org/show_bug.cgi?id=95863

Patch by Bruno de Oliveira Abinader <Bruno de Oliveira Abinader> on 2012-09-05
Reviewed by Eric Seidel.

For readibility and maintanability reasons, it is better to use getters for
visited* color variables than accessing them directly.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::colorIncludingFallback):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r127639 r127649  
     12012-09-05  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
     2
     3        Make RenderStyle::colorIncludingFallback use private getters
     4        https://bugs.webkit.org/show_bug.cgi?id=95863
     5
     6        Reviewed by Eric Seidel.
     7
     8        For readibility and maintanability reasons, it is better to use getters for
     9        visited* color variables than accessing them directly.
     10
     11        * rendering/style/RenderStyle.cpp:
     12        (WebCore::RenderStyle::colorIncludingFallback):
     13
    1142012-09-05  Benjamin Poulain  <bpoulain@apple.com>
    215
  • trunk/Source/WebCore/rendering/style/RenderStyle.cpp

    r127593 r127649  
    13361336    switch (colorProperty) {
    13371337    case CSSPropertyBackgroundColor:
    1338         return visitedLink ? rareNonInheritedData->m_visitedLinkBackgroundColor : backgroundColor(); // Background color doesn't fall back.
     1338        return visitedLink ? visitedLinkBackgroundColor() : backgroundColor(); // Background color doesn't fall back.
    13391339    case CSSPropertyBorderLeftColor:
    1340         result = visitedLink ? rareNonInheritedData->m_visitedLinkBorderLeftColor : borderLeftColor();
     1340        result = visitedLink ? visitedLinkBorderLeftColor() : borderLeftColor();
    13411341        borderStyle = borderLeftStyle();
    13421342        break;
    13431343    case CSSPropertyBorderRightColor:
    1344         result = visitedLink ? rareNonInheritedData->m_visitedLinkBorderRightColor : borderRightColor();
     1344        result = visitedLink ? visitedLinkBorderRightColor() : borderRightColor();
    13451345        borderStyle = borderRightStyle();
    13461346        break;
    13471347    case CSSPropertyBorderTopColor:
    1348         result = visitedLink ? rareNonInheritedData->m_visitedLinkBorderTopColor : borderTopColor();
     1348        result = visitedLink ? visitedLinkBorderTopColor() : borderTopColor();
    13491349        borderStyle = borderTopStyle();
    13501350        break;
    13511351    case CSSPropertyBorderBottomColor:
    1352         result = visitedLink ? rareNonInheritedData->m_visitedLinkBorderBottomColor : borderBottomColor();
     1352        result = visitedLink ? visitedLinkBorderBottomColor() : borderBottomColor();
    13531353        borderStyle = borderBottomStyle();
    13541354        break;
    13551355    case CSSPropertyColor:
    1356         result = visitedLink ? inherited->visitedLinkColor : color();
     1356        result = visitedLink ? visitedLinkColor() : color();
    13571357        break;
    13581358    case CSSPropertyOutlineColor:
    1359         result = visitedLink ? rareNonInheritedData->m_visitedLinkOutlineColor : outlineColor();
     1359        result = visitedLink ? visitedLinkOutlineColor() : outlineColor();
    13601360        break;
    13611361    case CSSPropertyWebkitColumnRuleColor:
    1362         result = visitedLink ? rareNonInheritedData->m_multiCol->m_visitedLinkColumnRuleColor : columnRuleColor();
     1362        result = visitedLink ? visitedLinkColumnRuleColor() : columnRuleColor();
    13631363        break;
    13641364    case CSSPropertyWebkitTextEmphasisColor:
    1365         result = visitedLink ? rareInheritedData->visitedLinkTextEmphasisColor : textEmphasisColor();
     1365        result = visitedLink ? visitedLinkTextEmphasisColor() : textEmphasisColor();
    13661366        break;
    13671367    case CSSPropertyWebkitTextFillColor:
    1368         result = visitedLink ? rareInheritedData->visitedLinkTextFillColor : textFillColor();
     1368        result = visitedLink ? visitedLinkTextFillColor() : textFillColor();
    13691369        break;
    13701370    case CSSPropertyWebkitTextStrokeColor:
    1371         result = visitedLink ? rareInheritedData->visitedLinkTextStrokeColor : textStrokeColor();
     1371        result = visitedLink ? visitedLinkTextStrokeColor() : textStrokeColor();
    13721372        break;
    13731373    default:
     
    13801380            result.setRGB(238, 238, 238);
    13811381        else
    1382             result = visitedLink ? inherited->visitedLinkColor : color();
     1382            result = visitedLink ? visitedLinkColor() : color();
    13831383    }
    13841384    return result;
Note: See TracChangeset for help on using the changeset viewer.