OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #include "WebFrameImpl.h" | 44 #include "WebFrameImpl.h" |
45 #include "WebHitTestResult.h" | 45 #include "WebHitTestResult.h" |
46 #include "WebInputEvent.h" | 46 #include "WebInputEvent.h" |
47 #include "WebSettings.h" | 47 #include "WebSettings.h" |
48 #include "WebSettingsImpl.h" | 48 #include "WebSettingsImpl.h" |
49 #include "WebViewClient.h" | 49 #include "WebViewClient.h" |
50 #include "WebViewImpl.h" | 50 #include "WebViewImpl.h" |
51 #include "WebWidget.h" | 51 #include "WebWidget.h" |
52 #include "core/dom/Document.h" | 52 #include "core/dom/Document.h" |
53 #include "core/dom/Element.h" | 53 #include "core/dom/Element.h" |
| 54 #include "core/dom/EventHandlerRegistry.h" |
54 #include "core/html/HTMLDocument.h" | 55 #include "core/html/HTMLDocument.h" |
55 #include "core/html/HTMLIFrameElement.h" | 56 #include "core/html/HTMLIFrameElement.h" |
56 #include "core/html/HTMLInputElement.h" | 57 #include "core/html/HTMLInputElement.h" |
57 #include "core/loader/FrameLoadRequest.h" | 58 #include "core/loader/FrameLoadRequest.h" |
58 #include "core/frame/FrameView.h" | 59 #include "core/frame/FrameView.h" |
59 #include "core/page/Chrome.h" | 60 #include "core/page/Chrome.h" |
60 #include "core/frame/Settings.h" | 61 #include "core/frame/Settings.h" |
61 #include "platform/KeyboardCodes.h" | 62 #include "platform/KeyboardCodes.h" |
62 #include "platform/graphics/Color.h" | 63 #include "platform/graphics/Color.h" |
63 #include "public/platform/Platform.h" | 64 #include "public/platform/Platform.h" |
(...skipping 1465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1529 { | 1530 { |
1530 int value = m_hasTouchEventHandlerCount[state]; | 1531 int value = m_hasTouchEventHandlerCount[state]; |
1531 m_hasTouchEventHandlerCount[state] = 0; | 1532 m_hasTouchEventHandlerCount[state] = 0; |
1532 return value; | 1533 return value; |
1533 } | 1534 } |
1534 | 1535 |
1535 private: | 1536 private: |
1536 int m_hasTouchEventHandlerCount[2]; | 1537 int m_hasTouchEventHandlerCount[2]; |
1537 }; | 1538 }; |
1538 | 1539 |
1539 // This test verifies that WebWidgetClient::hasTouchEventHandlers is called acco
rdingly for various | 1540 // This test verifies that WebWidgetClient::hasTouchEventHandlers is called |
1540 // calls to Document::did{Add|Remove|Clear}TouchEventHandler. Verifying that tho
se calls are made | 1541 // accordingly for various calls to EventHandlerRegistry::did{Add|Remove| |
1541 // correctly is the job of LayoutTests/fast/events/touch/touch-handler-count.htm
l. | 1542 // RemoveAll}EventHandler(..., TouchEvent). Verifying that those calls are made |
| 1543 // correctly is the job of LayoutTests/fast/events/event-handler-count.html. |
1542 TEST_F(WebViewTest, HasTouchEventHandlers) | 1544 TEST_F(WebViewTest, HasTouchEventHandlers) |
1543 { | 1545 { |
1544 TouchEventHandlerWebViewClient client; | 1546 TouchEventHandlerWebViewClient client; |
1545 std::string url = m_baseURL + "has_touch_event_handlers.html"; | 1547 std::string url = m_baseURL + "has_touch_event_handlers.html"; |
1546 URLTestHelpers::registerMockedURLLoad(toKURL(url), "has_touch_event_handlers
.html"); | 1548 URLTestHelpers::registerMockedURLLoad(toKURL(url), "has_touch_event_handlers
.html"); |
1547 WebViewImpl* webViewImpl = m_webViewHelper.initializeAndLoad(url, true, 0, &
client); | 1549 WebViewImpl* webViewImpl = m_webViewHelper.initializeAndLoad(url, true, 0, &
client); |
| 1550 const WebCore::EventHandlerRegistry::EventHandlerClass touchEvent = WebCore:
:EventHandlerRegistry::TouchEvent; |
1548 | 1551 |
1549 // The page is initialized with at least one no-handlers call. | 1552 // The page is initialized with at least one no-handlers call. |
1550 // In practice we get two such calls because WebViewHelper::initializeAndLoa
d first | 1553 // In practice we get two such calls because WebViewHelper::initializeAndLoa
d first |
1551 // initializes and empty frame, and then loads a document into it, so there
are two | 1554 // initializes and empty frame, and then loads a document into it, so there
are two |
1552 // FrameLoader::commitProvisionalLoad calls. | 1555 // FrameLoader::commitProvisionalLoad calls. |
1553 EXPECT_GE(client.getAndResetHasTouchEventHandlerCallCount(false), 1); | 1556 EXPECT_GE(client.getAndResetHasTouchEventHandlerCallCount(false), 1); |
1554 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); | 1557 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); |
1555 | 1558 |
1556 // Adding the first document handler results in a has-handlers call. | 1559 // Adding the first document handler results in a has-handlers call. |
1557 WebCore::Document* document = webViewImpl->mainFrameImpl()->frame()->documen
t(); | 1560 WebCore::Document* document = webViewImpl->mainFrameImpl()->frame()->documen
t(); |
1558 document->didAddTouchEventHandler(document); | 1561 WebCore::EventHandlerRegistry* registry = WebCore::EventHandlerRegistry::fro
m(*document); |
| 1562 registry->didAddEventHandler(*document, touchEvent); |
1559 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(false)); | 1563 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(false)); |
1560 EXPECT_EQ(1, client.getAndResetHasTouchEventHandlerCallCount(true)); | 1564 EXPECT_EQ(1, client.getAndResetHasTouchEventHandlerCallCount(true)); |
1561 | 1565 |
1562 // Adding another handler has no effect. | 1566 // Adding another handler has no effect. |
1563 document->didAddTouchEventHandler(document); | 1567 registry->didAddEventHandler(*document, touchEvent); |
1564 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(false)); | 1568 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(false)); |
1565 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); | 1569 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); |
1566 | 1570 |
1567 // Removing the duplicate handler has no effect. | 1571 // Removing the duplicate handler has no effect. |
1568 document->didRemoveTouchEventHandler(document); | 1572 registry->didRemoveEventHandler(*document, touchEvent); |
1569 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(false)); | 1573 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(false)); |
1570 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); | 1574 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); |
1571 | 1575 |
1572 // Removing the final handler results in a no-handlers call. | 1576 // Removing the final handler results in a no-handlers call. |
1573 document->didRemoveTouchEventHandler(document); | 1577 registry->didRemoveEventHandler(*document, touchEvent); |
1574 EXPECT_EQ(1, client.getAndResetHasTouchEventHandlerCallCount(false)); | 1578 EXPECT_EQ(1, client.getAndResetHasTouchEventHandlerCallCount(false)); |
1575 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); | 1579 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); |
1576 | 1580 |
1577 // Adding a handler on a div results in a has-handlers call. | 1581 // Adding a handler on a div results in a has-handlers call. |
1578 WebCore::Element* parentDiv = document->getElementById("parentdiv"); | 1582 WebCore::Element* parentDiv = document->getElementById("parentdiv"); |
1579 ASSERT(parentDiv); | 1583 ASSERT(parentDiv); |
1580 document->didAddTouchEventHandler(parentDiv); | 1584 registry->didAddEventHandler(*parentDiv, touchEvent); |
1581 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(false)); | 1585 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(false)); |
1582 EXPECT_EQ(1, client.getAndResetHasTouchEventHandlerCallCount(true)); | 1586 EXPECT_EQ(1, client.getAndResetHasTouchEventHandlerCallCount(true)); |
1583 | 1587 |
1584 // Adding a duplicate handler on the div, clearing all document handlers | 1588 // Adding a duplicate handler on the div, clearing all document handlers |
1585 // (of which there are none) and removing the extra handler on the div | 1589 // (of which there are none) and removing the extra handler on the div |
1586 // all have no effect. | 1590 // all have no effect. |
1587 document->didAddTouchEventHandler(parentDiv); | 1591 registry->didAddEventHandler(*parentDiv, touchEvent); |
1588 document->didClearTouchEventHandlers(document); | 1592 registry->didRemoveAllEventHandlers(*document); |
1589 document->didRemoveTouchEventHandler(parentDiv); | 1593 registry->didRemoveEventHandler(*parentDiv, touchEvent); |
1590 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(false)); | 1594 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(false)); |
1591 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); | 1595 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); |
1592 | 1596 |
1593 // Removing the final handler on the div results in a no-handlers call. | 1597 // Removing the final handler on the div results in a no-handlers call. |
1594 document->didRemoveTouchEventHandler(parentDiv); | 1598 registry->didRemoveEventHandler(*parentDiv, touchEvent); |
1595 EXPECT_EQ(1, client.getAndResetHasTouchEventHandlerCallCount(false)); | 1599 EXPECT_EQ(1, client.getAndResetHasTouchEventHandlerCallCount(false)); |
1596 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); | 1600 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); |
1597 | 1601 |
1598 // Adding two handlers then clearing them in a single call results in a | 1602 // Adding two handlers then clearing them in a single call results in a |
1599 // has-handlers then no-handlers call. | 1603 // has-handlers then no-handlers call. |
1600 document->didAddTouchEventHandler(parentDiv); | 1604 registry->didAddEventHandler(*parentDiv, touchEvent); |
1601 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(false)); | 1605 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(false)); |
1602 EXPECT_EQ(1, client.getAndResetHasTouchEventHandlerCallCount(true)); | 1606 EXPECT_EQ(1, client.getAndResetHasTouchEventHandlerCallCount(true)); |
1603 document->didAddTouchEventHandler(parentDiv); | 1607 registry->didAddEventHandler(*parentDiv, touchEvent); |
1604 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(false)); | 1608 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(false)); |
1605 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); | 1609 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); |
1606 document->didClearTouchEventHandlers(parentDiv); | 1610 registry->didRemoveAllEventHandlers(*parentDiv); |
1607 EXPECT_EQ(1, client.getAndResetHasTouchEventHandlerCallCount(false)); | 1611 EXPECT_EQ(1, client.getAndResetHasTouchEventHandlerCallCount(false)); |
1608 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); | 1612 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); |
| 1613 } |
| 1614 |
| 1615 TEST_F(WebViewTest, HasTouchEventHandlersInChildDocument) |
| 1616 { |
| 1617 TouchEventHandlerWebViewClient client; |
| 1618 std::string url = m_baseURL + "has_touch_event_handlers.html"; |
| 1619 URLTestHelpers::registerMockedURLLoad(toKURL(url), "has_touch_event_handlers
.html"); |
| 1620 WebViewImpl* webViewImpl = m_webViewHelper.initializeAndLoad(url, true, 0, &
client); |
| 1621 const WebCore::EventHandlerRegistry::EventHandlerClass touchEvent = WebCore:
:EventHandlerRegistry::TouchEvent; |
| 1622 |
| 1623 // The page is initialized with at least one no-handlers call. |
| 1624 // In practice we get two such calls because WebViewHelper::initializeAndLoa
d first |
| 1625 // initializes and empty frame, and then loads a document into it, so there
are two |
| 1626 // FrameLoader::commitProvisionalLoad calls. |
| 1627 EXPECT_GE(client.getAndResetHasTouchEventHandlerCallCount(false), 1); |
| 1628 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); |
1609 | 1629 |
1610 // Adding a handler inside of a child iframe results in a has-handlers call. | 1630 // Adding a handler inside of a child iframe results in a has-handlers call. |
| 1631 WebCore::Document* document = webViewImpl->mainFrameImpl()->frame()->documen
t(); |
| 1632 WebCore::EventHandlerRegistry* registry = WebCore::EventHandlerRegistry::fro
m(*document); |
1611 WebCore::Element* childFrame = document->getElementById("childframe"); | 1633 WebCore::Element* childFrame = document->getElementById("childframe"); |
1612 ASSERT(childFrame); | 1634 ASSERT(childFrame); |
1613 WebCore::Document* childDocument = toHTMLIFrameElement(childFrame)->contentD
ocument(); | 1635 WebCore::Document* childDocument = toHTMLIFrameElement(childFrame)->contentD
ocument(); |
| 1636 WebCore::EventHandlerRegistry* childRegistry = WebCore::EventHandlerRegistry
::from(*childDocument); |
1614 WebCore::Element* childDiv = childDocument->getElementById("childdiv"); | 1637 WebCore::Element* childDiv = childDocument->getElementById("childdiv"); |
1615 ASSERT(childDiv); | 1638 ASSERT(childDiv); |
1616 childDocument->didAddTouchEventHandler(childDiv); | 1639 childRegistry->didAddEventHandler(*childDiv, touchEvent); |
1617 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(false)); | 1640 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(false)); |
1618 EXPECT_EQ(1, client.getAndResetHasTouchEventHandlerCallCount(true)); | 1641 EXPECT_EQ(1, client.getAndResetHasTouchEventHandlerCallCount(true)); |
1619 | 1642 |
1620 // Adding and clearing handlers in the parent doc or elsewhere in the child
doc | 1643 // Adding and clearing handlers in the parent doc or elsewhere in the child
doc |
1621 // has no impact. | 1644 // has no impact. |
1622 document->didAddTouchEventHandler(document); | 1645 registry->didAddEventHandler(*document, touchEvent); |
1623 document->didAddTouchEventHandler(childFrame); | 1646 registry->didAddEventHandler(*childFrame, touchEvent); |
1624 childDocument->didAddTouchEventHandler(childDocument); | 1647 childRegistry->didAddEventHandler(*childDocument, touchEvent); |
1625 document->didClearTouchEventHandlers(document); | 1648 registry->didRemoveAllEventHandlers(*document); |
1626 document->didClearTouchEventHandlers(childFrame); | 1649 registry->didRemoveAllEventHandlers(*childFrame); |
1627 childDocument->didClearTouchEventHandlers(childDocument); | 1650 childRegistry->didRemoveAllEventHandlers(*childDocument); |
1628 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(false)); | 1651 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(false)); |
1629 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); | 1652 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); |
1630 | 1653 |
1631 // Removing the final handler inside the child frame results in a no-handler
s call. | 1654 // Removing the final handler inside the child frame results in a no-handler
s call. |
1632 childDocument->didRemoveTouchEventHandler(childDiv); | 1655 childRegistry->didRemoveAllEventHandlers(*childDiv); |
1633 EXPECT_EQ(1, client.getAndResetHasTouchEventHandlerCallCount(false)); | 1656 EXPECT_EQ(1, client.getAndResetHasTouchEventHandlerCallCount(false)); |
1634 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); | 1657 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); |
1635 | 1658 |
1636 // Adding a handler inside the child frame results in a has-handlers call. | 1659 // Adding a handler inside the child frame results in a has-handlers call. |
1637 childDocument->didAddTouchEventHandler(childDocument); | 1660 childRegistry->didAddEventHandler(*childDocument, touchEvent); |
1638 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(false)); | 1661 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(false)); |
1639 EXPECT_EQ(1, client.getAndResetHasTouchEventHandlerCallCount(true)); | 1662 EXPECT_EQ(1, client.getAndResetHasTouchEventHandlerCallCount(true)); |
1640 | 1663 |
1641 // Adding a handler in the parent document and removing the one in the frame | 1664 // Adding a handler in the parent document and removing the one in the frame |
1642 // has no effect. | 1665 // has no effect. |
1643 document->didAddTouchEventHandler(childFrame); | 1666 registry->didAddEventHandler(*childFrame, touchEvent); |
1644 childDocument->didRemoveTouchEventHandler(childDocument); | 1667 childRegistry->didRemoveEventHandler(*childDocument, touchEvent); |
1645 childDocument->didClearTouchEventHandlers(childDocument); | 1668 childRegistry->didRemoveAllEventHandlers(*childDocument); |
1646 document->didClearTouchEventHandlers(document); | 1669 registry->didRemoveAllEventHandlers(*document); |
1647 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(false)); | 1670 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(false)); |
1648 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); | 1671 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); |
1649 | 1672 |
1650 // Now removing the handler in the parent document results in a no-handlers
call. | 1673 // Now removing the handler in the parent document results in a no-handlers
call. |
1651 document->didRemoveTouchEventHandler(childFrame); | 1674 registry->didRemoveEventHandler(*childFrame, touchEvent); |
1652 EXPECT_EQ(1, client.getAndResetHasTouchEventHandlerCallCount(false)); | 1675 EXPECT_EQ(1, client.getAndResetHasTouchEventHandlerCallCount(false)); |
1653 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); | 1676 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); |
1654 } | 1677 } |
| 1678 |
| 1679 // This test verifies that WebWidgetClient::hasTouchEventHandlers is called |
| 1680 // accordingly for various calls to EventHandlerRegistry::did{Add|Remove| |
| 1681 // RemoveAll}ExternalEventHandler(TouchEvent). |
| 1682 TEST_F(WebViewTest, HasExternalTouchEventHandlers) |
| 1683 { |
| 1684 TouchEventHandlerWebViewClient client; |
| 1685 WebViewImpl* webViewImpl = m_webViewHelper.initializeAndLoad("about:blank",
true, 0, &client); |
| 1686 const AtomicString& touchstart = WebCore::EventTypeNames::touchstart; |
| 1687 |
| 1688 // See comment in WebViewTest::HasTouchHandlers. |
| 1689 EXPECT_GE(client.getAndResetHasTouchEventHandlerCallCount(false), 1); |
| 1690 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); |
| 1691 |
| 1692 // Adding the first document handler results in a has-handlers call. |
| 1693 WebCore::Document* document = webViewImpl->mainFrameImpl()->frame()->documen
t(); |
| 1694 WebCore::EventHandlerRegistry* registry = WebCore::EventHandlerRegistry::fro
m(*document); |
| 1695 registry->didAddExternalEventHandler(touchstart); |
| 1696 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(false)); |
| 1697 EXPECT_EQ(1, client.getAndResetHasTouchEventHandlerCallCount(true)); |
| 1698 |
| 1699 // Adding another handler has no effect. |
| 1700 registry->didAddExternalEventHandler(touchstart); |
| 1701 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(false)); |
| 1702 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); |
| 1703 |
| 1704 // Removing the duplicate handler has no effect. |
| 1705 registry->didRemoveExternalEventHandler(touchstart); |
| 1706 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(false)); |
| 1707 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); |
| 1708 |
| 1709 // Removing the final handler results in a no-handlers call. |
| 1710 registry->didRemoveExternalEventHandler(touchstart); |
| 1711 EXPECT_EQ(1, client.getAndResetHasTouchEventHandlerCallCount(false)); |
| 1712 EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true)); |
| 1713 } |
1655 | 1714 |
1656 static WebRect ExpectedRootBounds(WebCore::Document* document, float scaleFactor
) | 1715 static WebRect ExpectedRootBounds(WebCore::Document* document, float scaleFactor
) |
1657 { | 1716 { |
1658 WebCore::Element* element = document->getElementById("root"); | 1717 WebCore::Element* element = document->getElementById("root"); |
1659 if (!element) | 1718 if (!element) |
1660 element = document->getElementById("target"); | 1719 element = document->getElementById("target"); |
1661 if (element->hasTagName(WebCore::HTMLNames::iframeTag)) | 1720 if (element->hasTagName(WebCore::HTMLNames::iframeTag)) |
1662 return ExpectedRootBounds(toHTMLIFrameElement(element)->contentDocument(
), scaleFactor); | 1721 return ExpectedRootBounds(toHTMLIFrameElement(element)->contentDocument(
), scaleFactor); |
1663 | 1722 |
1664 WebCore::IntRect boundingBox = element->pixelSnappedBoundingBox(); | 1723 WebCore::IntRect boundingBox = element->pixelSnappedBoundingBox(); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1735 testSelectionRootBounds("select_range_iframe_textarea_overflow.html", 1.0f); | 1794 testSelectionRootBounds("select_range_iframe_textarea_overflow.html", 1.0f); |
1736 | 1795 |
1737 // Basic page with scale factor. | 1796 // Basic page with scale factor. |
1738 testSelectionRootBounds("select_range_basic.html", 0.0f); | 1797 testSelectionRootBounds("select_range_basic.html", 0.0f); |
1739 testSelectionRootBounds("select_range_basic.html", 0.1f); | 1798 testSelectionRootBounds("select_range_basic.html", 0.1f); |
1740 testSelectionRootBounds("select_range_basic.html", 1.5f); | 1799 testSelectionRootBounds("select_range_basic.html", 1.5f); |
1741 testSelectionRootBounds("select_range_basic.html", 2.0f); | 1800 testSelectionRootBounds("select_range_basic.html", 2.0f); |
1742 } | 1801 } |
1743 | 1802 |
1744 } // namespace | 1803 } // namespace |
OLD | NEW |