Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: Source/web/WebFrameImpl.cpp

Issue 22417002: Rename ASSERT_NO_EXCEPTION_STATE and IGNORE_EXCEPTION_STATE (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/web/ContextMenuClientImpl.cpp ('k') | Source/web/WebRange.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 return fromFrame(frame()->tree()->child(name)); 702 return fromFrame(frame()->tree()->child(name));
703 } 703 }
704 704
705 WebFrame* WebFrameImpl::findChildByExpression(const WebString& xpath) const 705 WebFrame* WebFrameImpl::findChildByExpression(const WebString& xpath) const
706 { 706 {
707 if (xpath.isEmpty()) 707 if (xpath.isEmpty())
708 return 0; 708 return 0;
709 709
710 Document* document = frame()->document(); 710 Document* document = frame()->document();
711 711
712 RefPtr<XPathResult> xpathResult = DocumentXPathEvaluator::evaluate(document, xpath, document, 0, XPathResult::ORDERED_NODE_ITERATOR_TYPE, 0, IGNORE_EXCEPTIO N_STATE); 712 RefPtr<XPathResult> xpathResult = DocumentXPathEvaluator::evaluate(document, xpath, document, 0, XPathResult::ORDERED_NODE_ITERATOR_TYPE, 0, IGNORE_EXCEPTIO N);
713 if (!xpathResult) 713 if (!xpathResult)
714 return 0; 714 return 0;
715 715
716 Node* node = xpathResult->iterateNext(IGNORE_EXCEPTION_STATE); 716 Node* node = xpathResult->iterateNext(IGNORE_EXCEPTION);
717 if (!node || !node->isFrameOwnerElement()) 717 if (!node || !node->isFrameOwnerElement())
718 return 0; 718 return 0;
719 HTMLFrameOwnerElement* frameElement = toFrameOwnerElement(node); 719 HTMLFrameOwnerElement* frameElement = toFrameOwnerElement(node);
720 return fromFrame(frameElement->contentFrame()); 720 return fromFrame(frameElement->contentFrame());
721 } 721 }
722 722
723 WebDocument WebFrameImpl::document() const 723 WebDocument WebFrameImpl::document() const
724 { 724 {
725 if (!frame() || !frame()->document()) 725 if (!frame() || !frame()->document())
726 return WebDocument(); 726 return WebDocument();
(...skipping 1628 matching lines...) Expand 10 before | Expand all | Expand 10 after
2355 } 2355 }
2356 } 2356 }
2357 2357
2358 void WebFrameImpl::addMarker(Range* range, bool activeMatch) 2358 void WebFrameImpl::addMarker(Range* range, bool activeMatch)
2359 { 2359 {
2360 frame()->document()->markers()->addTextMatchMarker(range, activeMatch); 2360 frame()->document()->markers()->addTextMatchMarker(range, activeMatch);
2361 } 2361 }
2362 2362
2363 void WebFrameImpl::setMarkerActive(Range* range, bool active) 2363 void WebFrameImpl::setMarkerActive(Range* range, bool active)
2364 { 2364 {
2365 if (!range || range->collapsed(IGNORE_EXCEPTION_STATE)) 2365 if (!range || range->collapsed(IGNORE_EXCEPTION))
2366 return; 2366 return;
2367 frame()->document()->markers()->setMarkersActive(range, active); 2367 frame()->document()->markers()->setMarkersActive(range, active);
2368 } 2368 }
2369 2369
2370 int WebFrameImpl::ordinalOfFirstMatchForFrame(WebFrameImpl* frame) const 2370 int WebFrameImpl::ordinalOfFirstMatchForFrame(WebFrameImpl* frame) const
2371 { 2371 {
2372 int ordinal = 0; 2372 int ordinal = 0;
2373 WebFrameImpl* mainFrameImpl = viewImpl()->mainFrameImpl(); 2373 WebFrameImpl* mainFrameImpl = viewImpl()->mainFrameImpl();
2374 // Iterate from the main frame up to (but not including) |frame| and 2374 // Iterate from the main frame up to (but not including) |frame| and
2375 // add up the number of matches found so far. 2375 // add up the number of matches found so far.
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
2480 2480
2481 // There is a possibility that the frame being detached was the only 2481 // There is a possibility that the frame being detached was the only
2482 // pending one. We need to make sure final replies can be sent. 2482 // pending one. We need to make sure final replies can be sent.
2483 flushCurrentScopingEffort(m_findRequestIdentifier); 2483 flushCurrentScopingEffort(m_findRequestIdentifier);
2484 2484
2485 cancelPendingScopingEffort(); 2485 cancelPendingScopingEffort();
2486 } 2486 }
2487 } 2487 }
2488 2488
2489 } // namespace WebKit 2489 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/web/ContextMenuClientImpl.cpp ('k') | Source/web/WebRange.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698