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

Issue 218403009: Map width/height to style for foreignObject (Closed)

Created:
6 years, 8 months ago by davve
Modified:
6 years, 8 months ago
Reviewers:
pdr., fs
CC:
blink-reviews, ed+blinkwatch_opera.com, f(malita), gyuyoung.kim_webkit.org, Stephen Chennney, kouhei+svg_chromium.org, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Map width/height to style for foreignObject As we move towards using the style system to resolve percentages for svg, start small by promoting width and height for foreignObject to presentation attributes. This is a preparation for issue 308992 where we plan to make height="100%" for svg elements behave as style="height:100%". Unless height is mapped to style for foreignObject, percentage style values for svg inside foreignObject cannot be resolved. This has been resolved in the SVG WG, see minutes http://www.w3.org/2014/04/08-svg-minutes.html#item04 BUG=308992, 358206 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=171306

Patch Set 1 #

Patch Set 2 : Tests update #

Patch Set 3 : Added SVG DOM change to test #

Total comments: 6

Patch Set 4 : Simplify code as suggested by review #

Patch Set 5 : Use |value| sent to collectStyleForPresentationAttribute as suggested in review #

Total comments: 4

Patch Set 6 : Rebase and address last review issue by removing the px conversion #

Patch Set 7 : Rebase to ToT #

Patch Set 8 : Avoid code duplication by using synchronizeAllAttributes #

Patch Set 9 : Update expected file to add description #

