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

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

Issue 48603002: Implement WindowEventHandlers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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/HTMLBodyElement.h ('k') | Source/core/html/HTMLBodyElement.idl » ('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) 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 else if (name == onerrorAttr) 135 else if (name == onerrorAttr)
136 document().setWindowAttributeEventListener(EventTypeNames::error, create AttributeEventListener(document().frame(), name, value)); 136 document().setWindowAttributeEventListener(EventTypeNames::error, create AttributeEventListener(document().frame(), name, value));
137 else if (name == onfocusAttr) 137 else if (name == onfocusAttr)
138 document().setWindowAttributeEventListener(EventTypeNames::focus, create AttributeEventListener(document().frame(), name, value)); 138 document().setWindowAttributeEventListener(EventTypeNames::focus, create AttributeEventListener(document().frame(), name, value));
139 #if ENABLE(ORIENTATION_EVENTS) 139 #if ENABLE(ORIENTATION_EVENTS)
140 else if (name == onorientationchangeAttr) 140 else if (name == onorientationchangeAttr)
141 document().setWindowAttributeEventListener(EventTypeNames::orientationch ange, createAttributeEventListener(document().frame(), name, value)); 141 document().setWindowAttributeEventListener(EventTypeNames::orientationch ange, createAttributeEventListener(document().frame(), name, value));
142 #endif 142 #endif
143 else if (name == onhashchangeAttr) 143 else if (name == onhashchangeAttr)
144 document().setWindowAttributeEventListener(EventTypeNames::hashchange, c reateAttributeEventListener(document().frame(), name, value)); 144 document().setWindowAttributeEventListener(EventTypeNames::hashchange, c reateAttributeEventListener(document().frame(), name, value));
145 else if (name == onmessageAttr)
146 document().setWindowAttributeEventListener(EventTypeNames::message, crea teAttributeEventListener(document().frame(), name, value));
145 else if (name == onresizeAttr) 147 else if (name == onresizeAttr)
146 document().setWindowAttributeEventListener(EventTypeNames::resize, creat eAttributeEventListener(document().frame(), name, value)); 148 document().setWindowAttributeEventListener(EventTypeNames::resize, creat eAttributeEventListener(document().frame(), name, value));
147 else if (name == onscrollAttr) 149 else if (name == onscrollAttr)
148 document().setWindowAttributeEventListener(EventTypeNames::scroll, creat eAttributeEventListener(document().frame(), name, value)); 150 document().setWindowAttributeEventListener(EventTypeNames::scroll, creat eAttributeEventListener(document().frame(), name, value));
149 else if (name == onselectionchangeAttr) 151 else if (name == onselectionchangeAttr)
150 document().setAttributeEventListener(EventTypeNames::selectionchange, cr eateAttributeEventListener(document().frame(), name, value)); 152 document().setAttributeEventListener(EventTypeNames::selectionchange, cr eateAttributeEventListener(document().frame(), name, value));
151 else if (name == onstorageAttr) 153 else if (name == onstorageAttr)
152 document().setWindowAttributeEventListener(EventTypeNames::storage, crea teAttributeEventListener(document().frame(), name, value)); 154 document().setWindowAttributeEventListener(EventTypeNames::storage, crea teAttributeEventListener(document().frame(), name, value));
153 else if (name == ononlineAttr) 155 else if (name == ononlineAttr)
154 document().setWindowAttributeEventListener(EventTypeNames::online, creat eAttributeEventListener(document().frame(), name, value)); 156 document().setWindowAttributeEventListener(EventTypeNames::online, creat eAttributeEventListener(document().frame(), name, value));
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 } 290 }
289 291
290 void HTMLBodyElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const 292 void HTMLBodyElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const
291 { 293 {
292 HTMLElement::addSubresourceAttributeURLs(urls); 294 HTMLElement::addSubresourceAttributeURLs(urls);
293 295
294 addSubresourceURL(urls, document().completeURL(getAttribute(backgroundAttr)) ); 296 addSubresourceURL(urls, document().completeURL(getAttribute(backgroundAttr)) );
295 } 297 }
296 298
297 } // namespace WebCore 299 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLBodyElement.h ('k') | Source/core/html/HTMLBodyElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698