| 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 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1370 | 1370 |
| 1371 // We might hit something like an image map that has no layoutObject on it | 1371 // We might hit something like an image map that has no layoutObject on it |
| 1372 // Walk up the tree until we have a node with an attached layoutObject | 1372 // Walk up the tree until we have a node with an attached layoutObject |
| 1373 while (!bestTouchNode->layoutObject()) { | 1373 while (!bestTouchNode->layoutObject()) { |
| 1374 bestTouchNode = LayoutTreeBuilderTraversal::parent(*bestTouchNode); | 1374 bestTouchNode = LayoutTreeBuilderTraversal::parent(*bestTouchNode); |
| 1375 if (!bestTouchNode) | 1375 if (!bestTouchNode) |
| 1376 return nullptr; | 1376 return nullptr; |
| 1377 } | 1377 } |
| 1378 | 1378 |
| 1379 // Editable nodes should not be highlighted (e.g., <input>) | 1379 // Editable nodes should not be highlighted (e.g., <input>) |
| 1380 if (bestTouchNode->hasEditableStyle()) | 1380 if (hasEditableStyle(*bestTouchNode)) |
| 1381 return nullptr; | 1381 return nullptr; |
| 1382 | 1382 |
| 1383 Node* cursorDefiningAncestor = | 1383 Node* cursorDefiningAncestor = |
| 1384 findCursorDefiningAncestor(bestTouchNode, m_page->deprecatedLocalMainFra
me()); | 1384 findCursorDefiningAncestor(bestTouchNode, m_page->deprecatedLocalMainFra
me()); |
| 1385 // We show a highlight on tap only when the current node shows a hand cursor | 1385 // We show a highlight on tap only when the current node shows a hand cursor |
| 1386 if (!cursorDefiningAncestor || !showsHandCursor(cursorDefiningAncestor, m_pa
ge->deprecatedLocalMainFrame())) { | 1386 if (!cursorDefiningAncestor || !showsHandCursor(cursorDefiningAncestor, m_pa
ge->deprecatedLocalMainFrame())) { |
| 1387 return nullptr; | 1387 return nullptr; |
| 1388 } | 1388 } |
| 1389 | 1389 |
| 1390 // We should pick the largest enclosing node with hand cursor set. We do thi
s by first jumping | 1390 // We should pick the largest enclosing node with hand cursor set. We do thi
s by first jumping |
| (...skipping 3225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4616 return nullptr; | 4616 return nullptr; |
| 4617 return focusedFrame; | 4617 return focusedFrame; |
| 4618 } | 4618 } |
| 4619 | 4619 |
| 4620 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const | 4620 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const |
| 4621 { | 4621 { |
| 4622 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; | 4622 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; |
| 4623 } | 4623 } |
| 4624 | 4624 |
| 4625 } // namespace blink | 4625 } // namespace blink |
| OLD | NEW |