Changeset 102734 in webkit
- Timestamp:
- Dec 13, 2011 8:59:33 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r102729 r102734 1 2011-12-13 Hajime Morrita <morrita@chromium.org> 2 3 HTML details summary not working with form controls 4 https://bugs.webkit.org/show_bug.cgi?id=74398 5 6 Reviewed by Kent Tamura. 7 8 * fast/html/details-click-controls-expected.txt: Added. 9 * fast/html/details-click-controls.html: Added. 10 1 11 2011-12-13 Dmitry Lomov <dslomov@google.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r102733 r102734 1 2011-12-13 Hajime Morrita <morrita@chromium.org> 2 3 HTML details summary not working with form controls 4 https://bugs.webkit.org/show_bug.cgi?id=74398 5 6 Reviewed by Kent Tamura. 7 8 Allowed HTMLSummaryElement to skip the toggle logic if the event 9 target is a form control. 10 11 Test: fast/html/details-click-controls.html 12 13 * html/HTMLSummaryElement.cpp: 14 (WebCore::isClickableControl): 15 (WebCore::HTMLSummaryElement::defaultEventHandler): 16 1 17 2011-12-13 James Wei <james.wei@intel.com> 2 18 -
trunk/Source/WebCore/html/HTMLSummaryElement.cpp
r95901 r102734 94 94 } 95 95 96 static bool isClickableControl(Node* node) 97 { 98 if (!node->isElementNode()) 99 return false; 100 Element* element = toElement(node); 101 if (element->isFormControlElement()) 102 return true; 103 Element* host = toElement(element->shadowAncestorNode()); 104 return host && host->isFormControlElement(); 105 } 106 96 107 void HTMLSummaryElement::defaultEventHandler(Event* event) 97 108 { … … 99 110 if (!isMainSummary() || !renderer() || !renderer()->isSummary() || !event->isMouseEvent() || event->type() != eventNames().clickEvent || event->defaultHandled()) 100 111 return; 101 102 112 MouseEvent* mouseEvent = static_cast<MouseEvent*>(event); 103 113 if (mouseEvent->button() != LeftButton) 114 return; 115 if (isClickableControl(event->target()->toNode())) 104 116 return; 105 117
Note: See TracChangeset
for help on using the changeset viewer.