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

Issue 139313009: Remove children of title element before setting new title (Closed)

Created:
6 years, 11 months ago by davve
Modified:
6 years, 11 months ago
CC:
blink-reviews, dglazkov+blink, sof, eae+blinkwatch, adamk+blink_chromium.org, Inactive
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Remove children of title element before setting new title http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#document.title When setting the document title through the document.title or <title>.text there was an optimization that reused a child text node in the cases it could. But according to the specification, all children must be removed and re-created with the new value. Removing the optimization has a performance impact and makes setting document.title (or <title>.text) up to ten times slower. This has been deemed acceptable since the change should only be visible in specialized micro-benchmarks. It is more important to align with other browsers and the spec that don't do this optimization. blink-dev thread about the performance regression: https://groups.google.com/a/chromium.org/d/msg/blink-dev/ONBQQ5uhBik/fEiTrzQeYlkJ This is a reland of: https://codereview.chromium.org/128603002 https://codereview.chromium.org/107513013 The original WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=28864 BUG=330140, 331076 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=165309

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+90 lines, -18 lines) Patch
A LayoutTests/fast/dom/document-set-title-mutations.html View 1 chunk +28 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/document-set-title-mutations-expected.txt View 1 chunk +13 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/document-set-title-no-reuse.html View 1 chunk +14 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/document-set-title-no-reuse-expected.txt View 1 chunk +11 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/title-text-property-3.html View 1 chunk +9 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/title-text-property-3-expected.txt View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/dom/Document.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/html/HTMLTitleElement.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/html/HTMLTitleElement.cpp View 4 chunks +9 lines, -16 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
davve
The actual code changes come verbatim from reverting the revert: git revert -n 997e0f0046046f7303fb14a51660c1d2f280e293 I've ...
6 years, 11 months ago (2014-01-16 09:59:56 UTC) #1
davve
Jochen, you have reviewed this before, do you mind taking a look now that this ...
6 years, 11 months ago (2014-01-17 08:34:57 UTC) #2
jochen (gone - plz use gerrit)
rslgtm
6 years, 11 months ago (2014-01-17 12:28:52 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/davve@opera.com/139313009/1
6 years, 11 months ago (2014-01-17 12:32:27 UTC) #4
commit-bot: I haz the power
6 years, 11 months ago (2014-01-17 13:40:23 UTC) #5
Message was sent while issue was closed.
Change committed as 165309

Powered by Google App Engine
This is Rietveld 408576698