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

Unified Diff: public/platform/WebVector.h

Issue 415343003: Option Groups with display: none should not show the children option elements (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« Source/web/ExternalPopupMenu.cpp ('K') | « Source/web/PopupListBox.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebVector.h
diff --git a/public/platform/WebVector.h b/public/platform/WebVector.h
index e83a2d0d2cd56d627ae2b4d50fed0c0e3fcfa591..b22327bba676842cee2f6a7b08f71356936463d4 100644
--- a/public/platform/WebVector.h
+++ b/public/platform/WebVector.h
@@ -152,6 +152,14 @@ public:
std::swap(m_size, other.m_size);
}
+ void shrink(size_t size)
tkent 2014/08/06 12:46:07 Why is this necessary? WebVector has no rich opera
spartha 2014/08/06 13:31:09 The function pre-allocates the vector for efficien
+ {
+ BLINK_ASSERT(size <= m_size);
+ for (size_t index = m_size - 1; index >= size; --index)
+ m_ptr[index].~T();
+ m_size = size;
+ }
+
private:
void initialize(size_t size)
{
« Source/web/ExternalPopupMenu.cpp ('K') | « Source/web/PopupListBox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698