OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1513 { | 1513 { |
1514 return createTabSpanElement(document, nullptr); | 1514 return createTabSpanElement(document, nullptr); |
1515 } | 1515 } |
1516 | 1516 |
1517 bool isNodeRendered(const Node& node) | 1517 bool isNodeRendered(const Node& node) |
1518 { | 1518 { |
1519 LayoutObject* layoutObject = node.layoutObject(); | 1519 LayoutObject* layoutObject = node.layoutObject(); |
1520 if (!layoutObject) | 1520 if (!layoutObject) |
1521 return false; | 1521 return false; |
1522 | 1522 |
1523 return layoutObject->style()->visibility() == VISIBLE; | 1523 return layoutObject->style()->visibility() == EVisibility::Visible; |
1524 } | 1524 } |
1525 | 1525 |
1526 // return first preceding DOM position rendered at a different location, or "thi
s" | 1526 // return first preceding DOM position rendered at a different location, or "thi
s" |
1527 static Position previousCharacterPosition(const Position& position, TextAffinity
affinity) | 1527 static Position previousCharacterPosition(const Position& position, TextAffinity
affinity) |
1528 { | 1528 { |
1529 if (position.isNull()) | 1529 if (position.isNull()) |
1530 return Position(); | 1530 return Position(); |
1531 | 1531 |
1532 Element* fromRootEditableElement = rootEditableElement(*position.anchorNode(
)); | 1532 Element* fromRootEditableElement = rootEditableElement(*position.anchorNode(
)); |
1533 | 1533 |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1925 { | 1925 { |
1926 if (!RuntimeEnabledFeatures::inputEventEnabled()) | 1926 if (!RuntimeEnabledFeatures::inputEventEnabled()) |
1927 return DispatchEventResult::NotCanceled; | 1927 return DispatchEventResult::NotCanceled; |
1928 if (!target) | 1928 if (!target) |
1929 return DispatchEventResult::NotCanceled; | 1929 return DispatchEventResult::NotCanceled; |
1930 InputEvent* beforeInputEvent = InputEvent::createBeforeInput(inputType, data
, InputEvent::EventCancelable::IsCancelable, InputEvent::EventIsComposing::NotCo
mposing, ranges); | 1930 InputEvent* beforeInputEvent = InputEvent::createBeforeInput(inputType, data
, InputEvent::EventCancelable::IsCancelable, InputEvent::EventIsComposing::NotCo
mposing, ranges); |
1931 return target->dispatchEvent(beforeInputEvent); | 1931 return target->dispatchEvent(beforeInputEvent); |
1932 } | 1932 } |
1933 | 1933 |
1934 } // namespace blink | 1934 } // namespace blink |
OLD | NEW |