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 2479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2490 } | 2490 } |
| 2491 | 2491 |
| 2492 String Element::innerText() | 2492 String Element::innerText() |
| 2493 { | 2493 { |
| 2494 // We need to update layout, since plainText uses line boxes in the layout t ree. | 2494 // We need to update layout, since plainText uses line boxes in the layout t ree. |
| 2495 document().updateLayoutIgnorePendingStylesheets(); | 2495 document().updateLayoutIgnorePendingStylesheets(); |
| 2496 | 2496 |
| 2497 if (!layoutObject()) | 2497 if (!layoutObject()) |
| 2498 return textContent(true); | 2498 return textContent(true); |
| 2499 | 2499 |
| 2500 return plainText(Position(this, Position::PositionIsBeforeChildren), Positio n(this, Position::PositionIsAfterChildren)); | 2500 return plainText(Position(this, Position::PositionIsBeforeChildren), Positio n(this, Position::PositionIsAfterChildren), TextIteratorForInnerText); |
|
yoichio
2015/07/02 06:28:39
Why do't you call UseCounter::count here directly?
yosin_UTC9
2015/07/02 06:40:29
I would like to count only if |plainText()| handle
yoichio
2015/07/02 07:10:32
Can't we check that here?
yosin_UTC9
2015/07/02 08:08:31
Yes, we can. But, we need to traverse tree here. W
| |
| 2501 } | 2501 } |
| 2502 | 2502 |
| 2503 String Element::outerText() | 2503 String Element::outerText() |
| 2504 { | 2504 { |
| 2505 // Getting outerText is the same as getting innerText, only | 2505 // Getting outerText is the same as getting innerText, only |
| 2506 // setting is different. You would think this should get the plain | 2506 // setting is different. You would think this should get the plain |
| 2507 // text for the outer range, but this is wrong, <br> for instance | 2507 // text for the outer range, but this is wrong, <br> for instance |
| 2508 // would return different values for inner and outer text by such | 2508 // would return different values for inner and outer text by such |
| 2509 // a rule, but it doesn't in WinIE, and we want to match that. | 2509 // a rule, but it doesn't in WinIE, and we want to match that. |
| 2510 return innerText(); | 2510 return innerText(); |
| (...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3429 { | 3429 { |
| 3430 #if ENABLE(OILPAN) | 3430 #if ENABLE(OILPAN) |
| 3431 if (hasRareData()) | 3431 if (hasRareData()) |
| 3432 visitor->trace(elementRareData()); | 3432 visitor->trace(elementRareData()); |
| 3433 visitor->trace(m_elementData); | 3433 visitor->trace(m_elementData); |
| 3434 #endif | 3434 #endif |
| 3435 ContainerNode::trace(visitor); | 3435 ContainerNode::trace(visitor); |
| 3436 } | 3436 } |
| 3437 | 3437 |
| 3438 } // namespace blink | 3438 } // namespace blink |
| OLD | NEW |