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

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

Issue 328513004: Introduce use counters for Blink specific editing event usage (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2014-06-11T11:21:22 Created 6 years, 6 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
« no previous file with comments | « Source/core/html/HTMLTextFormControlElement.h ('k') | no next file » | 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 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 getNextSoftBreak(line, breakNode, breakOffset); 607 getNextSoftBreak(line, breakNode, breakOffset);
608 } 608 }
609 return finishText(result); 609 return finishText(result);
610 } 610 }
611 611
612 HTMLTextFormControlElement* enclosingTextFormControl(const Position& position) 612 HTMLTextFormControlElement* enclosingTextFormControl(const Position& position)
613 { 613 {
614 ASSERT(position.isNull() || position.anchorType() == Position::PositionIsOff setInAnchor 614 ASSERT(position.isNull() || position.anchorType() == Position::PositionIsOff setInAnchor
615 || position.containerNode() || !position.anchorNode()->shadowHost() 615 || position.containerNode() || !position.anchorNode()->shadowHost()
616 || (position.anchorNode()->parentNode() && position.anchorNode()->parent Node()->isShadowRoot())); 616 || (position.anchorNode()->parentNode() && position.anchorNode()->parent Node()->isShadowRoot()));
617 return enclosingTextFormControl(position.containerNode());
618 }
617 619
618 Node* container = position.containerNode(); 620 HTMLTextFormControlElement* enclosingTextFormControl(Node* container)
621 {
619 if (!container) 622 if (!container)
620 return 0; 623 return 0;
621 Element* ancestor = container->shadowHost(); 624 Element* ancestor = container->shadowHost();
622 return ancestor && isHTMLTextFormControlElement(*ancestor) && container->con tainingShadowRoot()->type() == ShadowRoot::UserAgentShadowRoot ? toHTMLTextFormC ontrolElement(ancestor) : 0; 625 return ancestor && isHTMLTextFormControlElement(*ancestor) && container->con tainingShadowRoot()->type() == ShadowRoot::UserAgentShadowRoot ? toHTMLTextFormC ontrolElement(ancestor) : 0;
623 } 626 }
624 627
625 static const HTMLElement* parentHTMLElement(const Element* element) 628 static const HTMLElement* parentHTMLElement(const Element* element)
626 { 629 {
627 while (element) { 630 while (element) {
628 element = element->parentElement(); 631 element = element->parentElement();
(...skipping 22 matching lines...) Expand all
651 654
652 return "ltr"; 655 return "ltr";
653 } 656 }
654 657
655 HTMLElement* HTMLTextFormControlElement::innerTextElement() const 658 HTMLElement* HTMLTextFormControlElement::innerTextElement() const
656 { 659 {
657 return toHTMLElement(userAgentShadowRoot()->getElementById(ShadowElementName s::innerEditor())); 660 return toHTMLElement(userAgentShadowRoot()->getElementById(ShadowElementName s::innerEditor()));
658 } 661 }
659 662
660 } // namespace Webcore 663 } // namespace Webcore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLTextFormControlElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698