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 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 || inherited_flags._text_decorations != other->inherited_flags._text_dec
orations | 610 || inherited_flags._text_decorations != other->inherited_flags._text_dec
orations |
611 || inherited_flags.m_printColorAdjust != other->inherited_flags.m_printC
olorAdjust | 611 || inherited_flags.m_printColorAdjust != other->inherited_flags.m_printC
olorAdjust |
612 || inherited_flags._insideLink != other->inherited_flags._insideLink | 612 || inherited_flags._insideLink != other->inherited_flags._insideLink |
613 || surround->border != other->surround->border | 613 || surround->border != other->surround->border |
614 || *m_background.get() != *other->m_background.get() | 614 || *m_background.get() != *other->m_background.get() |
615 || visual->textDecoration != other->visual->textDecoration | 615 || visual->textDecoration != other->visual->textDecoration |
616 || rareInheritedData->userModify != other->rareInheritedData->userModify | 616 || rareInheritedData->userModify != other->rareInheritedData->userModify |
617 || rareInheritedData->userSelect != other->rareInheritedData->userSelect | 617 || rareInheritedData->userSelect != other->rareInheritedData->userSelect |
618 || rareNonInheritedData->userDrag != other->rareNonInheritedData->userDr
ag | 618 || rareNonInheritedData->userDrag != other->rareNonInheritedData->userDr
ag |
619 || rareNonInheritedData->m_borderFit != other->rareNonInheritedData->m_b
orderFit | 619 || rareNonInheritedData->m_borderFit != other->rareNonInheritedData->m_b
orderFit |
620 #if ENABLE(CSS3_TEXT) | |
621 || rareNonInheritedData->m_textDecorationStyle != other->rareNonInherite
dData->m_textDecorationStyle | 620 || rareNonInheritedData->m_textDecorationStyle != other->rareNonInherite
dData->m_textDecorationStyle |
622 || rareNonInheritedData->m_textDecorationColor != other->rareNonInherite
dData->m_textDecorationColor | 621 || rareNonInheritedData->m_textDecorationColor != other->rareNonInherite
dData->m_textDecorationColor |
623 #endif // CSS3_TEXT | |
624 || rareInheritedData->textFillColor != other->rareInheritedData->textFil
lColor | 622 || rareInheritedData->textFillColor != other->rareInheritedData->textFil
lColor |
625 || rareInheritedData->textStrokeColor != other->rareInheritedData->textS
trokeColor | 623 || rareInheritedData->textStrokeColor != other->rareInheritedData->textS
trokeColor |
626 || rareInheritedData->textEmphasisColor != other->rareInheritedData->tex
tEmphasisColor | 624 || rareInheritedData->textEmphasisColor != other->rareInheritedData->tex
tEmphasisColor |
627 || rareInheritedData->textEmphasisFill != other->rareInheritedData->text
EmphasisFill | 625 || rareInheritedData->textEmphasisFill != other->rareInheritedData->text
EmphasisFill |
628 || rareInheritedData->m_imageRendering != other->rareInheritedData->m_im
ageRendering) | 626 || rareInheritedData->m_imageRendering != other->rareInheritedData->m_im
ageRendering) |
629 return StyleDifferenceRepaint; | 627 return StyleDifferenceRepaint; |
630 | 628 |
631 // FIXME: The current spec is being reworked to remove dependencies betw
een exclusions and affected | 629 // FIXME: The current spec is being reworked to remove dependencies betw
een exclusions and affected |
632 // content. There's a proposal to use floats instead. In that case, wrap
-shape should actually relayout | 630 // content. There's a proposal to use floats instead. In that case, wrap
-shape should actually relayout |
633 // the parent container. For sure, I will have to revisit this code, but
for now I've added this in order | 631 // 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... |
1320 break; | 1318 break; |
1321 case CSSPropertyColor: | 1319 case CSSPropertyColor: |
1322 result = visitedLink ? visitedLinkColor() : color(); | 1320 result = visitedLink ? visitedLinkColor() : color(); |
1323 break; | 1321 break; |
1324 case CSSPropertyOutlineColor: | 1322 case CSSPropertyOutlineColor: |
1325 result = visitedLink ? visitedLinkOutlineColor() : outlineColor(); | 1323 result = visitedLink ? visitedLinkOutlineColor() : outlineColor(); |
1326 break; | 1324 break; |
1327 case CSSPropertyWebkitColumnRuleColor: | 1325 case CSSPropertyWebkitColumnRuleColor: |
1328 result = visitedLink ? visitedLinkColumnRuleColor() : columnRuleColor(); | 1326 result = visitedLink ? visitedLinkColumnRuleColor() : columnRuleColor(); |
1329 break; | 1327 break; |
1330 #if ENABLE(CSS3_TEXT) | 1328 case CSSPropertyTextDecorationColor: |
1331 case CSSPropertyWebkitTextDecorationColor: | |
1332 // Text decoration color fallback is handled in RenderObject::decoration
Color. | 1329 // Text decoration color fallback is handled in RenderObject::decoration
Color. |
1333 return visitedLink ? visitedLinkTextDecorationColor() : textDecorationCo
lor(); | 1330 return visitedLink ? visitedLinkTextDecorationColor() : textDecorationCo
lor(); |
1334 #endif // CSS3_TEXT | |
1335 case CSSPropertyWebkitTextEmphasisColor: | 1331 case CSSPropertyWebkitTextEmphasisColor: |
1336 result = visitedLink ? visitedLinkTextEmphasisColor() : textEmphasisColo
r(); | 1332 result = visitedLink ? visitedLinkTextEmphasisColor() : textEmphasisColo
r(); |
1337 break; | 1333 break; |
1338 case CSSPropertyWebkitTextFillColor: | 1334 case CSSPropertyWebkitTextFillColor: |
1339 result = visitedLink ? visitedLinkTextFillColor() : textFillColor(); | 1335 result = visitedLink ? visitedLinkTextFillColor() : textFillColor(); |
1340 break; | 1336 break; |
1341 case CSSPropertyWebkitTextStrokeColor: | 1337 case CSSPropertyWebkitTextStrokeColor: |
1342 result = visitedLink ? visitedLinkTextStrokeColor() : textStrokeColor(); | 1338 result = visitedLink ? visitedLinkTextStrokeColor() : textStrokeColor(); |
1343 break; | 1339 break; |
1344 default: | 1340 default: |
(...skipping 11 matching lines...) Expand all Loading... |
1356 } | 1352 } |
1357 | 1353 |
1358 Color RenderStyle::visitedDependentColor(int colorProperty) const | 1354 Color RenderStyle::visitedDependentColor(int colorProperty) const |
1359 { | 1355 { |
1360 Color unvisitedColor = colorIncludingFallback(colorProperty, false); | 1356 Color unvisitedColor = colorIncludingFallback(colorProperty, false); |
1361 if (insideLink() != InsideVisitedLink) | 1357 if (insideLink() != InsideVisitedLink) |
1362 return unvisitedColor; | 1358 return unvisitedColor; |
1363 | 1359 |
1364 Color visitedColor = colorIncludingFallback(colorProperty, true); | 1360 Color visitedColor = colorIncludingFallback(colorProperty, true); |
1365 | 1361 |
1366 #if ENABLE(CSS3_TEXT) | |
1367 // Text decoration color validity is preserved (checked in RenderObject::dec
orationColor). | 1362 // Text decoration color validity is preserved (checked in RenderObject::dec
orationColor). |
1368 if (colorProperty == CSSPropertyWebkitTextDecorationColor) | 1363 if (colorProperty == CSSPropertyTextDecorationColor) |
1369 return visitedColor; | 1364 return visitedColor; |
1370 #endif // CSS3_TEXT | |
1371 | 1365 |
1372 // FIXME: Technically someone could explicitly specify the color transparent
, but for now we'll just | 1366 // FIXME: Technically someone could explicitly specify the color transparent
, but for now we'll just |
1373 // assume that if the background color is transparent that it wasn't set. No
te that it's weird that | 1367 // assume that if the background color is transparent that it wasn't set. No
te that it's weird that |
1374 // we're returning unvisited info for a visited link, but given our restrict
ion that the alpha values | 1368 // we're returning unvisited info for a visited link, but given our restrict
ion that the alpha values |
1375 // have to match, it makes more sense to return the unvisited background col
or if specified than it | 1369 // have to match, it makes more sense to return the unvisited background col
or if specified than it |
1376 // does to return black. This behavior matches what Firefox 4 does as well. | 1370 // does to return black. This behavior matches what Firefox 4 does as well. |
1377 if (colorProperty == CSSPropertyBackgroundColor && visitedColor == Color::tr
ansparent) | 1371 if (colorProperty == CSSPropertyBackgroundColor && visitedColor == Color::tr
ansparent) |
1378 return unvisitedColor; | 1372 return unvisitedColor; |
1379 | 1373 |
1380 // Take the alpha from the unvisited color, but get the RGB values from the
visited color. | 1374 // Take the alpha from the unvisited color, but get the RGB values from the
visited color. |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1575 info.addMember(rareInheritedData, "rareInheritedData"); | 1569 info.addMember(rareInheritedData, "rareInheritedData"); |
1576 // FIXME: inherited contains StyleImage and Font fields that might need to b
e instrumented. | 1570 // FIXME: inherited contains StyleImage and Font fields that might need to b
e instrumented. |
1577 info.addMember(inherited, "inherited"); | 1571 info.addMember(inherited, "inherited"); |
1578 info.addMember(m_cachedPseudoStyles, "cachedPseudoStyles"); | 1572 info.addMember(m_cachedPseudoStyles, "cachedPseudoStyles"); |
1579 info.addMember(m_svgStyle, "svgStyle"); | 1573 info.addMember(m_svgStyle, "svgStyle"); |
1580 info.addMember(inherited_flags, "inherited_flags"); | 1574 info.addMember(inherited_flags, "inherited_flags"); |
1581 info.addMember(noninherited_flags, "noninherited_flags"); | 1575 info.addMember(noninherited_flags, "noninherited_flags"); |
1582 } | 1576 } |
1583 | 1577 |
1584 } // namespace WebCore | 1578 } // namespace WebCore |
OLD | NEW |