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

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

Issue 48303003: Handle the onerror content attribute for <body> and <frameset> (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.cpp ('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) 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, 2009, 2010 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2006, 2009, 2010 Apple Inc. All rights reserved.
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } else if (name == bordercolorAttr) 111 } else if (name == bordercolorAttr)
112 m_borderColorSet = !value.isEmpty(); 112 m_borderColorSet = !value.isEmpty();
113 else if (name == onloadAttr) 113 else if (name == onloadAttr)
114 document().setWindowAttributeEventListener(EventTypeNames::load, createA ttributeEventListener(document().frame(), name, value)); 114 document().setWindowAttributeEventListener(EventTypeNames::load, createA ttributeEventListener(document().frame(), name, value));
115 else if (name == onbeforeunloadAttr) 115 else if (name == onbeforeunloadAttr)
116 document().setWindowAttributeEventListener(EventTypeNames::beforeunload, createAttributeEventListener(document().frame(), name, value)); 116 document().setWindowAttributeEventListener(EventTypeNames::beforeunload, createAttributeEventListener(document().frame(), name, value));
117 else if (name == onunloadAttr) 117 else if (name == onunloadAttr)
118 document().setWindowAttributeEventListener(EventTypeNames::unload, creat eAttributeEventListener(document().frame(), name, value)); 118 document().setWindowAttributeEventListener(EventTypeNames::unload, creat eAttributeEventListener(document().frame(), name, value));
119 else if (name == onblurAttr) 119 else if (name == onblurAttr)
120 document().setWindowAttributeEventListener(EventTypeNames::blur, createA ttributeEventListener(document().frame(), name, value)); 120 document().setWindowAttributeEventListener(EventTypeNames::blur, createA ttributeEventListener(document().frame(), name, value));
121 else if (name == onerrorAttr)
122 document().setWindowAttributeEventListener(EventTypeNames::error, create AttributeEventListener(document().frame(), name, value));
121 else if (name == onfocusAttr) 123 else if (name == onfocusAttr)
122 document().setWindowAttributeEventListener(EventTypeNames::focus, create AttributeEventListener(document().frame(), name, value)); 124 document().setWindowAttributeEventListener(EventTypeNames::focus, create AttributeEventListener(document().frame(), name, value));
123 else if (name == onfocusinAttr) 125 else if (name == onfocusinAttr)
124 document().setWindowAttributeEventListener(EventTypeNames::focusin, crea teAttributeEventListener(document().frame(), name, value)); 126 document().setWindowAttributeEventListener(EventTypeNames::focusin, crea teAttributeEventListener(document().frame(), name, value));
125 else if (name == onfocusoutAttr) 127 else if (name == onfocusoutAttr)
126 document().setWindowAttributeEventListener(EventTypeNames::focusout, cre ateAttributeEventListener(document().frame(), name, value)); 128 document().setWindowAttributeEventListener(EventTypeNames::focusout, cre ateAttributeEventListener(document().frame(), name, value));
127 #if ENABLE(ORIENTATION_EVENTS) 129 #if ENABLE(ORIENTATION_EVENTS)
128 else if (name == onorientationchangeAttr) 130 else if (name == onorientationchangeAttr)
129 document().setWindowAttributeEventListener(EventTypeNames::orientationch ange, createAttributeEventListener(document().frame(), name, value)); 131 document().setWindowAttributeEventListener(EventTypeNames::orientationch ange, createAttributeEventListener(document().frame(), name, value));
130 #endif 132 #endif
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 Node* frameNode = children()->namedItem(name); 220 Node* frameNode = children()->namedItem(name);
219 if (!frameNode || !frameNode->hasTagName(HTMLNames::frameTag)) 221 if (!frameNode || !frameNode->hasTagName(HTMLNames::frameTag))
220 return 0; 222 return 0;
221 Document* document = toHTMLFrameElement(frameNode)->contentDocument(); 223 Document* document = toHTMLFrameElement(frameNode)->contentDocument();
222 if (!document || !document->frame()) 224 if (!document || !document->frame())
223 return 0; 225 return 0;
224 return document->domWindow(); 226 return document->domWindow();
225 } 227 }
226 228
227 } // namespace WebCore 229 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLBodyElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698