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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_exclusion.cc

Issue 2732223007: Revert of Combine 2 exclusions in Layout Opportunity Tree if they shadow each other (Closed)
Patch Set: Created 3 years, 9 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_exclusion.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_exclusion.cc b/third_party/WebKit/Source/core/layout/ng/ng_exclusion.cc
index 28e9a58601e6722e5a890ecdaf6803729ddd2eda..e5f711bacb67d42b1452d8de0fdf2610c7a8d14f 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_exclusion.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_exclusion.cc
@@ -15,35 +15,6 @@
String NGExclusion::ToString() const {
return String::format("Rect: %s Type: %d", rect.ToString().ascii().data(),
type);
-}
-
-bool NGExclusion::MaybeCombineWith(const NGExclusion& other) {
- if (other.rect.BlockEndOffset() < rect.BlockEndOffset())
- return false;
-
- if (other.type != type)
- return false;
-
- switch (other.type) {
- case NGExclusion::kFloatLeft: {
- if (other.rect.offset == rect.InlineEndBlockStartOffset()) {
- rect.size = {other.rect.InlineSize() + rect.InlineSize(),
- other.rect.BlockSize()};
- return true;
- }
- }
- case NGExclusion::kFloatRight: {
- if (rect.offset == other.rect.InlineEndBlockStartOffset()) {
- rect.offset = other.rect.offset;
- rect.size = {other.rect.InlineSize() + rect.InlineSize(),
- other.rect.BlockSize()};
- return true;
- }
- }
- default:
- NOTREACHED();
- return false;
- }
}
std::ostream& operator<<(std::ostream& stream, const NGExclusion& value) {

Powered by Google App Engine
This is Rietveld 408576698