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

Unified Diff: Source/core/rendering/RenderListBox.h

Issue 189543012: Update <select> when any of its <option> children has "display: none" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addtional layout test included. Created 6 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: Source/core/rendering/RenderListBox.h
diff --git a/Source/core/rendering/RenderListBox.h b/Source/core/rendering/RenderListBox.h
index efc47aa25103ee9bf7341490fa9a87f8ec049003..ded1f7ab8b029947ce41d7c8c087f73a640765ff 100644
--- a/Source/core/rendering/RenderListBox.h
+++ b/Source/core/rendering/RenderListBox.h
@@ -47,17 +47,17 @@ public:
void setOptionsChanged(bool changed) { m_optionsChanged = changed; }
- int listIndexAtOffset(const LayoutSize&);
- LayoutRect itemBoundingBoxRect(const LayoutPoint&, int index);
+ int listIndexAtOffset(const LayoutSize&) const;
+ LayoutRect itemBoundingBoxRect(const LayoutPoint&, int index) const;
bool scrollToRevealElementAtListIndex(int index);
- bool listIndexIsVisible(int index);
int scrollToward(const IntPoint&); // Returns the new index or -1 if no scroll occurred
int size() const;
void repaintScrollbarIfNeeded();
+ int toRenderListBoxIndex(int index) const;
private:
HTMLSelectElement* selectElement() const;
@@ -139,6 +139,7 @@ private:
LayoutUnit itemHeight() const;
int numVisibleItems() const;
+ bool listIndexIsVisible(int index) const;
int numItems() const;
LayoutUnit listHeight() const;
int scrollbarLeft() const;
@@ -147,11 +148,14 @@ private:
void paintItemBackground(PaintInfo&, const LayoutPoint&, int listIndex);
void scrollToRevealSelection();
+ int toOptionListIndex(int index) const;
+
bool m_optionsChanged;
bool m_scrollToRevealSelectionAfterLayout;
bool m_inAutoscroll;
int m_optionsWidth;
int m_indexOffset;
+ int m_listItemCount;
RefPtr<Scrollbar> m_vBar;
};

Powered by Google App Engine
This is Rietveld 408576698