OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 void HTMLTextFormControlElement::selectionChanged(bool userTriggered) | 468 void HTMLTextFormControlElement::selectionChanged(bool userTriggered) |
469 { | 469 { |
470 if (!renderer() || !isTextFormControl()) | 470 if (!renderer() || !isTextFormControl()) |
471 return; | 471 return; |
472 | 472 |
473 // selectionStart() or selectionEnd() will return cached selection when this
node doesn't have focus | 473 // selectionStart() or selectionEnd() will return cached selection when this
node doesn't have focus |
474 cacheSelection(computeSelectionStart(), computeSelectionEnd(), computeSelect
ionDirection()); | 474 cacheSelection(computeSelectionStart(), computeSelectionEnd(), computeSelect
ionDirection()); |
475 | 475 |
476 if (Frame* frame = document()->frame()) { | 476 if (Frame* frame = document()->frame()) { |
477 if (frame->selection()->isRange() && userTriggered) | 477 if (frame->selection()->isRange() && userTriggered) |
478 dispatchEvent(Event::create(eventNames().selectEvent, true, false)); | 478 dispatchEvent(Event::createBubble(eventNames().selectEvent)); |
479 } | 479 } |
480 } | 480 } |
481 | 481 |
482 void HTMLTextFormControlElement::parseAttribute(const QualifiedName& name, const
AtomicString& value) | 482 void HTMLTextFormControlElement::parseAttribute(const QualifiedName& name, const
AtomicString& value) |
483 { | 483 { |
484 if (name == placeholderAttr) { | 484 if (name == placeholderAttr) { |
485 updatePlaceholderVisibility(true); | 485 updatePlaceholderVisibility(true); |
486 UseCounter::count(document(), UseCounter::PlaceholderAttribute); | 486 UseCounter::count(document(), UseCounter::PlaceholderAttribute); |
487 } else | 487 } else |
488 HTMLFormControlElementWithState::parseAttribute(name, value); | 488 HTMLFormControlElementWithState::parseAttribute(name, value); |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 bool isAuto; | 638 bool isAuto; |
639 TextDirection textDirection = static_cast<const HTMLElement*>(elemen
t)->directionalityIfhasDirAutoAttribute(isAuto); | 639 TextDirection textDirection = static_cast<const HTMLElement*>(elemen
t)->directionalityIfhasDirAutoAttribute(isAuto); |
640 return textDirection == RTL ? "rtl" : "ltr"; | 640 return textDirection == RTL ? "rtl" : "ltr"; |
641 } | 641 } |
642 } | 642 } |
643 | 643 |
644 return "ltr"; | 644 return "ltr"; |
645 } | 645 } |
646 | 646 |
647 } // namespace Webcore | 647 } // namespace Webcore |
OLD | NEW |