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

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

Issue 2336693002: Rendering text to a canvas in a frame-less document. (Closed)
Patch Set: Created 4 years, 3 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 2865 matching lines...) Expand 10 before | Expand all | Expand 10 after
2876 if (!hasRareData() && size == defaultMinimumSizeForResizing()) 2876 if (!hasRareData() && size == defaultMinimumSizeForResizing())
2877 return; 2877 return;
2878 ensureElementRareData().setMinimumSizeForResizing(size); 2878 ensureElementRareData().setMinimumSizeForResizing(size);
2879 } 2879 }
2880 2880
2881 const ComputedStyle* Element::ensureComputedStyle(PseudoId pseudoElementSpecifie r) 2881 const ComputedStyle* Element::ensureComputedStyle(PseudoId pseudoElementSpecifie r)
2882 { 2882 {
2883 if (PseudoElement* element = pseudoElement(pseudoElementSpecifier)) 2883 if (PseudoElement* element = pseudoElement(pseudoElementSpecifier))
2884 return element->ensureComputedStyle(); 2884 return element->ensureComputedStyle();
2885 2885
2886 if (!inActiveDocument()) { 2886 if (!inActiveDocument() && document().frame()) {
2887 // FIXME: Try to do better than this. Ensure that styleForElement() work s for elements that are not in the 2887 // FIXME: Try to do better than this. Ensure that styleForElement() work s for elements that are not in the
2888 // document tree and figure out when to destroy the computed style for s uch elements. 2888 // document tree and figure out when to destroy the computed style for s uch elements.
2889 return nullptr; 2889 return nullptr;
2890 } 2890 }
2891 2891
2892 // FIXME: Find and use the layoutObject from the pseudo element instead of t he actual element so that the 'length' 2892 // FIXME: Find and use the layoutObject from the pseudo element instead of t he actual element so that the 'length'
2893 // properties, which are only known by the layoutObject because it did the l ayout, will be correct and so that the 2893 // properties, which are only known by the layoutObject because it did the l ayout, will be correct and so that the
2894 // values returned for the ":selection" pseudo-element will be correct. 2894 // values returned for the ":selection" pseudo-element will be correct.
2895 ComputedStyle* elementStyle = mutableComputedStyle(); 2895 ComputedStyle* elementStyle = mutableComputedStyle();
2896 if (!elementStyle) { 2896 if (!elementStyle) {
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after
3822 3822
3823 DEFINE_TRACE_WRAPPERS(Element) 3823 DEFINE_TRACE_WRAPPERS(Element)
3824 { 3824 {
3825 if (hasRareData()) { 3825 if (hasRareData()) {
3826 visitor->traceWrappers(elementRareData()); 3826 visitor->traceWrappers(elementRareData());
3827 } 3827 }
3828 ContainerNode::traceWrappers(visitor); 3828 ContainerNode::traceWrappers(visitor);
3829 } 3829 }
3830 3830
3831 } // namespace blink 3831 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698