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

Issue 107513013: Remove children of title node before updating (Closed)

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

Description

Remove children of title node before updating http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#document.title Extra care must be taken because of mutation events, which may cause just about anything to happen including m_titleElement to be removed itself when removing its children (see LayoutTests/fast/dom/document-set-title-mutation-crash.html for a good example). So make sure to again check m_titleElement before actually setting the new title text. Also update a related code comment that had rotted a bit. Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=28864 BUG=330140 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=164228

Patch Set 1 #

Patch Set 2 : remove children before updateTitle for less title update dispatches #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -1 line) Patch
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
M LayoutTests/fast/dom/title-text-property-2-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/dom/Document.cpp View 1 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/html/HTMLTitleElement.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
davve
Patch takes some experience from the patch and (fails from) EWS results in the Webkit ...
7 years ago (2013-12-20 09:01:10 UTC) #1
jochen (gone - plz use gerrit)
lgtm can you please include a pointer to the webkit revision this is based on ...
7 years ago (2013-12-20 09:12:42 UTC) #2
davve
On 2013/12/20 09:12:42, jochen wrote: > lgtm > > can you please include a pointer ...
7 years ago (2013-12-20 09:16:03 UTC) #3
jochen (gone - plz use gerrit)
On 2013/12/20 09:16:03, David Vest wrote: > On 2013/12/20 09:12:42, jochen wrote: > > lgtm ...
7 years ago (2013-12-20 09:18:20 UTC) #4
davve
On 2013/12/20 09:18:20, jochen wrote: > On 2013/12/20 09:16:03, David Vest wrote: > > On ...
7 years ago (2013-12-20 09:20:30 UTC) #5
davve
Still OK? Document::updateTitle does dispatchDidReceiveTitle which means that a listener might gets a little confused ...
7 years ago (2013-12-20 10:00:05 UTC) #6
jochen (gone - plz use gerrit)
still lgtm
7 years ago (2013-12-20 10:06:16 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/davve@opera.com/107513013/20001
7 years ago (2013-12-20 11:16:47 UTC) #8
commit-bot: I haz the power
7 years ago (2013-12-20 11:23:19 UTC) #9
Message was sent while issue was closed.
Change committed as 164228

Powered by Google App Engine
This is Rietveld 408576698