Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Side by Side Diff: sky/engine/core/rendering/style/RenderStyle.h

Issue 667003003: Remove most of visited link support. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 bool hasMarginBeforeQuirk() const { return marginBefore().quirk(); } 348 bool hasMarginBeforeQuirk() const { return marginBefore().quirk(); }
349 bool hasMarginAfterQuirk() const { return marginAfter().quirk(); } 349 bool hasMarginAfterQuirk() const { return marginAfter().quirk(); }
350 350
351 bool hasBackgroundImage() const { return m_background->background().hasImage (); } 351 bool hasBackgroundImage() const { return m_background->background().hasImage (); }
352 bool hasFixedBackgroundImage() const { return m_background->background().has FixedImage(); } 352 bool hasFixedBackgroundImage() const { return m_background->background().has FixedImage(); }
353 353
354 bool hasEntirelyFixedBackground() const; 354 bool hasEntirelyFixedBackground() const;
355 355
356 bool hasBackground() const 356 bool hasBackground() const
357 { 357 {
358 Color color = visitedDependentColor(CSSPropertyBackgroundColor); 358 Color color = colorIncludingFallback(CSSPropertyBackgroundColor);
359 if (color.alpha()) 359 if (color.alpha())
360 return true; 360 return true;
361 return hasBackgroundImage(); 361 return hasBackgroundImage();
362 } 362 }
363 363
364 LayoutBoxExtent imageOutsets(const NinePieceImage&) const; 364 LayoutBoxExtent imageOutsets(const NinePieceImage&) const;
365 bool hasBorderImageOutsets() const 365 bool hasBorderImageOutsets() const
366 { 366 {
367 return borderImage().hasImage() && borderImage().outset().nonZero(); 367 return borderImage().hasImage() && borderImage().outset().nonZero();
368 } 368 }
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
1343 1343
1344 bool isSharable() const; 1344 bool isSharable() const;
1345 1345
1346 bool emptyState() const { return noninherited_flags.emptyState; } 1346 bool emptyState() const { return noninherited_flags.emptyState; }
1347 void setEmptyState(bool b) { setUnique(); noninherited_flags.emptyState = b; } 1347 void setEmptyState(bool b) { setUnique(); noninherited_flags.emptyState = b; }
1348 bool firstChildState() const { return noninherited_flags.firstChildState; } 1348 bool firstChildState() const { return noninherited_flags.firstChildState; }
1349 void setFirstChildState() { setUnique(); noninherited_flags.firstChildState = true; } 1349 void setFirstChildState() { setUnique(); noninherited_flags.firstChildState = true; }
1350 bool lastChildState() const { return noninherited_flags.lastChildState; } 1350 bool lastChildState() const { return noninherited_flags.lastChildState; }
1351 void setLastChildState() { setUnique(); noninherited_flags.lastChildState = true; } 1351 void setLastChildState() { setUnique(); noninherited_flags.lastChildState = true; }
1352 1352
1353 StyleColor visitedDependentDecorationStyleColor() const; 1353 StyleColor decorationStyleColor() const;
1354 Color visitedDependentDecorationColor() const; 1354 Color decorationColor() const;
1355 Color visitedDependentColor(int colorProperty) const;
1356 1355
1357 void setHasExplicitlyInheritedProperties() { noninherited_flags.explicitInhe ritance = true; } 1356 void setHasExplicitlyInheritedProperties() { noninherited_flags.explicitInhe ritance = true; }
1358 bool hasExplicitlyInheritedProperties() const { return noninherited_flags.ex plicitInheritance; } 1357 bool hasExplicitlyInheritedProperties() const { return noninherited_flags.ex plicitInheritance; }
1359 1358
1360 void setHasCurrentColor() { noninherited_flags.currentColor = true; } 1359 void setHasCurrentColor() { noninherited_flags.currentColor = true; }
1361 bool hasCurrentColor() const { return noninherited_flags.currentColor; } 1360 bool hasCurrentColor() const { return noninherited_flags.currentColor; }
1362 1361
1363 bool hasBoxDecorations() const { return hasBorder() || hasBorderRadius() || hasOutline() || boxShadow() || hasFilter(); } 1362 bool hasBoxDecorations() const { return hasBorder() || hasBorderRadius() || hasOutline() || boxShadow() || hasFilter(); }
1364 1363
1365 // Initial values for all the properties 1364 // Initial values for all the properties
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1531 1530
1532 static QuotesData* initialQuotes() { return 0; } 1531 static QuotesData* initialQuotes() { return 0; }
1533 1532
1534 // Keep these at the end. 1533 // Keep these at the end.
1535 // FIXME: Why? Seems these should all be one big sorted list. 1534 // FIXME: Why? Seems these should all be one big sorted list.
1536 static LineClampValue initialLineClamp() { return LineClampValue(); } 1535 static LineClampValue initialLineClamp() { return LineClampValue(); }
1537 static Color initialTapHighlightColor(); 1536 static Color initialTapHighlightColor();
1538 static const FilterOperations& initialFilter() { DEFINE_STATIC_LOCAL(FilterO perations, ops, ()); return ops; } 1537 static const FilterOperations& initialFilter() { DEFINE_STATIC_LOCAL(FilterO perations, ops, ()); return ops; }
1539 static WebBlendMode initialBlendMode() { return WebBlendModeNormal; } 1538 static WebBlendMode initialBlendMode() { return WebBlendModeNormal; }
1540 static EIsolation initialIsolation() { return IsolationAuto; } 1539 static EIsolation initialIsolation() { return IsolationAuto; }
1540
1541 Color colorIncludingFallback(int colorProperty) const;
1542
1541 private: 1543 private:
1542 void setVisitedLinkColor(const Color&);
1543 void setVisitedLinkBackgroundColor(const StyleColor& v) { SET_VAR(rareNonInh eritedData, m_visitedLinkBackgroundColor, v); }
1544 void setVisitedLinkBorderLeftColor(const StyleColor& v) { SET_VAR(rareNonInh eritedData, m_visitedLinkBorderLeftColor, v); }
1545 void setVisitedLinkBorderRightColor(const StyleColor& v) { SET_VAR(rareNonIn heritedData, m_visitedLinkBorderRightColor, v); }
1546 void setVisitedLinkBorderBottomColor(const StyleColor& v) { SET_VAR(rareNonI nheritedData, m_visitedLinkBorderBottomColor, v); }
1547 void setVisitedLinkBorderTopColor(const StyleColor& v) { SET_VAR(rareNonInhe ritedData, m_visitedLinkBorderTopColor, v); }
1548 void setVisitedLinkOutlineColor(const StyleColor& v) { SET_VAR(rareNonInheri tedData, m_visitedLinkOutlineColor, v); }
1549 void setVisitedLinkTextDecorationColor(const StyleColor& v) { SET_VAR(rareNo nInheritedData, m_visitedLinkTextDecorationColor, v); }
1550 void setVisitedLinkTextEmphasisColor(const StyleColor& v) { SET_VAR_WITH_SET TER(rareInheritedData, visitedLinkTextEmphasisColor, setVisitedLinkTextEmphasisC olor, v); }
1551 void setVisitedLinkTextFillColor(const StyleColor& v) { SET_VAR_WITH_SETTER( rareInheritedData, visitedLinkTextFillColor, setVisitedLinkTextFillColor, v); }
1552 void setVisitedLinkTextStrokeColor(const StyleColor& v) { SET_VAR_WITH_SETTE R(rareInheritedData, visitedLinkTextStrokeColor, setVisitedLinkTextStrokeColor, v); }
1553
1554 void inheritUnicodeBidiFrom(const RenderStyle* parent) { noninherited_flags. unicodeBidi = parent->noninherited_flags.unicodeBidi; } 1544 void inheritUnicodeBidiFrom(const RenderStyle* parent) { noninherited_flags. unicodeBidi = parent->noninherited_flags.unicodeBidi; }
1555 void getShadowExtent(const ShadowList*, LayoutUnit& top, LayoutUnit& right, LayoutUnit& bottom, LayoutUnit& left) const; 1545 void getShadowExtent(const ShadowList*, LayoutUnit& top, LayoutUnit& right, LayoutUnit& bottom, LayoutUnit& left) const;
1556 LayoutBoxExtent getShadowInsetExtent(const ShadowList*) const; 1546 LayoutBoxExtent getShadowInsetExtent(const ShadowList*) const;
1557 void getShadowHorizontalExtent(const ShadowList*, LayoutUnit& left, LayoutUn it& right) const; 1547 void getShadowHorizontalExtent(const ShadowList*, LayoutUnit& left, LayoutUn it& right) const;
1558 void getShadowVerticalExtent(const ShadowList*, LayoutUnit& top, LayoutUnit& bottom) const; 1548 void getShadowVerticalExtent(const ShadowList*, LayoutUnit& top, LayoutUnit& bottom) const;
1559 void getShadowInlineDirectionExtent(const ShadowList* shadow, LayoutUnit& lo gicalLeft, LayoutUnit& logicalRight) const 1549 void getShadowInlineDirectionExtent(const ShadowList* shadow, LayoutUnit& lo gicalLeft, LayoutUnit& logicalRight) const
1560 { 1550 {
1561 return isHorizontalWritingMode() ? getShadowHorizontalExtent(shadow, log icalLeft, logicalRight) : getShadowVerticalExtent(shadow, logicalLeft, logicalRi ght); 1551 return isHorizontalWritingMode() ? getShadowHorizontalExtent(shadow, log icalLeft, logicalRight) : getShadowVerticalExtent(shadow, logicalLeft, logicalRi ght);
1562 } 1552 }
1563 void getShadowBlockDirectionExtent(const ShadowList* shadow, LayoutUnit& log icalTop, LayoutUnit& logicalBottom) const 1553 void getShadowBlockDirectionExtent(const ShadowList* shadow, LayoutUnit& log icalTop, LayoutUnit& logicalBottom) const
(...skipping 14 matching lines...) Expand all
1578 bool isDisplayReplacedType(EDisplay display) const 1568 bool isDisplayReplacedType(EDisplay display) const
1579 { 1569 {
1580 return display == INLINE_BLOCK || display == INLINE_FLEX || display == I NLINE_GRID; 1570 return display == INLINE_BLOCK || display == INLINE_FLEX || display == I NLINE_GRID;
1581 } 1571 }
1582 1572
1583 bool isDisplayInlineType(EDisplay display) const 1573 bool isDisplayInlineType(EDisplay display) const
1584 { 1574 {
1585 return display == INLINE || isDisplayReplacedType(display); 1575 return display == INLINE || isDisplayReplacedType(display);
1586 } 1576 }
1587 1577
1588 // Color accessors are all private to make sure callers use visitedDependent Color instead to access them. 1578 // Color accessors are all private to make sure callers use colorIncludingFa llback instead to access them.
1589 StyleColor borderLeftColor() const { return surround->border.left().color(); } 1579 StyleColor borderLeftColor() const { return surround->border.left().color(); }
1590 StyleColor borderRightColor() const { return surround->border.right().color( ); } 1580 StyleColor borderRightColor() const { return surround->border.right().color( ); }
1591 StyleColor borderTopColor() const { return surround->border.top().color(); } 1581 StyleColor borderTopColor() const { return surround->border.top().color(); }
1592 StyleColor borderBottomColor() const { return surround->border.bottom().colo r(); } 1582 StyleColor borderBottomColor() const { return surround->border.bottom().colo r(); }
1593 StyleColor backgroundColor() const { return m_background->color(); } 1583 StyleColor backgroundColor() const { return m_background->color(); }
1594 Color color() const; 1584 Color color() const;
1595 StyleColor outlineColor() const { return m_background->outline().color(); } 1585 StyleColor outlineColor() const { return m_background->outline().color(); }
1596 StyleColor textEmphasisColor() const { return rareInheritedData->textEmphasi sColor(); } 1586 StyleColor textEmphasisColor() const { return rareInheritedData->textEmphasi sColor(); }
1597 StyleColor textFillColor() const { return rareInheritedData->textFillColor() ; } 1587 StyleColor textFillColor() const { return rareInheritedData->textFillColor() ; }
1598 StyleColor textStrokeColor() const { return rareInheritedData->textStrokeCol or(); } 1588 StyleColor textStrokeColor() const { return rareInheritedData->textStrokeCol or(); }
1599 Color visitedLinkColor() const; 1589
1600 StyleColor visitedLinkBackgroundColor() const { return rareNonInheritedData- >m_visitedLinkBackgroundColor; }
1601 StyleColor visitedLinkBorderLeftColor() const { return rareNonInheritedData- >m_visitedLinkBorderLeftColor; }
1602 StyleColor visitedLinkBorderRightColor() const { return rareNonInheritedData ->m_visitedLinkBorderRightColor; }
1603 StyleColor visitedLinkBorderBottomColor() const { return rareNonInheritedDat a->m_visitedLinkBorderBottomColor; }
1604 StyleColor visitedLinkBorderTopColor() const { return rareNonInheritedData-> m_visitedLinkBorderTopColor; }
1605 StyleColor visitedLinkOutlineColor() const { return rareNonInheritedData->m_ visitedLinkOutlineColor; }
1606 StyleColor textDecorationColor() const { return rareNonInheritedData->m_text DecorationColor; } 1590 StyleColor textDecorationColor() const { return rareNonInheritedData->m_text DecorationColor; }
1607 StyleColor visitedLinkTextDecorationColor() const { return rareNonInheritedD ata->m_visitedLinkTextDecorationColor; }
1608 StyleColor visitedLinkTextEmphasisColor() const { return rareInheritedData-> visitedLinkTextEmphasisColor(); }
1609 StyleColor visitedLinkTextFillColor() const { return rareInheritedData->visi tedLinkTextFillColor(); }
1610 StyleColor visitedLinkTextStrokeColor() const { return rareInheritedData->vi sitedLinkTextStrokeColor(); }
1611
1612 Color colorIncludingFallback(int colorProperty, bool visitedLink) const;
1613 1591
1614 void appendContent(PassOwnPtr<ContentData>); 1592 void appendContent(PassOwnPtr<ContentData>);
1615 void addAppliedTextDecoration(const AppliedTextDecoration&); 1593 void addAppliedTextDecoration(const AppliedTextDecoration&);
1616 1594
1617 bool diffNeedsFullLayoutAndPaintInvalidation(const RenderStyle& other) const ; 1595 bool diffNeedsFullLayoutAndPaintInvalidation(const RenderStyle& other) const ;
1618 bool diffNeedsFullLayout(const RenderStyle& other) const; 1596 bool diffNeedsFullLayout(const RenderStyle& other) const;
1619 bool diffNeedsPaintInvalidationLayer(const RenderStyle& other) const; 1597 bool diffNeedsPaintInvalidationLayer(const RenderStyle& other) const;
1620 bool diffNeedsPaintInvalidationObject(const RenderStyle& other) const; 1598 bool diffNeedsPaintInvalidationObject(const RenderStyle& other) const;
1621 bool diffNeedsRecompositeLayer(const RenderStyle& other) const; 1599 bool diffNeedsRecompositeLayer(const RenderStyle& other) const;
1622 void updatePropertySpecificDifferences(const RenderStyle& other, StyleDiffer ence&) const; 1600 void updatePropertySpecificDifferences(const RenderStyle& other, StyleDiffer ence&) const;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
1689 1667
1690 rareInheritedData.access()->m_textOrientation = textOrientation; 1668 rareInheritedData.access()->m_textOrientation = textOrientation;
1691 return true; 1669 return true;
1692 } 1670 }
1693 1671
1694 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect ::Radii&); 1672 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect ::Radii&);
1695 1673
1696 } // namespace blink 1674 } // namespace blink
1697 1675
1698 #endif // RenderStyle_h 1676 #endif // RenderStyle_h
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderTreeAsText.h ('k') | sky/engine/core/rendering/style/RenderStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698