| 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 * | 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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 event->type() == EventTypeNames::focus)) { | 221 event->type() == EventTypeNames::focus)) { |
| 222 LayoutTextControlSingleLine* layoutTextControl = | 222 LayoutTextControlSingleLine* layoutTextControl = |
| 223 toLayoutTextControlSingleLine(element().layoutObject()); | 223 toLayoutTextControlSingleLine(element().layoutObject()); |
| 224 if (event->type() == EventTypeNames::blur) { | 224 if (event->type() == EventTypeNames::blur) { |
| 225 if (LayoutBox* innerEditorLayoutObject = | 225 if (LayoutBox* innerEditorLayoutObject = |
| 226 element().innerEditorElement()->layoutBox()) { | 226 element().innerEditorElement()->layoutBox()) { |
| 227 // FIXME: This class has no need to know about PaintLayer! | 227 // FIXME: This class has no need to know about PaintLayer! |
| 228 if (PaintLayer* innerLayer = innerEditorLayoutObject->layer()) { | 228 if (PaintLayer* innerLayer = innerEditorLayoutObject->layer()) { |
| 229 if (PaintLayerScrollableArea* innerScrollableArea = | 229 if (PaintLayerScrollableArea* innerScrollableArea = |
| 230 innerLayer->getScrollableArea()) { | 230 innerLayer->getScrollableArea()) { |
| 231 innerScrollableArea->setScrollPosition( | 231 innerScrollableArea->setScrollOffset(ScrollOffset(0, 0), |
| 232 DoublePoint(innerScrollableArea->scrollOrigin()), | 232 ProgrammaticScroll); |
| 233 ProgrammaticScroll, ScrollBehaviorInstant); | |
| 234 } | 233 } |
| 235 } | 234 } |
| 236 } | 235 } |
| 237 | 236 |
| 238 layoutTextControl->capsLockStateMayHaveChanged(); | 237 layoutTextControl->capsLockStateMayHaveChanged(); |
| 239 } else if (event->type() == EventTypeNames::focus) { | 238 } else if (event->type() == EventTypeNames::focus) { |
| 240 layoutTextControl->capsLockStateMayHaveChanged(); | 239 layoutTextControl->capsLockStateMayHaveChanged(); |
| 241 } | 240 } |
| 242 | 241 |
| 243 element().forwardEvent(event); | 242 element().forwardEvent(event); |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 return shouldSpinButtonRespondToMouseEvents() && element().isFocused(); | 544 return shouldSpinButtonRespondToMouseEvents() && element().isFocused(); |
| 546 } | 545 } |
| 547 | 546 |
| 548 void TextFieldInputType::spinButtonDidReleaseMouseCapture( | 547 void TextFieldInputType::spinButtonDidReleaseMouseCapture( |
| 549 SpinButtonElement::EventDispatch eventDispatch) { | 548 SpinButtonElement::EventDispatch eventDispatch) { |
| 550 if (eventDispatch == SpinButtonElement::EventDispatchAllowed) | 549 if (eventDispatch == SpinButtonElement::EventDispatchAllowed) |
| 551 element().dispatchFormControlChangeEvent(); | 550 element().dispatchFormControlChangeEvent(); |
| 552 } | 551 } |
| 553 | 552 |
| 554 } // namespace blink | 553 } // namespace blink |
| OLD | NEW |