Commit 7bb59d6b authored by Kent Tamura's avatar Kent Tamura Committed by Commit Bot

Merge invalidation request code in FileInputType into one

They are merged into FileInputType::UpdateView().
This CL has no behavior changes.

Bug: 1040828
Change-Id: Ie08598ce562842eee02b15575bcf278c4ce58b0a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2011464Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#733520}
parent 0936171b
...@@ -249,9 +249,8 @@ void FileInputType::SetValue(const String&, ...@@ -249,9 +249,8 @@ void FileInputType::SetValue(const String&,
return; return;
file_list_->clear(); file_list_->clear();
if (auto* layout_object = GetElement().GetLayoutObject())
layout_object->SetShouldDoFullPaintInvalidation();
GetElement().SetNeedsValidityCheck(); GetElement().SetNeedsValidityCheck();
UpdateView();
} }
FileList* FileInputType::CreateFileList(const FileChooserFileInfoList& files, FileList* FileInputType::CreateFileList(const FileChooserFileInfoList& files,
...@@ -377,10 +376,7 @@ bool FileInputType::SetFiles(FileList* files) { ...@@ -377,10 +376,7 @@ bool FileInputType::SetFiles(FileList* files) {
GetElement().NotifyFormStateChanged(); GetElement().NotifyFormStateChanged();
GetElement().SetNeedsValidityCheck(); GetElement().SetNeedsValidityCheck();
UpdateView();
if (GetElement().GetLayoutObject())
GetElement().GetLayoutObject()->SetShouldDoFullPaintInvalidation();
return files_changed; return files_changed;
} }
...@@ -524,4 +520,9 @@ void FileInputType::WillOpenPopup() { ...@@ -524,4 +520,9 @@ void FileInputType::WillOpenPopup() {
} }
} }
void FileInputType::UpdateView() {
if (auto* layout_object = GetElement().GetLayoutObject())
layout_object->SetShouldDoFullPaintInvalidation();
}
} // namespace blink } // namespace blink
...@@ -93,6 +93,7 @@ class CORE_EXPORT FileInputType final : public InputType, ...@@ -93,6 +93,7 @@ class CORE_EXPORT FileInputType final : public InputType,
void MultipleAttributeChanged() override; void MultipleAttributeChanged() override;
String DefaultToolTip(const InputTypeView&) const override; String DefaultToolTip(const InputTypeView&) const override;
void CopyNonAttributeProperties(const HTMLInputElement&) override; void CopyNonAttributeProperties(const HTMLInputElement&) override;
void UpdateView() override;
// KeyboardClickableInputTypeView overrides. // KeyboardClickableInputTypeView overrides.
void HandleKeypressEvent(KeyboardEvent&) override; void HandleKeypressEvent(KeyboardEvent&) override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment