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

Unified Diff: Source/core/dom/Document.cpp

Issue 340143002: Disabled form control elements should not be active (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review Comments Created 6 years, 6 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 | « LayoutTests/fast/css/disabled-form-control-elements-should-not-be-active-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index b02ebb32ff5c130637a9a4f15feec854a4a9d5dd..f1fe5a9c24bfb41fff47583dfa5bd4ab8aa2e206 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -5433,7 +5433,7 @@ void Document::updateHoverActiveState(const HitTestRequest& request, Element* in
setActiveHoverElement(nullptr);
} else {
Element* newActiveElement = innerElementInDocument;
- if (!oldActiveElement && newActiveElement && request.active() && !request.touchMove()) {
+ if (!oldActiveElement && newActiveElement && !newActiveElement->isDisabledFormControl() && request.active() && !request.touchMove()) {
// We are setting the :active chain and freezing it. If future moves happen, they
// will need to reference this chain.
for (RenderObject* curr = newActiveElement->renderer(); curr; curr = curr->parent()) {
« no previous file with comments | « LayoutTests/fast/css/disabled-form-control-elements-should-not-be-active-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698