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

Issue 1392863002: Fix HTMLToken::Attribute::value handling in AtomicHTMLToken (Closed)

Created:
5 years, 2 months ago by hiroshige
Modified:
5 years, 2 months ago
Reviewers:
Yoav Weiss
CC:
chromium-reviews, blink-reviews, dglazkov+blink, blink-reviews-html_chromium.org, kinuko+watch
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix HTMLToken::Attribute::value handling in AtomicHTMLToken |HTMLToken::Attribute::value| should be used as |String(value)| or |StringImpl::create8BitIfPossible(value)|. - |value.data()| is nullptr for attributes with no values, and such |value| should be converted to the empty string (WTF::String or AtomicString), because the null string is used for absence of an attribute. - |String(value)| and |StringImpl::create8BitIfPossible(value)| converts |value| with null |value.data()| into the empty string. However, |AtomicString(value)| converts |value| with null |value.data()| into the null string. This is done in AtomicHTMLToken, so this CL fixes it. Also, this CL - Adds unit tests for attributes with empty value, - Adds CORE_EXPORT to classes/function needed by the unit tests, and - Creates AtomicHTMLToken.cpp and moves implementation of AtomicHTMLToken from HTMLTokenizer.cpp. BUG=540546 Committed: https://crrev.com/37d6b63597f41322f6092405ae913b19a7e85686 Cr-Commit-Position: refs/heads/master@{#354704}

Patch Set 1 #

Patch Set 2 : Rebase + Tests. #

Patch Set 3 : Refactor AtomicHTMLToken / CORE_EXPORT #

Patch Set 4 : CORE_EXPORT #

Patch Set 5 : Style fix. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+159 lines, -22 lines) Patch
M third_party/WebKit/Source/build/scripts/templates/ElementLookupTrie.h.tmpl View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/core.gypi View 1 2 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/AtomicHTMLToken.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
A third_party/WebKit/Source/core/html/parser/AtomicHTMLToken.cpp View 1 2 1 chunk +25 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/html/parser/AtomicHTMLTokenTest.cpp View 1 2 3 4 1 chunk +80 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/CompactHTMLToken.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
A third_party/WebKit/Source/core/html/parser/CompactHTMLTokenTest.cpp View 1 2 3 4 1 chunk +46 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLTokenizer.cpp View 1 2 2 chunks +0 lines, -18 lines 0 comments Download

Messages

Total messages: 40 (19 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1392863002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1392863002/1
5 years, 2 months ago (2015-10-07 08:52:59 UTC) #2
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-10-07 10:01:49 UTC) #4
Yoav Weiss
This fix makes sense. Would it be possible to add tests that make sure the ...
5 years, 2 months ago (2015-10-09 07:37:14 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1392863002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1392863002/20001
5 years, 2 months ago (2015-10-13 10:00:41 UTC) #7
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/109236) mac_chromium_gn_rel on ...
5 years, 2 months ago (2015-10-13 10:02:30 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1392863002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1392863002/40001
5 years, 2 months ago (2015-10-13 10:02:33 UTC) #10
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/80529) ios_rel_device_ninja on ...
5 years, 2 months ago (2015-10-13 10:04:13 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1392863002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1392863002/60001
5 years, 2 months ago (2015-10-13 10:07:37 UTC) #16
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg_recipe/builds/132537)
5 years, 2 months ago (2015-10-13 10:22:07 UTC) #18
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1392863002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1392863002/120001
5 years, 2 months ago (2015-10-13 11:18:01 UTC) #21
hiroshige
yoav@, Thanks for comments. I added tests (and CORE_EXPORT's needed for the tests). Could you ...
5 years, 2 months ago (2015-10-13 12:53:09 UTC) #23
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-10-13 12:58:44 UTC) #25
Yoav Weiss
LGTM
5 years, 2 months ago (2015-10-14 11:36:50 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1392863002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1392863002/120001
5 years, 2 months ago (2015-10-15 08:33:18 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/120955)
5 years, 2 months ago (2015-10-15 10:29:00 UTC) #30
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1392863002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1392863002/140001
5 years, 2 months ago (2015-10-18 13:47:30 UTC) #32
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-10-18 14:54:38 UTC) #34
hiroshige
Fixed style ("Attribute *attributeB" to "Attribute* attributeB" etc.) in Patch Set 5. [pointers-cpp] https://www.chromium.org/blink/coding-style#TOC-Pointers-and-References
5 years, 2 months ago (2015-10-18 15:04:27 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1392863002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1392863002/140001
5 years, 2 months ago (2015-10-18 15:05:12 UTC) #38
commit-bot: I haz the power
Committed patchset #5 (id:140001)
5 years, 2 months ago (2015-10-18 15:08:34 UTC) #39
commit-bot: I haz the power
5 years, 2 months ago (2015-10-18 15:09:22 UTC) #40
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/37d6b63597f41322f6092405ae913b19a7e85686
Cr-Commit-Position: refs/heads/master@{#354704}

Powered by Google App Engine
This is Rietveld 408576698