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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.h

Issue 2650873002: Refactor PaintLayer location and offset calculation especially for floats (Closed)
Patch Set: - Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutObject.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.h b/third_party/WebKit/Source/core/layout/LayoutObject.h
index cef8ef1a279f3757243cf20cc8e294f15cd80a5c..1bbb9604592bb5b17c5640125e1aabdd5787ed34 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.h
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
@@ -731,21 +731,30 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
bool isFloating() const { return m_bitfields.floating(); }
+ bool isFloatingWithNonContainingBlockParent() const {
+ return isFloating() && parent() && !parent()->isLayoutBlockFlow();
+ }
+
+ // absolute or fixed positioning
bool isOutOfFlowPositioned() const {
return m_bitfields.isOutOfFlowPositioned();
- } // absolute or fixed positioning
+ }
+ // relative or sticky positioning
bool isInFlowPositioned() const {
return m_bitfields.isInFlowPositioned();
- } // relative or sticky positioning
+ }
bool isRelPositioned() const {
return m_bitfields.isRelPositioned();
- } // relative positioning
+ }
bool isStickyPositioned() const {
return m_bitfields.isStickyPositioned();
- } // sticky positioning
+ }
bool isFixedPositioned() const {
return isOutOfFlowPositioned() && style()->position() == FixedPosition;
- } // fixed positioning
+ }
+ bool isAbsolutePositioned() const {
+ return isOutOfFlowPositioned() && style()->position() == AbsolutePosition;
+ }
bool isPositioned() const { return m_bitfields.isPositioned(); }
bool isText() const { return m_bitfields.isText(); }

Powered by Google App Engine
This is Rietveld 408576698