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

Side by Side Diff: Source/core/html/HTMLInputElement.h

Issue 481753002: Use Shadow DOM to display fallback content for images (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 6 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 | Annotate | Revision Log
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) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved.
6 * Copyright (C) 2012 Samsung Electronics. All rights reserved. 6 * Copyright (C) 2012 Samsung Electronics. All rights reserved.
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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 virtual RenderObject* createRenderer(RenderStyle*) override; 147 virtual RenderObject* createRenderer(RenderStyle*) override;
148 virtual void detach(const AttachContext& = AttachContext()) override final; 148 virtual void detach(const AttachContext& = AttachContext()) override final;
149 virtual void updateFocusAppearance(bool restorePreviousSelection) override f inal; 149 virtual void updateFocusAppearance(bool restorePreviousSelection) override f inal;
150 150
151 // FIXME: For isActivatedSubmit and setActivatedSubmit, we should use the NV I-idiom here by making 151 // FIXME: For isActivatedSubmit and setActivatedSubmit, we should use the NV I-idiom here by making
152 // it private virtual in all classes and expose a public method in HTMLFormC ontrolElement to call 152 // it private virtual in all classes and expose a public method in HTMLFormC ontrolElement to call
153 // the private virtual method. 153 // the private virtual method.
154 virtual bool isActivatedSubmit() const override final; 154 virtual bool isActivatedSubmit() const override final;
155 virtual void setActivatedSubmit(bool flag) override final; 155 virtual void setActivatedSubmit(bool flag) override final;
156 156
157 String altText() const; 157 virtual String altText() const override final;
158 158
159 int maxResults() const { return m_maxResults; } 159 int maxResults() const { return m_maxResults; }
160 160
161 const AtomicString& defaultValue() const; 161 const AtomicString& defaultValue() const;
162 162
163 Vector<String> acceptMIMETypes(); 163 Vector<String> acceptMIMETypes();
164 Vector<String> acceptFileExtensions(); 164 Vector<String> acceptFileExtensions();
165 const AtomicString& alt() const; 165 const AtomicString& alt() const;
166 166
167 void setSize(unsigned); 167 void setSize(unsigned);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 245
246 bool setupDateTimeChooserParameters(DateTimeChooserParameters&); 246 bool setupDateTimeChooserParameters(DateTimeChooserParameters&);
247 247
248 bool supportsInputModeAttribute() const; 248 bool supportsInputModeAttribute() const;
249 249
250 void setShouldRevealPassword(bool value); 250 void setShouldRevealPassword(bool value);
251 bool shouldRevealPassword() const { return m_shouldRevealPassword; } 251 bool shouldRevealPassword() const { return m_shouldRevealPassword; }
252 AXObject* popupRootAXObject(); 252 AXObject* popupRootAXObject();
253 virtual void didNotifySubtreeInsertionsToDocument() override; 253 virtual void didNotifySubtreeInsertionsToDocument() override;
254 254
255 virtual void ensureFallbackContent();
256 virtual void ensurePrimaryContent();
257 bool hasFallbackContent() const;
255 protected: 258 protected:
256 HTMLInputElement(Document&, HTMLFormElement*, bool createdByParser); 259 HTMLInputElement(Document&, HTMLFormElement*, bool createdByParser);
257 260
258 virtual void defaultEventHandler(Event*) override; 261 virtual void defaultEventHandler(Event*) override;
259 262
260 private: 263 private:
261 enum AutoCompleteSetting { Uninitialized, On, Off }; 264 enum AutoCompleteSetting { Uninitialized, On, Off };
262 265
263 virtual void didAddUserAgentShadowRoot(ShadowRoot&) override final; 266 virtual void didAddUserAgentShadowRoot(ShadowRoot&) override final;
264 virtual void willAddFirstAuthorShadowRoot() override final; 267 virtual void willAddFirstAuthorShadowRoot() override final;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 void setListAttributeTargetObserver(PassOwnPtrWillBeRawPtr<ListAttributeTarg etObserver>); 347 void setListAttributeTargetObserver(PassOwnPtrWillBeRawPtr<ListAttributeTarg etObserver>);
345 void resetListAttributeTargetObserver(); 348 void resetListAttributeTargetObserver();
346 void parseMaxLengthAttribute(const AtomicString&); 349 void parseMaxLengthAttribute(const AtomicString&);
347 void parseMinLengthAttribute(const AtomicString&); 350 void parseMinLengthAttribute(const AtomicString&);
348 void updateValueIfNeeded(); 351 void updateValueIfNeeded();
349 352
350 // Returns null if this isn't associated with any radio button group. 353 // Returns null if this isn't associated with any radio button group.
351 RadioButtonGroupScope* radioButtonGroupScope() const; 354 RadioButtonGroupScope* radioButtonGroupScope() const;
352 void addToRadioButtonGroup(); 355 void addToRadioButtonGroup();
353 void removeFromRadioButtonGroup(); 356 void removeFromRadioButtonGroup();
354 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
355 virtual PassRefPtr<RenderStyle> customStyleForRenderer() override; 357 virtual PassRefPtr<RenderStyle> customStyleForRenderer() override;
356 #endif
357 358
358 virtual bool shouldDispatchFormControlChangeEvent(String&, String&) override ; 359 virtual bool shouldDispatchFormControlChangeEvent(String&, String&) override ;
359 360
360 AtomicString m_name; 361 AtomicString m_name;
361 String m_valueIfDirty; 362 String m_valueIfDirty;
362 String m_suggestedValue; 363 String m_suggestedValue;
363 int m_size; 364 int m_size;
364 int m_maxLength; 365 int m_maxLength;
365 int m_minLength; 366 int m_minLength;
366 short m_maxResults; 367 short m_maxResults;
(...skipping 15 matching lines...) Expand all
382 // The ImageLoader must be owned by this element because the loader code ass umes 383 // The ImageLoader must be owned by this element because the loader code ass umes
383 // that it lives as long as its owning element lives. If we move the loader into 384 // that it lives as long as its owning element lives. If we move the loader into
384 // the ImageInput object we may delete the loader while this element lives o n. 385 // the ImageInput object we may delete the loader while this element lives o n.
385 OwnPtrWillBeMember<HTMLImageLoader> m_imageLoader; 386 OwnPtrWillBeMember<HTMLImageLoader> m_imageLoader;
386 OwnPtrWillBeMember<ListAttributeTargetObserver> m_listAttributeTargetObserve r; 387 OwnPtrWillBeMember<ListAttributeTargetObserver> m_listAttributeTargetObserve r;
387 }; 388 };
388 389
389 } // namespace blink 390 } // namespace blink
390 391
391 #endif // HTMLInputElement_h 392 #endif // HTMLInputElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698