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

Side by Side Diff: Source/core/style/ComputedStyle.h

Issue 1269123002: Preparation for combining paths of focus rings and outlines (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 | Annotate | Revision Log
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 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 int borderTopWidth() const { return surround->border.borderTopWidth(); } 516 int borderTopWidth() const { return surround->border.borderTopWidth(); }
517 EBorderStyle borderTopStyle() const { return surround->border.top().style(); } 517 EBorderStyle borderTopStyle() const { return surround->border.top().style(); }
518 int borderBottomWidth() const { return surround->border.borderBottomWidth(); } 518 int borderBottomWidth() const { return surround->border.borderBottomWidth(); }
519 EBorderStyle borderBottomStyle() const { return surround->border.bottom().st yle(); } 519 EBorderStyle borderBottomStyle() const { return surround->border.bottom().st yle(); }
520 520
521 int borderBeforeWidth() const; 521 int borderBeforeWidth() const;
522 int borderAfterWidth() const; 522 int borderAfterWidth() const;
523 int borderStartWidth() const; 523 int borderStartWidth() const;
524 int borderEndWidth() const; 524 int borderEndWidth() const;
525 525
526 int outlineSize() const { return max(0, outlineWidth() + outlineOffset()); }
527 int outlineWidth() const 526 int outlineWidth() const
528 { 527 {
529 if (m_background->outline().style() == BNONE) 528 if (m_background->outline().style() == BNONE)
530 return 0; 529 return 0;
531 return m_background->outline().width(); 530 return m_background->outline().width();
532 } 531 }
533 bool hasOutline() const { return outlineWidth() > 0 && outlineStyle() > BHID DEN; } 532 bool hasOutline() const { return outlineWidth() > 0 && outlineStyle() > BHID DEN; }
534 EBorderStyle outlineStyle() const { return m_background->outline().style(); } 533 EBorderStyle outlineStyle() const { return m_background->outline().style(); }
535 OutlineIsAuto outlineStyleIsAuto() const { return static_cast<OutlineIsAuto> (m_background->outline().isAuto()); } 534 OutlineIsAuto outlineStyleIsAuto() const { return static_cast<OutlineIsAuto> (m_background->outline().isAuto()); }
536 int outlineOutset() const; 535 int outlineOutsetExtent() const;
537 536
538 EOverflow overflowX() const { return static_cast<EOverflow>(noninherited_fla gs.overflowX); } 537 EOverflow overflowX() const { return static_cast<EOverflow>(noninherited_fla gs.overflowX); }
539 EOverflow overflowY() const { return static_cast<EOverflow>(noninherited_fla gs.overflowY); } 538 EOverflow overflowY() const { return static_cast<EOverflow>(noninherited_fla gs.overflowY); }
540 // It's sufficient to just check one direction, since it's illegal to have v isible on only one overflow value. 539 // It's sufficient to just check one direction, since it's illegal to have v isible on only one overflow value.
541 bool isOverflowVisible() const { ASSERT(overflowX() != OVISIBLE || overflowX () == overflowY()); return overflowX() == OVISIBLE; } 540 bool isOverflowVisible() const { ASSERT(overflowX() != OVISIBLE || overflowX () == overflowY()); return overflowX() == OVISIBLE; }
542 bool isOverflowPaged() const { return overflowY() == OPAGEDX || overflowY() == OPAGEDY; } 541 bool isOverflowPaged() const { return overflowY() == OPAGEDX || overflowY() == OPAGEDY; }
543 542
544 EVisibility visibility() const { return static_cast<EVisibility>(inherited_f lags._visibility); } 543 EVisibility visibility() const { return static_cast<EVisibility>(inherited_f lags._visibility); }
545 EVerticalAlign verticalAlign() const { return static_cast<EVerticalAlign>(no ninherited_flags.verticalAlign); } 544 EVerticalAlign verticalAlign() const { return static_cast<EVerticalAlign>(no ninherited_flags.verticalAlign); }
546 const Length& verticalAlignLength() const { return m_box->verticalAlign(); } 545 const Length& verticalAlignLength() const { return m_box->verticalAlign(); }
(...skipping 1394 matching lines...) Expand 10 before | Expand all | Expand 10 after
1941 } 1940 }
1942 1941
1943 inline bool ComputedStyle::hasPseudoElementStyle() const 1942 inline bool ComputedStyle::hasPseudoElementStyle() const
1944 { 1943 {
1945 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK; 1944 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK;
1946 } 1945 }
1947 1946
1948 } // namespace blink 1947 } // namespace blink
1949 1948
1950 #endif // ComputedStyle_h 1949 #endif // ComputedStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698