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

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

Issue 1942623002: Rename Document::ownerElement to localOwner and fix main frame checks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed const changes and some gratuitous checks Created 4 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 | « no previous file | third_party/WebKit/Source/core/dom/Document.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) 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. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. 6 * Copyright (C) 2011 Sencha, 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 Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 545
546 // The style recalc could have caused the styled node to be discarded or rep laced 546 // The style recalc could have caused the styled node to be discarded or rep laced
547 // if it was a PseudoElement so we need to update it. 547 // if it was a PseudoElement so we need to update it.
548 styledNode = this->styledNode(); 548 styledNode = this->styledNode();
549 LayoutObject* layoutObject = styledNode->layoutObject(); 549 LayoutObject* layoutObject = styledNode->layoutObject();
550 550
551 const ComputedStyle* style = computeComputedStyle(); 551 const ComputedStyle* style = computeComputedStyle();
552 552
553 bool forceFullLayout = isLayoutDependent(propertyID, style, layoutObject) 553 bool forceFullLayout = isLayoutDependent(propertyID, style, layoutObject)
554 || styledNode->isInShadowTree() 554 || styledNode->isInShadowTree()
555 || (document.ownerElement() && document.ensureStyleResolver().hasViewpor tDependentMediaQueries()); 555 || (document.localOwner() && document.ensureStyleResolver().hasViewportD ependentMediaQueries());
556 556
557 if (forceFullLayout) { 557 if (forceFullLayout) {
558 document.updateLayoutIgnorePendingStylesheetsForNode(styledNode); 558 document.updateLayoutIgnorePendingStylesheetsForNode(styledNode);
559 styledNode = this->styledNode(); 559 styledNode = this->styledNode();
560 style = computeComputedStyle(); 560 style = computeComputedStyle();
561 layoutObject = styledNode->layoutObject(); 561 layoutObject = styledNode->layoutObject();
562 } 562 }
563 563
564 if (!style) 564 if (!style)
565 return nullptr; 565 return nullptr;
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 exceptionState.throwDOMException(NoModificationAllowedError, "These styles a re computed, and therefore the '" + getPropertyNameString(id) + "' property is r ead-only."); 692 exceptionState.throwDOMException(NoModificationAllowedError, "These styles a re computed, and therefore the '" + getPropertyNameString(id) + "' property is r ead-only.");
693 } 693 }
694 694
695 DEFINE_TRACE(CSSComputedStyleDeclaration) 695 DEFINE_TRACE(CSSComputedStyleDeclaration)
696 { 696 {
697 visitor->trace(m_node); 697 visitor->trace(m_node);
698 CSSStyleDeclaration::trace(visitor); 698 CSSStyleDeclaration::trace(visitor);
699 } 699 }
700 700
701 } // namespace blink 701 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698