OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 } | 302 } |
303 | 303 |
304 unsigned Internals::updateStyleAndReturnAffectedElementCount(ExceptionState& exc
eptionState) const | 304 unsigned Internals::updateStyleAndReturnAffectedElementCount(ExceptionState& exc
eptionState) const |
305 { | 305 { |
306 Document* document = contextDocument(); | 306 Document* document = contextDocument(); |
307 if (!document) { | 307 if (!document) { |
308 exceptionState.throwDOMException(InvalidAccessError, "No context documen
t is available."); | 308 exceptionState.throwDOMException(InvalidAccessError, "No context documen
t is available."); |
309 return 0; | 309 return 0; |
310 } | 310 } |
311 | 311 |
312 unsigned beforeCount = document->styleEngine().resolverAccessCount(); | 312 unsigned beforeCount = document->styleEngine().styleForElementCount(); |
313 document->updateLayoutTreeIfNeeded(); | 313 document->updateLayoutTreeIfNeeded(); |
314 return document->styleEngine().resolverAccessCount() - beforeCount; | 314 return document->styleEngine().styleForElementCount() - beforeCount; |
315 } | 315 } |
316 | 316 |
317 unsigned Internals::needsLayoutCount(ExceptionState& exceptionState) const | 317 unsigned Internals::needsLayoutCount(ExceptionState& exceptionState) const |
318 { | 318 { |
319 LocalFrame* contextFrame = frame(); | 319 LocalFrame* contextFrame = frame(); |
320 if (!contextFrame) { | 320 if (!contextFrame) { |
321 exceptionState.throwDOMException(InvalidAccessError, "No context frame i
s available."); | 321 exceptionState.throwDOMException(InvalidAccessError, "No context frame i
s available."); |
322 return 0; | 322 return 0; |
323 } | 323 } |
324 | 324 |
(...skipping 2240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2565 } | 2565 } |
2566 | 2566 |
2567 int Internals::getScrollAnimationState(Node* node) const | 2567 int Internals::getScrollAnimationState(Node* node) const |
2568 { | 2568 { |
2569 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) | 2569 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) |
2570 return static_cast<int>(scrollableArea->scrollAnimator().m_runState); | 2570 return static_cast<int>(scrollableArea->scrollAnimator().m_runState); |
2571 return -1; | 2571 return -1; |
2572 } | 2572 } |
2573 | 2573 |
2574 } // namespace blink | 2574 } // namespace blink |
OLD | NEW |