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

Side by Side Diff: Source/WebCore/html/HTMLFormControlElement.cpp

Issue 11415195: Merge 135829 - :read-only selector should match to date/time input types (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 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 unified diff | Download patch
« no previous file with comments | « Source/WebCore/html/HTMLFormControlElement.h ('k') | Source/WebCore/html/HTMLInputElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 updateVisibleValidationMessage(); 451 updateVisibleValidationMessage();
452 } 452 }
453 } 453 }
454 454
455 void HTMLFormControlElement::setCustomValidity(const String& error) 455 void HTMLFormControlElement::setCustomValidity(const String& error)
456 { 456 {
457 FormAssociatedElement::setCustomValidity(error); 457 FormAssociatedElement::setCustomValidity(error);
458 setNeedsValidityCheck(); 458 setNeedsValidityCheck();
459 } 459 }
460 460
461 bool HTMLFormControlElement::shouldMatchReadOnlySelector() const
462 {
463 return readOnly();
464 }
465
466 bool HTMLFormControlElement::shouldMatchReadWriteSelector() const
467 {
468 return !readOnly();
469 }
470
471 bool HTMLFormControlElement::validationMessageShadowTreeContains(Node* node) con st 461 bool HTMLFormControlElement::validationMessageShadowTreeContains(Node* node) con st
472 { 462 {
473 return m_validationMessage && m_validationMessage->shadowTreeContains(node); 463 return m_validationMessage && m_validationMessage->shadowTreeContains(node);
474 } 464 }
475 465
476 void HTMLFormControlElement::dispatchBlurEvent(PassRefPtr<Node> newFocusedNode) 466 void HTMLFormControlElement::dispatchBlurEvent(PassRefPtr<Node> newFocusedNode)
477 { 467 {
478 HTMLElement::dispatchBlurEvent(newFocusedNode); 468 HTMLElement::dispatchBlurEvent(newFocusedNode);
479 hideVisibleValidationMessage(); 469 hideVisibleValidationMessage();
480 } 470 }
(...skipping 11 matching lines...) Expand all
492 HTMLFormControlElement* HTMLFormControlElement::enclosingFormControlElement(Node * node) 482 HTMLFormControlElement* HTMLFormControlElement::enclosingFormControlElement(Node * node)
493 { 483 {
494 for (; node; node = node->parentNode()) { 484 for (; node; node = node->parentNode()) {
495 if (node->isElementNode() && toElement(node)->isFormControlElement()) 485 if (node->isElementNode() && toElement(node)->isFormControlElement())
496 return static_cast<HTMLFormControlElement*>(node); 486 return static_cast<HTMLFormControlElement*>(node);
497 } 487 }
498 return 0; 488 return 0;
499 } 489 }
500 490
501 } // namespace Webcore 491 } // namespace Webcore
OLDNEW
« no previous file with comments | « Source/WebCore/html/HTMLFormControlElement.h ('k') | Source/WebCore/html/HTMLInputElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698