| 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 } | |
| 355 | 320 |
| 356 bool Internals::isPreloaded(const String& url) | 321 bool Internals::isPreloaded(const String& url) |
| 357 { | 322 { |
| 358 Document* document = contextDocument(); | 323 Document* document = contextDocument(); |
| 359 return document->fetcher()->isPreloaded(document->completeURL(url)); | 324 return document->fetcher()->isPreloaded(document->completeURL(url)); |
| 360 } | 325 } |
| 361 | 326 |
| 362 bool Internals::isLoadingFromMemoryCache(const String& url) | 327 bool Internals::isLoadingFromMemoryCache(const String& url) |
| 363 { | 328 { |
| 364 if (!contextDocument()) | 329 if (!contextDocument()) |
| (...skipping 2051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2416 | 2381 |
| 2417 ClientRectList* Internals::focusRingRects(Element* element) | 2382 ClientRectList* Internals::focusRingRects(Element* element) |
| 2418 { | 2383 { |
| 2419 Vector<LayoutRect> rects; | 2384 Vector<LayoutRect> rects; |
| 2420 if (element && element->layoutObject()) | 2385 if (element && element->layoutObject()) |
| 2421 element->layoutObject()->addFocusRingRects(rects, LayoutPoint()); | 2386 element->layoutObject()->addFocusRingRects(rects, LayoutPoint()); |
| 2422 return ClientRectList::create(rects); | 2387 return ClientRectList::create(rects); |
| 2423 } | 2388 } |
| 2424 | 2389 |
| 2425 } // namespace blink | 2390 } // namespace blink |
| OLD | NEW |