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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/select/option-display-none-computed-style.html

Issue 2095973002: Don't create m_style for option element in display:none subtree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLOptionElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../../resources/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script>
4 <style>
5 option, optgroup { color: red }
6 .green { color: green }
7 </style>
8 <div style="display:none">
9 <option id="opt"></option>
10 </div>
11 <div style="display:none">
12 <optgroup id="optgroup"></optgroup>
13 </div>
14 <div style="display:none">
15 <optgroup>
16 <option id="optingroup"></option>
17 </optgroup>
18 </div>
19 <script>
20 test(() => assert_equals(getComputedStyle(opt).color, "rgb(255, 0, 0)", "Opt ion color was not red before change."), "Option color before change.");
21 test(() => assert_equals(getComputedStyle(optgroup).color, "rgb(255, 0, 0)", "Optgroup color was not red before change."), "Optgroup color before change.");
22 test(() => assert_equals(getComputedStyle(optingroup).color, "rgb(255, 0, 0) ", "Option in optgroup color was not red before change."), "Option in optgroup c olor before change.");
23 test(() => {
24 opt.className = "green";
25 assert_equals(getComputedStyle(opt).color, "rgb(0, 128, 0)", "Option col or was not green after change.");
26 }, "Option color after class change.");
27 test(() => {
28 optgroup.className = "green";
29 assert_equals(getComputedStyle(optgroup).color, "rgb(0, 128, 0)", "Optgr oup color was not green after change.");
30 }, "Optgroup color after class change.");
31 test(() => {
32 optingroup.className = "green";
33 assert_equals(getComputedStyle(optingroup).color, "rgb(0, 128, 0)", "Opt ion in optgroup color was not green after change.");
34 }, "Option in optgroup color after class change.");
35 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLOptionElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698