Fix setting image's alt text content in html_image_element.cc.
The change to AttributeModificationParams (http://crrev.com/2623513005) has changed the use of the local variable |value| to params.new_value without noticing that the local variable was shadowing the function parameter. Since AltText() looks at both alt and text attributes, and we don't know which of the two is being parsed in this block, we should compare text->textContent to AltText(), and not params.new_value. The local variable |value| is being renamed to a more appropriate |alt_text_content|.This variable containing AltText() can be used for both comparison and setting which will save one extra function call. Bug: None Change-Id: I7f27ab77f1877c6e405aa41b4e912d826ace0fbf Reviewed-on: https://chromium-review.googlesource.com/1049425 Commit-Queue: Prashant Nevase <prashant.n@samsung.com> Reviewed-by:Steve Kobes <skobes@chromium.org> Reviewed-by:
Ian Clelland <iclelland@chromium.org> Reviewed-by:
Prashant Nevase <prashant.n@samsung.com> Cr-Commit-Position: refs/heads/master@{#561531}
Showing
Please register or sign in to comment