| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 if (!loader) | 496 if (!loader) |
| 497 return; | 497 return; |
| 498 | 498 |
| 499 String content; | 499 String content; |
| 500 bool success = false; | 500 bool success = false; |
| 501 if (equalIgnoringFragmentIdentifier(kurl, loader->url())) | 501 if (equalIgnoringFragmentIdentifier(kurl, loader->url())) |
| 502 success = mainResourceContent(frame, false, &content); | 502 success = mainResourceContent(frame, false, &content); |
| 503 | 503 |
| 504 if (!success) { | 504 if (!success) { |
| 505 CachedResource* resource = cachedResource(frame, kurl); | 505 CachedResource* resource = cachedResource(frame, kurl); |
| 506 success = textContentForCachedResource(resource, &content); | 506 if (resource) |
| 507 success = textContentForCachedResource(resource, &content); |
| 507 } | 508 } |
| 508 | 509 |
| 509 if (!success) | 510 if (!success) |
| 510 return; | 511 return; |
| 511 | 512 |
| 512 *results = ContentSearchUtils::searchInTextByLines(query, content); | 513 *results = ContentSearchUtils::searchInTextByLines(query, content); |
| 513 } | 514 } |
| 514 | 515 |
| 515 static PassRefPtr<InspectorObject> buildObjectForSearchResult(const String& fram
eId, const String& url, int matchesCount) | 516 static PassRefPtr<InspectorObject> buildObjectForSearchResult(const String& fram
eId, const String& url, int matchesCount) |
| 516 { | 517 { |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 result->setArray("childFrames", childrenArray); | 681 result->setArray("childFrames", childrenArray); |
| 681 } | 682 } |
| 682 childrenArray->pushObject(buildObjectForFrameTree(child)); | 683 childrenArray->pushObject(buildObjectForFrameTree(child)); |
| 683 } | 684 } |
| 684 return result; | 685 return result; |
| 685 } | 686 } |
| 686 | 687 |
| 687 } // namespace WebCore | 688 } // namespace WebCore |
| 688 | 689 |
| 689 #endif // ENABLE(INSPECTOR) | 690 #endif // ENABLE(INSPECTOR) |
| OLD | NEW |