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

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

Issue 2202493002: NOT FOR REVIEW: Fullscreen WIP (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 1 month 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 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 : contentHeight(); 506 : contentHeight();
507 } 507 }
508 LayoutUnit contentLogicalHeight() const { 508 LayoutUnit contentLogicalHeight() const {
509 return style()->isHorizontalWritingMode() ? contentHeight() 509 return style()->isHorizontalWritingMode() ? contentHeight()
510 : contentWidth(); 510 : contentWidth();
511 } 511 }
512 512
513 // IE extensions. Used to calculate offsetWidth/Height. Overridden by inlines 513 // IE extensions. Used to calculate offsetWidth/Height. Overridden by inlines
514 // (LayoutFlow) to return the remaining width on a given line (and the height 514 // (LayoutFlow) to return the remaining width on a given line (and the height
515 // of a single line). 515 // of a single line).
516 LayoutUnit offsetWidth() const override { return m_frameRect.width(); } 516 LayoutUnit offsetWidth() const final { return m_frameRect.width(); }
517 LayoutUnit offsetHeight() const override { return m_frameRect.height(); } 517 LayoutUnit offsetHeight() const final { return m_frameRect.height(); }
518 518
519 int pixelSnappedOffsetWidth(const Element*) const final; 519 int pixelSnappedOffsetWidth(const Element*) const final;
520 int pixelSnappedOffsetHeight(const Element*) const final; 520 int pixelSnappedOffsetHeight(const Element*) const final;
521 521
522 // More IE extensions. clientWidth and clientHeight represent the interior of 522 // More IE extensions. clientWidth and clientHeight represent the interior of
523 // an object excluding border and scrollbar. clientLeft/Top are just the 523 // an object excluding border and scrollbar. clientLeft/Top are just the
524 // borderLeftWidth and borderTopWidth. 524 // borderLeftWidth and borderTopWidth.
525 DISABLE_CFI_PERF LayoutUnit clientLeft() const { 525 DISABLE_CFI_PERF LayoutUnit clientLeft() const {
526 return LayoutUnit(borderLeft() + 526 return LayoutUnit(borderLeft() +
527 (shouldPlaceBlockDirectionScrollbarOnLogicalLeft() 527 (shouldPlaceBlockDirectionScrollbarOnLogicalLeft()
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 LayoutUnit lineHeight( 1131 LayoutUnit lineHeight(
1132 bool firstLine, 1132 bool firstLine,
1133 LineDirectionMode, 1133 LineDirectionMode,
1134 LinePositionMode = PositionOnContainingLine) const override; 1134 LinePositionMode = PositionOnContainingLine) const override;
1135 int baselinePosition( 1135 int baselinePosition(
1136 FontBaseline, 1136 FontBaseline,
1137 bool firstLine, 1137 bool firstLine,
1138 LineDirectionMode, 1138 LineDirectionMode,
1139 LinePositionMode = PositionOnContainingLine) const override; 1139 LinePositionMode = PositionOnContainingLine) const override;
1140 1140
1141 LayoutUnit offsetLeft(const Element*) const override; 1141 LayoutUnit offsetLeft(const Element*) const final;
1142 LayoutUnit offsetTop(const Element*) const override; 1142 LayoutUnit offsetTop(const Element*) const final;
1143 1143
1144 LayoutPoint flipForWritingModeForChild(const LayoutBox* child, 1144 LayoutPoint flipForWritingModeForChild(const LayoutBox* child,
1145 const LayoutPoint&) const; 1145 const LayoutPoint&) const;
1146 LayoutUnit flipForWritingMode(LayoutUnit position) const WARN_UNUSED_RETURN { 1146 LayoutUnit flipForWritingMode(LayoutUnit position) const WARN_UNUSED_RETURN {
1147 // The offset is in the block direction (y for horizontal writing modes, x 1147 // The offset is in the block direction (y for horizontal writing modes, x
1148 // for vertical writing modes). 1148 // for vertical writing modes).
1149 if (!UNLIKELY(hasFlippedBlocksWritingMode())) 1149 if (!UNLIKELY(hasFlippedBlocksWritingMode()))
1150 return position; 1150 return position;
1151 return logicalHeight() - position; 1151 return logicalHeight() - position;
1152 } 1152 }
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
1622 1622
1623 inline bool LayoutBox::isForcedFragmentainerBreakValue(EBreak breakValue) { 1623 inline bool LayoutBox::isForcedFragmentainerBreakValue(EBreak breakValue) {
1624 return breakValue == BreakColumn || breakValue == BreakLeft || 1624 return breakValue == BreakColumn || breakValue == BreakLeft ||
1625 breakValue == BreakPage || breakValue == BreakRecto || 1625 breakValue == BreakPage || breakValue == BreakRecto ||
1626 breakValue == BreakRight || breakValue == BreakVerso; 1626 breakValue == BreakRight || breakValue == BreakVerso;
1627 } 1627 }
1628 1628
1629 } // namespace blink 1629 } // namespace blink
1630 1630
1631 #endif // LayoutBox_h 1631 #endif // LayoutBox_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutFullScreen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698