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

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/geometry/ng_logical_rect.h

Issue 2886453005: Account for border/padding in NG Inline layout algorithm. (Closed)
Patch Set: Skip some tests becase of crbug.com/713891 Created 3 years, 7 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NGLogicalRect_h 5 #ifndef NGLogicalRect_h
6 #define NGLogicalRect_h 6 #define NGLogicalRect_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/layout/ng/geometry/ng_logical_offset.h" 9 #include "core/layout/ng/geometry/ng_logical_offset.h"
10 #include "core/layout/ng/geometry/ng_logical_size.h" 10 #include "core/layout/ng/geometry/ng_logical_size.h"
(...skipping 20 matching lines...) Expand all
31 31
32 LayoutUnit InlineStartOffset() const { return offset.inline_offset; } 32 LayoutUnit InlineStartOffset() const { return offset.inline_offset; }
33 LayoutUnit InlineEndOffset() const { 33 LayoutUnit InlineEndOffset() const {
34 return offset.inline_offset + size.inline_size; 34 return offset.inline_offset + size.inline_size;
35 } 35 }
36 LayoutUnit BlockStartOffset() const { return offset.block_offset; } 36 LayoutUnit BlockStartOffset() const { return offset.block_offset; }
37 LayoutUnit BlockEndOffset() const { 37 LayoutUnit BlockEndOffset() const {
38 return offset.block_offset + size.block_size; 38 return offset.block_offset + size.block_size;
39 } 39 }
40 40
41 NGLogicalOffset InlineStartBlockStartOffset() const {
42 return {InlineStartOffset(), BlockStartOffset()};
43 }
44
41 NGLogicalOffset InlineEndBlockStartOffset() const { 45 NGLogicalOffset InlineEndBlockStartOffset() const {
42 return {InlineEndOffset(), BlockStartOffset()}; 46 return {InlineEndOffset(), BlockStartOffset()};
43 } 47 }
44 48
45 LayoutUnit BlockSize() const { return size.block_size; } 49 LayoutUnit BlockSize() const { return size.block_size; }
46 LayoutUnit InlineSize() const { return size.inline_size; } 50 LayoutUnit InlineSize() const { return size.inline_size; }
47 51
48 String ToString() const; 52 String ToString() const;
49 bool operator==(const NGLogicalRect& other) const; 53 bool operator==(const NGLogicalRect& other) const;
50 54
51 NGLogicalOffset offset; 55 NGLogicalOffset offset;
52 NGLogicalSize size; 56 NGLogicalSize size;
53 }; 57 };
54 58
55 CORE_EXPORT std::ostream& operator<<(std::ostream&, const NGLogicalRect&); 59 CORE_EXPORT std::ostream& operator<<(std::ostream&, const NGLogicalRect&);
56 60
57 } // namespace blink 61 } // namespace blink
58 62
59 #endif // NGLogicalRect_h 63 #endif // NGLogicalRect_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698