| 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 } |
| 342 |
| 343 void Internals::clearHitTestCache(Document* doc, ExceptionState& exceptionState)
const |
| 344 { |
| 345 if (!doc) { |
| 346 exceptionState.throwDOMException(InvalidAccessError, "Must supply docume
nt to check"); |
| 347 return; |
| 348 } |
| 349 |
| 350 if (!doc->layoutView()) |
| 351 return; |
| 352 |
| 353 doc->layoutView()->clearHitTestCache(); |
| 354 } |
| 320 | 355 |
| 321 bool Internals::isPreloaded(const String& url) | 356 bool Internals::isPreloaded(const String& url) |
| 322 { | 357 { |
| 323 Document* document = contextDocument(); | 358 Document* document = contextDocument(); |
| 324 return document->fetcher()->isPreloaded(document->completeURL(url)); | 359 return document->fetcher()->isPreloaded(document->completeURL(url)); |
| 325 } | 360 } |
| 326 | 361 |
| 327 bool Internals::isLoadingFromMemoryCache(const String& url) | 362 bool Internals::isLoadingFromMemoryCache(const String& url) |
| 328 { | 363 { |
| 329 if (!contextDocument()) | 364 if (!contextDocument()) |
| (...skipping 2034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2364 | 2399 |
| 2365 ClientRectList* Internals::focusRingRects(Element* element) | 2400 ClientRectList* Internals::focusRingRects(Element* element) |
| 2366 { | 2401 { |
| 2367 Vector<LayoutRect> rects; | 2402 Vector<LayoutRect> rects; |
| 2368 if (element && element->layoutObject()) | 2403 if (element && element->layoutObject()) |
| 2369 element->layoutObject()->addFocusRingRects(rects, LayoutPoint()); | 2404 element->layoutObject()->addFocusRingRects(rects, LayoutPoint()); |
| 2370 return ClientRectList::create(rects); | 2405 return ClientRectList::create(rects); |
| 2371 } | 2406 } |
| 2372 | 2407 |
| 2373 } // namespace blink | 2408 } // namespace blink |
| OLD | NEW |