Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 2539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2550 } | 2550 } |
| 2551 | 2551 |
| 2552 RenderRegion* Element::renderRegion() const | 2552 RenderRegion* Element::renderRegion() const |
| 2553 { | 2553 { |
| 2554 if (renderer() && renderer()->isRenderRegion()) | 2554 if (renderer() && renderer()->isRenderRegion()) |
| 2555 return toRenderRegion(renderer()); | 2555 return toRenderRegion(renderer()); |
| 2556 | 2556 |
| 2557 return 0; | 2557 return 0; |
| 2558 } | 2558 } |
| 2559 | 2559 |
| 2560 bool Element::moveToFlowThreadIsNeeded(RefPtr<RenderStyle>& cachedStyle) | |
|
Julien - ping for review
2013/05/09 15:30:18
I don't see a good reason why this isn't const as
Mihai Maerean
2013/05/09 16:25:55
styleForRenderer not being const (as you might exp
| |
| 2561 { | |
| 2562 Document* doc = document(); | |
| 2563 | |
| 2564 if (!RuntimeEnabledFeatures::cssRegionsEnabled()) | |
| 2565 return false; | |
| 2566 | |
| 2567 if (doc->webkitIsFullScreen() && doc->webkitCurrentFullScreenElement() == th is) | |
| 2568 return false; | |
| 2569 | |
| 2570 if (isInShadowTree()) | |
| 2571 return false; | |
| 2572 | |
| 2573 if (!cachedStyle) | |
| 2574 cachedStyle = styleForRenderer(); | |
|
Julien - ping for review
2013/05/09 15:30:18
It smells very bad to have this function fill the
Mihai Maerean
2013/05/09 16:25:55
Calling styleForRenderer is very slow, so caching
Julien - ping for review
2013/05/10 00:13:05
You are missing the point. That we do need to cach
| |
| 2575 if (!cachedStyle) | |
| 2576 return false; | |
| 2577 | |
| 2578 if (cachedStyle->flowThread().isEmpty()) | |
| 2579 return false; | |
| 2580 | |
| 2581 return !document()->renderView()->flowThreadController()->isContentNodeRegis teredWithAnyNamedFlow(this); | |
|
Julien - ping for review
2013/05/09 15:30:18
Is it possible for the document not to be attached
Mihai Maerean
2013/05/09 16:25:55
I don't know. How can we tell?
moveToFlowThreadIsN
| |
| 2582 } | |
| 2583 | |
| 2560 const AtomicString& Element::webkitRegionOverset() const | 2584 const AtomicString& Element::webkitRegionOverset() const |
| 2561 { | 2585 { |
| 2562 document()->updateLayoutIgnorePendingStylesheets(); | 2586 document()->updateLayoutIgnorePendingStylesheets(); |
| 2563 | 2587 |
| 2564 DEFINE_STATIC_LOCAL(AtomicString, undefinedState, ("undefined", AtomicString ::ConstructFromLiteral)); | 2588 DEFINE_STATIC_LOCAL(AtomicString, undefinedState, ("undefined", AtomicString ::ConstructFromLiteral)); |
| 2565 if (!RuntimeEnabledFeatures::cssRegionsEnabled() || !renderRegion()) | 2589 if (!RuntimeEnabledFeatures::cssRegionsEnabled() || !renderRegion()) |
| 2566 return undefinedState; | 2590 return undefinedState; |
| 2567 | 2591 |
| 2568 switch (renderRegion()->regionState()) { | 2592 switch (renderRegion()->regionState()) { |
| 2569 case RenderRegion::RegionFit: { | 2593 case RenderRegion::RegionFit: { |
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3142 return 0; | 3166 return 0; |
| 3143 } | 3167 } |
| 3144 | 3168 |
| 3145 Attribute* UniqueElementData::attributeItem(unsigned index) | 3169 Attribute* UniqueElementData::attributeItem(unsigned index) |
| 3146 { | 3170 { |
| 3147 ASSERT_WITH_SECURITY_IMPLICATION(index < length()); | 3171 ASSERT_WITH_SECURITY_IMPLICATION(index < length()); |
| 3148 return &m_attributeVector.at(index); | 3172 return &m_attributeVector.at(index); |
| 3149 } | 3173 } |
| 3150 | 3174 |
| 3151 } // namespace WebCore | 3175 } // namespace WebCore |
| OLD | NEW |