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

Side by Side Diff: sky/engine/core/dom/Element.cpp

Issue 710733004: Remove resizing code from ElementRareData. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/core/dom/Element.h ('k') | sky/engine/core/dom/ElementRareData.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) 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 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after
1386 for (Node* child = firstTextNode; child; child = child->nextSibling()) { 1386 for (Node* child = firstTextNode; child; child = child->nextSibling()) {
1387 if (!child->isTextNode()) 1387 if (!child->isTextNode())
1388 continue; 1388 continue;
1389 content.append(toText(child)->data()); 1389 content.append(toText(child)->data());
1390 } 1390 }
1391 1391
1392 ASSERT(content.length() == totalLength); 1392 ASSERT(content.length() == totalLength);
1393 return content.toString(); 1393 return content.toString();
1394 } 1394 }
1395 1395
1396 LayoutSize Element::minimumSizeForResizing() const
1397 {
1398 return hasRareData() ? elementRareData()->minimumSizeForResizing() : default MinimumSizeForResizing();
1399 }
1400
1401 void Element::setMinimumSizeForResizing(const LayoutSize& size)
1402 {
1403 if (!hasRareData() && size == defaultMinimumSizeForResizing())
1404 return;
1405 ensureElementRareData().setMinimumSizeForResizing(size);
1406 }
1407
1408 // FIXME(sky): Remove pseudoElementSpecifier. 1396 // FIXME(sky): Remove pseudoElementSpecifier.
1409 RenderStyle* Element::computedStyle(PseudoId pseudoElementSpecifier) 1397 RenderStyle* Element::computedStyle(PseudoId pseudoElementSpecifier)
1410 { 1398 {
1411 // FIXME: Find and use the renderer from the pseudo element instead of the a ctual element so that the 'length' 1399 // FIXME: Find and use the renderer from the pseudo element instead of the a ctual element so that the 'length'
1412 // properties, which are only known by the renderer because it did the layou t, will be correct and so that the 1400 // properties, which are only known by the renderer because it did the layou t, will be correct and so that the
1413 // values returned for the ":selection" pseudo-element will be correct. 1401 // values returned for the ":selection" pseudo-element will be correct.
1414 if (RenderStyle* usedStyle = renderStyle()) 1402 if (RenderStyle* usedStyle = renderStyle())
1415 return usedStyle; 1403 return usedStyle;
1416 1404
1417 if (!inActiveDocument()) 1405 if (!inActiveDocument())
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
1854 return false; 1842 return false;
1855 // Turn off style sharing for elements that can gain layers for reasons outs ide of the style system. 1843 // Turn off style sharing for elements that can gain layers for reasons outs ide of the style system.
1856 // See comments in RenderObject::setStyle(). 1844 // See comments in RenderObject::setStyle().
1857 // FIXME: Why does gaining a layer from outside the style system require dis abling sharing? 1845 // FIXME: Why does gaining a layer from outside the style system require dis abling sharing?
1858 if (isHTMLCanvasElement(*this)) 1846 if (isHTMLCanvasElement(*this))
1859 return false; 1847 return false;
1860 return true; 1848 return true;
1861 } 1849 }
1862 1850
1863 } // namespace blink 1851 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/dom/Element.h ('k') | sky/engine/core/dom/ElementRareData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698