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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp

Issue 2387033003: Make cols/rows/span not accept zero when set from idl (Closed)
Patch Set: V2 Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLTableColElement.cpp ('k') | no next file » | 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, 2008, 2010 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv ed.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 bool HTMLTextAreaElement::isValidValue(const String& candidate) const { 619 bool HTMLTextAreaElement::isValidValue(const String& candidate) const {
620 return !valueMissing(&candidate) && !tooLong(&candidate, IgnoreDirtyFlag) && 620 return !valueMissing(&candidate) && !tooLong(&candidate, IgnoreDirtyFlag) &&
621 !tooShort(&candidate, IgnoreDirtyFlag); 621 !tooShort(&candidate, IgnoreDirtyFlag);
622 } 622 }
623 623
624 void HTMLTextAreaElement::accessKeyAction(bool) { 624 void HTMLTextAreaElement::accessKeyAction(bool) {
625 focus(); 625 focus();
626 } 626 }
627 627
628 void HTMLTextAreaElement::setCols(unsigned cols) { 628 void HTMLTextAreaElement::setCols(unsigned cols) {
629 setUnsignedIntegralAttribute(colsAttr, cols); 629 setUnsignedIntegralAttribute(colsAttr, cols ? cols : defaultCols);
630 } 630 }
631 631
632 void HTMLTextAreaElement::setRows(unsigned rows) { 632 void HTMLTextAreaElement::setRows(unsigned rows) {
633 setUnsignedIntegralAttribute(rowsAttr, rows); 633 setUnsignedIntegralAttribute(rowsAttr, rows ? rows : defaultRows);
634 } 634 }
635 635
636 bool HTMLTextAreaElement::matchesReadOnlyPseudoClass() const { 636 bool HTMLTextAreaElement::matchesReadOnlyPseudoClass() const {
637 return isReadOnly(); 637 return isReadOnly();
638 } 638 }
639 639
640 bool HTMLTextAreaElement::matchesReadWritePseudoClass() const { 640 bool HTMLTextAreaElement::matchesReadWritePseudoClass() const {
641 return !isReadOnly(); 641 return !isReadOnly();
642 } 642 }
643 643
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 void HTMLTextAreaElement::copyNonAttributePropertiesFromElement( 682 void HTMLTextAreaElement::copyNonAttributePropertiesFromElement(
683 const Element& source) { 683 const Element& source) {
684 const HTMLTextAreaElement& sourceElement = 684 const HTMLTextAreaElement& sourceElement =
685 static_cast<const HTMLTextAreaElement&>(source); 685 static_cast<const HTMLTextAreaElement&>(source);
686 setValueCommon(sourceElement.value(), DispatchNoEvent, SetSeletion); 686 setValueCommon(sourceElement.value(), DispatchNoEvent, SetSeletion);
687 m_isDirty = sourceElement.m_isDirty; 687 m_isDirty = sourceElement.m_isDirty;
688 HTMLTextFormControlElement::copyNonAttributePropertiesFromElement(source); 688 HTMLTextFormControlElement::copyNonAttributePropertiesFromElement(source);
689 } 689 }
690 690
691 } // namespace blink 691 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLTableColElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698