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

Issue 235063003: Get rid of code duplication in LinkRelAttribute (Closed)

Created:
6 years, 8 months ago by esprehn
Modified:
6 years, 8 months ago
CC:
blink-reviews, dglazkov+blink, adamk+blink_chromium.org
Visibility:
Public.

Description

Get rid of code duplication in LinkRelAttribute There was a "fast path" that just compared the strings and then another that split and then compared. The two paths were slightly different for no obvious reasons which doesn't really follow the spec where the tokens can be all mixed with each other (except for "shortcut icon" apparently). Allocating the separate strings for "alternate stylesheet" should not be an issue. I also removed the extra constructor, we can just use a default argument value. The only behavior change is that now we allow things like "alternate import" (or dns-prefetch) and just ignore the alternate part when deciding what to do with the link. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=171380

Patch Set 1 #

Patch Set 2 : remove inline capacity #

Patch Set 3 : only allow one of import or stylesheet to apply #

Patch Set 4 : silly #

Patch Set 5 : more silly #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -70 lines) Patch
M Source/core/html/LinkRelAttribute.h View 1 chunk +2 lines, -6 lines 0 comments Download
M Source/core/html/LinkRelAttribute.cpp View 1 2 3 4 2 chunks +36 lines, -63 lines 0 comments Download
M Source/core/html/LinkRelAttributeTest.cpp View 1 2 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 29 (0 generated)
esprehn
6 years, 8 months ago (2014-04-11 18:11:04 UTC) #1
abarth-chromium
lgtm
6 years, 8 months ago (2014-04-11 18:30:03 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/esprehn@chromium.org/235063003/1
6 years, 8 months ago (2014-04-11 18:30:09 UTC) #3
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-11 18:59:09 UTC) #4
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on blink_presubmit
6 years, 8 months ago (2014-04-11 18:59:10 UTC) #5
esprehn
The CQ bit was checked by esprehn@chromium.org
6 years, 8 months ago (2014-04-11 19:16:59 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/esprehn@chromium.org/235063003/1
6 years, 8 months ago (2014-04-11 19:17:08 UTC) #7
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-11 19:17:34 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on linux_blink_rel
6 years, 8 months ago (2014-04-11 19:17:34 UTC) #9
esprehn
On 2014/04/11 19:17:34, I haz the power (commit-bot) wrote: > Try jobs failed on following ...
6 years, 8 months ago (2014-04-11 19:19:31 UTC) #10
esprehn
The CQ bit was checked by esprehn@chromium.org
6 years, 8 months ago (2014-04-11 19:19:45 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/esprehn@chromium.org/235063003/20001
6 years, 8 months ago (2014-04-11 19:19:51 UTC) #12
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-11 19:32:08 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on mac_blink_rel
6 years, 8 months ago (2014-04-11 19:32:08 UTC) #14
esprehn
The CQ bit was checked by esprehn@chromium.org
6 years, 8 months ago (2014-04-11 20:25:59 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/esprehn@chromium.org/235063003/40001
6 years, 8 months ago (2014-04-11 20:26:04 UTC) #16
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-11 20:38:50 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on mac_blink_rel
6 years, 8 months ago (2014-04-11 20:38:50 UTC) #18
esprehn
The CQ bit was checked by esprehn@chromium.org
6 years, 8 months ago (2014-04-11 20:52:18 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/esprehn@chromium.org/235063003/60001
6 years, 8 months ago (2014-04-11 20:52:24 UTC) #20
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-11 21:03:48 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on mac_blink_rel
6 years, 8 months ago (2014-04-11 21:03:48 UTC) #22
esprehn
The CQ bit was checked by esprehn@chromium.org
6 years, 8 months ago (2014-04-11 21:07:55 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/esprehn@chromium.org/235063003/80001
6 years, 8 months ago (2014-04-11 21:08:02 UTC) #24
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-11 21:41:26 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on mac_blink_rel
6 years, 8 months ago (2014-04-11 21:41:27 UTC) #26
esprehn
The CQ bit was checked by esprehn@chromium.org
6 years, 8 months ago (2014-04-11 23:37:39 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/esprehn@chromium.org/235063003/80001
6 years, 8 months ago (2014-04-11 23:37:51 UTC) #28
commit-bot: I haz the power
6 years, 8 months ago (2014-04-12 00:08:17 UTC) #29
Message was sent while issue was closed.
Change committed as 171380

Powered by Google App Engine
This is Rietveld 408576698