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

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

Issue 23714003: Refactoring: Add Event::createBubble. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
« no previous file with comments | « Source/core/html/HTMLInputElement.cpp ('k') | Source/core/page/PointerLockController.cpp » ('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) 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
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
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
OLDNEW
« no previous file with comments | « Source/core/html/HTMLInputElement.cpp ('k') | Source/core/page/PointerLockController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698