Index: content/renderer/render_view_impl.cc |
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc |
index aeb07c5e1f6aa8c895fcdcebdf0fcaa7fe6cdb36..e8a8e0b3e694b08dc1c87962f3d3320c982cec6d 100644 |
--- a/content/renderer/render_view_impl.cc |
+++ b/content/renderer/render_view_impl.cc |
@@ -2019,8 +2019,14 @@ void RenderViewImpl::focusPrevious() { |
void RenderViewImpl::focusedNodeChanged(const WebNode& node) { |
has_scrolled_focused_editable_node_into_rect_ = false; |
- |
- Send(new ViewHostMsg_FocusedNodeChanged(routing_id_, IsEditableNode(node))); |
+ int max_length_; |
+ if (IsEditableNode(node)) { |
+ const WebElement& element = node.toConst<WebElement>(); |
+ if (toWebInputElement(&element)) |
+ max_length_ = toWebInputElement(&element)->maxLength(); |
+ } |
+ Send(new ViewHostMsg_FocusedNodeChanged( |
+ routing_id_, IsEditableNode(node), max_length_)); |
FOR_EACH_OBSERVER(RenderViewObserver, observers_, FocusedNodeChanged(node)); |