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

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

Issue 2055593002: Reserve enough vertical space for the menuList layout element setting its logical height to the max… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: NeedsManualRebaseline Created 4 years, 6 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/LayoutMenuList.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutMenuList.h b/third_party/WebKit/Source/core/layout/LayoutMenuList.h
index 808f6788a6d5b5de99b5a68e50e34f340a868fe8..f31cccedcfb71560be0be32eacbd59a67656aed7 100644
--- a/third_party/WebKit/Source/core/layout/LayoutMenuList.h
+++ b/third_party/WebKit/Source/core/layout/LayoutMenuList.h
@@ -62,6 +62,7 @@ private:
bool hasControlClip() const override { return true; }
void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const override;
+ void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, LogicalExtentComputedValues&) const override;
void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override;
@@ -80,8 +81,9 @@ private:
void adjustInnerStyle();
void setText(const String&);
void setTextFromOption(int optionIndex);
- void updateOptionsWidth();
- float computeTextWidth(const String&) const;
+ void updateOptionsHeightWidth();
+ float computeTextHeight(const TextRun&, const ComputedStyle&) const;
+ float computeTextWidth(const TextRun&, const ComputedStyle&) const;
void updateText();
void setIndexToSelectOnCancel(int listIndex);
@@ -93,6 +95,7 @@ private:
bool m_optionsChanged : 1;
bool m_isEmpty : 1;
bool m_hasUpdatedActiveOption : 1;
+ int m_optionsHeight;
int m_optionsWidth;
int m_lastActiveIndex;

Powered by Google App Engine
This is Rietveld 408576698