Patch Set 10 : Updated TextExpectations to include height variants too #

Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -0 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -0 lines 0 comments Download
A LayoutTests/svg/foreignObject/fO-percentage-height-style.html View 1 2 3 4 5 6 7 1 chunk +21 lines, -0 lines 0 comments Download
A LayoutTests/svg/foreignObject/fO-percentage-height-style-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +12 lines, -0 lines 0 comments Download
M Source/core/dom/Element.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/svg/SVGElement.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/svg/SVGForeignObjectElement.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/svg/SVGForeignObjectElement.cpp View 1 2 3 4 5 2 chunks +28 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
davve
Baby steps for presentation attributes, starting with foreignObject. I think the new repaints is because ...
6 years, 8 months ago (2014-04-02 09:37:35 UTC) #1
fs
https://codereview.chromium.org/218403009/diff/40001/Source/core/svg/SVGForeignObjectElement.cpp File Source/core/svg/SVGForeignObjectElement.cpp (right): https://codereview.chromium.org/218403009/diff/40001/Source/core/svg/SVGForeignObjectElement.cpp#newcode94 Source/core/svg/SVGForeignObjectElement.cpp:94: if (name == SVGNames::widthAttr || name == SVGNames::heightAttr) { ...
6 years, 8 months ago (2014-04-02 11:00:41 UTC) #2
krit
On 2014/04/02 11:00:41, fs wrote: > https://codereview.chromium.org/218403009/diff/40001/Source/core/svg/SVGForeignObjectElement.cpp > File Source/core/svg/SVGForeignObjectElement.cpp (right): > > https://codereview.chromium.org/218403009/diff/40001/Source/core/svg/SVGForeignObjectElement.cpp#newcode94 > ...
6 years, 8 months ago (2014-04-02 11:07:01 UTC) #3
davve
https://codereview.chromium.org/218403009/diff/40001/Source/core/svg/SVGForeignObjectElement.cpp File Source/core/svg/SVGForeignObjectElement.cpp (right): https://codereview.chromium.org/218403009/diff/40001/Source/core/svg/SVGForeignObjectElement.cpp#newcode94 Source/core/svg/SVGForeignObjectElement.cpp:94: if (name == SVGNames::widthAttr || name == SVGNames::heightAttr) { ...
6 years, 8 months ago (2014-04-02 11:17:48 UTC) #4
fs
https://codereview.chromium.org/218403009/diff/40001/Source/core/svg/SVGForeignObjectElement.cpp File Source/core/svg/SVGForeignObjectElement.cpp (right): https://codereview.chromium.org/218403009/diff/40001/Source/core/svg/SVGForeignObjectElement.cpp#newcode96 Source/core/svg/SVGForeignObjectElement.cpp:96: addPropertyToPresentationAttributeStyle(style, CSSPropertyWidth, m_width->currentValue()->valueAsString()); On 2014/04/02 11:17:48, David Vest wrote: ...
6 years, 8 months ago (2014-04-02 11:54:59 UTC) #5
davve
https://codereview.chromium.org/218403009/diff/40001/Source/core/svg/SVGForeignObjectElement.cpp File Source/core/svg/SVGForeignObjectElement.cpp (right): https://codereview.chromium.org/218403009/diff/40001/Source/core/svg/SVGForeignObjectElement.cpp#newcode96 Source/core/svg/SVGForeignObjectElement.cpp:96: addPropertyToPresentationAttributeStyle(style, CSSPropertyWidth, m_width->currentValue()->valueAsString()); On 2014/04/02 11:55:00, fs wrote: > ...
6 years, 8 months ago (2014-04-02 12:43:55 UTC) #6
davve
Dependency on svg animation values from presentation attributes now addressed. Had to take some care ...
6 years, 8 months ago (2014-04-02 14:13:44 UTC) #7
fs
https://codereview.chromium.org/218403009/diff/80001/Source/core/svg/SVGForeignObjectElement.cpp File Source/core/svg/SVGForeignObjectElement.cpp (right): https://codereview.chromium.org/218403009/diff/80001/Source/core/svg/SVGForeignObjectElement.cpp#newcode97 Source/core/svg/SVGForeignObjectElement.cpp:97: if (length->unitType() == LengthTypeNumber) Won't the mode == SVGAttributeMode ...
6 years, 8 months ago (2014-04-02 14:38:30 UTC) #8
davve
https://codereview.chromium.org/218403009/diff/80001/Source/core/svg/SVGForeignObjectElement.cpp File Source/core/svg/SVGForeignObjectElement.cpp (right): https://codereview.chromium.org/218403009/diff/80001/Source/core/svg/SVGForeignObjectElement.cpp#newcode97 Source/core/svg/SVGForeignObjectElement.cpp:97: if (length->unitType() == LengthTypeNumber) On 2014/04/02 14:38:31, fs wrote: ...
6 years, 8 months ago (2014-04-02 18:23:26 UTC) #9
fs
Non-owner LGTM. https://codereview.chromium.org/218403009/diff/80001/Source/core/svg/SVGForeignObjectElement.cpp File Source/core/svg/SVGForeignObjectElement.cpp (right): https://codereview.chromium.org/218403009/diff/80001/Source/core/svg/SVGForeignObjectElement.cpp#newcode97 Source/core/svg/SVGForeignObjectElement.cpp:97: if (length->unitType() == LengthTypeNumber) On 2014/04/02 18:23:27, ...
6 years, 8 months ago (2014-04-03 07:50:40 UTC) #10
davve
https://codereview.chromium.org/218403009/diff/80001/Source/core/svg/SVGForeignObjectElement.cpp File Source/core/svg/SVGForeignObjectElement.cpp (right): https://codereview.chromium.org/218403009/diff/80001/Source/core/svg/SVGForeignObjectElement.cpp#newcode97 Source/core/svg/SVGForeignObjectElement.cpp:97: if (length->unitType() == LengthTypeNumber) On 2014/04/03 07:50:41, fs wrote: ...
6 years, 8 months ago (2014-04-03 08:43:56 UTC) #11
davve
On 2014/04/03 08:43:56, David Vest wrote: > Leaning towards removing now. Enabling the presentation attribute ...
6 years, 8 months ago (2014-04-03 09:19:41 UTC) #12
pdr.
On 2014/04/03 09:19:41, David Vest wrote: > On 2014/04/03 08:43:56, David Vest wrote: > > ...
6 years, 8 months ago (2014-04-09 10:01:15 UTC) #13
davve
Found that surrounding code used synchronizeAllAttributes() instead of doing manual flag checking. Could you PTAL, ...
6 years, 8 months ago (2014-04-10 11:56:28 UTC) #14
fs
On 2014/04/10 11:56:28, David Vest wrote: > Found that surrounding code used synchronizeAllAttributes() instead of ...
6 years, 8 months ago (2014-04-10 12:16:32 UTC) #15
davve
The CQ bit was checked by davve@opera.com
6 years, 8 months ago (2014-04-10 12:19:23 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/davve@opera.com/218403009/150001
6 years, 8 months ago (2014-04-10 12:19:31 UTC) #17
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-10 12:54:24 UTC) #18
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-10 12:54:25 UTC) #19
davve
The CQ bit was checked by davve@opera.com
6 years, 8 months ago (2014-04-10 14:43:18 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/davve@opera.com/218403009/170001
6 years, 8 months ago (2014-04-10 14:43:25 UTC) #21
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-10 15:52:38 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on linux_blink_dbg
6 years, 8 months ago (2014-04-10 15:52:38 UTC) #23
pdr.
The CQ bit was checked by pdr@chromium.org
6 years, 8 months ago (2014-04-10 18:53:02 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/davve@opera.com/218403009/170001
6 years, 8 months ago (2014-04-10 18:53:03 UTC) #25
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-10 20:01:27 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on linux_blink_dbg
6 years, 8 months ago (2014-04-10 20:01:28 UTC) #27
pdr.
The CQ bit was checked by pdr@chromium.org
6 years, 8 months ago (2014-04-10 20:37:05 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/davve@opera.com/218403009/170001
6 years, 8 months ago (2014-04-10 20:37:08 UTC) #29
commit-bot: I haz the power
6 years, 8 months ago (2014-04-10 21:41:56 UTC) #30
Message was sent while issue was closed.
Change committed as 171306

Powered by Google App Engine
This is Rietveld 408576698