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

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

Issue 2644693003: SUMMARY element: click() for invisible SUMMARY should toggle DETAILS element. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/html/summary-invisible-click.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLSummaryElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLSummaryElement.cpp b/third_party/WebKit/Source/core/html/HTMLSummaryElement.cpp
index d5c5792c93ace75af5799e522b9a165e5e7c41c4..f789441a0d49868408bc04fe356d7dc52bb14581 100644
--- a/third_party/WebKit/Source/core/html/HTMLSummaryElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLSummaryElement.cpp
@@ -98,7 +98,7 @@ bool HTMLSummaryElement::supportsFocus() const {
}
void HTMLSummaryElement::defaultEventHandler(Event* event) {
- if (isMainSummary() && layoutObject()) {
+ if (isMainSummary()) {
if (event->type() == EventTypeNames::DOMActivate &&
!isClickableControl(event->target()->toNode())) {
if (HTMLDetailsElement* details = detailsElement())
@@ -140,10 +140,7 @@ void HTMLSummaryElement::defaultEventHandler(Event* event) {
}
bool HTMLSummaryElement::willRespondToMouseClickEvents() {
- if (isMainSummary() && layoutObject())
- return true;
-
- return HTMLElement::willRespondToMouseClickEvents();
+ return isMainSummary() || HTMLElement::willRespondToMouseClickEvents();
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/html/summary-invisible-click.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698