Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Issue 2577203002: Remove use of WebNode/WebElement in translate_helper (Closed)

Created:
4 years ago by adithyas
Modified:
3 years, 11 months ago
CC:
blink-reviews, blink-reviews-api_chromium.org, blink-reviews-dom_chromium.org, chromium-reviews, darin-cc_chromium.org, dglazkov+blink, eae+blinkwatch, jam, kinuko+watch, mlamouri+watch-content_chromium.org, rwlbuis, sof
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove use of WebNode/WebElement in translate_helper Moves DOM crawling code to documentLanguage() and hasMetaValues() to WebDocument and Document BUG=674714 Review-Url: https://codereview.chromium.org/2577203002 Cr-Commit-Position: refs/heads/master@{#444149} Committed: https://chromium.googlesource.com/chromium/src/+/5e61528ed7a6cd174f97e14d4cd29b91f8e8baf3

Patch Set 1 #

Patch Set 2 : Minor changes #

Total comments: 19

Patch Set 3 : Add WebLanguageDetectionDetails #

Total comments: 3

Patch Set 4 : Move translate specific DOM operations into separate file #

Total comments: 10

Patch Set 5 : Fix nits #

Patch Set 6 : Rebase #

Patch Set 7 : Rebase again #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+101 lines, -54 lines) Patch
M components/translate/content/renderer/translate_helper.cc View 1 2 3 4 5 6 4 chunks +8 lines, -54 lines 1 comment Download
M third_party/WebKit/Source/web/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/Source/web/WebLanguageDetectionDetails.cpp View 1 2 3 4 1 chunk +64 lines, -0 lines 0 comments Download
M third_party/WebKit/public/BUILD.gn View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/public/web/WebLanguageDetectionDetails.h View 1 2 3 4 1 chunk +27 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (15 generated)
adithyas
4 years ago (2016-12-16 15:34:39 UTC) #7
jbroman
https://codereview.chromium.org/2577203002/diff/20001/components/translate/content/renderer/translate_helper.cc File components/translate/content/renderer/translate_helper.cc (right): https://codereview.chromium.org/2577203002/diff/20001/components/translate/content/renderer/translate_helper.cc#newcode63 components/translate/content/renderer/translate_helper.cc:63: // TODO(dglazkov): This logic should be moved into Blink. ...
4 years ago (2016-12-16 16:17:42 UTC) #8
jbroman
https://codereview.chromium.org/2577203002/diff/20001/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/2577203002/diff/20001/third_party/WebKit/Source/core/dom/Document.cpp#newcode1273 third_party/WebKit/Source/core/dom/Document.cpp:1273: for (Node* child = headElement->firstChild(); child; On 2016/12/16 at ...
4 years ago (2016-12-16 16:20:06 UTC) #9
dglazkov
Thanks for jumping into this! \o/ I believe the Blink/content cut you're making is a ...
4 years ago (2016-12-16 16:54:34 UTC) #10
adithyas
dglazkov@: I've changed it such that translate_helper uses only a single method in WebDocument to ...
4 years ago (2016-12-16 21:57:17 UTC) #11
dglazkov
https://codereview.chromium.org/2577203002/diff/40001/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/2577203002/diff/40001/third_party/WebKit/Source/core/dom/Document.cpp#newcode1261 third_party/WebKit/Source/core/dom/Document.cpp:1261: const AtomicString& Document::documentLanguage() const { I would avoid adding ...
4 years ago (2016-12-16 23:00:28 UTC) #13
esprehn
Very cool, can we introduce a new file that contains the translate related code like ...
4 years ago (2016-12-16 23:08:24 UTC) #14
adithyas
dglazkov@, esprehn@: I moved the methods I previously defined in Document/WebDocument into WebLanguageDetectionDetails.cpp
4 years ago (2016-12-19 18:11:50 UTC) #15
dglazkov
lgtm
4 years ago (2016-12-19 18:16:44 UTC) #16
jbroman
lgtm just a couple nits https://codereview.chromium.org/2577203002/diff/60001/third_party/WebKit/Source/web/WebLanguageDetectionDetails.cpp File third_party/WebKit/Source/web/WebLanguageDetectionDetails.cpp (right): https://codereview.chromium.org/2577203002/diff/60001/third_party/WebKit/Source/web/WebLanguageDetectionDetails.cpp#newcode26 third_party/WebKit/Source/web/WebLanguageDetectionDetails.cpp:26: Vector<AtomicString> results; unused variable ...
4 years ago (2016-12-20 16:43:52 UTC) #17
adithyas
https://codereview.chromium.org/2577203002/diff/60001/third_party/WebKit/Source/web/WebLanguageDetectionDetails.cpp File third_party/WebKit/Source/web/WebLanguageDetectionDetails.cpp (right): https://codereview.chromium.org/2577203002/diff/60001/third_party/WebKit/Source/web/WebLanguageDetectionDetails.cpp#newcode26 third_party/WebKit/Source/web/WebLanguageDetectionDetails.cpp:26: Vector<AtomicString> results; On 2016/12/20 at 16:43:51, jbroman wrote: > ...
3 years, 11 months ago (2017-01-09 15:40:03 UTC) #19
adithyas
groby@: could you please take a look at this patch? :)
3 years, 11 months ago (2017-01-13 15:55:48 UTC) #23
groby-ooo-7-16
lgtm https://codereview.chromium.org/2577203002/diff/120001/components/translate/content/renderer/translate_helper.cc File components/translate/content/renderer/translate_helper.cc (right): https://codereview.chromium.org/2577203002/diff/120001/components/translate/content/renderer/translate_helper.cc#newcode102 components/translate/content/renderer/translate_helper.cc:102: std::string content_language = web_detection_details.contentLanguage.utf8(); Sidebar: It's sad we ...
3 years, 11 months ago (2017-01-17 18:23:19 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2577203002/120001
3 years, 11 months ago (2017-01-17 19:54:50 UTC) #27
commit-bot: I haz the power
3 years, 11 months ago (2017-01-17 21:27:44 UTC) #30
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/5e61528ed7a6cd174f97e14d4cd2...

Powered by Google App Engine
This is Rietveld 408576698