Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2012 Samsung Electronics. All rights reserved. | 4 * Copyright (C) 2012 Samsung Electronics. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions are | 7 * modification, are permitted provided that the following conditions are |
| 8 * met: | 8 * met: |
| 9 * | 9 * |
| 10 * * Redistributions of source code must retain the above copyright | 10 * * Redistributions of source code must retain the above copyright |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 34 #define ImageInputType_h | 34 #define ImageInputType_h |
| 35 | 35 |
| 36 #include "core/html/forms/BaseButtonInputType.h" | 36 #include "core/html/forms/BaseButtonInputType.h" |
| 37 #include "platform/geometry/IntPoint.h" | 37 #include "platform/geometry/IntPoint.h" |
| 38 | 38 |
| 39 namespace blink { | 39 namespace blink { |
| 40 | 40 |
| 41 class ImageInputType FINAL : public BaseButtonInputType { | 41 class ImageInputType FINAL : public BaseButtonInputType { |
| 42 public: | 42 public: |
| 43 static PassRefPtrWillBeRawPtr<InputType> create(HTMLInputElement&); | 43 static PassRefPtrWillBeRawPtr<InputType> create(HTMLInputElement&); |
| 44 virtual PassRefPtr<RenderStyle> customStyleForRenderer(PassRefPtr<RenderStyl e>); | |
| 44 | 45 |
| 45 private: | 46 private: |
| 46 ImageInputType(HTMLInputElement&); | 47 ImageInputType(HTMLInputElement&); |
| 47 virtual const AtomicString& formControlType() const OVERRIDE; | 48 virtual const AtomicString& formControlType() const OVERRIDE; |
| 48 virtual bool isFormDataAppendable() const OVERRIDE; | 49 virtual bool isFormDataAppendable() const OVERRIDE; |
| 49 virtual bool appendFormData(FormDataList&, bool) const OVERRIDE; | 50 virtual bool appendFormData(FormDataList&, bool) const OVERRIDE; |
| 50 virtual String resultForDialogSubmit() const OVERRIDE; | 51 virtual String resultForDialogSubmit() const OVERRIDE; |
| 51 virtual bool supportsValidation() const OVERRIDE; | 52 virtual bool supportsValidation() const OVERRIDE; |
| 52 virtual RenderObject* createRenderer(RenderStyle*) const OVERRIDE; | 53 virtual RenderObject* createRenderer(RenderStyle*) const OVERRIDE; |
| 53 virtual void handleDOMActivateEvent(Event*) OVERRIDE; | 54 virtual void handleDOMActivateEvent(Event*) OVERRIDE; |
| 54 virtual void altAttributeChanged() OVERRIDE; | 55 virtual void altAttributeChanged() OVERRIDE; |
| 55 virtual void srcAttributeChanged() OVERRIDE; | 56 virtual void srcAttributeChanged() OVERRIDE; |
| 57 virtual void valueAttributeChanged() OVERRIDE; | |
| 56 virtual void startResourceLoading() OVERRIDE; | 58 virtual void startResourceLoading() OVERRIDE; |
| 57 virtual bool shouldRespectAlignAttribute() OVERRIDE; | 59 virtual bool shouldRespectAlignAttribute() OVERRIDE; |
| 58 virtual bool canBeSuccessfulSubmitButton() OVERRIDE; | 60 virtual bool canBeSuccessfulSubmitButton() OVERRIDE; |
| 59 virtual bool isImageButton() const OVERRIDE; | 61 virtual bool isImageButton() const OVERRIDE; |
| 60 virtual bool isEnumeratable() OVERRIDE; | 62 virtual bool isEnumeratable() OVERRIDE; |
| 61 virtual bool shouldRespectHeightAndWidthAttributes() OVERRIDE; | 63 virtual bool shouldRespectHeightAndWidthAttributes() OVERRIDE; |
| 62 virtual unsigned height() const OVERRIDE; | 64 virtual unsigned height() const OVERRIDE; |
| 63 virtual unsigned width() const OVERRIDE; | 65 virtual unsigned width() const OVERRIDE; |
| 64 virtual bool hasLegalLinkAttribute(const QualifiedName&) const OVERRIDE; | 66 virtual bool hasLegalLinkAttribute(const QualifiedName&) const OVERRIDE; |
| 65 virtual const QualifiedName& subResourceAttributeName() const OVERRIDE; | 67 virtual const QualifiedName& subResourceAttributeName() const OVERRIDE; |
| 68 virtual void ensureFallbackContent() OVERRIDE; | |
| 69 virtual void ensurePrimaryContent() OVERRIDE; | |
| 70 virtual void createShadowSubtree() OVERRIDE; | |
| 71 | |
| 72 void reattachFallbackContent(); | |
| 73 void setUseFallbackContent(); | |
| 74 Text* altTextNode() { return m_altTextNode; } | |
|
esprehn
2014/09/05 00:47:52
Remove this getter, you only use it once anyway.
| |
| 66 | 75 |
| 67 IntPoint m_clickLocation; // Valid only during HTMLFormElement::prepareForSu bmission(). | 76 IntPoint m_clickLocation; // Valid only during HTMLFormElement::prepareForSu bmission(). |
| 77 bool m_useFallbackContent; | |
| 78 Text* m_altTextNode; | |
|
esprehn
2014/09/05 00:47:52
Get this by putting an id on the parent and then d
| |
| 68 }; | 79 }; |
| 69 | 80 |
| 70 } // namespace blink | 81 } // namespace blink |
| 71 | 82 |
| 72 #endif // ImageInputType_h | 83 #endif // ImageInputType_h |
| OLD | NEW |