| OLD | NEW |
| 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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 bool HTMLFormControlElement::reportValidity() | 553 bool HTMLFormControlElement::reportValidity() |
| 554 { | 554 { |
| 555 HeapVector<Member<HTMLFormControlElement>> unhandledInvalidControls; | 555 HeapVector<Member<HTMLFormControlElement>> unhandledInvalidControls; |
| 556 bool isValid = checkValidity(&unhandledInvalidControls, CheckValidityDispatc
hInvalidEvent); | 556 bool isValid = checkValidity(&unhandledInvalidControls, CheckValidityDispatc
hInvalidEvent); |
| 557 if (isValid || unhandledInvalidControls.isEmpty()) | 557 if (isValid || unhandledInvalidControls.isEmpty()) |
| 558 return isValid; | 558 return isValid; |
| 559 ASSERT(unhandledInvalidControls.size() == 1); | 559 ASSERT(unhandledInvalidControls.size() == 1); |
| 560 ASSERT(unhandledInvalidControls[0].get() == this); | 560 ASSERT(unhandledInvalidControls[0].get() == this); |
| 561 // Update layout now before calling isFocusable(), which has | 561 // Update layout now before calling isFocusable(), which has |
| 562 // !layoutObject()->needsLayout() assertion. | 562 // !layoutObject()->needsLayout() assertion. |
| 563 document().updateLayoutIgnorePendingStylesheets(); | 563 document().updateStyleAndLayoutIgnorePendingStylesheets(); |
| 564 if (isFocusable()) { | 564 if (isFocusable()) { |
| 565 showValidationMessage(); | 565 showValidationMessage(); |
| 566 return false; | 566 return false; |
| 567 } | 567 } |
| 568 if (document().frame()) { | 568 if (document().frame()) { |
| 569 String message("An invalid form control with name='%name' is not focusab
le."); | 569 String message("An invalid form control with name='%name' is not focusab
le."); |
| 570 message.replace("%name", name()); | 570 message.replace("%name", name()); |
| 571 document().addConsoleMessage(ConsoleMessage::create(RenderingMessageSour
ce, ErrorMessageLevel, message)); | 571 document().addConsoleMessage(ConsoleMessage::create(RenderingMessageSour
ce, ErrorMessageLevel, message)); |
| 572 } | 572 } |
| 573 return false; | 573 return false; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 dispatchFormControlChangeEvent(); | 654 dispatchFormControlChangeEvent(); |
| 655 } | 655 } |
| 656 | 656 |
| 657 void HTMLFormControlElement::copyNonAttributePropertiesFromElement(const Element
& source) | 657 void HTMLFormControlElement::copyNonAttributePropertiesFromElement(const Element
& source) |
| 658 { | 658 { |
| 659 HTMLElement::copyNonAttributePropertiesFromElement(source); | 659 HTMLElement::copyNonAttributePropertiesFromElement(source); |
| 660 setNeedsValidityCheck(); | 660 setNeedsValidityCheck(); |
| 661 } | 661 } |
| 662 | 662 |
| 663 } // namespace blink | 663 } // namespace blink |
| OLD | NEW |