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

Side by Side Diff: Source/web/PopupMenuImpl.h

Issue 1149153003: New SELECT Popup: Very slow to open a popup with many items. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More optimization Created 5 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/web/PopupMenuImpl.cpp » ('j') | Source/web/resources/listPicker.js » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PopupMenuImpl_h 5 #ifndef PopupMenuImpl_h
6 #define PopupMenuImpl_h 6 #define PopupMenuImpl_h
7 7
8 #include "core/html/forms/PopupMenuClient.h" 8 #include "core/html/forms/PopupMenuClient.h"
9 #include "core/page/PagePopupClient.h" 9 #include "core/page/PagePopupClient.h"
10 #include "platform/PopupMenu.h" 10 #include "platform/PopupMenu.h"
(...skipping 12 matching lines...) Expand all
23 static PassRefPtrWillBeRawPtr<PopupMenuImpl> create(ChromeClientImpl*, Popup MenuClient*); 23 static PassRefPtrWillBeRawPtr<PopupMenuImpl> create(ChromeClientImpl*, Popup MenuClient*);
24 virtual ~PopupMenuImpl(); 24 virtual ~PopupMenuImpl();
25 25
26 void update(); 26 void update();
27 27
28 void dispose(); 28 void dispose();
29 29
30 private: 30 private:
31 PopupMenuImpl(ChromeClientImpl*, PopupMenuClient*); 31 PopupMenuImpl(ChromeClientImpl*, PopupMenuClient*);
32 32
33 void addOption(HTMLOptionElement&, SharedBuffer*); 33 void addOption(HTMLOptionElement&, bool enableExtraStyling, SharedBuffer*);
34 void addOptGroup(HTMLOptGroupElement&, SharedBuffer*); 34 void addOptGroup(HTMLOptGroupElement&, bool enableExtraStyling, SharedBuffer *);
35 void addSeparator(HTMLHRElement&, SharedBuffer*); 35 void addSeparator(HTMLHRElement&, bool enableExtraStyling, SharedBuffer*);
36 void addElementStyle(HTMLElement&, SharedBuffer*); 36 void addElementStyle(HTMLElement&, bool enableExtraStyling, SharedBuffer*);
37 37
38 // PopupMenu functions: 38 // PopupMenu functions:
39 void show(const FloatQuad& controlPosition, const IntSize& controlSize, int index) override; 39 void show(const FloatQuad& controlPosition, const IntSize& controlSize, int index) override;
40 void hide() override; 40 void hide() override;
41 void disconnectClient() override; 41 void disconnectClient() override;
42 void updateFromElement() override; 42 void updateFromElement() override;
43 43
44 // PagePopupClient functions: 44 // PagePopupClient functions:
45 IntSize contentSize() override; 45 IntSize contentSize() override;
46 void writeDocument(SharedBuffer*) override; 46 void writeDocument(SharedBuffer*) override;
47 void selectFontsFromOwnerDocument(Document&) override; 47 void selectFontsFromOwnerDocument(Document&) override;
48 void setValueAndClosePopup(int, const String&) override; 48 void setValueAndClosePopup(int, const String&) override;
49 void setValue(const String&) override; 49 void setValue(const String&) override;
50 void closePopup() override; 50 void closePopup() override;
51 Element& ownerElement() override; 51 Element& ownerElement() override;
52 Locale& locale() override; 52 Locale& locale() override;
53 void didClosePopup() override; 53 void didClosePopup() override;
54 54
55 ChromeClientImpl* m_chromeClient; 55 ChromeClientImpl* m_chromeClient;
56 PopupMenuClient* m_client; 56 PopupMenuClient* m_client;
57 PagePopup* m_popup; 57 PagePopup* m_popup;
58 bool m_needsUpdate; 58 bool m_needsUpdate;
59 }; 59 };
60 60
61 } 61 }
62 62
63 #endif // PopupMenuImpl_h 63 #endif // PopupMenuImpl_h
OLDNEW
« no previous file with comments | « no previous file | Source/web/PopupMenuImpl.cpp » ('j') | Source/web/resources/listPicker.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698