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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutFieldset.h

Issue 2215133005: Add grid/flex layout support for <fieldset> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed more ClusterFuzz tests Created 4 years, 4 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/LayoutFieldset.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutFieldset.h b/third_party/WebKit/Source/core/layout/LayoutFieldset.h
index d00d1682b7c977566c55d222bfbdd43a87b69232..bdb75709868c3f43eeefc0a9974af0dd39fcee01 100644
--- a/third_party/WebKit/Source/core/layout/LayoutFieldset.h
+++ b/third_party/WebKit/Source/core/layout/LayoutFieldset.h
@@ -24,11 +24,11 @@
#ifndef LayoutFieldset_h
#define LayoutFieldset_h
-#include "core/layout/LayoutBlockFlow.h"
+#include "core/layout/LayoutFlexibleBox.h"
namespace blink {
-class LayoutFieldset final : public LayoutBlockFlow {
+class LayoutFieldset final : public LayoutFlexibleBox {
public:
explicit LayoutFieldset(Element*);
@@ -37,15 +37,27 @@ public:
const char* name() const override { return "LayoutFieldset"; }
private:
- bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectFieldset || LayoutBlockFlow::isOfType(type); }
-
- LayoutObject* layoutSpecialExcludedChild(bool relayoutChildren, SubtreeLayoutScope&) override;
-
- void computePreferredLogicalWidths() override;
+ void addChild(LayoutObject* newChild, LayoutObject* beforeChild = nullptr) override;
bool avoidsFloats() const override { return true; }
+ // We override the two baseline functions because we want our baseline to be the bottom of our margin box.
+ int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode) const override;
+ int inlineBlockBaseline(LineDirectionMode) const override { return -1; }
+
+ void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const override;
+ bool createsAnonymousWrapper() const override { return true; }
+ bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectFieldset || LayoutFlexibleBox::isOfType(type); }
+ LayoutObject* layoutSpecialExcludedChild(bool relayoutChildren, SubtreeLayoutScope&) override;
void paintBoxDecorationBackground(const PaintInfo&, const LayoutPoint&) const override;
void paintMask(const PaintInfo&, const LayoutPoint&) const override;
+ void updateAnonymousChildStyle(const LayoutObject& child, ComputedStyle& childStyle) const override;
+
+ void createInnerBlock();
+ void setLogicalLeftForChild(LayoutBox& child, LayoutUnit logicalLeft);
+ void setLogicalTopForChild(LayoutBox& child, LayoutUnit logicalTop);
+ void removeChild(LayoutObject*) override;
+
+ LayoutBlock* m_innerBlock;
};
DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutFieldset, isFieldset());
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutFieldset.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698