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

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

Issue 1104243003: Oilpan: put ClientRect(List) on the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove transition types uses also Created 5 years, 8 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) 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 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 if (quads.isEmpty()) 966 if (quads.isEmpty())
967 return IntRect(); 967 return IntRect();
968 968
969 IntRect result = quads[0].enclosingBoundingBox(); 969 IntRect result = quads[0].enclosingBoundingBox();
970 for (size_t i = 1; i < quads.size(); ++i) 970 for (size_t i = 1; i < quads.size(); ++i)
971 result.unite(quads[i].enclosingBoundingBox()); 971 result.unite(quads[i].enclosingBoundingBox());
972 972
973 return view->soonToBeRemovedContentsToUnscaledViewport(result); 973 return view->soonToBeRemovedContentsToUnscaledViewport(result);
974 } 974 }
975 975
976 PassRefPtrWillBeRawPtr<ClientRectList> Element::getClientRects() 976 ClientRectList* Element::getClientRects()
977 { 977 {
978 document().updateLayoutIgnorePendingStylesheets(); 978 document().updateLayoutIgnorePendingStylesheets();
979 979
980 LayoutObject* elementRenderer = layoutObject(); 980 LayoutObject* elementRenderer = layoutObject();
981 if (!elementRenderer || (!elementRenderer->isBoxModelObject() && !elementRen derer->isBR())) 981 if (!elementRenderer || (!elementRenderer->isBoxModelObject() && !elementRen derer->isBR()))
982 return ClientRectList::create(); 982 return ClientRectList::create();
983 983
984 // FIXME: Handle SVG elements. 984 // FIXME: Handle SVG elements.
985 // FIXME: Handle table/inline-table with a caption. 985 // FIXME: Handle table/inline-table with a caption.
986 986
987 Vector<FloatQuad> quads; 987 Vector<FloatQuad> quads;
988 elementRenderer->absoluteQuads(quads); 988 elementRenderer->absoluteQuads(quads);
989 document().adjustFloatQuadsForScrollAndAbsoluteZoom(quads, *elementRenderer) ; 989 document().adjustFloatQuadsForScrollAndAbsoluteZoom(quads, *elementRenderer) ;
990 return ClientRectList::create(quads); 990 return ClientRectList::create(quads);
991 } 991 }
992 992
993 PassRefPtrWillBeRawPtr<ClientRect> Element::getBoundingClientRect() 993 ClientRect* Element::getBoundingClientRect()
994 { 994 {
995 document().updateLayoutIgnorePendingStylesheets(); 995 document().updateLayoutIgnorePendingStylesheets();
996 996
997 Vector<FloatQuad> quads; 997 Vector<FloatQuad> quads;
998 LayoutObject* elementRenderer = layoutObject(); 998 LayoutObject* elementRenderer = layoutObject();
999 if (elementRenderer) { 999 if (elementRenderer) {
1000 if (isSVGElement() && !elementRenderer->isSVGRoot()) { 1000 if (isSVGElement() && !elementRenderer->isSVGRoot()) {
1001 // Get the bounding rectangle from the SVG model. 1001 // Get the bounding rectangle from the SVG model.
1002 SVGElement* svgElement = toSVGElement(this); 1002 SVGElement* svgElement = toSVGElement(this);
1003 FloatRect localRect; 1003 FloatRect localRect;
(...skipping 2508 matching lines...) Expand 10 before | Expand all | Expand 10 after
3512 { 3512 {
3513 #if ENABLE(OILPAN) 3513 #if ENABLE(OILPAN)
3514 if (hasRareData()) 3514 if (hasRareData())
3515 visitor->trace(elementRareData()); 3515 visitor->trace(elementRareData());
3516 visitor->trace(m_elementData); 3516 visitor->trace(m_elementData);
3517 #endif 3517 #endif
3518 ContainerNode::trace(visitor); 3518 ContainerNode::trace(visitor);
3519 } 3519 }
3520 3520
3521 } // namespace blink 3521 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698