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

Side by Side Diff: Source/core/rendering/RenderBox.h

Issue 788073004: Replace RenderFullscreen with top layer - Take II (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated after review comments. Created 6 years 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2006, 2007 Apple Inc. 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 void updateLayerTransformAfterLayout(); 235 void updateLayerTransformAfterLayout();
236 236
237 LayoutUnit contentWidth() const { return clientWidth() - paddingLeft() - pad dingRight(); } 237 LayoutUnit contentWidth() const { return clientWidth() - paddingLeft() - pad dingRight(); }
238 LayoutUnit contentHeight() const { return clientHeight() - paddingTop() - pa ddingBottom(); } 238 LayoutUnit contentHeight() const { return clientHeight() - paddingTop() - pa ddingBottom(); }
239 LayoutSize contentSize() const { return LayoutSize(contentWidth(), contentHe ight()); } 239 LayoutSize contentSize() const { return LayoutSize(contentWidth(), contentHe ight()); }
240 LayoutUnit contentLogicalWidth() const { return style()->isHorizontalWriting Mode() ? contentWidth() : contentHeight(); } 240 LayoutUnit contentLogicalWidth() const { return style()->isHorizontalWriting Mode() ? contentWidth() : contentHeight(); }
241 LayoutUnit contentLogicalHeight() const { return style()->isHorizontalWritin gMode() ? contentHeight() : contentWidth(); } 241 LayoutUnit contentLogicalHeight() const { return style()->isHorizontalWritin gMode() ? contentHeight() : contentWidth(); }
242 242
243 // IE extensions. Used to calculate offsetWidth/Height. Overridden by inlin es (RenderFlow) 243 // IE extensions. Used to calculate offsetWidth/Height. Overridden by inlin es (RenderFlow)
244 // to return the remaining width on a given line (and the height of a single line). 244 // to return the remaining width on a given line (and the height of a single line).
245 virtual LayoutUnit offsetWidth() const override { return m_frameRect.width() ; } 245 virtual LayoutUnit offsetWidth() const final { return m_frameRect.width(); }
246 virtual LayoutUnit offsetHeight() const override { return m_frameRect.height (); } 246 virtual LayoutUnit offsetHeight() const final { return m_frameRect.height(); }
247 247
248 virtual int pixelSnappedOffsetWidth() const override final; 248 virtual int pixelSnappedOffsetWidth() const override final;
249 virtual int pixelSnappedOffsetHeight() const override final; 249 virtual int pixelSnappedOffsetHeight() const override final;
250 250
251 // More IE extensions. clientWidth and clientHeight represent the interior of an object 251 // More IE extensions. clientWidth and clientHeight represent the interior of an object
252 // excluding border and scrollbar. clientLeft/Top are just the borderLeftWi dth and borderTopWidth. 252 // excluding border and scrollbar. clientLeft/Top are just the borderLeftWi dth and borderTopWidth.
253 LayoutUnit clientLeft() const { return borderLeft() + (style()->shouldPlaceB lockDirectionScrollbarOnLogicalLeft() ? verticalScrollbarWidth() : 0); } 253 LayoutUnit clientLeft() const { return borderLeft() + (style()->shouldPlaceB lockDirectionScrollbarOnLogicalLeft() ? verticalScrollbarWidth() : 0); }
254 LayoutUnit clientTop() const { return borderTop(); } 254 LayoutUnit clientTop() const { return borderTop(); }
255 LayoutUnit clientWidth() const; 255 LayoutUnit clientWidth() const;
256 LayoutUnit clientHeight() const; 256 LayoutUnit clientHeight() const;
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 bool isWritingModeRoot() const { return !parent() || parent()->style()->writ ingMode() != style()->writingMode(); } 559 bool isWritingModeRoot() const { return !parent() || parent()->style()->writ ingMode() != style()->writingMode(); }
560 560
561 bool isDeprecatedFlexItem() const { return !isInline() && !isFloatingOrOutOf FlowPositioned() && parent() && parent()->isDeprecatedFlexibleBox(); } 561 bool isDeprecatedFlexItem() const { return !isInline() && !isFloatingOrOutOf FlowPositioned() && parent() && parent()->isDeprecatedFlexibleBox(); }
562 bool isFlexItemIncludingDeprecated() const { return !isInline() && !isFloati ngOrOutOfFlowPositioned() && parent() && parent()->isFlexibleBoxIncludingDepreca ted(); } 562 bool isFlexItemIncludingDeprecated() const { return !isInline() && !isFloati ngOrOutOfFlowPositioned() && parent() && parent()->isFlexibleBoxIncludingDepreca ted(); }
563 563
564 bool isGridItem() const { return parent() && parent()->isRenderGrid(); } 564 bool isGridItem() const { return parent() && parent()->isRenderGrid(); }
565 565
566 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio nMode = PositionOnContainingLine) const override; 566 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio nMode = PositionOnContainingLine) const override;
567 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode = PositionOnContainingLine) const override; 567 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode = PositionOnContainingLine) const override;
568 568
569 virtual LayoutUnit offsetLeft() const override; 569 virtual LayoutUnit offsetLeft() const final;
570 virtual LayoutUnit offsetTop() const override; 570 virtual LayoutUnit offsetTop() const final;
571 571
572 LayoutPoint flipForWritingModeForChild(const RenderBox* child, const LayoutP oint&) const; 572 LayoutPoint flipForWritingModeForChild(const RenderBox* child, const LayoutP oint&) const;
573 LayoutUnit flipForWritingMode(LayoutUnit position) const WARN_UNUSED_RETURN 573 LayoutUnit flipForWritingMode(LayoutUnit position) const WARN_UNUSED_RETURN
574 { 574 {
575 // The offset is in the block direction (y for horizontal writing modes, x for vertical writing modes). 575 // The offset is in the block direction (y for horizontal writing modes, x for vertical writing modes).
576 if (!UNLIKELY(hasFlippedBlocksWritingMode())) 576 if (!UNLIKELY(hasFlippedBlocksWritingMode()))
577 return position; 577 return position;
578 return logicalHeight() - position; 578 return logicalHeight() - position;
579 } 579 }
580 LayoutPoint flipForWritingMode(const LayoutPoint& position) const WARN_UNUSE D_RETURN 580 LayoutPoint flipForWritingMode(const LayoutPoint& position) const WARN_UNUSE D_RETURN
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 if (UNLIKELY(inlineBoxWrapper() != 0)) 869 if (UNLIKELY(inlineBoxWrapper() != 0))
870 deleteLineBoxWrapper(); 870 deleteLineBoxWrapper();
871 } 871 }
872 872
873 ensureRareData().m_inlineBoxWrapper = boxWrapper; 873 ensureRareData().m_inlineBoxWrapper = boxWrapper;
874 } 874 }
875 875
876 } // namespace blink 876 } // namespace blink
877 877
878 #endif // RenderBox_h 878 #endif // RenderBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698