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

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

Issue 521603002: Do not use SubtreeStyleChange for reattachment of plugin renderers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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 Stefan Schimanski (1Stein@gmx.de) 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 } else if (name == dataAttr) { 250 } else if (name == dataAttr) {
251 needsInvalidation = !fastHasAttribute(classidAttr); 251 needsInvalidation = !fastHasAttribute(classidAttr);
252 } else if (name == classidAttr) { 252 } else if (name == classidAttr) {
253 needsInvalidation = true; 253 needsInvalidation = true;
254 } else { 254 } else {
255 ASSERT_NOT_REACHED(); 255 ASSERT_NOT_REACHED();
256 needsInvalidation = false; 256 needsInvalidation = false;
257 } 257 }
258 setNeedsWidgetUpdate(true); 258 setNeedsWidgetUpdate(true);
259 if (needsInvalidation) 259 if (needsInvalidation)
260 setNeedsStyleRecalc(SubtreeStyleChange); 260 triggerReattachThroughStyleRecalcHack();
261 } 261 }
262 262
263 // FIXME: This should be unified with HTMLEmbedElement::updateWidget and 263 // FIXME: This should be unified with HTMLEmbedElement::updateWidget and
264 // moved down into HTMLPluginElement.cpp 264 // moved down into HTMLPluginElement.cpp
265 void HTMLObjectElement::updateWidgetInternal() 265 void HTMLObjectElement::updateWidgetInternal()
266 { 266 {
267 ASSERT(!renderEmbeddedObject()->showsUnavailablePluginIndicator()); 267 ASSERT(!renderEmbeddedObject()->showsUnavailablePluginIndicator());
268 ASSERT(needsWidgetUpdate()); 268 ASSERT(needsWidgetUpdate());
269 setNeedsWidgetUpdate(false); 269 setNeedsWidgetUpdate(false);
270 // FIXME: This should ASSERT isFinishedParsingChildren() instead. 270 // FIXME: This should ASSERT isFinishedParsingChildren() instead.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 void HTMLObjectElement::removedFrom(ContainerNode* insertionPoint) 325 void HTMLObjectElement::removedFrom(ContainerNode* insertionPoint)
326 { 326 {
327 HTMLPlugInElement::removedFrom(insertionPoint); 327 HTMLPlugInElement::removedFrom(insertionPoint);
328 FormAssociatedElement::removedFrom(insertionPoint); 328 FormAssociatedElement::removedFrom(insertionPoint);
329 } 329 }
330 330
331 void HTMLObjectElement::childrenChanged(const ChildrenChange& change) 331 void HTMLObjectElement::childrenChanged(const ChildrenChange& change)
332 { 332 {
333 if (inDocument() && !useFallbackContent()) { 333 if (inDocument() && !useFallbackContent()) {
334 setNeedsWidgetUpdate(true); 334 setNeedsWidgetUpdate(true);
335 setNeedsStyleRecalc(SubtreeStyleChange); 335 triggerReattachThroughStyleRecalcHack();
336 } 336 }
337 HTMLPlugInElement::childrenChanged(change); 337 HTMLPlugInElement::childrenChanged(change);
338 } 338 }
339 339
340 bool HTMLObjectElement::isURLAttribute(const Attribute& attribute) const 340 bool HTMLObjectElement::isURLAttribute(const Attribute& attribute) const
341 { 341 {
342 return attribute.name() == codebaseAttr || attribute.name() == dataAttr 342 return attribute.name() == codebaseAttr || attribute.name() == dataAttr
343 || (attribute.name() == usemapAttr && attribute.value().string()[0] != ' #') 343 || (attribute.name() == usemapAttr && attribute.value().string()[0] != ' #')
344 || HTMLPlugInElement::isURLAttribute(attribute); 344 || HTMLPlugInElement::isURLAttribute(attribute);
345 } 345 }
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 { 458 {
459 return fastHasAttribute(usemapAttr); 459 return fastHasAttribute(usemapAttr);
460 } 460 }
461 461
462 bool HTMLObjectElement::useFallbackContent() const 462 bool HTMLObjectElement::useFallbackContent() const
463 { 463 {
464 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent; 464 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent;
465 } 465 }
466 466
467 } 467 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698