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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h

Issue 2679343002: Fragment that establishes new BFC knows it's BFC offset in parent space (Closed)
Patch Set: Created 3 years, 10 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/ng/ng_block_layout_algorithm.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h
index a9fe01b750dab61bf787b5286082fe37e2146c7a..d2962edc0d73796563384574b7fe9ea6cdbc18ac 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h
@@ -18,7 +18,6 @@ namespace blink {
class ComputedStyle;
class NGBlockBreakToken;
-class NGBoxFragment;
class NGConstraintSpace;
class NGConstraintSpaceBuilder;
class NGInlineNode;
@@ -98,9 +97,13 @@ class CORE_EXPORT NGBlockLayoutAlgorithm : public NGLayoutAlgorithm {
return content_size_;
}
- // Calculates offset for the provided fragment which is relative to the
- // fragment's parent.
- NGLogicalOffset CalculateRelativeOffset(const NGBoxFragment& fragment);
+ // Calculates logical offset for the current fragment using either
+ // {@code content_size_} when the fragment doesn't know it's offset
+ // or {@code known_fragment_offset} if the fragment knows it's offset
+ // @return Fragment's offset relative to the fragment's parent.
+ NGLogicalOffset CalculateLogicalOffset(
+ const WTF::Optional<NGLogicalOffset>& known_fragment_offset);
+
NGLogicalOffset GetChildSpaceOffset() const {
return NGLogicalOffset(border_and_padding_.inline_start, content_size_);
}
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698