| 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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 unsigned Internals::hitTestCount(Document* doc, ExceptionState& exceptionState)
const | 310 unsigned Internals::hitTestCount(Document* doc, ExceptionState& exceptionState)
const |
| 311 { | 311 { |
| 312 if (!doc) { | 312 if (!doc) { |
| 313 exceptionState.throwDOMException(InvalidAccessError, "Must supply docume
nt to check"); | 313 exceptionState.throwDOMException(InvalidAccessError, "Must supply docume
nt to check"); |
| 314 return 0; | 314 return 0; |
| 315 } | 315 } |
| 316 | 316 |
| 317 return doc->layoutView()->hitTestCount(); | 317 return doc->layoutView()->hitTestCount(); |
| 318 } | 318 } |
| 319 | 319 |
| 320 unsigned Internals::hitTestCacheHits(Document* doc, ExceptionState& exceptionSta
te) const |
| 321 { |
| 322 if (!doc) { |
| 323 exceptionState.throwDOMException(InvalidAccessError, "Must supply docume
nt to check"); |
| 324 return 0; |
| 325 } |
| 326 |
| 327 return doc->layoutView()->hitTestCacheHits(); |
| 328 } |
| 329 |
| 330 Element* Internals::elementFromPointNoCache(Document* doc, double x, double y, E
xceptionState& exceptionState) const |
| 331 { |
| 332 if (!doc) { |
| 333 exceptionState.throwDOMException(InvalidAccessError, "Must supply docume
nt to check"); |
| 334 return 0; |
| 335 } |
| 336 |
| 337 if (!doc->layoutView()) |
| 338 return 0; |
| 339 |
| 340 return doc->elementFromPointNoCache(x, y); |
| 341 } |
| 320 | 342 |
| 321 bool Internals::isPreloaded(const String& url) | 343 bool Internals::isPreloaded(const String& url) |
| 322 { | 344 { |
| 323 Document* document = contextDocument(); | 345 Document* document = contextDocument(); |
| 324 return document->fetcher()->isPreloaded(document->completeURL(url)); | 346 return document->fetcher()->isPreloaded(document->completeURL(url)); |
| 325 } | 347 } |
| 326 | 348 |
| 327 bool Internals::isLoadingFromMemoryCache(const String& url) | 349 bool Internals::isLoadingFromMemoryCache(const String& url) |
| 328 { | 350 { |
| 329 if (!contextDocument()) | 351 if (!contextDocument()) |
| (...skipping 1983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2313 | 2335 |
| 2314 ClientRectList* Internals::focusRingRects(Element* element) | 2336 ClientRectList* Internals::focusRingRects(Element* element) |
| 2315 { | 2337 { |
| 2316 Vector<LayoutRect> rects; | 2338 Vector<LayoutRect> rects; |
| 2317 if (element && element->layoutObject()) | 2339 if (element && element->layoutObject()) |
| 2318 element->layoutObject()->addFocusRingRects(rects, LayoutPoint()); | 2340 element->layoutObject()->addFocusRingRects(rects, LayoutPoint()); |
| 2319 return ClientRectList::create(rects); | 2341 return ClientRectList::create(rects); |
| 2320 } | 2342 } |
| 2321 | 2343 |
| 2322 } // namespace blink | 2344 } // namespace blink |
| OLD | NEW |