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

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

Issue 1308273010: Adapt and reland old position sticky implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix style errors and remaining layout tests. Created 5 years, 3 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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 // Whether or not a positioned element requires normal flow x/y to be comput ed 467 // Whether or not a positioned element requires normal flow x/y to be comput ed
468 // to determine its position. 468 // to determine its position.
469 bool hasAutoLeftAndRight() const { return left().isAuto() && right().isAuto( ); } 469 bool hasAutoLeftAndRight() const { return left().isAuto() && right().isAuto( ); }
470 bool hasAutoTopAndBottom() const { return top().isAuto() && bottom().isAuto( ); } 470 bool hasAutoTopAndBottom() const { return top().isAuto() && bottom().isAuto( ); }
471 bool hasStaticInlinePosition(bool horizontal) const { return horizontal ? ha sAutoLeftAndRight() : hasAutoTopAndBottom(); } 471 bool hasStaticInlinePosition(bool horizontal) const { return horizontal ? ha sAutoLeftAndRight() : hasAutoTopAndBottom(); }
472 bool hasStaticBlockPosition(bool horizontal) const { return horizontal ? has AutoTopAndBottom() : hasAutoLeftAndRight(); } 472 bool hasStaticBlockPosition(bool horizontal) const { return horizontal ? has AutoTopAndBottom() : hasAutoLeftAndRight(); }
473 473
474 EPosition position() const { return static_cast<EPosition>(noninherited_flag s.position); } 474 EPosition position() const { return static_cast<EPosition>(noninherited_flag s.position); }
475 bool hasOutOfFlowPosition() const { return position() == AbsolutePosition || position() == FixedPosition; } 475 bool hasOutOfFlowPosition() const { return position() == AbsolutePosition || position() == FixedPosition; }
476 bool hasInFlowPosition() const { return position() == RelativePosition || po sition() == StickyPosition; } 476 bool hasInFlowPosition() const { return position() == RelativePosition || po sition() == StickyPosition; }
477 bool hasViewportConstrainedPosition() const { return position() == FixedPosi tion; } 477 bool hasViewportConstrainedPosition() const { return position() == FixedPosi tion || position() == StickyPosition; }
478 EFloat floating() const { return static_cast<EFloat>(noninherited_flags.floa ting); } 478 EFloat floating() const { return static_cast<EFloat>(noninherited_flags.floa ting); }
479 479
480 const Length& width() const { return m_box->width(); } 480 const Length& width() const { return m_box->width(); }
481 const Length& height() const { return m_box->height(); } 481 const Length& height() const { return m_box->height(); }
482 const Length& minWidth() const { return m_box->minWidth(); } 482 const Length& minWidth() const { return m_box->minWidth(); }
483 const Length& maxWidth() const { return m_box->maxWidth(); } 483 const Length& maxWidth() const { return m_box->maxWidth(); }
484 const Length& minHeight() const { return m_box->minHeight(); } 484 const Length& minHeight() const { return m_box->minHeight(); }
485 const Length& maxHeight() const { return m_box->maxHeight(); } 485 const Length& maxHeight() const { return m_box->maxHeight(); }
486 486
487 const Length& logicalWidth() const { return isHorizontalWritingMode() ? widt h() : height(); } 487 const Length& logicalWidth() const { return isHorizontalWritingMode() ? widt h() : height(); }
(...skipping 1470 matching lines...) Expand 10 before | Expand all | Expand 10 after
1958 } 1958 }
1959 1959
1960 inline bool ComputedStyle::hasPseudoElementStyle() const 1960 inline bool ComputedStyle::hasPseudoElementStyle() const
1961 { 1961 {
1962 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK; 1962 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK;
1963 } 1963 }
1964 1964
1965 } // namespace blink 1965 } // namespace blink
1966 1966
1967 #endif // ComputedStyle_h 1967 #endif // ComputedStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698