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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp

Issue 2775563002: getComputedStyle should not always force a layout inside shadow trees. (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | third_party/WebKit/Source/core/dom/Document.cpp » ('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) 2004 Zack Rusin <zack@kde.org> 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
7 * Copyright (C) 2011 Sencha, Inc. All rights reserved. 7 * Copyright (C) 2011 Sencha, Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public 10 * modify it under the terms of the GNU Lesser General Public
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 394
395 // The style recalc could have caused the styled node to be discarded or 395 // The style recalc could have caused the styled node to be discarded or
396 // replaced if it was a PseudoElement so we need to update it. 396 // replaced if it was a PseudoElement so we need to update it.
397 styledNode = this->styledNode(); 397 styledNode = this->styledNode();
398 LayoutObject* layoutObject = styledNode->layoutObject(); 398 LayoutObject* layoutObject = styledNode->layoutObject();
399 399
400 const ComputedStyle* style = computeComputedStyle(); 400 const ComputedStyle* style = computeComputedStyle();
401 401
402 bool forceFullLayout = 402 bool forceFullLayout =
403 isLayoutDependent(propertyID, style, layoutObject) || 403 isLayoutDependent(propertyID, style, layoutObject) ||
404 styledNode->isInShadowTree() ||
405 (document.localOwner() && 404 (document.localOwner() &&
406 document.styleEngine().hasViewportDependentMediaQueries()); 405 document.styleEngine().hasViewportDependentMediaQueries());
407 406
408 if (forceFullLayout) { 407 if (forceFullLayout) {
409 document.updateStyleAndLayoutIgnorePendingStylesheetsForNode(styledNode); 408 document.updateStyleAndLayoutIgnorePendingStylesheetsForNode(styledNode);
410 styledNode = this->styledNode(); 409 styledNode = this->styledNode();
411 style = computeComputedStyle(); 410 style = computeComputedStyle();
412 layoutObject = styledNode->layoutObject(); 411 layoutObject = styledNode->layoutObject();
413 } 412 }
414 413
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 "These styles are computed, and therefore the '" + 561 "These styles are computed, and therefore the '" +
563 getPropertyNameString(id) + "' property is read-only."); 562 getPropertyNameString(id) + "' property is read-only.");
564 } 563 }
565 564
566 DEFINE_TRACE(CSSComputedStyleDeclaration) { 565 DEFINE_TRACE(CSSComputedStyleDeclaration) {
567 visitor->trace(m_node); 566 visitor->trace(m_node);
568 CSSStyleDeclaration::trace(visitor); 567 CSSStyleDeclaration::trace(visitor);
569 } 568 }
570 569
571 } // namespace blink 570 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698