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

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

Issue 2623513005: Introduce Element::AttributeModificationParams (Closed)
Patch Set: Created 3 years, 11 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, 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 void HTMLFrameSetElement::collectStyleForPresentationAttribute( 63 void HTMLFrameSetElement::collectStyleForPresentationAttribute(
64 const QualifiedName& name, 64 const QualifiedName& name,
65 const AtomicString& value, 65 const AtomicString& value,
66 MutableStylePropertySet* style) { 66 MutableStylePropertySet* style) {
67 if (name == bordercolorAttr) 67 if (name == bordercolorAttr)
68 addHTMLColorToStyle(style, CSSPropertyBorderColor, value); 68 addHTMLColorToStyle(style, CSSPropertyBorderColor, value);
69 else 69 else
70 HTMLElement::collectStyleForPresentationAttribute(name, value, style); 70 HTMLElement::collectStyleForPresentationAttribute(name, value, style);
71 } 71 }
72 72
73 void HTMLFrameSetElement::parseAttribute(const QualifiedName& name, 73 void HTMLFrameSetElement::parseAttribute(
74 const AtomicString& oldValue, 74 const AttributeModificationParams& params) {
75 const AtomicString& value) { 75 const QualifiedName& name = params.name;
76 const AtomicString& value = params.newValue;
76 if (name == rowsAttr) { 77 if (name == rowsAttr) {
77 if (!value.isNull()) { 78 if (!value.isNull()) {
78 m_rowLengths = parseListOfDimensions(value.getString()); 79 m_rowLengths = parseListOfDimensions(value.getString());
79 setNeedsStyleRecalc(SubtreeStyleChange, 80 setNeedsStyleRecalc(SubtreeStyleChange,
80 StyleChangeReasonForTracing::fromAttribute(name)); 81 StyleChangeReasonForTracing::fromAttribute(name));
81 } 82 }
82 } else if (name == colsAttr) { 83 } else if (name == colsAttr) {
83 if (!value.isNull()) { 84 if (!value.isNull()) {
84 m_colLengths = parseListOfDimensions(value.getString()); 85 m_colLengths = parseListOfDimensions(value.getString());
85 setNeedsStyleRecalc(SubtreeStyleChange, 86 setNeedsStyleRecalc(SubtreeStyleChange,
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 document().setWindowAttributeEventListener( 205 document().setWindowAttributeEventListener(
205 EventTypeNames::popstate, 206 EventTypeNames::popstate,
206 createAttributeEventListener(document().frame(), name, value, 207 createAttributeEventListener(document().frame(), name, value,
207 eventParameterName())); 208 eventParameterName()));
208 } else if (name == onlanguagechangeAttr) { 209 } else if (name == onlanguagechangeAttr) {
209 document().setWindowAttributeEventListener( 210 document().setWindowAttributeEventListener(
210 EventTypeNames::languagechange, 211 EventTypeNames::languagechange,
211 createAttributeEventListener(document().frame(), name, value, 212 createAttributeEventListener(document().frame(), name, value,
212 eventParameterName())); 213 eventParameterName()));
213 } else { 214 } else {
214 HTMLElement::parseAttribute(name, oldValue, value); 215 HTMLElement::parseAttribute(params);
215 } 216 }
216 } 217 }
217 218
218 bool HTMLFrameSetElement::layoutObjectIsNeeded(const ComputedStyle& style) { 219 bool HTMLFrameSetElement::layoutObjectIsNeeded(const ComputedStyle& style) {
219 // For compatibility, frames layoutObject even when display: none is set. 220 // For compatibility, frames layoutObject even when display: none is set.
220 // However, we delay creating a layoutObject until stylesheets have loaded. 221 // However, we delay creating a layoutObject until stylesheets have loaded.
221 return style.isStyleAvailable(); 222 return style.isStyleAvailable();
222 } 223 }
223 224
224 LayoutObject* HTMLFrameSetElement::createLayoutObject( 225 LayoutObject* HTMLFrameSetElement::createLayoutObject(
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 Element* frameElement = children()->namedItem(name); 284 Element* frameElement = children()->namedItem(name);
284 if (!isHTMLFrameElement(frameElement)) 285 if (!isHTMLFrameElement(frameElement))
285 return nullptr; 286 return nullptr;
286 Document* document = toHTMLFrameElement(frameElement)->contentDocument(); 287 Document* document = toHTMLFrameElement(frameElement)->contentDocument();
287 if (!document || !document->frame()) 288 if (!document || !document->frame())
288 return nullptr; 289 return nullptr;
289 return document->domWindow(); 290 return document->domWindow();
290 } 291 }
291 292
292 } // namespace blink 293 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLFrameSetElement.h ('k') | third_party/WebKit/Source/core/html/HTMLIFrameElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698