Changeset 59956 in webkit


Ignore:
Timestamp:
May 21, 2010 1:56:24 PM (14 years ago)
Author:
hyatt@apple.com
Message:

WebCore: https://bugs.webkit.org/show_bug.cgi?id=39420, :visited not working with background-color.

Reviewed by Dan Bernstein.

Make the RenderStyle color accessors private. This forces callers to use visitedDependentColor
instead (or to make the decision to become friends of the RenderStyle class in order to get access
to the real style information).

Modified history/self-is-visited.html to also test background colors.

  • WebCore.base.exp:
  • accessibility/AccessibilityTable.cpp:

(WebCore::AccessibilityTable::isTableExposableThroughAccessibility):

  • accessibility/mac/AccessibilityObjectWrapper.mm:

(AXAttributeStringSetStyle):

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::CSSComputedStyleDeclaration::currentColorOrValidColor):

  • css/CSSComputedStyleDeclaration.h:
  • css/SVGCSSStyleSelector.cpp:

(WebCore::colorFromSVGColorCSSValue):

  • editing/ApplyStyleCommand.cpp:

(WebCore::ApplyStyleCommand::editingStyleAtPosition):
(WebCore::prepareEditingStyleToApplyAt):
(WebCore::removeStylesAddedByNode):
(WebCore::fontColorChangesComputedStyle):
(WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):

  • editing/ApplyStyleCommand.h:

(WebCore::):

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::moveParagraphs):
(WebCore::CompositeEditCommand::breakOutOfEmptyListItem):

  • editing/DeleteButtonController.cpp:

(WebCore::isDeletableElement):

  • editing/DeleteSelectionCommand.cpp:

(WebCore::DeleteSelectionCommand::saveTypingStyleState):

  • editing/InsertParagraphSeparatorCommand.cpp:

(WebCore::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion):

  • editing/RemoveFormatCommand.cpp:

(WebCore::RemoveFormatCommand::doApply):

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::handleStyleSpansBeforeInsertion):
(WebCore::ReplaceSelectionCommand::handleStyleSpans):
(WebCore::ReplaceSelectionCommand::doApply):

  • editing/SelectionController.cpp:

(WebCore::SelectionController::paintCaret):

  • editing/markup.cpp:

(WebCore::createMarkup):

  • page/animation/AnimationBase.cpp:

(WebCore::AnimationBase::ensurePropertyMap):

  • page/animation/AnimationBase.h:
  • page/mac/FrameMac.mm:

(WebCore::Frame::fontAttributesForSelectionStart):

  • rendering/EllipsisBox.cpp:

(WebCore::EllipsisBox::paint):
(WebCore::EllipsisBox::paintSelection):

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::paint):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::styleDidChange):
(WebCore::RenderBox::paintRootBoxDecorations):
(WebCore::RenderBox::paintBoxDecorationsWithSize):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::paintBoxShadow):

  • rendering/RenderFieldset.cpp:

(WebCore::RenderFieldset::paintBoxDecorations):

  • rendering/RenderFileUploadControl.cpp:

(WebCore::RenderFileUploadControl::paintObject):

  • rendering/RenderFrameSet.cpp:

(WebCore::RenderFrameSet::paintColumnBorder):
(WebCore::RenderFrameSet::paintRowBorder):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::paintReplaced):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::rendererBackgroundColor):

  • rendering/RenderLayerBacking.h:
  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::paintItemForeground):
(WebCore::RenderListBox::paintItemBackground):

  • rendering/RenderListMarker.cpp:

(WebCore::RenderListMarker::paint):

  • rendering/RenderMenuList.cpp:

(WebCore::RenderMenuList::itemStyle):
(WebCore::RenderMenuList::itemBackgroundColor):
(WebCore::RenderMenuList::menuStyle):

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::selectionBackgroundColor):
(WebCore::RenderObject::selectionForegroundColor):

  • rendering/RenderSVGResource.cpp:

(WebCore::RenderSVGResource::adjustColorForPseudoRules):
(WebCore::RenderSVGResource::fillPaintingResource):
(WebCore::RenderSVGResource::strokePaintingResource):

  • rendering/RenderSVGResource.h:
  • rendering/RenderTable.cpp:

(WebCore::RenderTable::paintBoxDecorations):

  • rendering/RenderTable.h:

(WebCore::RenderTable::bgColor):

  • rendering/RenderTableCell.cpp:

(WebCore::RenderTableCell::paintBackgroundsBehindCell):

  • rendering/RenderTextControl.cpp:

(WebCore::RenderTextControl::adjustInnerTextStyle):

  • rendering/RenderTextControlSingleLine.cpp:

(WebCore::RenderTextControlSingleLine::menuStyle):

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::isControlStyled):

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::paintMenuListButton):

  • rendering/RenderTreeAsText.cpp:

(WebCore::RenderTreeAsText::writeRenderObject):
(WebCore::write):

  • rendering/RenderTreeAsText.h:
  • rendering/SVGInlineTextBox.cpp:

(WebCore::SVGInlineTextBox::paintSelection):

  • rendering/SVGRenderTreeAsText.cpp:

(WebCore::writeRenderSVGTextBox):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::colorIncludingFallback):
(WebCore::RenderStyle::visitedDependentColor):

  • rendering/style/RenderStyle.h:

(WebCore::):
(WebCore::InheritedFlags::hasBackground):
(WebCore::InheritedFlags::borderLeftStyle):
(WebCore::InheritedFlags::borderRightStyle):
(WebCore::InheritedFlags::borderTopStyle):
(WebCore::InheritedFlags::borderBottomStyle):
(WebCore::InheritedFlags::textShadow):
(WebCore::InheritedFlags::textStrokeWidth):
(WebCore::InheritedFlags::hasNormalColumnGap):
(WebCore::InheritedFlags::borderLeftColor):
(WebCore::InheritedFlags::borderRightColor):
(WebCore::InheritedFlags::borderTopColor):
(WebCore::InheritedFlags::borderBottomColor):
(WebCore::InheritedFlags::backgroundColor):
(WebCore::InheritedFlags::color):
(WebCore::InheritedFlags::columnRuleColor):
(WebCore::InheritedFlags::outlineColor):
(WebCore::InheritedFlags::textFillColor):
(WebCore::InheritedFlags::textStrokeColor):

  • svg/SVGAnimationElement.cpp:

(WebCore::adjustForCurrentColor):

WebKit/mac: https://bugs.webkit.org/show_bug.cgi?id=39420

Reviewed by Dan Bernstein.

Make sure everyone who needs to is using visitedDependentColor rather than accessing styles
directly.

  • Misc/WebNSAttributedStringExtras.mm:

(+[NSAttributedString _web_attributedStringFromRange:]):

  • WebView/WebFrame.mm:

(-[WebFrame _bodyBackgroundColor]):

