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

Unified Diff: third_party/WebKit/Source/core/html/HTMLOptGroupElement.cpp

Issue 2539363003: Don't include ComputedStyle.h where not needed. (Closed)
Patch Set: Add ~HTMLOptGroupElement(). Comment stolen from ~HTMLOptionElement(). Created 4 years 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/html/HTMLOptGroupElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLOptGroupElement.cpp b/third_party/WebKit/Source/core/html/HTMLOptGroupElement.cpp
index d0bf597f41a5725b68521c02ba9abef9fdea39da..0feeb29edce19a1c95e236a12c237c7be81b00bb 100644
--- a/third_party/WebKit/Source/core/html/HTMLOptGroupElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLOptGroupElement.cpp
@@ -33,6 +33,7 @@
#include "core/html/HTMLDivElement.h"
#include "core/html/HTMLSelectElement.h"
#include "core/html/shadow/ShadowElementNames.h"
+#include "core/style/ComputedStyle.h"
#include "wtf/StdLibExtras.h"
#include "wtf/text/CharacterNames.h"
@@ -45,6 +46,13 @@ inline HTMLOptGroupElement::HTMLOptGroupElement(Document& document)
setHasCustomStyleCallbacks();
}
+// An explicit empty destructor should be in HTMLOptGroupElement.cpp, because
+// if an implicit destructor is used or an empty destructor is defined in
+// HTMLOptGroupElement.h, when including HTMLOptGroupElement.h,
+// msvc tries to expand the destructor and causes
+// a compile error because of lack of ComputedStyle definition.
+HTMLOptGroupElement::~HTMLOptGroupElement() {}
+
HTMLOptGroupElement* HTMLOptGroupElement::create(Document& document) {
HTMLOptGroupElement* optGroupElement = new HTMLOptGroupElement(document);
optGroupElement->ensureUserAgentShadowRoot();
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLOptGroupElement.h ('k') | third_party/WebKit/Source/core/html/HTMLOptionElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698