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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBox.h

Issue 1363023005: Implement FullScreen using top layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re-add accidentally removed style Created 5 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) 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 void updateLayerTransformAfterLayout(); 293 void updateLayerTransformAfterLayout();
294 294
295 LayoutUnit contentWidth() const { return clientWidth() - paddingLeft() - pad dingRight(); } 295 LayoutUnit contentWidth() const { return clientWidth() - paddingLeft() - pad dingRight(); }
296 LayoutUnit contentHeight() const { return clientHeight() - paddingTop() - pa ddingBottom(); } 296 LayoutUnit contentHeight() const { return clientHeight() - paddingTop() - pa ddingBottom(); }
297 LayoutSize contentSize() const { return LayoutSize(contentWidth(), contentHe ight()); } 297 LayoutSize contentSize() const { return LayoutSize(contentWidth(), contentHe ight()); }
298 LayoutUnit contentLogicalWidth() const { return style()->isHorizontalWriting Mode() ? contentWidth() : contentHeight(); } 298 LayoutUnit contentLogicalWidth() const { return style()->isHorizontalWriting Mode() ? contentWidth() : contentHeight(); }
299 LayoutUnit contentLogicalHeight() const { return style()->isHorizontalWritin gMode() ? contentHeight() : contentWidth(); } 299 LayoutUnit contentLogicalHeight() const { return style()->isHorizontalWritin gMode() ? contentHeight() : contentWidth(); }
300 300
301 // IE extensions. Used to calculate offsetWidth/Height. Overridden by inlin es (LayoutFlow) 301 // IE extensions. Used to calculate offsetWidth/Height. Overridden by inlin es (LayoutFlow)
302 // to return the remaining width on a given line (and the height of a single line). 302 // to return the remaining width on a given line (and the height of a single line).
303 LayoutUnit offsetWidth() const override { return m_frameRect.width(); } 303 LayoutUnit offsetWidth() const final { return m_frameRect.width(); }
304 LayoutUnit offsetHeight() const override { return m_frameRect.height(); } 304 LayoutUnit offsetHeight() const final { return m_frameRect.height(); }
305 305
306 int pixelSnappedOffsetWidth() const final; 306 int pixelSnappedOffsetWidth() const final;
307 int pixelSnappedOffsetHeight() const final; 307 int pixelSnappedOffsetHeight() const final;
308 308
309 // More IE extensions. clientWidth and clientHeight represent the interior of an object 309 // More IE extensions. clientWidth and clientHeight represent the interior of an object
310 // excluding border and scrollbar. clientLeft/Top are just the borderLeftWi dth and borderTopWidth. 310 // excluding border and scrollbar. clientLeft/Top are just the borderLeftWi dth and borderTopWidth.
311 LayoutUnit clientLeft() const { return borderLeft() + (style()->shouldPlaceB lockDirectionScrollbarOnLogicalLeft() ? verticalScrollbarWidth() : 0); } 311 LayoutUnit clientLeft() const { return borderLeft() + (style()->shouldPlaceB lockDirectionScrollbarOnLogicalLeft() ? verticalScrollbarWidth() : 0); }
312 LayoutUnit clientTop() const { return borderTop(); } 312 LayoutUnit clientTop() const { return borderTop(); }
313 LayoutUnit clientWidth() const; 313 LayoutUnit clientWidth() const;
314 LayoutUnit clientHeight() const; 314 LayoutUnit clientHeight() const;
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 bool isWritingModeRoot() const { return !parent() || parent()->style()->writ ingMode() != style()->writingMode(); } 629 bool isWritingModeRoot() const { return !parent() || parent()->style()->writ ingMode() != style()->writingMode(); }
630 630
631 bool isDeprecatedFlexItem() const { return !isInline() && !isFloatingOrOutOf FlowPositioned() && parent() && parent()->isDeprecatedFlexibleBox(); } 631 bool isDeprecatedFlexItem() const { return !isInline() && !isFloatingOrOutOf FlowPositioned() && parent() && parent()->isDeprecatedFlexibleBox(); }
632 bool isFlexItemIncludingDeprecated() const { return !isInline() && !isFloati ngOrOutOfFlowPositioned() && parent() && parent()->isFlexibleBoxIncludingDepreca ted(); } 632 bool isFlexItemIncludingDeprecated() const { return !isInline() && !isFloati ngOrOutOfFlowPositioned() && parent() && parent()->isFlexibleBoxIncludingDepreca ted(); }
633 633
634 bool isGridItem() const { return parent() && parent()->isLayoutGrid(); } 634 bool isGridItem() const { return parent() && parent()->isLayoutGrid(); }
635 635
636 LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const override; 636 LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const override;
637 int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePo sitionMode = PositionOnContainingLine) const override; 637 int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePo sitionMode = PositionOnContainingLine) const override;
638 638
639 LayoutUnit offsetLeft() const override; 639 LayoutUnit offsetLeft() const final;
640 LayoutUnit offsetTop() const override; 640 LayoutUnit offsetTop() const final;
641 641
642 LayoutPoint flipForWritingModeForChild(const LayoutBox* child, const LayoutP oint&) const; 642 LayoutPoint flipForWritingModeForChild(const LayoutBox* child, const LayoutP oint&) const;
643 LayoutUnit flipForWritingMode(LayoutUnit position) const WARN_UNUSED_RETURN { 643 LayoutUnit flipForWritingMode(LayoutUnit position) const WARN_UNUSED_RETURN {
644 // The offset is in the block direction (y for horizontal writing modes, x for vertical writing modes). 644 // The offset is in the block direction (y for horizontal writing modes, x for vertical writing modes).
645 if (!UNLIKELY(hasFlippedBlocksWritingMode())) 645 if (!UNLIKELY(hasFlippedBlocksWritingMode()))
646 return position; 646 return position;
647 return logicalHeight() - position; 647 return logicalHeight() - position;
648 } 648 }
649 LayoutPoint flipForWritingMode(const LayoutPoint& position) const WARN_UNUSE D_RETURN { 649 LayoutPoint flipForWritingMode(const LayoutPoint& position) const WARN_UNUSE D_RETURN {
650 if (!UNLIKELY(hasFlippedBlocksWritingMode())) 650 if (!UNLIKELY(hasFlippedBlocksWritingMode()))
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 if (UNLIKELY(inlineBoxWrapper() != nullptr)) 956 if (UNLIKELY(inlineBoxWrapper() != nullptr))
957 deleteLineBoxWrapper(); 957 deleteLineBoxWrapper();
958 } 958 }
959 959
960 ensureRareData().m_inlineBoxWrapper = boxWrapper; 960 ensureRareData().m_inlineBoxWrapper = boxWrapper;
961 } 961 }
962 962
963 } // namespace blink 963 } // namespace blink
964 964
965 #endif // LayoutBox_h 965 #endif // LayoutBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698