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

Issue 43223002: SVGTests should not leave detached elements in the tree (Closed)

Created:
7 years, 1 month ago by esprehn
Modified:
7 years, 1 month ago
Reviewers:
pdr., f(malita)
CC:
blink-reviews, pdr, Stephen Chennney, f(malita)
Visibility:
Public.

Description

SVGTests should not leave detached elements in the tree Previously SVGTests would detach() elements when they were invalid. This was not correct though since then calling getComputedStyle assumed that the element was not in the document and would return an empty style. Worse, if anything triggered a style recalc it would reattach this element and the style would not be empty anymore. As part of the effort to make the concept of "attached" implicit and stop using confusingAndOftenMisusedAttached this patch switches to the correct model of never leaving detached nodes in the tree and also fixes all the tests that were asserting that the style was empty (which should never actually happen if the element is inside the tree). This also exposes that the SVGTests feature doesn't actually work for the SVGSVGElement. As soon as a style recalc happened the element would reappear. This patch makes the test for it correctly print FAIL exposing that bug. This is blocking https://codereview.chromium.org/26270004/ Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=160625

Patch Set 1 #

Patch Set 2 : Add TestExpectations #

Total comments: 3

Patch Set 3 : Always reattach #

Unified diffs Side-by-side diffs Delta from patch set Stats (+181 lines, -152 lines) Patch
M LayoutTests/TestExpectations View 1 1 chunk +28 lines, -0 lines 0 comments Download
M LayoutTests/svg/dynamic-updates/resources/SVGTestCase.js View 1 chunk +6 lines, -0 lines 0 comments Download
M LayoutTests/svg/dynamic-updates/script-tests/SVGCircleElement-dom-requiredFeatures.js View 1 chunk +5 lines, -5 lines 0 comments Download
M LayoutTests/svg/dynamic-updates/script-tests/SVGCircleElement-svgdom-requiredFeatures.js View 1 chunk +5 lines, -5 lines 0 comments Download
M LayoutTests/svg/dynamic-updates/script-tests/SVGEllipseElement-dom-requiredFeatures.js View 1 chunk +5 lines, -5 lines 0 comments Download
M LayoutTests/svg/dynamic-updates/script-tests/SVGEllipseElement-svgdom-requiredFeatures.js View 1 chunk +5 lines, -5 lines 0 comments Download
M LayoutTests/svg/dynamic-updates/script-tests/SVGForeignObjectElement-dom-requiredFeatures.js View 1 chunk +5 lines, -5 lines 0 comments Download
M LayoutTests/svg/dynamic-updates/script-tests/SVGForeignObjectElement-svgdom-requiredFeatures.js View 1 chunk +5 lines, -5 lines 0 comments Download
M LayoutTests/svg/dynamic-updates/script-tests/SVGGElement-dom-requiredFeatures.js View 1 chunk +9 lines, -5 lines 0 comments Download
M LayoutTests/svg/dynamic-updates/script-tests/SVGGElement-svgdom-requiredFeatures.js View 1 chunk +9 lines, -5 lines 0 comments Download
M LayoutTests/svg/dynamic-updates/script-tests/SVGImageElement-dom-requiredFeatures.js View 1 chunk +5 lines, -5 lines 0 comments Download
M LayoutTests/svg/dynamic-updates/script-tests/SVGImageElement-svgdom-requiredFeatures.js View 1 chunk +5 lines, -5 lines 0 comments Download
M LayoutTests/svg/dynamic-updates/script-tests/SVGLineElement-dom-requiredFeatures.js View 1 chunk +5 lines, -5 lines 0 comments Download
M LayoutTests/svg/dynamic-updates/script-tests/SVGLineElement-svgdom-requiredFeatures.js View 1 chunk +5 lines, -5 lines 0 comments Download
M LayoutTests/svg/dynamic-updates/script-tests/SVGPathElement-dom-requiredFeatures.js View 1 chunk +5 lines, -5 lines 0 comments Download
M LayoutTests/svg/dynamic-updates/script-tests/SVGPathElement-svgdom-requiredFeatures.js View 1 chunk +5 lines, -5 lines 0 comments Download
M LayoutTests/svg/dynamic-updates/script-tests/SVGPolygonElement-dom-requiredFeatures.js View 1 chunk +5 lines, -5 lines 0 comments Download
M LayoutTests/svg/dynamic-updates/script-tests/SVGPolygonElement-svgdom-requiredFeatures.js View 1 chunk +5 lines, -5 lines 0 comments Download
M LayoutTests/svg/dynamic-updates/script-tests/SVGPolylineElement-dom-requiredFeatures.js View 1 chunk +5 lines, -5 lines 0 comments Download
M LayoutTests/svg/dynamic-updates/script-tests/SVGPolylineElement-svgdom-requiredFeatures.js View 1 chunk +5 lines, -5 lines 0 comments Download
M LayoutTests/svg/dynamic-updates/script-tests/SVGRectElement-dom-requiredFeatures.js View 1 chunk +5 lines, -5 lines 0 comments Download
M LayoutTests/svg/dynamic-updates/script-tests/SVGRectElement-svgdom-requiredFeatures.js View 1 chunk +5 lines, -5 lines 0 comments Download
M LayoutTests/svg/dynamic-updates/script-tests/SVGSVGElement-dom-requiredFeatures.js View 1 chunk +5 lines, -5 lines 0 comments Download
M LayoutTests/svg/dynamic-updates/script-tests/SVGSVGElement-svgdom-requiredFeatures.js View 1 chunk +5 lines, -5 lines 0 comments Download
M LayoutTests/svg/dynamic-updates/script-tests/SVGTextElement-dom-requiredFeatures.js View 1 chunk +6 lines, -5 lines 0 comments Download
M LayoutTests/svg/dynamic-updates/script-tests/SVGTextElement-svgdom-requiredFeatures.js View 1 chunk +6 lines, -5 lines 0 comments Download
M LayoutTests/svg/dynamic-updates/script-tests/SVGUseElement-dom-requiredFeatures.js View 1 chunk +8 lines, -8 lines 0 comments Download
M LayoutTests/svg/dynamic-updates/script-tests/SVGUseElement-svgdom-requiredFeatures.js View 1 chunk +5 lines, -5 lines 0 comments Download
M Source/core/svg/SVGGraphicsElement.cpp View 1 2 1 chunk +4 lines, -1 line 0 comments Download
M Source/core/svg/SVGTests.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/svg/SVGTests.cpp View 1 chunk +0 lines, -17 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
esprehn
7 years, 1 month ago (2013-10-25 05:46:12 UTC) #1
pdr.
SVGTests is a dumb and useless feature I wish would go away. LGTM with nits. ...
7 years, 1 month ago (2013-10-25 06:13:11 UTC) #2
esprehn
We could simplify this by just always reattaching whenever one of these attributes change. That ...
7 years, 1 month ago (2013-10-25 07:33:57 UTC) #3
esprehn
Okay look again, this is much simpler. It does mean changing the attribute from one ...
7 years, 1 month ago (2013-10-25 07:53:17 UTC) #4
pdr.
On 2013/10/25 07:53:17, esprehn wrote: > Okay look again, this is much simpler. It does ...
7 years, 1 month ago (2013-10-25 19:37:50 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/esprehn@chromium.org/43223002/110001
7 years, 1 month ago (2013-10-25 20:02:42 UTC) #6
commit-bot: I haz the power
7 years, 1 month ago (2013-10-25 21:22:10 UTC) #7
Message was sent while issue was closed.
Change committed as 160625

Powered by Google App Engine
This is Rietveld 408576698