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

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

Issue 2860483002: Add messageerror event handler (Closed)
Patch Set: fix test Created 3 years, 7 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 6 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
7 * reserved. 7 * reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 } else if (name == onhashchangeAttr) { 169 } else if (name == onhashchangeAttr) {
170 GetDocument().SetWindowAttributeEventListener( 170 GetDocument().SetWindowAttributeEventListener(
171 EventTypeNames::hashchange, 171 EventTypeNames::hashchange,
172 CreateAttributeEventListener(GetDocument().GetFrame(), name, value, 172 CreateAttributeEventListener(GetDocument().GetFrame(), name, value,
173 EventParameterName())); 173 EventParameterName()));
174 } else if (name == onmessageAttr) { 174 } else if (name == onmessageAttr) {
175 GetDocument().SetWindowAttributeEventListener( 175 GetDocument().SetWindowAttributeEventListener(
176 EventTypeNames::message, 176 EventTypeNames::message,
177 CreateAttributeEventListener(GetDocument().GetFrame(), name, value, 177 CreateAttributeEventListener(GetDocument().GetFrame(), name, value,
178 EventParameterName())); 178 EventParameterName()));
179 } else if (name == onmessageerrorAttr) {
180 GetDocument().SetWindowAttributeEventListener(
181 EventTypeNames::messageerror,
182 CreateAttributeEventListener(GetDocument().GetFrame(), name, value,
183 EventParameterName()));
179 } else if (name == onresizeAttr) { 184 } else if (name == onresizeAttr) {
180 GetDocument().SetWindowAttributeEventListener( 185 GetDocument().SetWindowAttributeEventListener(
181 EventTypeNames::resize, 186 EventTypeNames::resize,
182 CreateAttributeEventListener(GetDocument().GetFrame(), name, value, 187 CreateAttributeEventListener(GetDocument().GetFrame(), name, value,
183 EventParameterName())); 188 EventParameterName()));
184 } else if (name == onscrollAttr) { 189 } else if (name == onscrollAttr) {
185 GetDocument().SetWindowAttributeEventListener( 190 GetDocument().SetWindowAttributeEventListener(
186 EventTypeNames::scroll, 191 EventTypeNames::scroll,
187 CreateAttributeEventListener(GetDocument().GetFrame(), name, value, 192 CreateAttributeEventListener(GetDocument().GetFrame(), name, value,
188 EventParameterName())); 193 EventParameterName()));
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 return backgroundAttr; 256 return backgroundAttr;
252 } 257 }
253 258
254 bool HTMLBodyElement::SupportsFocus() const { 259 bool HTMLBodyElement::SupportsFocus() const {
255 // This override is needed because the inherited method bails if the parent is 260 // This override is needed because the inherited method bails if the parent is
256 // editable. The <body> should be focusable even if <html> is editable. 261 // editable. The <body> should be focusable even if <html> is editable.
257 return HasEditableStyle(*this) || HTMLElement::SupportsFocus(); 262 return HasEditableStyle(*this) || HTMLElement::SupportsFocus();
258 } 263 }
259 264
260 } // namespace blink 265 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698