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

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

Issue 899163003: Move rendering/RenderObject to layout/LayoutObject. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/shadow/TextControlInnerElements.h ('k') | Source/core/html/track/vtt/VTTCue.h » ('j') | 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 { 50 {
51 } 51 }
52 52
53 PassRefPtrWillBeRawPtr<TextControlInnerContainer> TextControlInnerContainer::cre ate(Document& document) 53 PassRefPtrWillBeRawPtr<TextControlInnerContainer> TextControlInnerContainer::cre ate(Document& document)
54 { 54 {
55 RefPtrWillBeRawPtr<TextControlInnerContainer> element = adoptRefWillBeNoop(n ew TextControlInnerContainer(document)); 55 RefPtrWillBeRawPtr<TextControlInnerContainer> element = adoptRefWillBeNoop(n ew TextControlInnerContainer(document));
56 element->setAttribute(idAttr, ShadowElementNames::textFieldContainer()); 56 element->setAttribute(idAttr, ShadowElementNames::textFieldContainer());
57 return element.release(); 57 return element.release();
58 } 58 }
59 59
60 RenderObject* TextControlInnerContainer::createRenderer(const RenderStyle&) 60 LayoutObject* TextControlInnerContainer::createRenderer(const RenderStyle&)
61 { 61 {
62 return new RenderTextControlInnerContainer(this); 62 return new RenderTextControlInnerContainer(this);
63 } 63 }
64 64
65 // --------------------------- 65 // ---------------------------
66 66
67 EditingViewPortElement::EditingViewPortElement(Document& document) 67 EditingViewPortElement::EditingViewPortElement(Document& document)
68 : HTMLDivElement(document) 68 : HTMLDivElement(document)
69 { 69 {
70 setHasCustomStyleCallbacks(); 70 setHasCustomStyleCallbacks();
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 // cause events to be sent to the TextControlInnerTextElement. To 123 // cause events to be sent to the TextControlInnerTextElement. To
124 // prevent an infinite loop, we must check for this case before sending 124 // prevent an infinite loop, we must check for this case before sending
125 // the event up the chain. 125 // the event up the chain.
126 if (shadowAncestor) 126 if (shadowAncestor)
127 shadowAncestor->defaultEventHandler(event); 127 shadowAncestor->defaultEventHandler(event);
128 } 128 }
129 if (!event->defaultHandled()) 129 if (!event->defaultHandled())
130 HTMLDivElement::defaultEventHandler(event); 130 HTMLDivElement::defaultEventHandler(event);
131 } 131 }
132 132
133 RenderObject* TextControlInnerEditorElement::createRenderer(const RenderStyle&) 133 LayoutObject* TextControlInnerEditorElement::createRenderer(const RenderStyle&)
134 { 134 {
135 return new RenderTextControlInnerBlock(this); 135 return new RenderTextControlInnerBlock(this);
136 } 136 }
137 137
138 PassRefPtr<RenderStyle> TextControlInnerEditorElement::customStyleForRenderer() 138 PassRefPtr<RenderStyle> TextControlInnerEditorElement::customStyleForRenderer()
139 { 139 {
140 RenderObject* parentRenderer = shadowHost()->renderer(); 140 LayoutObject* parentRenderer = shadowHost()->renderer();
141 if (!parentRenderer || !parentRenderer->isTextControl()) 141 if (!parentRenderer || !parentRenderer->isTextControl())
142 return originalStyleForRenderer(); 142 return originalStyleForRenderer();
143 RenderTextControl* textControlRenderer = toRenderTextControl(parentRenderer) ; 143 RenderTextControl* textControlRenderer = toRenderTextControl(parentRenderer) ;
144 return textControlRenderer->createInnerEditorStyle(textControlRenderer->styl e()); 144 return textControlRenderer->createInnerEditorStyle(textControlRenderer->styl e());
145 } 145 }
146 146
147 // ---------------------------- 147 // ----------------------------
148 148
149 inline SearchFieldDecorationElement::SearchFieldDecorationElement(Document& docu ment) 149 inline SearchFieldDecorationElement::SearchFieldDecorationElement(Document& docu ment)
150 : HTMLDivElement(document) 150 : HTMLDivElement(document)
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 bool SearchFieldCancelButtonElement::willRespondToMouseClickEvents() 243 bool SearchFieldCancelButtonElement::willRespondToMouseClickEvents()
244 { 244 {
245 const HTMLInputElement* input = toHTMLInputElement(shadowHost()); 245 const HTMLInputElement* input = toHTMLInputElement(shadowHost());
246 if (input && !input->isDisabledOrReadOnly()) 246 if (input && !input->isDisabledOrReadOnly())
247 return true; 247 return true;
248 248
249 return HTMLDivElement::willRespondToMouseClickEvents(); 249 return HTMLDivElement::willRespondToMouseClickEvents();
250 } 250 }
251 251
252 } 252 }
OLDNEW
« no previous file with comments | « Source/core/html/shadow/TextControlInnerElements.h ('k') | Source/core/html/track/vtt/VTTCue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698