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

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

Issue 2393133004: reflow comments in core/html/shadow (Closed)
Patch Set: oops 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/shadow/SliderThumbElement.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) 2006, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Google Inc. All rights reserved. 3 * Copyright (C) 2010 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 TextControlInnerEditorElement* TextControlInnerEditorElement::create( 106 TextControlInnerEditorElement* TextControlInnerEditorElement::create(
107 Document& document) { 107 Document& document) {
108 TextControlInnerEditorElement* element = 108 TextControlInnerEditorElement* element =
109 new TextControlInnerEditorElement(document); 109 new TextControlInnerEditorElement(document);
110 element->setAttribute(idAttr, ShadowElementNames::innerEditor()); 110 element->setAttribute(idAttr, ShadowElementNames::innerEditor());
111 return element; 111 return element;
112 } 112 }
113 113
114 void TextControlInnerEditorElement::defaultEventHandler(Event* event) { 114 void TextControlInnerEditorElement::defaultEventHandler(Event* event) {
115 // FIXME: In the future, we should add a way to have default event listeners. 115 // FIXME: In the future, we should add a way to have default event listeners.
116 // Then we would add one to the text field's inner div, and we wouldn't need t his subclass. 116 // Then we would add one to the text field's inner div, and we wouldn't need
117 // this subclass.
117 // Or possibly we could just use a normal event listener. 118 // Or possibly we could just use a normal event listener.
118 if (event->isBeforeTextInsertedEvent() || 119 if (event->isBeforeTextInsertedEvent() ||
119 event->type() == EventTypeNames::webkitEditableContentChanged) { 120 event->type() == EventTypeNames::webkitEditableContentChanged) {
120 Element* shadowAncestor = ownerShadowHost(); 121 Element* shadowAncestor = ownerShadowHost();
121 // A TextControlInnerTextElement can have no host if its been detached, 122 // A TextControlInnerTextElement can have no host if its been detached,
122 // but kept alive by an EditCommand. In this case, an undo/redo can 123 // but kept alive by an EditCommand. In this case, an undo/redo can
123 // cause events to be sent to the TextControlInnerTextElement. To 124 // cause events to be sent to the TextControlInnerTextElement. To
124 // prevent an infinite loop, we must check for this case before sending 125 // prevent an infinite loop, we must check for this case before sending
125 // the event up the chain. 126 // the event up the chain.
126 if (shadowAncestor) 127 if (shadowAncestor)
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 202
202 bool SearchFieldCancelButtonElement::willRespondToMouseClickEvents() { 203 bool SearchFieldCancelButtonElement::willRespondToMouseClickEvents() {
203 const HTMLInputElement* input = toHTMLInputElement(ownerShadowHost()); 204 const HTMLInputElement* input = toHTMLInputElement(ownerShadowHost());
204 if (input && !input->isDisabledOrReadOnly()) 205 if (input && !input->isDisabledOrReadOnly())
205 return true; 206 return true;
206 207
207 return HTMLDivElement::willRespondToMouseClickEvents(); 208 return HTMLDivElement::willRespondToMouseClickEvents();
208 } 209 }
209 210
210 } // namespace blink 211 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/shadow/SliderThumbElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698