OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) | 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. |
4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 || inherited_flags._text_decorations != other->inherited_flags._text_dec
orations | 635 || inherited_flags._text_decorations != other->inherited_flags._text_dec
orations |
636 || inherited_flags.m_printColorAdjust != other->inherited_flags.m_printC
olorAdjust | 636 || inherited_flags.m_printColorAdjust != other->inherited_flags.m_printC
olorAdjust |
637 || inherited_flags._insideLink != other->inherited_flags._insideLink | 637 || inherited_flags._insideLink != other->inherited_flags._insideLink |
638 || surround->border != other->surround->border | 638 || surround->border != other->surround->border |
639 || *m_background.get() != *other->m_background.get() | 639 || *m_background.get() != *other->m_background.get() |
640 || visual->textDecoration != other->visual->textDecoration | 640 || visual->textDecoration != other->visual->textDecoration |
641 || rareInheritedData->userModify != other->rareInheritedData->userModify | 641 || rareInheritedData->userModify != other->rareInheritedData->userModify |
642 || rareInheritedData->userSelect != other->rareInheritedData->userSelect | 642 || rareInheritedData->userSelect != other->rareInheritedData->userSelect |
643 || rareNonInheritedData->userDrag != other->rareNonInheritedData->userDr
ag | 643 || rareNonInheritedData->userDrag != other->rareNonInheritedData->userDr
ag |
644 || rareNonInheritedData->m_borderFit != other->rareNonInheritedData->m_b
orderFit | 644 || rareNonInheritedData->m_borderFit != other->rareNonInheritedData->m_b
orderFit |
645 #if ENABLE(CSS3_TEXT) | |
646 || rareNonInheritedData->m_textDecorationStyle != other->rareNonInherite
dData->m_textDecorationStyle | 645 || rareNonInheritedData->m_textDecorationStyle != other->rareNonInherite
dData->m_textDecorationStyle |
647 || rareNonInheritedData->m_textDecorationColor != other->rareNonInherite
dData->m_textDecorationColor | 646 || rareNonInheritedData->m_textDecorationColor != other->rareNonInherite
dData->m_textDecorationColor |
648 #endif // CSS3_TEXT | |
649 || rareInheritedData->textFillColor != other->rareInheritedData->textFil
lColor | 647 || rareInheritedData->textFillColor != other->rareInheritedData->textFil
lColor |
650 || rareInheritedData->textStrokeColor != other->rareInheritedData->textS
trokeColor | 648 || rareInheritedData->textStrokeColor != other->rareInheritedData->textS
trokeColor |
651 || rareInheritedData->textEmphasisColor != other->rareInheritedData->tex
tEmphasisColor | 649 || rareInheritedData->textEmphasisColor != other->rareInheritedData->tex
tEmphasisColor |
652 || rareInheritedData->textEmphasisFill != other->rareInheritedData->text
EmphasisFill | 650 || rareInheritedData->textEmphasisFill != other->rareInheritedData->text
EmphasisFill |
653 || rareInheritedData->m_imageRendering != other->rareInheritedData->m_im
ageRendering) | 651 || rareInheritedData->m_imageRendering != other->rareInheritedData->m_im
ageRendering) |
654 return StyleDifferenceRepaint; | 652 return StyleDifferenceRepaint; |
655 | 653 |
656 // FIXME: The current spec is being reworked to remove dependencies betw
een exclusions and affected | 654 // FIXME: The current spec is being reworked to remove dependencies betw
een exclusions and affected |
657 // content. There's a proposal to use floats instead. In that case, wrap
-shape should actually relayout | 655 // content. There's a proposal to use floats instead. In that case, wrap
-shape should actually relayout |
658 // the parent container. For sure, I will have to revisit this code, but
for now I've added this in order | 656 // the parent container. For sure, I will have to revisit this code, but
for now I've added this in order |
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1345 break; | 1343 break; |
1346 case CSSPropertyColor: | 1344 case CSSPropertyColor: |
1347 result = visitedLink ? visitedLinkColor() : color(); | 1345 result = visitedLink ? visitedLinkColor() : color(); |
1348 break; | 1346 break; |
1349 case CSSPropertyOutlineColor: | 1347 case CSSPropertyOutlineColor: |
1350 result = visitedLink ? visitedLinkOutlineColor() : outlineColor(); | 1348 result = visitedLink ? visitedLinkOutlineColor() : outlineColor(); |
1351 break; | 1349 break; |
1352 case CSSPropertyWebkitColumnRuleColor: | 1350 case CSSPropertyWebkitColumnRuleColor: |
1353 result = visitedLink ? visitedLinkColumnRuleColor() : columnRuleColor(); | 1351 result = visitedLink ? visitedLinkColumnRuleColor() : columnRuleColor(); |
1354 break; | 1352 break; |
1355 #if ENABLE(CSS3_TEXT) | 1353 case CSSPropertyTextDecorationColor: |
1356 case CSSPropertyWebkitTextDecorationColor: | |
1357 // Text decoration color fallback is handled in RenderObject::decoration
Color. | 1354 // Text decoration color fallback is handled in RenderObject::decoration
Color. |
1358 return visitedLink ? visitedLinkTextDecorationColor() : textDecorationCo
lor(); | 1355 return visitedLink ? visitedLinkTextDecorationColor() : textDecorationCo
lor(); |
1359 #endif // CSS3_TEXT | |
1360 case CSSPropertyWebkitTextEmphasisColor: | 1356 case CSSPropertyWebkitTextEmphasisColor: |
1361 result = visitedLink ? visitedLinkTextEmphasisColor() : textEmphasisColo
r(); | 1357 result = visitedLink ? visitedLinkTextEmphasisColor() : textEmphasisColo
r(); |
1362 break; | 1358 break; |
1363 case CSSPropertyWebkitTextFillColor: | 1359 case CSSPropertyWebkitTextFillColor: |
1364 result = visitedLink ? visitedLinkTextFillColor() : textFillColor(); | 1360 result = visitedLink ? visitedLinkTextFillColor() : textFillColor(); |
1365 break; | 1361 break; |
1366 case CSSPropertyWebkitTextStrokeColor: | 1362 case CSSPropertyWebkitTextStrokeColor: |
1367 result = visitedLink ? visitedLinkTextStrokeColor() : textStrokeColor(); | 1363 result = visitedLink ? visitedLinkTextStrokeColor() : textStrokeColor(); |
1368 break; | 1364 break; |
1369 default: | 1365 default: |
(...skipping 11 matching lines...) Expand all Loading... |
1381 } | 1377 } |
1382 | 1378 |
1383 Color RenderStyle::visitedDependentColor(int colorProperty) const | 1379 Color RenderStyle::visitedDependentColor(int colorProperty) const |
1384 { | 1380 { |
1385 Color unvisitedColor = colorIncludingFallback(colorProperty, false); | 1381 Color unvisitedColor = colorIncludingFallback(colorProperty, false); |
1386 if (insideLink() != InsideVisitedLink) | 1382 if (insideLink() != InsideVisitedLink) |
1387 return unvisitedColor; | 1383 return unvisitedColor; |
1388 | 1384 |
1389 Color visitedColor = colorIncludingFallback(colorProperty, true); | 1385 Color visitedColor = colorIncludingFallback(colorProperty, true); |
1390 | 1386 |
1391 #if ENABLE(CSS3_TEXT) | |
1392 // Text decoration color validity is preserved (checked in RenderObject::dec
orationColor). | 1387 // Text decoration color validity is preserved (checked in RenderObject::dec
orationColor). |
1393 if (colorProperty == CSSPropertyWebkitTextDecorationColor) | 1388 if (colorProperty == CSSPropertyTextDecorationColor) |
1394 return visitedColor; | 1389 return visitedColor; |
1395 #endif // CSS3_TEXT | |
1396 | 1390 |
1397 // FIXME: Technically someone could explicitly specify the color transparent
, but for now we'll just | 1391 // FIXME: Technically someone could explicitly specify the color transparent
, but for now we'll just |
1398 // assume that if the background color is transparent that it wasn't set. No
te that it's weird that | 1392 // assume that if the background color is transparent that it wasn't set. No
te that it's weird that |
1399 // we're returning unvisited info for a visited link, but given our restrict
ion that the alpha values | 1393 // we're returning unvisited info for a visited link, but given our restrict
ion that the alpha values |
1400 // have to match, it makes more sense to return the unvisited background col
or if specified than it | 1394 // have to match, it makes more sense to return the unvisited background col
or if specified than it |
1401 // does to return black. This behavior matches what Firefox 4 does as well. | 1395 // does to return black. This behavior matches what Firefox 4 does as well. |
1402 if (colorProperty == CSSPropertyBackgroundColor && visitedColor == Color::tr
ansparent) | 1396 if (colorProperty == CSSPropertyBackgroundColor && visitedColor == Color::tr
ansparent) |
1403 return unvisitedColor; | 1397 return unvisitedColor; |
1404 | 1398 |
1405 // Take the alpha from the unvisited color, but get the RGB values from the
visited color. | 1399 // Take the alpha from the unvisited color, but get the RGB values from the
visited color. |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1602 info.addMember(inherited, "inherited"); | 1596 info.addMember(inherited, "inherited"); |
1603 info.addMember(m_cachedPseudoStyles, "cachedPseudoStyles"); | 1597 info.addMember(m_cachedPseudoStyles, "cachedPseudoStyles"); |
1604 #if ENABLE(SVG) | 1598 #if ENABLE(SVG) |
1605 info.addMember(m_svgStyle, "svgStyle"); | 1599 info.addMember(m_svgStyle, "svgStyle"); |
1606 #endif | 1600 #endif |
1607 info.addMember(inherited_flags, "inherited_flags"); | 1601 info.addMember(inherited_flags, "inherited_flags"); |
1608 info.addMember(noninherited_flags, "noninherited_flags"); | 1602 info.addMember(noninherited_flags, "noninherited_flags"); |
1609 } | 1603 } |
1610 | 1604 |
1611 } // namespace WebCore | 1605 } // namespace WebCore |
OLD | NEW |