| OLD | NEW |
| 1 /** | 1 /** |
| 2 * Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved. |
| 3 * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 3 * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 4 * Copyright (C) 2010 Google Inc. All rights reserved. | 4 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 if (innerTextElement()) | 445 if (innerTextElement()) |
| 446 innerTextElement()->setScrollTop(newTop); | 446 innerTextElement()->setScrollTop(newTop); |
| 447 } | 447 } |
| 448 | 448 |
| 449 bool RenderTextControlSingleLine::scroll(ScrollDirection direction, ScrollGranul
arity granularity, float multiplier, Node** stopNode) | 449 bool RenderTextControlSingleLine::scroll(ScrollDirection direction, ScrollGranul
arity granularity, float multiplier, Node** stopNode) |
| 450 { | 450 { |
| 451 RenderBox* renderer = innerTextElement()->renderBox(); | 451 RenderBox* renderer = innerTextElement()->renderBox(); |
| 452 if (!renderer) | 452 if (!renderer) |
| 453 return false; | 453 return false; |
| 454 RenderLayer* layer = renderer->layer(); | 454 RenderLayer* layer = renderer->layer(); |
| 455 if (layer && layer->scroll(direction, granularity, multiplier)) | 455 |
| 456 // Use the forced touch scroll method since the text control wont have scrol
lbars |
| 457 if (layer && layer->touchScroll(direction, granularity, multiplier)) { |
| 458 if (stopNode) |
| 459 *stopNode = node(); |
| 460 |
| 456 return true; | 461 return true; |
| 462 } |
| 457 return RenderBlock::scroll(direction, granularity, multiplier, stopNode); | 463 return RenderBlock::scroll(direction, granularity, multiplier, stopNode); |
| 458 } | 464 } |
| 459 | 465 |
| 460 bool RenderTextControlSingleLine::logicalScroll(ScrollLogicalDirection direction
, ScrollGranularity granularity, float multiplier, Node** stopNode) | 466 bool RenderTextControlSingleLine::logicalScroll(ScrollLogicalDirection direction
, ScrollGranularity granularity, float multiplier, Node** stopNode) |
| 461 { | 467 { |
| 462 RenderLayer* layer = innerTextElement()->renderBox()->layer(); | 468 RenderLayer* layer = innerTextElement()->renderBox()->layer(); |
| 463 if (layer && layer->scroll(logicalToPhysical(direction, style()->isHorizonta
lWritingMode(), style()->isFlippedBlocksWritingMode()), granularity, multiplier)
) | 469 if (layer && layer->scroll(logicalToPhysical(direction, style()->isHorizonta
lWritingMode(), style()->isFlippedBlocksWritingMode()), granularity, multiplier)
) |
| 464 return true; | 470 return true; |
| 465 return RenderBlock::logicalScroll(direction, granularity, multiplier, stopNo
de); | 471 return RenderBlock::logicalScroll(direction, granularity, multiplier, stopNo
de); |
| 466 } | 472 } |
| 467 | 473 |
| 468 HTMLInputElement* RenderTextControlSingleLine::inputElement() const | 474 HTMLInputElement* RenderTextControlSingleLine::inputElement() const |
| 469 { | 475 { |
| 470 return node()->toInputElement(); | 476 return node()->toInputElement(); |
| 471 } | 477 } |
| 472 | 478 |
| 473 } | 479 } |
| OLD | NEW |