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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLBodyElement.cpp

Issue 2249613002: Measure <body onselectionchange> content attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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
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) 2000 Simon Hausmann (hausmann@kde.org) 4 * (C) 2000 Simon Hausmann (hausmann@kde.org)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
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 15 matching lines...) Expand all
26 #include "bindings/core/v8/ScriptEventListener.h" 26 #include "bindings/core/v8/ScriptEventListener.h"
27 #include "core/CSSValueKeywords.h" 27 #include "core/CSSValueKeywords.h"
28 #include "core/HTMLNames.h" 28 #include "core/HTMLNames.h"
29 #include "core/css/CSSImageValue.h" 29 #include "core/css/CSSImageValue.h"
30 #include "core/css/StylePropertySet.h" 30 #include "core/css/StylePropertySet.h"
31 #include "core/css/parser/CSSParser.h" 31 #include "core/css/parser/CSSParser.h"
32 #include "core/dom/Attribute.h" 32 #include "core/dom/Attribute.h"
33 #include "core/dom/StyleChangeReason.h" 33 #include "core/dom/StyleChangeReason.h"
34 #include "core/editing/EditingUtilities.h" 34 #include "core/editing/EditingUtilities.h"
35 #include "core/frame/LocalFrame.h" 35 #include "core/frame/LocalFrame.h"
36 #include "core/frame/UseCounter.h"
36 #include "core/html/HTMLFrameElementBase.h" 37 #include "core/html/HTMLFrameElementBase.h"
37 #include "core/html/parser/HTMLParserIdioms.h" 38 #include "core/html/parser/HTMLParserIdioms.h"
38 39
39 namespace blink { 40 namespace blink {
40 41
41 using namespace HTMLNames; 42 using namespace HTMLNames;
42 43
43 inline HTMLBodyElement::HTMLBodyElement(Document& document) 44 inline HTMLBodyElement::HTMLBodyElement(Document& document)
44 : HTMLElement(bodyTag, document) 45 : HTMLElement(bodyTag, document)
45 { 46 {
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 document().setWindowAttributeEventListener(EventTypeNames::orientationch ange, createAttributeEventListener(document().frame(), name, value, eventParamet erName())); 131 document().setWindowAttributeEventListener(EventTypeNames::orientationch ange, createAttributeEventListener(document().frame(), name, value, eventParamet erName()));
131 } else if (name == onhashchangeAttr) { 132 } else if (name == onhashchangeAttr) {
132 document().setWindowAttributeEventListener(EventTypeNames::hashchange, c reateAttributeEventListener(document().frame(), name, value, eventParameterName( ))); 133 document().setWindowAttributeEventListener(EventTypeNames::hashchange, c reateAttributeEventListener(document().frame(), name, value, eventParameterName( )));
133 } else if (name == onmessageAttr) { 134 } else if (name == onmessageAttr) {
134 document().setWindowAttributeEventListener(EventTypeNames::message, crea teAttributeEventListener(document().frame(), name, value, eventParameterName())) ; 135 document().setWindowAttributeEventListener(EventTypeNames::message, crea teAttributeEventListener(document().frame(), name, value, eventParameterName())) ;
135 } else if (name == onresizeAttr) { 136 } else if (name == onresizeAttr) {
136 document().setWindowAttributeEventListener(EventTypeNames::resize, creat eAttributeEventListener(document().frame(), name, value, eventParameterName())); 137 document().setWindowAttributeEventListener(EventTypeNames::resize, creat eAttributeEventListener(document().frame(), name, value, eventParameterName()));
137 } else if (name == onscrollAttr) { 138 } else if (name == onscrollAttr) {
138 document().setWindowAttributeEventListener(EventTypeNames::scroll, creat eAttributeEventListener(document().frame(), name, value, eventParameterName())); 139 document().setWindowAttributeEventListener(EventTypeNames::scroll, creat eAttributeEventListener(document().frame(), name, value, eventParameterName()));
139 } else if (name == onselectionchangeAttr) { 140 } else if (name == onselectionchangeAttr) {
141 UseCounter::count(document(), UseCounter::HTMLBodyElementOnSelectionChan geAttribute);
140 document().setAttributeEventListener(EventTypeNames::selectionchange, cr eateAttributeEventListener(document().frame(), name, value, eventParameterName() )); 142 document().setAttributeEventListener(EventTypeNames::selectionchange, cr eateAttributeEventListener(document().frame(), name, value, eventParameterName() ));
141 } else if (name == onstorageAttr) { 143 } else if (name == onstorageAttr) {
142 document().setWindowAttributeEventListener(EventTypeNames::storage, crea teAttributeEventListener(document().frame(), name, value, eventParameterName())) ; 144 document().setWindowAttributeEventListener(EventTypeNames::storage, crea teAttributeEventListener(document().frame(), name, value, eventParameterName())) ;
143 } else if (name == ononlineAttr) { 145 } else if (name == ononlineAttr) {
144 document().setWindowAttributeEventListener(EventTypeNames::online, creat eAttributeEventListener(document().frame(), name, value, eventParameterName())); 146 document().setWindowAttributeEventListener(EventTypeNames::online, creat eAttributeEventListener(document().frame(), name, value, eventParameterName()));
145 } else if (name == onofflineAttr) { 147 } else if (name == onofflineAttr) {
146 document().setWindowAttributeEventListener(EventTypeNames::offline, crea teAttributeEventListener(document().frame(), name, value, eventParameterName())) ; 148 document().setWindowAttributeEventListener(EventTypeNames::offline, crea teAttributeEventListener(document().frame(), name, value, eventParameterName())) ;
147 } else if (name == onlanguagechangeAttr) { 149 } else if (name == onlanguagechangeAttr) {
148 document().setWindowAttributeEventListener(EventTypeNames::languagechang e, createAttributeEventListener(document().frame(), name, value, eventParameterN ame())); 150 document().setWindowAttributeEventListener(EventTypeNames::languagechang e, createAttributeEventListener(document().frame(), name, value, eventParameterN ame()));
149 } else { 151 } else {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 } 190 }
189 191
190 bool HTMLBodyElement::supportsFocus() const 192 bool HTMLBodyElement::supportsFocus() const
191 { 193 {
192 // This override is needed because the inherited method bails if the parent is editable. 194 // This override is needed because the inherited method bails if the parent is editable.
193 // The <body> should be focusable even if <html> is editable. 195 // The <body> should be focusable even if <html> is editable.
194 return hasEditableStyle(*this) || HTMLElement::supportsFocus(); 196 return hasEditableStyle(*this) || HTMLElement::supportsFocus();
195 } 197 }
196 198
197 } // namespace blink 199 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698