OLD | NEW |
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 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1431 void WebLocalFrameImpl::cancelPendingScopingEffort() | 1431 void WebLocalFrameImpl::cancelPendingScopingEffort() |
1432 { | 1432 { |
1433 if (m_textFinder) | 1433 if (m_textFinder) |
1434 m_textFinder->cancelPendingScopingEffort(); | 1434 m_textFinder->cancelPendingScopingEffort(); |
1435 } | 1435 } |
1436 | 1436 |
1437 void WebLocalFrameImpl::increaseMatchCount(int count, int identifier) | 1437 void WebLocalFrameImpl::increaseMatchCount(int count, int identifier) |
1438 { | 1438 { |
1439 // This function should only be called on the mainframe. | 1439 // This function should only be called on the mainframe. |
1440 ASSERT(!parent()); | 1440 ASSERT(!parent()); |
1441 ASSERT(m_textFinder); | 1441 ensureTextFinder().increaseMatchCount(identifier, count); |
1442 m_textFinder->increaseMatchCount(identifier, count); | |
1443 } | 1442 } |
1444 | 1443 |
1445 void WebLocalFrameImpl::resetMatchCount() | 1444 void WebLocalFrameImpl::resetMatchCount() |
1446 { | 1445 { |
1447 ASSERT(m_textFinder); | 1446 ensureTextFinder().resetMatchCount(); |
1448 m_textFinder->resetMatchCount(); | |
1449 } | 1447 } |
1450 | 1448 |
1451 void WebLocalFrameImpl::sendOrientationChangeEvent() | 1449 void WebLocalFrameImpl::sendOrientationChangeEvent() |
1452 { | 1450 { |
1453 if (frame()) | 1451 if (frame()) |
1454 frame()->sendOrientationChangeEvent(); | 1452 frame()->sendOrientationChangeEvent(); |
1455 } | 1453 } |
1456 | 1454 |
1457 void WebLocalFrameImpl::dispatchMessageEventWithOriginCheck(const WebSecurityOri
gin& intendedTargetOrigin, const WebDOMEvent& event) | 1455 void WebLocalFrameImpl::dispatchMessageEventWithOriginCheck(const WebSecurityOri
gin& intendedTargetOrigin, const WebDOMEvent& event) |
1458 { | 1456 { |
1459 ASSERT(!event.isNull()); | 1457 ASSERT(!event.isNull()); |
1460 frame()->domWindow()->dispatchMessageEventWithOriginCheck(intendedTargetOrig
in.get(), event, nullptr); | 1458 frame()->domWindow()->dispatchMessageEventWithOriginCheck(intendedTargetOrig
in.get(), event, nullptr); |
1461 } | 1459 } |
1462 | 1460 |
1463 int WebLocalFrameImpl::findMatchMarkersVersion() const | 1461 int WebLocalFrameImpl::findMatchMarkersVersion() const |
1464 { | 1462 { |
1465 ASSERT(!parent()); | 1463 ASSERT(!parent()); |
1466 | 1464 |
1467 if (m_textFinder) | 1465 if (m_textFinder) |
1468 return m_textFinder->findMatchMarkersVersion(); | 1466 return m_textFinder->findMatchMarkersVersion(); |
1469 return 0; | 1467 return 0; |
1470 } | 1468 } |
1471 | 1469 |
1472 int WebLocalFrameImpl::selectNearestFindMatch(const WebFloatPoint& point, WebRec
t* selectionRect) | 1470 int WebLocalFrameImpl::selectNearestFindMatch(const WebFloatPoint& point, WebRec
t* selectionRect) |
1473 { | 1471 { |
1474 ASSERT(!parent()); | 1472 ASSERT(!parent()); |
1475 ASSERT(m_textFinder); | 1473 return ensureTextFinder().selectNearestFindMatch(point, selectionRect); |
1476 return m_textFinder->selectNearestFindMatch(point, selectionRect); | |
1477 } | 1474 } |
1478 | 1475 |
1479 WebFloatRect WebLocalFrameImpl::activeFindMatchRect() | 1476 WebFloatRect WebLocalFrameImpl::activeFindMatchRect() |
1480 { | 1477 { |
1481 ASSERT(!parent()); | 1478 ASSERT(!parent()); |
1482 | 1479 |
1483 if (m_textFinder) | 1480 if (m_textFinder) |
1484 return m_textFinder->activeFindMatchRect(); | 1481 return m_textFinder->activeFindMatchRect(); |
1485 return WebFloatRect(); | 1482 return WebFloatRect(); |
1486 } | 1483 } |
1487 | 1484 |
1488 void WebLocalFrameImpl::findMatchRects(WebVector<WebFloatRect>& outputRects) | 1485 void WebLocalFrameImpl::findMatchRects(WebVector<WebFloatRect>& outputRects) |
1489 { | 1486 { |
1490 ASSERT(!parent()); | 1487 ASSERT(!parent()); |
1491 ASSERT(m_textFinder); | 1488 ensureTextFinder().findMatchRects(outputRects); |
1492 m_textFinder->findMatchRects(outputRects); | |
1493 } | 1489 } |
1494 | 1490 |
1495 void WebLocalFrameImpl::setTickmarks(const WebVector<WebRect>& tickmarks) | 1491 void WebLocalFrameImpl::setTickmarks(const WebVector<WebRect>& tickmarks) |
1496 { | 1492 { |
1497 if (frameView()) { | 1493 if (frameView()) { |
1498 Vector<IntRect> tickmarksConverted(tickmarks.size()); | 1494 Vector<IntRect> tickmarksConverted(tickmarks.size()); |
1499 for (size_t i = 0; i < tickmarks.size(); ++i) | 1495 for (size_t i = 0; i < tickmarks.size(); ++i) |
1500 tickmarksConverted[i] = tickmarks[i]; | 1496 tickmarksConverted[i] = tickmarks[i]; |
1501 frameView()->setTickmarks(tickmarksConverted); | 1497 frameView()->setTickmarks(tickmarksConverted); |
1502 invalidateScrollbar(); | 1498 invalidateScrollbar(); |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1912 | 1908 |
1913 void WebLocalFrameImpl::invalidateAll() const | 1909 void WebLocalFrameImpl::invalidateAll() const |
1914 { | 1910 { |
1915 ASSERT(frame() && frame()->view()); | 1911 ASSERT(frame() && frame()->view()); |
1916 FrameView* view = frame()->view(); | 1912 FrameView* view = frame()->view(); |
1917 view->invalidateRect(view->frameRect()); | 1913 view->invalidateRect(view->frameRect()); |
1918 invalidateScrollbar(); | 1914 invalidateScrollbar(); |
1919 } | 1915 } |
1920 | 1916 |
1921 } // namespace blink | 1917 } // namespace blink |
OLD | NEW |