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

Side by Side Diff: Source/core/dom/Element.h

Issue 15871005: Avoid N^2 walk placing renderers when building the render tree (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Adding a mitigation for the perf regression to Element::recalcStyle. Created 7 years, 5 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/dom/Document.cpp ('k') | Source/core/dom/Element.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) 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) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 Appl e Inc. All rights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 Appl e 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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 void cloneDataFromElement(const Element&); 425 void cloneDataFromElement(const Element&);
426 426
427 bool hasEquivalentAttributes(const Element* other) const; 427 bool hasEquivalentAttributes(const Element* other) const;
428 428
429 virtual void copyNonAttributePropertiesFromElement(const Element&) { } 429 virtual void copyNonAttributePropertiesFromElement(const Element&) { }
430 430
431 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; 431 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE;
432 virtual void detach(const AttachContext& = AttachContext()) OVERRIDE; 432 virtual void detach(const AttachContext& = AttachContext()) OVERRIDE;
433 virtual RenderObject* createRenderer(RenderStyle*); 433 virtual RenderObject* createRenderer(RenderStyle*);
434 virtual bool rendererIsNeeded(const NodeRenderingContext&); 434 virtual bool rendererIsNeeded(const NodeRenderingContext&);
435 void recalcStyle(StyleChange = NoChange); 435 void recalcStyle(StyleChange = NoChange, int childIndex = 0);
436 void didAffectSelector(AffectedSelectorMask); 436 void didAffectSelector(AffectedSelectorMask);
437 437
438 ElementShadow* shadow() const; 438 ElementShadow* shadow() const;
439 ElementShadow* ensureShadow(); 439 ElementShadow* ensureShadow();
440 PassRefPtr<ShadowRoot> createShadowRoot(ExceptionCode&); 440 PassRefPtr<ShadowRoot> createShadowRoot(ExceptionCode&);
441 ShadowRoot* shadowRoot() const; 441 ShadowRoot* shadowRoot() const;
442 void ensureDistribution(); 442 void ensureDistribution();
443 443
444 bool hasAuthorShadowRoot() const { return shadowRoot(); } 444 bool hasAuthorShadowRoot() const { return shadowRoot(); }
445 445
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 // W3C API 594 // W3C API
595 void webkitRequestFullscreen(); 595 void webkitRequestFullscreen();
596 596
597 bool isInTopLayer() const; 597 bool isInTopLayer() const;
598 void setIsInTopLayer(bool); 598 void setIsInTopLayer(bool);
599 599
600 void webkitRequestPointerLock(); 600 void webkitRequestPointerLock();
601 601
602 bool isSpellCheckingEnabled() const; 602 bool isSpellCheckingEnabled() const;
603 603
604 PassRefPtr<RenderStyle> styleForRenderer(); 604 PassRefPtr<RenderStyle> styleForRenderer(int childIndex = 0);
605 PassRefPtr<RenderStyle> originalStyleForRenderer(); 605 PassRefPtr<RenderStyle> originalStyleForRenderer(int childIndex = 0);
606 606
607 RenderRegion* renderRegion() const; 607 RenderRegion* renderRegion() const;
608 const AtomicString& webkitRegionOverset() const; 608 const AtomicString& webkitRegionOverset() const;
609 Vector<RefPtr<Range> > webkitGetRegionFlowRanges() const; 609 Vector<RefPtr<Range> > webkitGetRegionFlowRanges() const;
610 610
611 bool hasID() const; 611 bool hasID() const;
612 bool hasClass() const; 612 bool hasClass() const;
613 const SpaceSplitString& classNames() const; 613 const SpaceSplitString& classNames() const;
614 614
615 IntSize savedLayerScrollOffset() const; 615 IntSize savedLayerScrollOffset() const;
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
1055 1055
1056 inline const Attribute* ElementData::attributeItem(unsigned index) const 1056 inline const Attribute* ElementData::attributeItem(unsigned index) const
1057 { 1057 {
1058 RELEASE_ASSERT(index < length()); 1058 RELEASE_ASSERT(index < length());
1059 return attributeBase() + index; 1059 return attributeBase() + index;
1060 } 1060 }
1061 1061
1062 } // namespace 1062 } // namespace
1063 1063
1064 #endif 1064 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698