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

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

Issue 284793003: Implement languagechange event, fired when accept languages changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase and add tests Created 6 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
« no previous file with comments | « Source/core/html/HTMLBodyElement.cpp ('k') | Source/core/page/Page.h » ('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, 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 else if (name == onscrollAttr) 138 else if (name == onscrollAttr)
139 document().setWindowAttributeEventListener(EventTypeNames::scroll, creat eAttributeEventListener(document().frame(), name, value)); 139 document().setWindowAttributeEventListener(EventTypeNames::scroll, creat eAttributeEventListener(document().frame(), name, value));
140 else if (name == onstorageAttr) 140 else if (name == onstorageAttr)
141 document().setWindowAttributeEventListener(EventTypeNames::storage, crea teAttributeEventListener(document().frame(), name, value)); 141 document().setWindowAttributeEventListener(EventTypeNames::storage, crea teAttributeEventListener(document().frame(), name, value));
142 else if (name == ononlineAttr) 142 else if (name == ononlineAttr)
143 document().setWindowAttributeEventListener(EventTypeNames::online, creat eAttributeEventListener(document().frame(), name, value)); 143 document().setWindowAttributeEventListener(EventTypeNames::online, creat eAttributeEventListener(document().frame(), name, value));
144 else if (name == onofflineAttr) 144 else if (name == onofflineAttr)
145 document().setWindowAttributeEventListener(EventTypeNames::offline, crea teAttributeEventListener(document().frame(), name, value)); 145 document().setWindowAttributeEventListener(EventTypeNames::offline, crea teAttributeEventListener(document().frame(), name, value));
146 else if (name == onpopstateAttr) 146 else if (name == onpopstateAttr)
147 document().setWindowAttributeEventListener(EventTypeNames::popstate, cre ateAttributeEventListener(document().frame(), name, value)); 147 document().setWindowAttributeEventListener(EventTypeNames::popstate, cre ateAttributeEventListener(document().frame(), name, value));
148 else if (name == onlanguagechangeAttr)
149 document().setWindowAttributeEventListener(EventTypeNames::languagechang e, createAttributeEventListener(document().frame(), name, value));
148 else 150 else
149 HTMLElement::parseAttribute(name, value); 151 HTMLElement::parseAttribute(name, value);
150 } 152 }
151 153
152 bool HTMLFrameSetElement::rendererIsNeeded(const RenderStyle& style) 154 bool HTMLFrameSetElement::rendererIsNeeded(const RenderStyle& style)
153 { 155 {
154 // For compatibility, frames render even when display: none is set. 156 // For compatibility, frames render even when display: none is set.
155 // However, we delay creating a renderer until stylesheets have loaded. 157 // However, we delay creating a renderer until stylesheets have loaded.
156 return style.isStyleAvailable(); 158 return style.isStyleAvailable();
157 } 159 }
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 Element* frameElement = children()->namedItem(name); 219 Element* frameElement = children()->namedItem(name);
218 if (!isHTMLFrameElement(frameElement)) 220 if (!isHTMLFrameElement(frameElement))
219 return 0; 221 return 0;
220 Document* document = toHTMLFrameElement(frameElement)->contentDocument(); 222 Document* document = toHTMLFrameElement(frameElement)->contentDocument();
221 if (!document || !document->frame()) 223 if (!document || !document->frame())
222 return 0; 224 return 0;
223 return document->domWindow(); 225 return document->domWindow();
224 } 226 }
225 227
226 } // namespace WebCore 228 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLBodyElement.cpp ('k') | Source/core/page/Page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698