| 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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 320 |
| 321 bool Internals::isPreloaded(const String& url) | 321 bool Internals::isPreloaded(const String& url) |
| 322 { | 322 { |
| 323 Document* document = contextDocument(); | 323 return isPreloadedBy(url, contextDocument()); |
| 324 } |
| 325 |
| 326 bool Internals::isPreloadedBy(const String& url, Document* document) |
| 327 { |
| 328 if (!document) |
| 329 return false; |
| 324 return document->fetcher()->isPreloaded(document->completeURL(url)); | 330 return document->fetcher()->isPreloaded(document->completeURL(url)); |
| 325 } | 331 } |
| 326 | 332 |
| 327 bool Internals::isLoadingFromMemoryCache(const String& url) | 333 bool Internals::isLoadingFromMemoryCache(const String& url) |
| 328 { | 334 { |
| 329 if (!contextDocument()) | 335 if (!contextDocument()) |
| 330 return false; | 336 return false; |
| 331 const String cacheIdentifier = contextDocument()->fetcher()->getCacheIdentif
ier(); | 337 const String cacheIdentifier = contextDocument()->fetcher()->getCacheIdentif
ier(); |
| 332 Resource* resource = memoryCache()->resourceForURL(contextDocument()->comple
teURL(url), cacheIdentifier); | 338 Resource* resource = memoryCache()->resourceForURL(contextDocument()->comple
teURL(url), cacheIdentifier); |
| 333 return resource && resource->status() == Resource::Cached; | 339 return resource && resource->status() == Resource::Cached; |
| (...skipping 2047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2381 | 2387 |
| 2382 ClientRectList* Internals::focusRingRects(Element* element) | 2388 ClientRectList* Internals::focusRingRects(Element* element) |
| 2383 { | 2389 { |
| 2384 Vector<LayoutRect> rects; | 2390 Vector<LayoutRect> rects; |
| 2385 if (element && element->layoutObject()) | 2391 if (element && element->layoutObject()) |
| 2386 element->layoutObject()->addFocusRingRects(rects, LayoutPoint()); | 2392 element->layoutObject()->addFocusRingRects(rects, LayoutPoint()); |
| 2387 return ClientRectList::create(rects); | 2393 return ClientRectList::create(rects); |
| 2388 } | 2394 } |
| 2389 | 2395 |
| 2390 } // namespace blink | 2396 } // namespace blink |
| OLD | NEW |