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

Side by Side Diff: Source/core/html/TextFieldInputType.cpp

Issue 22893055: Split computeScrollDimensions() out of RenderLayer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated after Ian's comment. Created 7 years, 3 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
OLDNEW
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 * 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 are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 if (event->defaultHandled()) 180 if (event->defaultHandled())
181 return; 181 return;
182 } 182 }
183 183
184 if (element()->renderer() && (event->isMouseEvent() || event->isDragEvent() || event->hasInterface(eventNames().interfaceForWheelEvent) || event->type() == eventNames().blurEvent || event->type() == eventNames().focusEvent)) { 184 if (element()->renderer() && (event->isMouseEvent() || event->isDragEvent() || event->hasInterface(eventNames().interfaceForWheelEvent) || event->type() == eventNames().blurEvent || event->type() == eventNames().focusEvent)) {
185 RenderTextControlSingleLine* renderTextControl = toRenderTextControlSing leLine(element()->renderer()); 185 RenderTextControlSingleLine* renderTextControl = toRenderTextControlSing leLine(element()->renderer());
186 if (event->type() == eventNames().blurEvent) { 186 if (event->type() == eventNames().blurEvent) {
187 if (RenderBox* innerTextRenderer = innerTextElement()->renderBox()) { 187 if (RenderBox* innerTextRenderer = innerTextElement()->renderBox()) {
188 if (RenderLayer* innerLayer = innerTextRenderer->layer()) { 188 if (RenderLayer* innerLayer = innerTextRenderer->layer()) {
189 IntSize scrollOffset(!renderTextControl->style()->isLeftToRi ghtDirection() ? innerLayer->scrollWidth() : 0, 0); 189 IntSize scrollOffset(!renderTextControl->style()->isLeftToRi ghtDirection() ? innerLayer->scrollWidth() : 0, 0);
190 innerLayer->scrollToOffset(scrollOffset, RenderLayer::Scroll OffsetClamped); 190 innerLayer->scrollToOffset(scrollOffset, ScrollOffsetClamped );
191 } 191 }
192 } 192 }
193 193
194 renderTextControl->capsLockStateMayHaveChanged(); 194 renderTextControl->capsLockStateMayHaveChanged();
195 } else if (event->type() == eventNames().focusEvent) 195 } else if (event->type() == eventNames().focusEvent)
196 renderTextControl->capsLockStateMayHaveChanged(); 196 renderTextControl->capsLockStateMayHaveChanged();
197 197
198 element()->forwardEvent(event); 198 element()->forwardEvent(event);
199 } 199 }
200 } 200 }
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 { 493 {
494 return !element()->isDisabledOrReadOnly(); 494 return !element()->isDisabledOrReadOnly();
495 } 495 }
496 496
497 bool TextFieldInputType::shouldSpinButtonRespondToWheelEvents() 497 bool TextFieldInputType::shouldSpinButtonRespondToWheelEvents()
498 { 498 {
499 return shouldSpinButtonRespondToMouseEvents() && element()->focused(); 499 return shouldSpinButtonRespondToMouseEvents() && element()->focused();
500 } 500 }
501 501
502 } // namespace WebCore 502 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/accessibility/AccessibilityRenderObject.cpp ('k') | Source/core/rendering/RenderBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698