Location:
trunk
Files:
57 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/fast/history/self-is-visited.html

    r57292 r59956  
    1212        var firstStyle = window.layoutTestController.computedStyleIncludingVisitedInfo(document.getElementById('one'));
    1313        var secondStyle = window.layoutTestController.computedStyleIncludingVisitedInfo(document.getElementById('two'));
    14         if (firstStyle.color == secondStyle.color) {
     14        if (firstStyle.color == secondStyle.color || firstStyle.backgroundColor == secondStyle.backgroundColor) {
    1515            document.getElementById('result').innerHTML = 'FAIL';
    1616            return;
     
    2020    var firstStyle = window.getComputedStyle(document.getElementById('one'), "");
    2121    var secondStyle = window.getComputedStyle(document.getElementById('two'), "");
    22     if (firstStyle.color != secondStyle.color) {
     22    if (firstStyle.color != secondStyle.color || firstStyle.backgroundColor != secondStyle.backgroundColor) {
    2323        document.getElementById('result').innerHTML = 'FAIL';
    2424        return;
     
    2727</script>
    2828<style>
    29 :link { color: green }
    30 :visited { color: orange }
     29:link { color: green; background-color: white }
     30:visited { color: orange; background-color: black }
    3131</style>
    3232</head>
  • trunk/WebCore/ChangeLog

    r59950 r59956  
     12010-05-21  David Hyatt  <hyatt@apple.com>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=39420, :visited not working with background-color.
     6
     7        Make the RenderStyle color accessors private.  This forces callers to use visitedDependentColor
     8        instead (or to make the decision to become friends of the RenderStyle class in order to get access
     9        to the real style information).
     10
     11        Modified history/self-is-visited.html to also test background colors.
     12
     13        * WebCore.base.exp:
     14        * accessibility/AccessibilityTable.cpp:
     15        (WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
     16        * accessibility/mac/AccessibilityObjectWrapper.mm:
     17        (AXAttributeStringSetStyle):
     18        * css/CSSComputedStyleDeclaration.cpp:
     19        (WebCore::CSSComputedStyleDeclaration::currentColorOrValidColor):
     20        * css/CSSComputedStyleDeclaration.h:
     21        * css/SVGCSSStyleSelector.cpp:
     22        (WebCore::colorFromSVGColorCSSValue):
     23        * editing/ApplyStyleCommand.cpp:
     24        (WebCore::ApplyStyleCommand::editingStyleAtPosition):
     25        (WebCore::prepareEditingStyleToApplyAt):
     26        (WebCore::removeStylesAddedByNode):
     27        (WebCore::fontColorChangesComputedStyle):
     28        (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
     29        * editing/ApplyStyleCommand.h:
     30        (WebCore::):
     31        * editing/CompositeEditCommand.cpp:
     32        (WebCore::CompositeEditCommand::moveParagraphs):
     33        (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
     34        * editing/DeleteButtonController.cpp:
     35        (WebCore::isDeletableElement):
     36        * editing/DeleteSelectionCommand.cpp:
     37        (WebCore::DeleteSelectionCommand::saveTypingStyleState):
     38        * editing/InsertParagraphSeparatorCommand.cpp:
     39        (WebCore::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion):
     40        * editing/RemoveFormatCommand.cpp:
     41        (WebCore::RemoveFormatCommand::doApply):
     42        * editing/ReplaceSelectionCommand.cpp:
     43        (WebCore::handleStyleSpansBeforeInsertion):
     44        (WebCore::ReplaceSelectionCommand::handleStyleSpans):
     45        (WebCore::ReplaceSelectionCommand::doApply):
     46        * editing/SelectionController.cpp:
     47        (WebCore::SelectionController::paintCaret):
     48        * editing/markup.cpp:
     49        (WebCore::createMarkup):
     50        * page/animation/AnimationBase.cpp:
     51        (WebCore::AnimationBase::ensurePropertyMap):
     52        * page/animation/AnimationBase.h:
     53        * page/mac/FrameMac.mm:
     54        (WebCore::Frame::fontAttributesForSelectionStart):
     55        * rendering/EllipsisBox.cpp:
     56        (WebCore::EllipsisBox::paint):
     57        (WebCore::EllipsisBox::paintSelection):
     58        * rendering/InlineTextBox.cpp:
     59        (WebCore::InlineTextBox::paint):
     60        * rendering/RenderBox.cpp:
     61        (WebCore::RenderBox::styleDidChange):
     62        (WebCore::RenderBox::paintRootBoxDecorations):
     63        (WebCore::RenderBox::paintBoxDecorationsWithSize):
     64        * rendering/RenderBoxModelObject.cpp:
     65        (WebCore::RenderBoxModelObject::paintBoxShadow):
     66        * rendering/RenderFieldset.cpp:
     67        (WebCore::RenderFieldset::paintBoxDecorations):
     68        * rendering/RenderFileUploadControl.cpp:
     69        (WebCore::RenderFileUploadControl::paintObject):
     70        * rendering/RenderFrameSet.cpp:
     71        (WebCore::RenderFrameSet::paintColumnBorder):
     72        (WebCore::RenderFrameSet::paintRowBorder):
     73        * rendering/RenderImage.cpp:
     74        (WebCore::RenderImage::paintReplaced):
     75        * rendering/RenderLayerBacking.cpp:
     76        (WebCore::RenderLayerBacking::rendererBackgroundColor):
     77        * rendering/RenderLayerBacking.h:
     78        * rendering/RenderListBox.cpp:
     79        (WebCore::RenderListBox::paintItemForeground):
     80        (WebCore::RenderListBox::paintItemBackground):
     81        * rendering/RenderListMarker.cpp:
     82        (WebCore::RenderListMarker::paint):
     83        * rendering/RenderMenuList.cpp:
     84        (WebCore::RenderMenuList::itemStyle):
     85        (WebCore::RenderMenuList::itemBackgroundColor):
     86        (WebCore::RenderMenuList::menuStyle):
     87        * rendering/RenderObject.cpp:
     88        (WebCore::RenderObject::selectionBackgroundColor):
     89        (WebCore::RenderObject::selectionForegroundColor):
     90        * rendering/RenderSVGResource.cpp:
     91        (WebCore::RenderSVGResource::adjustColorForPseudoRules):
     92        (WebCore::RenderSVGResource::fillPaintingResource):
     93        (WebCore::RenderSVGResource::strokePaintingResource):
     94        * rendering/RenderSVGResource.h:
     95        * rendering/RenderTable.cpp:
     96        (WebCore::RenderTable::paintBoxDecorations):
     97        * rendering/RenderTable.h:
     98        (WebCore::RenderTable::bgColor):
     99        * rendering/RenderTableCell.cpp:
     100        (WebCore::RenderTableCell::paintBackgroundsBehindCell):
     101        * rendering/RenderTextControl.cpp:
     102        (WebCore::RenderTextControl::adjustInnerTextStyle):
     103        * rendering/RenderTextControlSingleLine.cpp:
     104        (WebCore::RenderTextControlSingleLine::menuStyle):
     105        * rendering/RenderTheme.cpp:
     106        (WebCore::RenderTheme::isControlStyled):
     107        * rendering/RenderThemeMac.mm:
     108        (WebCore::RenderThemeMac::paintMenuListButton):
     109        * rendering/RenderTreeAsText.cpp:
     110        (WebCore::RenderTreeAsText::writeRenderObject):
     111        (WebCore::write):
     112        * rendering/RenderTreeAsText.h:
     113        * rendering/SVGInlineTextBox.cpp:
     114        (WebCore::SVGInlineTextBox::paintSelection):
     115        * rendering/SVGRenderTreeAsText.cpp:
     116        (WebCore::writeRenderSVGTextBox):
     117        * rendering/style/RenderStyle.cpp:
     118        (WebCore::RenderStyle::colorIncludingFallback):
     119        (WebCore::RenderStyle::visitedDependentColor):
     120        * rendering/style/RenderStyle.h:
     121        (WebCore::):
     122        (WebCore::InheritedFlags::hasBackground):
     123        (WebCore::InheritedFlags::borderLeftStyle):
     124        (WebCore::InheritedFlags::borderRightStyle):
     125        (WebCore::InheritedFlags::borderTopStyle):
     126        (WebCore::InheritedFlags::borderBottomStyle):
     127        (WebCore::InheritedFlags::textShadow):
     128        (WebCore::InheritedFlags::textStrokeWidth):
     129        (WebCore::InheritedFlags::hasNormalColumnGap):
     130        (WebCore::InheritedFlags::borderLeftColor):
     131        (WebCore::InheritedFlags::borderRightColor):
     132        (WebCore::InheritedFlags::borderTopColor):
     133        (WebCore::InheritedFlags::borderBottomColor):
     134        (WebCore::InheritedFlags::backgroundColor):
     135        (WebCore::InheritedFlags::color):
     136        (WebCore::InheritedFlags::columnRuleColor):
     137        (WebCore::InheritedFlags::outlineColor):
     138        (WebCore::InheritedFlags::textFillColor):
     139        (WebCore::InheritedFlags::textStrokeColor):
     140        * svg/SVGAnimationElement.cpp:
     141        (WebCore::adjustForCurrentColor):
     142
    11432010-05-21  Beth Dakin  <bdakin@apple.com>
    2144
  • trunk/WebCore/WebCore.base.exp

    r59935 r59956  
    988988__ZNK7WebCore9PageCache10frameCountEv
    989989__ZNK7WebCore9PageCache21autoreleasedPageCountEv
     990__ZNK7WebCore11RenderStyle21visitedDependentColorEi
    990991__ZTVN7WebCore12ChromeClientE
    991992__ZTVN7WebCore12PluginWidgetE
  • trunk/WebCore/accessibility/AccessibilityTable.cpp

    r56073 r59956  
    127127    if (!tableStyle)
    128128        return false;
    129     Color tableBGColor = tableStyle->backgroundColor();
     129    Color tableBGColor = tableStyle->visitedDependentColor(CSSPropertyBackgroundColor);
    130130   
    131131    // check enough of the cells to find if the table matches our criteria
     
    170170            // if the cell has a different color from the table and there is cell spacing,
    171171            // then it is probably a data table cell (spacing and colors take the place of borders)
    172             Color cellColor = renderStyle->backgroundColor();
     172            Color cellColor = renderStyle->visitedDependentColor(CSSPropertyBackgroundColor);
    173173            if (table->hBorderSpacing() > 0 && table->vBorderSpacing() > 0
    174174                && tableBGColor != cellColor && cellColor.alpha() != 1)
  • trunk/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm

    r58266 r59956  
    316316
    317317    // set basic colors
    318     AXAttributeStringSetColor(attrString, NSAccessibilityForegroundColorTextAttribute, nsColor(style->color()), range);
    319     AXAttributeStringSetColor(attrString, NSAccessibilityBackgroundColorTextAttribute, nsColor(style->backgroundColor()), range);
     318    AXAttributeStringSetColor(attrString, NSAccessibilityForegroundColorTextAttribute, nsColor(style->visitedDependentColor(CSSPropertyColor)), range);
     319    AXAttributeStringSetColor(attrString, NSAccessibilityBackgroundColorTextAttribute, nsColor(style->visitedDependentColor(CSSPropertyBackgroundColor)), range);
    320320
    321321    // set super/sub scripting
  • trunk/WebCore/css/CSSComputedStyleDeclaration.cpp

    r58360 r59956  
    375375}
    376376
    377 static PassRefPtr<CSSPrimitiveValue> currentColorOrValidColor(RenderStyle* style, const Color& color)
    378 {
     377PassRefPtr<CSSPrimitiveValue> CSSComputedStyleDeclaration::currentColorOrValidColor(RenderStyle* style, const Color& color) const
     378{
     379    // This function does NOT look at visited information, so that computed style doesn't expose that.
    379380    if (!color.isValid())
    380381        return CSSPrimitiveValue::createColor(style->color().rgb());
  • trunk/WebCore/css/CSSComputedStyleDeclaration.h

    r58273 r59956  
    2828namespace WebCore {
    2929
     30class Color;
    3031class CSSMutableStyleDeclaration;
     32class CSSPrimitiveValue;
    3133class ShadowData;
    3234
     
    7072
    7173    PassRefPtr<CSSValue> valueForShadow(const ShadowData*, int) const;
    72 
     74    PassRefPtr<CSSPrimitiveValue> currentColorOrValidColor(RenderStyle*, const Color&) const;
     75   
    7376    RefPtr<Node> m_node;
    7477    PseudoId m_pseudoElementSpecifier;
  • trunk/WebCore/css/SVGCSSStyleSelector.cpp

    r57575 r59956  
    9191}
    9292
    93 static Color colorFromSVGColorCSSValue(CSSValue* value, RenderStyle* style)
     93static Color colorFromSVGColorCSSValue(CSSValue* value, const Color& fgColor)
    9494{
    9595    ASSERT(value->isSVGColor());
     
    9797    Color color;
    9898    if (c->colorType() == SVGColor::SVG_COLORTYPE_CURRENTCOLOR)
    99         color = style->color();
     99        color = fgColor;
    100100    else
    101101        color = c->color();
     
    455455        {
    456456            HANDLE_INHERIT_AND_INITIAL(stopColor, StopColor);
    457             svgstyle->setStopColor(colorFromSVGColorCSSValue(value, m_style.get()));
     457            svgstyle->setStopColor(colorFromSVGColorCSSValue(value, m_style->color()));
    458458            break;
    459459        }
     
    461461        {
    462462            HANDLE_INHERIT_AND_INITIAL(lightingColor, LightingColor);
    463             svgstyle->setLightingColor(colorFromSVGColorCSSValue(value, m_style.get()));
     463            svgstyle->setLightingColor(colorFromSVGColorCSSValue(value, m_style->color()));
    464464            break;
    465465        }
     
    488488                return;
    489489            }
    490             svgstyle->setFloodColor(colorFromSVGColorCSSValue(value, m_style.get()));
     490            svgstyle->setFloodColor(colorFromSVGColorCSSValue(value, m_style->color()));
    491491            break;
    492492        }
  • trunk/WebCore/editing/ApplyStyleCommand.cpp

    r59828 r59956  
    417417size_t numEditingStyleProperties = sizeof(editingStyleProperties)/sizeof(editingStyleProperties[0]);
    418418
    419 PassRefPtr<CSSMutableStyleDeclaration> editingStyleAtPosition(Position pos, ShouldIncludeTypingStyle shouldIncludeTypingStyle)
     419PassRefPtr<CSSMutableStyleDeclaration> ApplyStyleCommand::editingStyleAtPosition(Position pos, ShouldIncludeTypingStyle shouldIncludeTypingStyle)
    420420{
    421421    RefPtr<CSSComputedStyleDeclaration> computedStyleAtPosition = pos.computedStyle();
     
    455455    // If this function was modified in the future to delete all redundant properties, then add a boolean value to indicate
    456456    // which one of editingStyleAtPosition or computedStyle is called.
    457     RefPtr<CSSMutableStyleDeclaration> style = editingStyleAtPosition(pos);
     457    RefPtr<CSSMutableStyleDeclaration> style = ApplyStyleCommand::editingStyleAtPosition(pos);
    458458    style->diff(editingStyle);
    459459
     
    473473    ASSERT(node);
    474474    ASSERT(node->parentNode());
    475     RefPtr<CSSMutableStyleDeclaration> parentStyle = editingStyleAtPosition(Position(node->parentNode(), 0));
    476     RefPtr<CSSMutableStyleDeclaration> style = editingStyleAtPosition(Position(node, 0));
     475    RefPtr<CSSMutableStyleDeclaration> parentStyle = ApplyStyleCommand::editingStyleAtPosition(Position(node->parentNode(), 0));
     476    RefPtr<CSSMutableStyleDeclaration> style = ApplyStyleCommand::editingStyleAtPosition(Position(node, 0));
    477477    parentStyle->diff(style.get());
    478478    style->diff(editingStyle);
     
    17581758}
    17591759
    1760 static bool fontColorChangesComputedStyle(RenderStyle* computedStyle, StyleChange styleChange)
     1760static bool fontColorChangesComputedStyle(const Color& computedStyleColor, StyleChange styleChange)
    17611761{
    17621762    if (styleChange.applyFontColor()) {
    1763         if (Color(styleChange.fontColor()) != computedStyle->color())
     1763        if (Color(styleChange.fontColor()) != computedStyleColor)
    17641764            return true;
    17651765    }
     
    18021802        // text somehow. Otherwise it will be a garbage node that will create problems for us
    18031803        // most notably when we apply a blockquote style for a message reply.
    1804         if (fontColorChangesComputedStyle(computedStyle, styleChange)
     1804        if (fontColorChangesComputedStyle(computedStyle->color(), styleChange)
    18051805                || fontFaceChangesComputedStyle(computedStyle, styleChange)
    18061806                || fontSizeChangesComputedStyle(computedStyle, styleChange)) {
  • trunk/WebCore/editing/ApplyStyleCommand.h

    r49414 r59956  
    3535class StyleChange;
    3636
     37enum ShouldIncludeTypingStyle {
     38    IncludeTypingStyle,
     39    IgnoreTypingStyle
     40};
     41
    3742class ApplyStyleCommand : public CompositeEditCommand {
    3843public:
     
    5156        return adoptRef(new ApplyStyleCommand(element, removeOnly, action));
    5257    }
     58   
     59    static PassRefPtr<CSSMutableStyleDeclaration> editingStyleAtPosition(Position pos, ShouldIncludeTypingStyle shouldIncludeTypingStyle = IgnoreTypingStyle);
    5360
    5461private:
     
    118125RefPtr<CSSMutableStyleDeclaration> getPropertiesNotInComputedStyle(CSSStyleDeclaration* style, CSSComputedStyleDeclaration* computedStyle);
    119126
    120 enum ShouldIncludeTypingStyle {
    121     IncludeTypingStyle,
    122     IgnoreTypingStyle
    123 };
    124 
    125 PassRefPtr<CSSMutableStyleDeclaration> editingStyleAtPosition(Position, ShouldIncludeTypingStyle = IgnoreTypingStyle);
    126127void prepareEditingStyleToApplyAt(CSSMutableStyleDeclaration*, Position);
    127128void removeStylesAddedByNode(CSSMutableStyleDeclaration*, Node*);
  • trunk/WebCore/editing/CompositeEditCommand.cpp

    r57957 r59956  
    941941    RefPtr<CSSMutableStyleDeclaration> styleInEmptyParagraph;
    942942    if (startOfParagraphToMove == endOfParagraphToMove && preserveStyle) {
    943         styleInEmptyParagraph = editingStyleAtPosition(startOfParagraphToMove.deepEquivalent(), IncludeTypingStyle);
     943        styleInEmptyParagraph = ApplyStyleCommand::editingStyleAtPosition(startOfParagraphToMove.deepEquivalent(), IncludeTypingStyle);
    944944        // The moved paragraph should assume the block style of the destination.
    945945        styleInEmptyParagraph->removeBlockProperties();
     
    10041004        return false;
    10051005
    1006     RefPtr<CSSMutableStyleDeclaration> style = editingStyleAtPosition(endingSelection().start(), IncludeTypingStyle);
     1006    RefPtr<CSSMutableStyleDeclaration> style = ApplyStyleCommand::editingStyleAtPosition(endingSelection().start(), IncludeTypingStyle);
    10071007
    10081008    Node* listNode = emptyListItem->parentNode();
  • trunk/WebCore/editing/DeleteButtonController.cpp

    r53809 r59956  
    134134            return false;
    135135
    136         if (style->hasBackground() && (!parentStyle->hasBackground() || style->backgroundColor() != parentStyle->backgroundColor()))
     136        if (renderer->hasBackground() && (!parentRenderer->hasBackground() || style->visitedDependentColor(CSSPropertyBackgroundColor) != parentStyle->visitedDependentColor(CSSPropertyBackgroundColor)))
    137137            return true;
    138138    }
  • trunk/WebCore/editing/DeleteSelectionCommand.cpp

    r55753 r59956  
    295295
    296296    // Figure out the typing style in effect before the delete is done.
    297     m_typingStyle = editingStyleAtPosition(positionBeforeTabSpan(m_selectionToDelete.start()));
     297    m_typingStyle = ApplyStyleCommand::editingStyleAtPosition(positionBeforeTabSpan(m_selectionToDelete.start()));
    298298
    299299    removeEnclosingAnchorStyle(m_typingStyle.get(), m_selectionToDelete.start());
     
    302302    // We'll use this later in computeTypingStyleAfterDelete if we end up outside of a Mail blockquote
    303303    if (nearestMailBlockquote(m_selectionToDelete.start().node()))
    304         m_deleteIntoBlockquoteStyle = editingStyleAtPosition(m_selectionToDelete.end());
     304        m_deleteIntoBlockquoteStyle = ApplyStyleCommand::editingStyleAtPosition(m_selectionToDelete.end());
    305305    else
    306306        m_deleteIntoBlockquoteStyle = 0;
  • trunk/WebCore/editing/InsertParagraphSeparatorCommand.cpp

    r59591 r59956  
    8383        return;
    8484   
    85     m_style = editingStyleAtPosition(pos, IncludeTypingStyle);
     85    m_style = ApplyStyleCommand::editingStyleAtPosition(pos, IncludeTypingStyle);
    8686}
    8787
  • trunk/WebCore/editing/RemoveFormatCommand.cpp

    r46914 r59956  
    5757    // content that we're operating on.
    5858    Node* root = frame->selection()->rootEditableElement();
    59     RefPtr<CSSMutableStyleDeclaration> defaultStyle = editingStyleAtPosition(Position(root, 0));
     59    RefPtr<CSSMutableStyleDeclaration> defaultStyle = ApplyStyleCommand::editingStyleAtPosition(Position(root, 0));
    6060
    6161    // Delete the selected content.
  • trunk/WebCore/editing/ReplaceSelectionCommand.cpp

    r55762 r59956  
    578578    RefPtr<Node> copiedRangeStyleSpan = sourceDocumentStyleSpan->firstChild();
    579579
    580     RefPtr<CSSMutableStyleDeclaration> styleAtInsertionPos = editingStyleAtPosition(rangeCompliantEquivalent(insertionPos));
     580    RefPtr<CSSMutableStyleDeclaration> styleAtInsertionPos = ApplyStyleCommand::editingStyleAtPosition(rangeCompliantEquivalent(insertionPos));
    581581
    582582    String styleText = styleAtInsertionPos->cssText();
     
    635635    Node* blockquoteNode = isMailPasteAsQuotationNode(context) ? context : nearestMailBlockquote(context);
    636636    if (blockquoteNode) {
    637         RefPtr<CSSMutableStyleDeclaration> blockquoteStyle = editingStyleAtPosition(Position(blockquoteNode, 0));
    638         RefPtr<CSSMutableStyleDeclaration> parentStyle = editingStyleAtPosition(Position(blockquoteNode->parentNode(), 0));
     637        RefPtr<CSSMutableStyleDeclaration> blockquoteStyle = ApplyStyleCommand::editingStyleAtPosition(Position(blockquoteNode, 0));
     638        RefPtr<CSSMutableStyleDeclaration> parentStyle = ApplyStyleCommand::editingStyleAtPosition(Position(blockquoteNode->parentNode(), 0));
    639639        parentStyle->diff(blockquoteStyle.get());
    640640
     
    795795   
    796796    if (m_matchStyle)
    797         m_insertionStyle = editingStyleAtPosition(selection.start(), IncludeTypingStyle);
     797        m_insertionStyle = ApplyStyleCommand::editingStyleAtPosition(selection.start(), IncludeTypingStyle);
    798798   
    799799    VisiblePosition visibleStart = selection.visibleStart();
  • trunk/WebCore/editing/SelectionController.cpp

    r57218 r59956  
    10831083    Element* element = rootEditableElement();
    10841084    if (element && element->renderer()) {
    1085         caretColor = element->renderer()->style()->color();
     1085        caretColor = element->renderer()->style()->visitedDependentColor(CSSPropertyColor);
    10861086        colorSpace = element->renderer()->style()->colorSpace();
    10871087    }
  • trunk/WebCore/editing/markup.cpp

    r59917 r59956  
    10201020    Node* parentOfLastClosed = lastClosed ? lastClosed->parentNode() : 0;
    10211021    if (parentOfLastClosed && parentOfLastClosed->renderer()) {
    1022         RefPtr<CSSMutableStyleDeclaration> style = editingStyleAtPosition(Position(parentOfLastClosed, 0));
     1022        RefPtr<CSSMutableStyleDeclaration> style = ApplyStyleCommand::editingStyleAtPosition(Position(parentOfLastClosed, 0));
    10231023
    10241024        // Styles that Mail blockquotes contribute should only be placed on the Mail blockquote, to help
     
    10441044        // span so that at paste time we can differentiate between document defaults and user
    10451045        // applied styles.
    1046         RefPtr<CSSMutableStyleDeclaration> defaultStyle = editingStyleAtPosition(Position(document->documentElement(), 0));
     1046        RefPtr<CSSMutableStyleDeclaration> defaultStyle = ApplyStyleCommand::editingStyleAtPosition(Position(document->documentElement(), 0));
    10471047
    10481048        if (defaultStyle->length() > 0)
  • trunk/WebCore/page/animation/AnimationBase.cpp

    r58186 r59956  
    563563
    564564
    565 static void ensurePropertyMap()
     565void AnimationBase::ensurePropertyMap()
    566566{
    567567    // FIXME: This data is never destroyed. Maybe we should ref count it and toss it when the last AnimationController is destroyed?
  • trunk/WebCore/page/animation/AnimationBase.h

    r55576 r59956  
    226226   
    227227    AnimationBase* m_next;
     228   
     229private:
     230    static void ensurePropertyMap();
    228231};
    229232
  • trunk/WebCore/page/mac/FrameMac.mm

    r57482 r59956  
    408408    NSMutableDictionary* result = [NSMutableDictionary dictionary];
    409409
    410     if (style->backgroundColor().isValid() && style->backgroundColor().alpha() != 0)
    411         [result setObject:nsColor(style->backgroundColor()) forKey:NSBackgroundColorAttributeName];
     410    if (style->visitedDependentColor(CSSPropertyBackgroundColor).isValid() && style->visitedDependentColor(CSSPropertyBackgroundColor).alpha() != 0)
     411        [result setObject:nsColor(style->visitedDependentColor(CSSPropertyBackgroundColor)) forKey:NSBackgroundColorAttributeName];
    412412
    413413    if (style->font().primaryFont()->getNSFont())
    414414        [result setObject:style->font().primaryFont()->getNSFont() forKey:NSFontAttributeName];
    415415
    416     if (style->color().isValid() && style->color() != Color::black)
    417         [result setObject:nsColor(style->color()) forKey:NSForegroundColorAttributeName];
     416    if (style->visitedDependentColor(CSSPropertyColor).isValid() && style->visitedDependentColor(CSSPropertyColor) != Color::black)
     417        [result setObject:nsColor(style->visitedDependentColor(CSSPropertyColor)) forKey:NSForegroundColorAttributeName];
    418418
    419419    const ShadowData* shadow = style->textShadow();
  • trunk/WebCore/rendering/EllipsisBox.cpp

    r59592 r59956  
    3232    GraphicsContext* context = paintInfo.context;
    3333    RenderStyle* style = m_renderer->style(m_firstLine);
    34     Color textColor = style->color();
     34    Color textColor = style->visitedDependentColor(CSSPropertyColor);
    3535    if (textColor != context->fillColor())
    3636        context->setFillColor(textColor, style->colorSpace());
     
    7979void EllipsisBox::paintSelection(GraphicsContext* context, int tx, int ty, RenderStyle* style, const Font& font)
    8080{
    81     Color textColor = style->color();
     81    Color textColor = style->visitedDependentColor(CSSPropertyColor);
    8282    Color c = m_renderer->selectionBackgroundColor();
    8383    if (!c.isValid() || !c.alpha())
  • trunk/WebCore/rendering/InlineTextBox.cpp

    r59592 r59956  
    456456            }
    457457
    458             Color stroke = paintInfo.forceBlackText ? Color::black : pseudoStyle->textStrokeColor();
    459             if (!stroke.isValid())
    460                 stroke = pseudoStyle->color();
     458            Color stroke = paintInfo.forceBlackText ? Color::black : pseudoStyle->visitedDependentColor(CSSPropertyWebkitTextStrokeColor);
    461459            if (stroke != selectionStrokeColor) {
    462460                if (!paintSelectedTextOnly)
  • trunk/WebCore/rendering/RenderBox.cpp

    r59784 r59956  
    185185    // Set the text color if we're the body.
    186186    if (isBody())
    187         document()->setTextColor(style()->color());
     187        document()->setTextColor(style()->visitedDependentColor(CSSPropertyColor));
    188188}
    189189
     
    578578{
    579579    const FillLayer* bgLayer = style()->backgroundLayers();
    580     Color bgColor = style()->backgroundColor();
     580    Color bgColor = style()->visitedDependentColor(CSSPropertyBackgroundColor);
    581581    RenderObject* bodyObject = 0;
    582     if (!style()->hasBackground() && node() && node()->hasTagName(HTMLNames::htmlTag)) {
     582    if (!hasBackground() && node() && node()->hasTagName(HTMLNames::htmlTag)) {
    583583        // Locate the <body> element using the DOM.  This is easier than trying
    584584        // to crawl around a render tree with potential :before/:after content and
     
    589589        if (bodyObject) {
    590590            bgLayer = bodyObject->style()->backgroundLayers();
    591             bgColor = bodyObject->style()->backgroundColor();
     591            bgColor = bodyObject->style()->visitedDependentColor(CSSPropertyBackgroundColor);
    592592        }
    593593    }
     
    650650        // independent of the body.  Go through the DOM to get to the root element's render object,
    651651        // since the root could be inline and wrapped in an anonymous block.
    652         if (!isBody() || document()->documentElement()->renderer()->style()->hasBackground())
    653             paintFillLayers(paintInfo, style()->backgroundColor(), style()->backgroundLayers(), tx, ty, width, height);
     652        if (!isBody() || document()->documentElement()->renderer()->hasBackground())
     653            paintFillLayers(paintInfo, style()->visitedDependentColor(CSSPropertyBackgroundColor), style()->backgroundLayers(), tx, ty, width, height);
    654654        if (style()->hasAppearance())
    655655            theme()->paintDecorations(this, paintInfo, IntRect(tx, ty, width, height));
     
    797797            // if we haven't already
    798798            if (!layerRenderer) {
    799                 bool drawingRootBackground = drawingBackground && (isRoot() || (isBody() && !document()->documentElement()->renderer()->style()->hasBackground()));
     799                bool drawingRootBackground = drawingBackground && (isRoot() || (isBody() && !document()->documentElement()->renderer()->hasBackground()));
    800800                if (drawingRootBackground) {
    801801                    layerRenderer = view();
  • trunk/WebCore/rendering/RenderBoxModelObject.cpp

    r57482 r59956  
    305305    // Set the appropriate bits for a box model object.  Since all bits are cleared in styleWillChange,
    306306    // we only check for bits that could possibly be set to true.
    307     setHasBoxDecorations(style()->hasBorder() || style()->hasBackground() || style()->hasAppearance() || style()->boxShadow());
     307    setHasBoxDecorations(hasBackground() || style()->hasBorder() || style()->hasAppearance() || style()->boxShadow());
    308308    setInline(style()->isDisplayInlineType());
    309309    setRelPositioned(style()->position() == RelativePosition);
     
    13221322    }
    13231323
    1324     bool hasOpaqueBackground = s->backgroundColor().isValid() && s->backgroundColor().alpha() == 255;
     1324    bool hasOpaqueBackground = s->visitedDependentColor(CSSPropertyBackgroundColor).isValid() && s->visitedDependentColor(CSSPropertyBackgroundColor).alpha() == 255;
    13251325    for (const ShadowData* shadow = s->boxShadow(); shadow; shadow = shadow->next()) {
    13261326        if (shadow->style() != shadowStyle)
  • trunk/WebCore/rendering/RenderFieldset.cpp

    r58177 r59956  
    137137    paintBoxShadow(paintInfo.context, tx, ty, w, h, style(), Normal);
    138138
    139     paintFillLayers(paintInfo, style()->backgroundColor(), style()->backgroundLayers(), tx, ty, w, h);
     139    paintFillLayers(paintInfo, style()->visitedDependentColor(CSSPropertyBackgroundColor), style()->backgroundLayers(), tx, ty, w, h);
    140140    paintBoxShadow(paintInfo.context, tx, ty, w, h, style(), Inset);
    141141
  • trunk/WebCore/rendering/RenderFileUploadControl.cpp

    r58914 r59956  
    229229            + buttonRenderer->baselinePosition(true, false);
    230230
    231         paintInfo.context->setFillColor(style()->color(), style()->colorSpace());
     231        paintInfo.context->setFillColor(style()->visitedDependentColor(CSSPropertyColor), style()->colorSpace());
    232232       
    233233        // Draw the filename
  • trunk/WebCore/rendering/RenderFrameSet.cpp

    r56718 r59956  
    8888    GraphicsContext* context = paintInfo.context;
    8989    ColorSpace colorSpace = style()->colorSpace();
    90     context->fillRect(borderRect, frameSet()->hasBorderColor() ? style()->borderLeftColor() : borderFillColor(), colorSpace);
     90    context->fillRect(borderRect, frameSet()->hasBorderColor() ? style()->visitedDependentColor(CSSPropertyBorderLeftColor) : borderFillColor(), colorSpace);
    9191   
    9292    // Now stroke the edges but only if we have enough room to paint both edges with a little
     
    108108    GraphicsContext* context = paintInfo.context;
    109109    ColorSpace colorSpace = style()->colorSpace();
    110     context->fillRect(borderRect, frameSet()->hasBorderColor() ? style()->borderLeftColor() : borderFillColor(), colorSpace);
     110    context->fillRect(borderRect, frameSet()->hasBorderColor() ? style()->visitedDependentColor(CSSPropertyBorderLeftColor) : borderFillColor(), colorSpace);
    111111
    112112    // Now stroke the edges but only if we have enough room to paint both edges with a little
  • trunk/WebCore/rendering/RenderImage.cpp

    r59281 r59956  
    398398            if (!m_altText.isEmpty()) {
    399399                String text = document()->displayStringModifiedByEncoding(m_altText);
    400                 context->setFillColor(style()->color(), style()->colorSpace());
     400                context->setFillColor(style()->visitedDependentColor(CSSPropertyColor), style()->colorSpace());
    401401                int ax = tx + leftBorder + leftPad;
    402402                int ay = ty + topBorder + topPad;
  • trunk/WebCore/rendering/RenderLayerBacking.cpp

    r59711 r59956  
    6363
    6464static bool hasBorderOutlineOrShadow(const RenderStyle*);
    65 static bool hasBoxDecorationsOrBackground(const RenderStyle*);
     65static bool hasBoxDecorationsOrBackground(const RenderObject*);
    6666static bool hasBoxDecorationsOrBackgroundImage(const RenderStyle*);
    6767
     
    534534}
    535535
    536 static bool hasBoxDecorationsOrBackground(const RenderStyle* style)
    537 {
    538     return hasBorderOutlineOrShadow(style) || style->hasBackground();
     536static bool hasBoxDecorationsOrBackground(const RenderObject* renderer)
     537{
     538    return hasBorderOutlineOrShadow(renderer->style()) || renderer->hasBackground();
    539539}
    540540
     
    552552            return false;
    553553       
    554         RenderStyle* style = htmlObject->style();
    555         if (style->hasBackground())
     554        if (htmlObject->hasBackground())
    556555            return true;
    557556       
     
    560559            return false;
    561560       
    562         style = bodyObject->style();
    563         return style->hasBackground();
    564     }
    565    
    566     return renderer()->style()->hasBackground();
    567 }
    568 
    569 const Color& RenderLayerBacking::rendererBackgroundColor() const
     561        return bodyObject->hasBackground();
     562    }
     563   
     564    return renderer()->hasBackground();
     565}
     566
     567const Color RenderLayerBacking::rendererBackgroundColor() const
    570568{
    571569    // FIXME: share more code here
    572570    if (renderer()->node() && renderer()->node()->isDocumentNode()) {
    573571        RenderObject* htmlObject = renderer()->firstChild();
    574         RenderStyle* style = htmlObject->style();
    575         if (style->hasBackground())
    576             return style->backgroundColor();
     572        if (htmlObject->hasBackground())
     573            return htmlObject->style()->visitedDependentColor(CSSPropertyBackgroundColor);
    577574
    578575        RenderObject* bodyObject = htmlObject->firstChild();
    579         style = bodyObject->style();
    580         return style->backgroundColor();
    581     }
    582 
    583     return renderer()->style()->backgroundColor();
     576        return bodyObject->style()->visitedDependentColor(CSSPropertyBackgroundColor);
     577    }
     578
     579    return renderer()->style()->visitedDependentColor(CSSPropertyBackgroundColor);
    584580}
    585581
     
    599595    // or any background (color or image).
    600596    // FIXME: we could optimize layers for simple backgrounds.
    601     if (hasBoxDecorationsOrBackground(style))
     597    if (hasBoxDecorationsOrBackground(renderObject))
    602598        return false;
    603599
     
    709705    // and set background color on the layer in that case, instead of allocating backing store and painting.
    710706    if (renderer()->isVideo() || is3DCanvas(renderer()))
    711         return hasBoxDecorationsOrBackground(renderer()->style());
     707        return hasBoxDecorationsOrBackground(renderer());
    712708
    713709    return true;
     
    719715{
    720716    RenderObject* renderObject = renderer();
    721     return renderObject->isImage() && !hasBoxDecorationsOrBackground(renderObject->style());
     717    return renderObject->isImage() && !hasBoxDecorationsOrBackground(renderObject);
    722718}
    723719
  • trunk/WebCore/rendering/RenderLayerBacking.h

    r59711 r59956  
    160160
    161161    bool rendererHasBackground() const;
    162     const Color& rendererBackgroundColor() const;
     162    const Color rendererBackgroundColor() const;
    163163
    164164    bool hasNonCompositingContent() const;
  • trunk/WebCore/rendering/RenderListBox.cpp

    r58177 r59956  
    313313        itemStyle = style();
    314314   
    315     Color textColor = element->renderStyle() ? element->renderStyle()->color() : style()->color();
     315    Color textColor = element->renderStyle() ? element->renderStyle()->visitedDependentColor(CSSPropertyColor) : style()->visitedDependentColor(CSSPropertyColor);
    316316    if (optionElement && optionElement->selected()) {
    317317        if (document()->frame()->selection()->isFocusedAndActive() && document()->focusedNode() == node())
     
    356356            backColor = theme()->inactiveListBoxSelectionBackgroundColor();
    357357    } else
    358         backColor = element->renderStyle() ? element->renderStyle()->backgroundColor() : style()->backgroundColor();
     358        backColor = element->renderStyle() ? element->renderStyle()->visitedDependentColor(CSSPropertyBackgroundColor) : style()->visitedDependentColor(CSSPropertyBackgroundColor);
    359359
    360360    // Draw the background for this list box item
  • trunk/WebCore/rendering/RenderListMarker.cpp

    r59950 r59956  
    10101010    }
    10111011
    1012     const Color color(style()->color());
     1012    const Color color(style()->visitedDependentColor(CSSPropertyColor));
    10131013    context->setStrokeColor(color, style()->colorSpace());
    10141014    context->setStrokeStyle(SolidStroke);
  • trunk/WebCore/rendering/RenderMediaControlsChromium.cpp

    r59932 r59956  
    121121    context->setShouldAntialias(true);
    122122    context->setStrokeStyle(SolidStroke);
    123     context->setStrokeColor(style->borderLeftColor(), DeviceColorSpace);
     123    context->setStrokeColor(style->visitedDependentColor(CSSPropertyBorderLeftColor), DeviceColorSpace);
    124124    context->setStrokeThickness(style->borderLeftWidth());
    125     context->setFillColor(style->backgroundColor(), DeviceColorSpace);
     125    context->setFillColor(style->visitedDependentColor(CSSPropertyBackgroundColor), DeviceColorSpace);
    126126    context->drawRect(rect);
    127127    context->restore();
     
    151151
    152152        RefPtr<Gradient> gradient = Gradient::create(sliderTopLeft, sliderTopRight);
    153         Color startColor = object->style()->color();
     153        Color startColor = object->style()->visitedDependentColor(CSSPropertyColor);
    154154        gradient->addColorStop(0.0, startColor);
    155155        gradient->addColorStop(1.0, Color(startColor.red() / 2, startColor.green() / 2, startColor.blue() / 2, startColor.alpha()));
     
    225225        // Draw the left border using CSS defined width and color.
    226226        context->setStrokeThickness(object->style()->borderLeftWidth());
    227         context->setStrokeColor(object->style()->borderLeftColor().rgb(), DeviceColorSpace);
     227        context->setStrokeColor(object->style()->visitedDependentColor(CSSPropertyBorderLeftColor).rgb(), DeviceColorSpace);
    228228        context->drawLine(IntPoint(rect.x() + 1, rect.y()),
    229229                          IntPoint(rect.x() + 1, rect.y() + rect.height()));
     
    231231        // Draw the right border using CSS defined width and color.
    232232        context->setStrokeThickness(object->style()->borderRightWidth());
    233         context->setStrokeColor(object->style()->borderRightColor().rgb(), DeviceColorSpace);
     233        context->setStrokeColor(object->style()->visitedDependentColor(CSSPropertyBorderRightColor).rgb(), DeviceColorSpace);
    234234        context->drawLine(IntPoint(rect.x() + rect.width() - 1, rect.y()),
    235235                          IntPoint(rect.x() + rect.width() - 1, rect.y() + rect.height()));
  • trunk/WebCore/rendering/RenderMenuList.cpp

    r58177 r59956  
    410410   
    411411    RenderStyle* style = element->renderStyle() ? element->renderStyle() : element->computedStyle();
    412     return style ? PopupMenuStyle(style->color(), itemBackgroundColor(listIndex), style->font(), style->visibility() == VISIBLE, style->textIndent(), style->direction()) : menuStyle();
     412    return style ? PopupMenuStyle(style->visitedDependentColor(CSSPropertyColor), itemBackgroundColor(listIndex), style->font(), style->visibility() == VISIBLE, style->textIndent(), style->direction()) : menuStyle();
    413413}
    414414
     
    418418    const Vector<Element*>& listItems = select->listItems();
    419419    if (listIndex >= listItems.size())
    420         return style()->backgroundColor();
     420        return style()->visitedDependentColor(CSSPropertyBackgroundColor);
    421421    Element* element = listItems[listIndex];
    422422
    423423    Color backgroundColor;
    424424    if (element->renderStyle())
    425         backgroundColor = element->renderStyle()->backgroundColor();
     425        backgroundColor = element->renderStyle()->visitedDependentColor(CSSPropertyBackgroundColor);
    426426    // If the item has an opaque background color, return that.
    427427    if (!backgroundColor.hasAlpha())
     
    429429
    430430    // Otherwise, the item's background is overlayed on top of the menu background.
    431     backgroundColor = style()->backgroundColor().blend(backgroundColor);
     431    backgroundColor = style()->visitedDependentColor(CSSPropertyBackgroundColor).blend(backgroundColor);
    432432    if (!backgroundColor.hasAlpha())
    433433        return backgroundColor;
     
    440440{
    441441    RenderStyle* s = m_innerBlock ? m_innerBlock->style() : style();
    442     return PopupMenuStyle(s->color(), s->backgroundColor(), s->font(), s->visibility() == VISIBLE, s->textIndent(), s->direction());
     442    return PopupMenuStyle(s->visitedDependentColor(CSSPropertyColor), s->visitedDependentColor(CSSPropertyBackgroundColor), s->font(), s->visibility() == VISIBLE, s->textIndent(), s->direction());
    443443}
    444444
  • trunk/WebCore/rendering/RenderObject.cpp

    r59143 r59956  
    13831383    Color color;
    13841384    if (style()->userSelect() != SELECT_NONE) {
    1385          RefPtr<RenderStyle> pseudoStyle = getUncachedPseudoStyle(SELECTION);
    1386         if (pseudoStyle && pseudoStyle->backgroundColor().isValid())
    1387             color = pseudoStyle->backgroundColor().blendWithWhite();
     1385        RefPtr<RenderStyle> pseudoStyle = getUncachedPseudoStyle(SELECTION);
     1386        if (pseudoStyle && pseudoStyle->visitedDependentColor(CSSPropertyBackgroundColor).isValid())
     1387            color = pseudoStyle->visitedDependentColor(CSSPropertyBackgroundColor).blendWithWhite();
    13881388        else
    13891389            color = document()->frame()->selection()->isFocusedAndActive() ?
     
    14021402
    14031403    if (RefPtr<RenderStyle> pseudoStyle = getUncachedPseudoStyle(SELECTION)) {
    1404         color = pseudoStyle->textFillColor();
     1404        color = pseudoStyle->visitedDependentColor(CSSPropertyWebkitTextFillColor);
    14051405        if (!color.isValid())
    1406             color = pseudoStyle->color();
     1406            color = pseudoStyle->visitedDependentColor(CSSPropertyColor);
    14071407    } else
    14081408        color = document()->frame()->selection()->isFocusedAndActive() ?
  • trunk/WebCore/rendering/RenderObject.h

    r59876 r59956  
    402402    bool hasBoxDecorations() const { return m_paintBackground; }
    403403    bool mustRepaintBackgroundOrBorder() const;
     404    bool hasBackground() const
     405    {
     406        Color color = style()->visitedDependentColor(CSSPropertyBackgroundColor);
     407        if (color.isValid() && color.alpha() > 0)
     408            return true;
     409        return style()->hasBackgroundImage();
     410    }
    404411
    405412    bool needsLayout() const { return m_needsLayout || m_normalChildNeedsLayout || m_posChildNeedsLayout || m_needsPositionedMovementLayout; }
  • trunk/WebCore/rendering/RenderSVGResource.cpp

    r58212 r59956  
    4545}
    4646
    47 static inline void adjustColorForPseudoRules(const RenderStyle* style, bool useFillPaint, Color& color)
     47inline void RenderSVGResource::adjustColorForPseudoRules(const RenderStyle* style, bool useFillPaint, Color& color)
    4848{
    4949    if (style->insideLink() != InsideVisitedLink)
     
    9696        Color fillColor;
    9797        if (fillPaint->paintType() == SVGPaint::SVG_PAINTTYPE_CURRENTCOLOR)
    98             fillColor = style->color();
     98            fillColor = style->visitedDependentColor(CSSPropertyColor);
    9999        else
    100100            fillColor = fillPaint->color();
     
    150150        Color strokeColor;
    151151        if (strokePaint->paintType() == SVGPaint::SVG_PAINTTYPE_CURRENTCOLOR)
    152             strokeColor = style->color();
     152            strokeColor = style->visitedDependentColor(CSSPropertyColor);
    153153        else
    154154            strokeColor = strokePaint->color();
  • trunk/WebCore/rendering/RenderSVGResource.h

    r59081 r59956  
    4545};
    4646
     47class Color;
    4748class FloatRect;
    4849class GraphicsContext;
     
    7980    static RenderSVGResourceSolidColor* sharedSolidPaintingResource();
    8081
     82private:
     83    static void adjustColorForPseudoRules(const RenderStyle*, bool useFillPaint, Color&);
     84   
    8185protected:
    8286    void markForLayoutAndResourceInvalidation(RenderObject*);
  • trunk/WebCore/rendering/RenderTable.cpp

    r57355 r59956  
    502502    paintBoxShadow(paintInfo.context, tx, ty, w, h, style(), Normal);
    503503   
    504     paintFillLayers(paintInfo, style()->backgroundColor(), style()->backgroundLayers(), tx, ty, w, h);
     504    paintFillLayers(paintInfo, style()->visitedDependentColor(CSSPropertyBackgroundColor), style()->backgroundLayers(), tx, ty, w, h);
    505505    paintBoxShadow(paintInfo.context, tx, ty, w, h, style(), Inset);
    506506
  • trunk/WebCore/rendering/RenderTable.h

    r56319 r59956  
    2626#define RenderTable_h
    2727
     28#include "CSSPropertyNames.h"
    2829#include "RenderBlock.h"
    2930#include <wtf/Vector.h>
     
    5152    int borderBottom() const;
    5253   
    53     const Color& bgColor() const { return style()->backgroundColor(); }
     54    const Color bgColor() const { return style()->visitedDependentColor(CSSPropertyBackgroundColor); }
    5455
    5556    int outerBorderTop() const;
  • trunk/WebCore/rendering/RenderTableCell.cpp

    r58177 r59956  
    850850    int h = height();
    851851
    852     Color c = backgroundObject->style()->backgroundColor();
     852    Color c = backgroundObject->style()->visitedDependentColor(CSSPropertyBackgroundColor);
    853853    const FillLayer* bgLayer = backgroundObject->style()->backgroundLayers();
    854854
  • trunk/WebCore/rendering/RenderTextControl.cpp

    r58627 r59956  
    135135    bool disabled = updateUserModifyProperty(node(), textBlockStyle);
    136136    if (disabled)
    137         textBlockStyle->setColor(disabledTextColor(textBlockStyle->color(), startStyle->backgroundColor()));
     137        textBlockStyle->setColor(disabledTextColor(textBlockStyle->visitedDependentColor(CSSPropertyColor), startStyle->visitedDependentColor(CSSPropertyBackgroundColor)));
    138138}
    139139
  • trunk/WebCore/rendering/RenderTextControlSingleLine.cpp

    r59236 r59956  
    789789PopupMenuStyle RenderTextControlSingleLine::menuStyle() const
    790790{
    791     return PopupMenuStyle(style()->color(), style()->backgroundColor(), style()->font(), style()->visibility() == VISIBLE, style()->textIndent(), style()->direction());
     791    return PopupMenuStyle(style()->visitedDependentColor(CSSPropertyColor), style()->visitedDependentColor(CSSPropertyBackgroundColor), style()->font(), style()->visibility() == VISIBLE, style()->textIndent(), style()->direction());
    792792}
    793793
  • trunk/WebCore/rendering/RenderTheme.cpp

    r59541 r59956  
    643643            return (style->border() != border ||
    644644                    *style->backgroundLayers() != background ||
    645                     style->backgroundColor() != backgroundColor);
     645                    style->visitedDependentColor(CSSPropertyBackgroundColor) != backgroundColor);
    646646        default:
    647647            return false;
  • trunk/WebCore/rendering/RenderThemeChromiumSkia.cpp

    r55714 r59956  
    309309    const int bottom = rect.y() + rect.height();
    310310    SkColor baseColor = SkColorSetARGB(0xff, 0xdd, 0xdd, 0xdd);
    311     if (o->style()->hasBackground())
    312         baseColor = o->style()->backgroundColor().rgb();
     311    if (o->hasBackground())
     312        baseColor = o->style()->visitedDependentColor(CSSPropertyBackgroundColor).rgb();
    313313    double h, s, l;
    314314    Color(baseColor).getHSL(h, s, l);
  • trunk/WebCore/rendering/RenderThemeMac.mm

    r58943 r59956  
    995995    paintInfo.context->save();
    996996
    997     paintInfo.context->setFillColor(o->style()->color(), o->style()->colorSpace());
     997    paintInfo.context->setFillColor(o->style()->visitedDependentColor(CSSPropertyColor), o->style()->colorSpace());
    998998    paintInfo.context->setStrokeStyle(NoStroke);
    999999
  • trunk/WebCore/rendering/RenderTreeAsText.cpp

    r59592 r59956  
    181181}
    182182
    183 static void writeRenderObject(TextStream& ts, const RenderObject& o, RenderAsTextBehavior behavior)
     183void RenderTreeAsText::writeRenderObject(TextStream& ts, const RenderObject& o, RenderAsTextBehavior behavior)
    184184{
    185185    ts << o.renderName();
     
    430430    writeIndent(ts, indent);
    431431
    432     writeRenderObject(ts, o, behavior);
     432    RenderTreeAsText::writeRenderObject(ts, o, behavior);
    433433    ts << "\n";
    434434
  • trunk/WebCore/rendering/RenderTreeAsText.h

    r59069 r59956  
    5050void writeIndent(TextStream&, int indent);
    5151
     52class RenderTreeAsText {
     53// FIXME: This is a cheesy hack to allow easy access to RenderStyle colors.  It won't be needed if we convert
     54// it to use visitedDependentColor instead. (This just involves rebaselining many results though, so for now it's
     55// not being done).
     56public:
     57static void writeRenderObject(TextStream& ts, const RenderObject& o, RenderAsTextBehavior behavior);
     58};
     59
    5260// Helper function shared with SVGRenderTreeAsText
    5361String quoteAndEscapeNonPrintables(const String&);
  • trunk/WebCore/rendering/SVGInlineTextBox.cpp

    r59148 r59956  
    478478        return;
    479479
    480     Color textColor = style->color();
     480    Color textColor = style->visitedDependentColor(CSSPropertyColor);
    481481    Color color = renderer()->selectionBackgroundColor();
    482482    if (!color.isValid() || !color.alpha())
  • trunk/WebCore/rendering/SVGRenderTreeAsText.cpp

    r59148 r59956  
    434434    ts << " at (" << text.x() << "," << text.y() << ") size " << box->width() << "x" << box->height() << " contains " << chunks.size() << " chunk(s)";
    435435
    436     if (text.parent() && (text.parent()->style()->color() != text.style()->color()))
    437         writeNameValuePair(ts, "color", text.style()->color().name());
     436    if (text.parent() && (text.parent()->style()->visitedDependentColor(CSSPropertyColor) != text.style()->visitedDependentColor(CSSPropertyColor)))
     437        writeNameValuePair(ts, "color", text.style()->visitedDependentColor(CSSPropertyColor).name());
    438438}
    439439
  • trunk/WebCore/rendering/style/RenderStyle.cpp

    r59629 r59956  
    996996}
    997997
    998 static Color colorIncludingFallback(const RenderStyle* style, int colorProperty, EBorderStyle borderStyle)
     998const Color RenderStyle::colorIncludingFallback(int colorProperty, EBorderStyle borderStyle) const
    999999{
    10001000    Color result;
    10011001    switch (colorProperty) {
    10021002    case CSSPropertyBackgroundColor:
    1003         return style->backgroundColor(); // Background color doesn't fall back.
     1003        return backgroundColor(); // Background color doesn't fall back.
    10041004    case CSSPropertyBorderLeftColor:
    1005         result = style->borderLeftColor();
    1006         borderStyle = style->borderLeftStyle();
     1005        result = borderLeftColor();
     1006        borderStyle = borderLeftStyle();
    10071007        break;
    10081008    case CSSPropertyBorderRightColor:
    1009         result = style->borderRightColor();
    1010         borderStyle = style->borderRightStyle();
     1009        result = borderRightColor();
     1010        borderStyle = borderRightStyle();
    10111011        break;
    10121012    case CSSPropertyBorderTopColor:
    1013         result = style->borderTopColor();
    1014         borderStyle = style->borderTopStyle();
     1013        result = borderTopColor();
     1014        borderStyle = borderTopStyle();
    10151015        break;
    10161016    case CSSPropertyBorderBottomColor:
    1017         result = style->borderBottomColor();
    1018         borderStyle = style->borderBottomStyle();
     1017        result = borderBottomColor();
     1018        borderStyle = borderBottomStyle();
    10191019        break;
    10201020    case CSSPropertyColor:
    1021         result = style->color();
     1021        result = color();
    10221022        break;
    10231023    case CSSPropertyOutlineColor:
    1024         result = style->outlineColor();
     1024        result = outlineColor();
    10251025        break;
    10261026    case CSSPropertyWebkitColumnRuleColor:
    1027         result = style->columnRuleColor();
     1027        result = columnRuleColor();
    10281028        break;
    10291029    case CSSPropertyWebkitTextFillColor:
    1030         result = style->textFillColor();
     1030        result = textFillColor();
    10311031        break;
    10321032    case CSSPropertyWebkitTextStrokeColor:
    1033         result = style->textStrokeColor();
     1033        result = textStrokeColor();
    10341034        break;
    10351035    default:
     
    10441044            result.setRGB(238, 238, 238);
    10451045        else
    1046             result = style->color();
     1046            result = color();
    10471047    }
    10481048
     
    10501050}
    10511051
    1052 Color RenderStyle::visitedDependentColor(int colorProperty) const
     1052const Color RenderStyle::visitedDependentColor(int colorProperty) const
    10531053{
    10541054    EBorderStyle borderStyle = borderStyleForColorProperty(this, colorProperty);
    1055     Color unvisitedColor = colorIncludingFallback(this, colorProperty, borderStyle);
     1055    Color unvisitedColor = colorIncludingFallback(colorProperty, borderStyle);
    10561056    if (insideLink() != InsideVisitedLink)
    10571057        return unvisitedColor;
     
    10601060    if (!visitedStyle)
    10611061        return unvisitedColor;
    1062     Color visitedColor = colorIncludingFallback(visitedStyle, colorProperty, borderStyle);
     1062    Color visitedColor = visitedStyle->colorIncludingFallback(colorProperty, borderStyle);
    10631063
    10641064    // Take the alpha from the unvisited color, but get the RGB values from the visited color.
  • trunk/WebCore/rendering/style/RenderStyle.h

    r59629 r59956  
    3333#include "CSSImageGeneratorValue.h"
    3434#include "CSSPrimitiveValue.h"
     35#include "CSSPropertyNames.h"
    3536#include "CSSReflectionDirection.h"
    3637#include "CSSValueList.h"
     
    114115
    115116class RenderStyle: public RefCounted<RenderStyle> {
    116     friend class CSSStyleSelector;
     117    friend class AnimationBase; // Used by CSS animations. We can't allow them to animate based off visited colors.
     118    friend class ApplyStyleCommand; // Editing has to only reveal unvisited info.
     119    friend class CSSStyleSelector; // Sets members directly.
     120    friend class CSSComputedStyleDeclaration; // Ignores visited styles, so needs to be able to see unvisited info.
     121    friend class PropertyWrapperMaybeInvalidColor; // Used by CSS animations. We can't allow them to animate based off visited colors.
     122    friend class RenderSVGResource; // FIXME: Needs to alter the visited state by hand. Should clean the SVG code up and move it into RenderStyle perhaps.
     123    friend class RenderTreeAsText; // FIXME: Only needed so the render tree can keep lying and dump the wrong colors.  Rebaselining would allow this to be yanked.
    117124protected:
    118125
     
    342349    bool hasOffset() const { return surround->offset.nonZero(); }
    343350
    344     bool hasBackground() const
    345     {
    346         if (backgroundColor().isValid() && backgroundColor().alpha() > 0)
    347             return true;
    348         return m_background->background().hasImage();
    349     }
    350351    bool hasBackgroundImage() const { return m_background->background().hasImage(); }
    351352    bool hasFixedBackgroundImage() const { return m_background->background().hasFixedImage(); }
     
    402403    unsigned short borderLeftWidth() const { return surround->border.borderLeftWidth(); }
    403404    EBorderStyle borderLeftStyle() const { return surround->border.left().style(); }
    404     const Color& borderLeftColor() const { return surround->border.left().color(); }
    405405    bool borderLeftIsTransparent() const { return surround->border.left().isTransparent(); }
    406406    unsigned short borderRightWidth() const { return surround->border.borderRightWidth(); }
    407407    EBorderStyle borderRightStyle() const { return surround->border.right().style(); }
    408     const Color& borderRightColor() const { return surround->border.right().color(); }
    409408    bool borderRightIsTransparent() const { return surround->border.right().isTransparent(); }
    410409    unsigned short borderTopWidth() const { return surround->border.borderTopWidth(); }
    411410    EBorderStyle borderTopStyle() const { return surround->border.top().style(); }
    412     const Color& borderTopColor() const { return surround->border.top().color(); }
    413411    bool borderTopIsTransparent() const { return surround->border.top().isTransparent(); }
    414412    unsigned short borderBottomWidth() const { return surround->border.borderBottomWidth(); }
    415413    EBorderStyle borderBottomStyle() const { return surround->border.bottom().style(); }
    416     const Color& borderBottomColor() const { return surround->border.bottom().color(); }
    417414    bool borderBottomIsTransparent() const { return surround->border.bottom().isTransparent(); }
    418415
     
    427424    EBorderStyle outlineStyle() const { return m_background->outline().style(); }
    428425    bool outlineStyleIsAuto() const { return m_background->outline().isAuto(); }
    429     const Color& outlineColor() const { return m_background->outline().color(); }
    430 
     426   
    431427    EOverflow overflowX() const { return static_cast<EOverflow>(noninherited_flags._overflowX); }
    432428    EOverflow overflowY() const { return static_cast<EOverflow>(noninherited_flags._overflowY); }
     
    452448    int fontSize() const { return inherited->font.pixelSize(); }
    453449
    454     const Color& color() const { return inherited->color; }
    455450    Length textIndent() const { return rareInheritedData->indent; }
    456451    ETextAlign textAlign() const { return static_cast<ETextAlign>(inherited_flags._text_align); }
     
    536531    }
    537532
    538     const Color& backgroundColor() const { return m_background->color(); }
    539533    StyleImage* backgroundImage() const { return m_background->background().image(); }
    540534    EFillRepeat backgroundRepeatX() const { return static_cast<EFillRepeat>(m_background->background().repeatX()); }
     
    617611
    618612    const ShadowData* textShadow() const { return rareInheritedData->textShadow; }
    619     const Color& textStrokeColor() const { return rareInheritedData->textStrokeColor; }
    620613    float textStrokeWidth() const { return rareInheritedData->textStrokeWidth; }
    621     const Color& textFillColor() const { return rareInheritedData->textFillColor; }
    622614    ColorSpace colorSpace() const { return static_cast<ColorSpace>(rareInheritedData->colorSpace); }
    623615    float opacity() const { return rareNonInheritedData->opacity; }
     
    665657    float columnGap() const { return rareNonInheritedData->m_multiCol->m_gap; }
    666658    bool hasNormalColumnGap() const { return rareNonInheritedData->m_multiCol->m_normalGap; }
    667     const Color& columnRuleColor() const { return rareNonInheritedData->m_multiCol->m_rule.color(); }
    668659    EBorderStyle columnRuleStyle() const { return rareNonInheritedData->m_multiCol->m_rule.style(); }
    669660    unsigned short columnRuleWidth() const { return rareNonInheritedData->m_multiCol->ruleWidth(); }
     
    11131104    void setChildIndex(unsigned index) { m_childIndex = index; }
    11141105
    1115     Color visitedDependentColor(int colorProperty) const;
     1106    const Color visitedDependentColor(int colorProperty) const;
    11161107
    11171108    // Initial values for all the properties
     
    12131204    static const Vector<StyleDashboardRegion>& noneDashboardRegions();
    12141205#endif
     1206
     1207private:
     1208    // Color accessors are all private to make sure callers use visitedDependentColor instead to access them.
     1209    const Color& borderLeftColor() const { return surround->border.left().color(); }
     1210    const Color& borderRightColor() const { return surround->border.right().color(); }
     1211    const Color& borderTopColor() const { return surround->border.top().color(); }
     1212    const Color& borderBottomColor() const { return surround->border.bottom().color(); }
     1213    const Color& backgroundColor() const { return m_background->color(); }
     1214    const Color& color() const { return inherited->color; }
     1215    const Color& columnRuleColor() const { return rareNonInheritedData->m_multiCol->m_rule.color(); }
     1216    const Color& outlineColor() const { return m_background->outline().color(); }
     1217    const Color& textFillColor() const { return rareInheritedData->textFillColor; }
     1218    const Color& textStrokeColor() const { return rareInheritedData->textStrokeColor; }
     1219   
     1220    const Color colorIncludingFallback(int colorProperty, EBorderStyle borderStyle) const;
    12151221};
    12161222
  • trunk/WebCore/svg/SVGAnimationElement.cpp

    r59773 r59956  
    503503
    504504    if (RenderObject* targetRenderer = target->renderer())
    505         value = targetRenderer->style()->color().name();
     505        value = targetRenderer->style()->visitedDependentColor(CSSPropertyColor).name();
    506506}
    507507   
  • trunk/WebKit/mac/ChangeLog

    r59941 r59956  
     12010-05-21  David Hyatt  <hyatt@apple.com>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=39420
     6
     7        Make sure everyone who needs to is using visitedDependentColor rather than accessing styles
     8        directly.
     9
     10        * Misc/WebNSAttributedStringExtras.mm:
     11        (+[NSAttributedString _web_attributedStringFromRange:]):
     12        * WebView/WebFrame.mm:
     13        (-[WebFrame _bodyBackgroundColor]):
     14
    1152010-05-21  Oliver Hunt  <oliver@apple.com>
    216
  • trunk/WebKit/mac/Misc/WebNSAttributedStringExtras.mm

    r46647 r59956  
    155155        NSFont *font = style->font().primaryFont()->getNSFont();
    156156        [attrs.get() setObject:font forKey:NSFontAttributeName];
    157         if (style->color().isValid())
    158             [attrs.get() setObject:nsColor(style->color()) forKey:NSForegroundColorAttributeName];
     157        if (style->visitedDependentColor(CSSPropertyColor).isValid())
     158            [attrs.get() setObject:nsColor(style->visitedDependentColor(CSSPropertyColor)) forKey:NSForegroundColorAttributeName];
    159159        else
    160160            [attrs.get() removeObjectForKey:NSForegroundColorAttributeName];
    161         if (style->backgroundColor().isValid())
    162             [attrs.get() setObject:nsColor(style->backgroundColor()) forKey:NSBackgroundColorAttributeName];
     161        if (style->visitedDependentColor(CSSPropertyBackgroundColor).isValid())
     162            [attrs.get() setObject:nsColor(style->visitedDependentColor(CSSPropertyBackgroundColor)) forKey:NSBackgroundColorAttributeName];
    163163        else
    164164            [attrs.get() removeObjectForKey:NSBackgroundColorAttributeName];
  • trunk/WebKit/mac/WebView/WebFrame.mm

    r59840 r59956  
    10381038    if (!bodyRenderer)
    10391039        return nil;
    1040     Color color = bodyRenderer->style()->backgroundColor();
     1040    Color color = bodyRenderer->style()->visitedDependentColor(CSSPropertyBackgroundColor);
    10411041    if (!color.isValid())
    10421042        return nil;
Note: See TracChangeset for help on using the changeset viewer.