| Differences between
and this patch
- a/Source/WebCore/ChangeLog +27 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2012-12-12  Tim Volodine  <timvolodine@google.com>
2
3
        Text Autosizing: Work out what to do about form controls
4
        https://bugs.webkit.org/show_bug.cgi?id=102560
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Disallow autosizing of form input controls like buttons, text input fields, selection controls, radio buttons
9
        and check boxes. This is a short term solution to avoid inconsistent autosizing of form controls (which is
10
        worse than not autosizing at all).
11
12
        Tests: fast/text-autosizing/form-controls-boosting-button-textarea-input-elements.html
13
               fast/text-autosizing/form-controls-boosting-checkbox-input-element.html
14
               fast/text-autosizing/form-controls-boosting-radio-input-element.html
15
               fast/text-autosizing/form-controls-boosting-select-element.html
16
17
        * rendering/TextAutosizer.cpp:
18
        (WebCore):
19
        (WebCore::TextAutosizer::containerShouldBeAutosized):
20
        (WebCore::TextAutosizer::contentHeightIsConstrained):
21
        (WebCore::TextAutosizer::processContainer):
22
        (WebCore::TextAutosizer::isAutosizingContainer):
23
        (WebCore::TextAutosizer::containerContainsTags):
24
        (WebCore::TextAutosizer::measureDescendantTextWidth):
25
        (WebCore::TextAutosizer::findDeepestBlockContainingAllText):
26
        * rendering/TextAutosizer.h:
27
1
2012-12-04  Antoine Quint  <graouts@apple.com>
28
2012-12-04  Antoine Quint  <graouts@apple.com>
2
29
3
        TextTrack's .kind property should return lower-case values
30
        TextTrack's .kind property should return lower-case values
- a/Source/WebCore/rendering/TextAutosizer.cpp -4 / +53 lines
Lines 25-30 a/Source/WebCore/rendering/TextAutosizer.cpp_sec1
25
#include "TextAutosizer.h"
25
#include "TextAutosizer.h"
26
26
27
#include "Document.h"
27
#include "Document.h"
28
#include "HTMLElement.h"
28
#include "InspectorInstrumentation.h"
29
#include "InspectorInstrumentation.h"
29
#include "RenderObject.h"
30
#include "RenderObject.h"
30
#include "RenderStyle.h"
31
#include "RenderStyle.h"
Lines 37-42 a/Source/WebCore/rendering/TextAutosizer.cpp_sec2
37
38
38
namespace WebCore {
39
namespace WebCore {
39
40
41
using namespace HTMLNames;
42
40
struct TextAutosizingWindowInfo {
43
struct TextAutosizingWindowInfo {
41
    IntSize windowSize;
44
    IntSize windowSize;
42
    IntSize minLayoutSize;
45
    IntSize minLayoutSize;
Lines 119-125 void TextAutosizer::processCluster(RenderBlock* cluster, RenderBlock* container, a/Source/WebCore/rendering/TextAutosizer.cpp_sec3
119
    processContainer(multiplier, container, subtreeRoot, windowInfo);
122
    processContainer(multiplier, container, subtreeRoot, windowInfo);
120
}
123
}
121
124
122
static bool contentHeightIsConstrained(const RenderBlock* container)
125
bool TextAutosizer::containerShouldBeAutosized(const RenderBlock* container)
126
{
127
    Vector<QualifiedName> tags;
128
    tags.append(inputTag);
129
    tags.append(textareaTag);
130
    tags.append(buttonTag);
131
    tags.append(selectTag);
132
    if (containerContainsTags(container, tags))
133
        return false;
134
135
    return !contentHeightIsConstrained(container);
136
}
137
138
bool TextAutosizer::contentHeightIsConstrained(const RenderBlock* container)
123
{
139
{
124
    // FIXME: Propagate constrainedness down the tree, to avoid inefficiently walking back up from each box.
140
    // FIXME: Propagate constrainedness down the tree, to avoid inefficiently walking back up from each box.
125
    // FIXME: This code needs to take into account vertical writing modes.
141
    // FIXME: This code needs to take into account vertical writing modes.
Lines 143-149 void TextAutosizer::processContainer(float multiplier, RenderBlock* container, R a/Source/WebCore/rendering/TextAutosizer.cpp_sec4
143
{
159
{
144
    ASSERT(isAutosizingContainer(container));
160
    ASSERT(isAutosizingContainer(container));
145
161
146
    float localMultiplier = contentHeightIsConstrained(container) ? 1 : multiplier;
162
    float localMultiplier = containerShouldBeAutosized(container) ? multiplier : 1;
147
163
148
    RenderObject* descendant = nextInPreOrderSkippingDescendantsOfContainers(subtreeRoot, subtreeRoot);
164
    RenderObject* descendant = nextInPreOrderSkippingDescendantsOfContainers(subtreeRoot, subtreeRoot);
149
    while (descendant) {
165
    while (descendant) {
Lines 211-216 bool TextAutosizer::isAutosizingContainer(const RenderObject* renderer) a/Source/WebCore/rendering/TextAutosizer.cpp_sec5
211
        return false;
227
        return false;
212
    if (renderer->isListItem())
228
    if (renderer->isListItem())
213
        return renderer->isFloating() || renderer->isOutOfFlowPositioned();
229
        return renderer->isFloating() || renderer->isOutOfFlowPositioned();
230
    // avoid creating containers for text within text controls, buttons, or selection menus.
231
    RenderObject* parent = renderer->parent();
232
    if (parent) {
233
        if (parent->isRenderButton() || parent->isTextControl() || parent->isMenuList())
234
            return false;
235
    }
236
214
    return true;
237
    return true;
215
}
238
}
216
239
Lines 271-279 bool TextAutosizer::clusterShouldBeAutosized(const RenderBlock* lowestCommonAnce a/Source/WebCore/rendering/TextAutosizer.cpp_sec6
271
    return false;
294
    return false;
272
}
295
}
273
296
297
bool TextAutosizer::containerContainsTags(const RenderObject* container, Vector<QualifiedName>& tags)
298
{
299
    const Node* containerNode = container->node();
300
    bool validCandidate = containerNode && containerNode->isHTMLElement() && !containerNode->isShadowRoot();
301
    if (validCandidate) {
302
        for (size_t i = 0; i < tags.size(); ++i) {
303
            if (containerNode->hasTagName(tags[i]))
304
                return true;
305
        }
306
    }
307
308
    RenderObject* descendant = nextInPreOrderSkippingDescendantsOfContainers(container, container);
309
    while (descendant) {
310
        const Node* descendantNode = descendant->node();
311
        bool validCandidate = descendantNode && descendantNode->isHTMLElement() && !descendantNode->isShadowRoot();
312
        if (validCandidate) {
313
            for (size_t i = 0; i < tags.size(); ++i) {
314
                if (descendantNode->hasTagName(tags[i]))
315
                    return true;
316
            }
317
        }
318
        descendant = nextInPreOrderSkippingDescendantsOfContainers(descendant, container);
319
    }
320
    return false;
321
}
322
274
void TextAutosizer::measureDescendantTextWidth(const RenderBlock* container, float minTextWidth, float& textWidth)
323
void TextAutosizer::measureDescendantTextWidth(const RenderBlock* container, float minTextWidth, float& textWidth)
275
{
324
{
276
    bool skipLocalText = contentHeightIsConstrained(container);
325
    bool skipLocalText = !containerShouldBeAutosized(container);
277
326
278
    RenderObject* descendant = nextInPreOrderSkippingDescendantsOfContainers(container, container);
327
    RenderObject* descendant = nextInPreOrderSkippingDescendantsOfContainers(container, container);
279
    while (descendant) {
328
    while (descendant) {
Lines 319-325 const RenderBlock* TextAutosizer::findDeepestBlockContainingAllText(const Render a/Source/WebCore/rendering/TextAutosizer.cpp_sec7
319
    const RenderObject* lastTextLeaf = findFirstTextLeafNotInCluster(cluster, lastDepth, LastToFirst);
368
    const RenderObject* lastTextLeaf = findFirstTextLeafNotInCluster(cluster, lastDepth, LastToFirst);
320
    ASSERT(lastTextLeaf);
369
    ASSERT(lastTextLeaf);
321
370
322
    // Equalize the depths if necessary. Only one of the while loops below will get executed.
371
    // Equalize the depths if containerShouldBeAutosized necessary. Only one of the while loops below will get executed.
323
    const RenderObject* firstNode = firstTextLeaf;
372
    const RenderObject* firstNode = firstTextLeaf;
324
    const RenderObject* lastNode = lastTextLeaf;
373
    const RenderObject* lastNode = lastTextLeaf;
325
    while (firstDepth > lastDepth) {
374
    while (firstDepth > lastDepth) {
- a/Source/WebCore/rendering/TextAutosizer.h +4 lines
Lines 28-33 a/Source/WebCore/rendering/TextAutosizer.h_sec1
28
28
29
#if ENABLE(TEXT_AUTOSIZING)
29
#if ENABLE(TEXT_AUTOSIZING)
30
30
31
#include "HTMLNames.h"
31
#include "IntSize.h"
32
#include "IntSize.h"
32
#include <wtf/Noncopyable.h>
33
#include <wtf/Noncopyable.h>
33
#include <wtf/PassOwnPtr.h>
34
#include <wtf/PassOwnPtr.h>
Lines 71-76 private: a/Source/WebCore/rendering/TextAutosizer.h_sec2
71
    static bool isAutosizingCluster(const RenderBlock*);
72
    static bool isAutosizingCluster(const RenderBlock*);
72
73
73
    static bool clusterShouldBeAutosized(const RenderBlock* lowestCommonAncestor, float commonAncestorWidth);
74
    static bool clusterShouldBeAutosized(const RenderBlock* lowestCommonAncestor, float commonAncestorWidth);
75
    static bool containerShouldBeAutosized(const RenderBlock* container);
76
    static bool contentHeightIsConstrained(const RenderBlock* container);
77
    static bool containerContainsTags(const RenderObject* cluster, Vector<QualifiedName>& tags);
74
    static void measureDescendantTextWidth(const RenderBlock* container, float minTextWidth, float& textWidth);
78
    static void measureDescendantTextWidth(const RenderBlock* container, float minTextWidth, float& textWidth);
75
79
76
    // Use to traverse the tree of descendants, excluding descendants of containers (but returning the containers themselves).
80
    // Use to traverse the tree of descendants, excluding descendants of containers (but returning the containers themselves).
- a/LayoutTests/ChangeLog +19 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2012-12-12  Tim Volodine  <timvolodine@google.com>
2
3
        Text Autosizing: Work out what to do about form controls
4
        https://bugs.webkit.org/show_bug.cgi?id=102560
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Tests for form input elements autosizing. Added tests to check that various kinds of form elements
9
        don't get autosized, i.e. buttons, textareas, check boxes, radio button and selection menus.
10
11
        * fast/text-autosizing/form-controls-boosting-button-textarea-input-elements-expected.html: Added.
12
        * fast/text-autosizing/form-controls-boosting-button-textarea-input-elements.html: Added.
13
        * fast/text-autosizing/form-controls-boosting-checkbox-input-element-expected.html: Added.
14
        * fast/text-autosizing/form-controls-boosting-checkbox-input-element.html: Added.
15
        * fast/text-autosizing/form-controls-boosting-radio-input-element-expected.html: Added.
16
        * fast/text-autosizing/form-controls-boosting-radio-input-element.html: Added.
17
        * fast/text-autosizing/form-controls-boosting-select-element-expected.html: Added.
18
        * fast/text-autosizing/form-controls-boosting-select-element.html: Added.
19
1
2012-12-04  Antoine Quint  <graouts@apple.com>
20
2012-12-04  Antoine Quint  <graouts@apple.com>
2
21
3
        TextTrack's .kind property should return lower-case values
22
        TextTrack's .kind property should return lower-case values
- a/LayoutTests/fast/text-autosizing/form-controls-boosting-button-textarea-input-elements-expected.html +107 lines
Line 0 a/LayoutTests/fast/text-autosizing/form-controls-boosting-button-textarea-input-elements-expected.html_sec1
1
<!DOCTYPE html>
2
<html>
3
<head>
4
5
<meta name="viewport" content="width=800">
6
<style>
7
  body {
8
    width: 800px;
9
    margin: 0;
10
    overflow-y: hidden;
11
    font-family: Verdana, sans-serif;
12
    font-size: small;
13
  }
14
  
15
  #boosted {
16
    font-size: 2.05rem;
17
  }
18
  
19
  #header form {
20
    font-size: 85%;
21
    display: inline;
22
  }
23
  
24
  #header .links {
25
    font-size: 85%;
26
  }
27
  
28
  ul.links {
29
    margin: 0;
30
    padding: 0;
31
    list-style-type: none;
32
  }
33
34
  ul.links li {
35
    display: inline;
36
    white-space: nowrap;
37
  }
38
</style>
39
40
</head>
41
<body>
42
43
<div id="header">
44
  <ul class="links">
45
    <li>
46
      <a href="./">Home</a>
47
    </li>
48
    <li>
49
      <span>| </span>
50
      <a href="">New</a>
51
    </li>
52
    <li>
53
      <span>| </span>
54
      <a href="">Search</a>
55
    </li>
56
    <li>
57
      <span>| </span>
58
      <form>
59
        <input class="txt" type="text" id="quicksearch_top" name="quicksearch">
60
        <input class="btn" type="submit" value="Find" id=find_top">
61
      </form>
62
    </li>
63
    <li>
64
      <span>| </span>
65
      <a href="">Reports</a>
66
    </li>
67
  </ul>
68
</div>
69
70
<div>
71
  <p><div id="boosted">This test checks that from controls like buttons, text inputs and check-boxes are not autosized.
72
    The text in this paragraph should be autosized, while the form controls in the header and in the table-layout
73
    below should not. Also the "Find" button and text-input box at the bottom of the page should not be autosized.
74
  </div></p>
75
76
  <form name="login" action="" method="POST">
77
  <table>
78
    <tr>
79
      <th align="right"><label for="Bugzilla_login">Login:</label></th>
80
      <td><input size="20" id="Bugzilla_login" name="Bugzilla_login"></td>
81
    </tr>
82
    <tr>
83
      <th align="right"><label for="Bugzilla_password">Password:</label></th>
84
      <td>
85
        <input type="password" size="20" id="Bugzilla_password" name="Bugzilla_password">
86
      </td>
87
    </tr>
88
    <tr>
89
      <td><input type="submit" name="GoAheadAndLogIn" value="Login" id="log_in"></td>
90
      <td>[ <a href="">Forgot my Password</a> ]</td>
91
    </tr>
92
  </table>
93
  </form>
94
  
95
  <form>
96
  <div>
97
    <p><div id="boosted">This text should be autosized, while the input controls below should not.</div></p>
98
    <input id="quicksearch" type="text" name="quicksearch">
99
    <input id="find" type="submit" value="Find">
100
    <a href="">[Help]</a>
101
  </div>
102
  </form>
103
104
</div>
105
106
</body>
107
</html>
- a/LayoutTests/fast/text-autosizing/form-controls-boosting-button-textarea-input-elements.html +112 lines
Line 0 a/LayoutTests/fast/text-autosizing/form-controls-boosting-button-textarea-input-elements.html_sec1
1
<!DOCTYPE html>
2
<html>
3
<head>
4
5
<meta name="viewport" content="width=800">
6
<style>
7
  body {
8
    width: 800px;
9
    margin: 0;
10
    overflow-y: hidden;
11
    font-family: Verdana, sans-serif;
12
    font-size: small;
13
  }
14
  
15
  #header form {
16
    font-size: 85%;
17
    display: inline;
18
  }
19
  
20
  #header .links {
21
    font-size: 85%;
22
  }
23
  
24
  ul.links {
25
    margin: 0;
26
    padding: 0;
27
    list-style-type: none;
28
  }
29
30
  ul.links li {
31
    display: inline;
32
    white-space: nowrap;
33
  }
34
</style>
35
36
<script>
37
if (window.internals) {
38
    window.internals.settings.setTextAutosizingEnabled(true);
39
    window.internals.settings.setTextAutosizingWindowSizeOverride(320, 480);
40
} else if (window.console && console.warn) {
41
    console.warn("This test depends on the Text Autosizing setting being true, so run it in DumpRenderTree, or manually enable Text Autosizing, and either use a mobile device with 320px device-width (like Nexus S or iPhone), or define HACK_FORCE_TEXT_AUTOSIZING_ON_DESKTOP.");
42
}
43
</script>
44
45
</head>
46
<body>
47
48
<div id="header">
49
  <ul class="links">
50
    <li>
51
      <a href="./">Home</a>
52
    </li>
53
    <li>
54
      <span>| </span>
55
      <a href="">New</a>
56
    </li>
57
    <li>
58
      <span>| </span>
59
      <a href="">Search</a>
60
    </li>
61
    <li>
62
      <span>| </span>
63
      <form>
64
        <input class="txt" type="text" id="quicksearch_top" name="quicksearch">
65
        <input class="btn" type="submit" value="Find" id=find_top">
66
      </form>
67
    </li>
68
    <li>
69
      <span>| </span>
70
      <a href="">Reports</a>
71
    </li>
72
  </ul>
73
</div>
74
75
<div>
76
  <p>This test checks that from controls like buttons, text inputs and check-boxes are not autosized.
77
    The text in this paragraph should be autosized, while the form controls in the header and in the table-layout
78
    below should not. Also the "Find" button and text-input box at the bottom of the page should not be autosized.
79
  </p>
80
81
  <form name="login" action="" method="POST">
82
  <table>
83
    <tr>
84
      <th align="right"><label for="Bugzilla_login">Login:</label></th>
85
      <td><input size="20" id="Bugzilla_login" name="Bugzilla_login"></td>
86
    </tr>
87
    <tr>
88
      <th align="right"><label for="Bugzilla_password">Password:</label></th>
89
      <td>
90
        <input type="password" size="20" id="Bugzilla_password" name="Bugzilla_password">
91
      </td>
92
    </tr>
93
    <tr>
94
      <td><input type="submit" name="GoAheadAndLogIn" value="Login" id="log_in"></td>
95
      <td>[ <a href="">Forgot my Password</a> ]</td>
96
    </tr>
97
  </table>
98
  </form>
99
  
100
  <form>
101
  <div>
102
    <p>This text should be autosized, while the input controls below should not.</p>
103
    <input id="quicksearch" type="text" name="quicksearch">
104
    <input id="find" type="submit" value="Find">
105
    <a href="">[Help]</a>
106
  </div>
107
  </form>
108
109
</div>
110
111
</body>
112
</html>
- a/LayoutTests/fast/text-autosizing/form-controls-boosting-checkbox-input-element-expected.html +40 lines
Line 0 a/LayoutTests/fast/text-autosizing/form-controls-boosting-checkbox-input-element-expected.html_sec1
1
<!DOCTYPE html>
2
<html>
3
<head>
4
5
<meta name="viewport" content="width=800">
6
<style>
7
  body {
8
    width: 800px;
9
    margin: 0;
10
    overflow-y: hidden;
11
    font-family: Verdana, sans-serif;
12
    font-size: small;
13
  }
14
  
15
  #boosted {
16
    font-size: 2.05rem;
17
  }
18
</style>
19
20
21
</head>
22
<body>
23
24
<div>
25
<div id="boosted">
26
This tests the boosting of check boxes. This paragraph should be boosted, while
27
the check boxes below should not be autosized. +++++++++++++++++++++++++++++++++++++++++++++
28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
29
</div>
30
<div>
31
<form action="">
32
Check one or more:
33
<input type="checkbox" name="vehicle" value="Bike">I have a bike<br/>
34
<input type="checkbox" name="vehicle" value="Car">I have a car <br/>
35
</form>
36
</div>
37
</div>
38
39
</body>
40
</html>
- a/LayoutTests/fast/text-autosizing/form-controls-boosting-checkbox-input-element.html +44 lines
Line 0 a/LayoutTests/fast/text-autosizing/form-controls-boosting-checkbox-input-element.html_sec1
1
<!DOCTYPE html>
2
<html>
3
<head>
4
5
<meta name="viewport" content="width=800">
6
<style>
7
  body {
8
    width: 800px;
9
    margin: 0;
10
    overflow-y: hidden;
11
    font-family: Verdana, sans-serif;
12
    font-size: small;
13
  }
14
</style>
15
16
<script>
17
if (window.internals) {
18
    window.internals.settings.setTextAutosizingEnabled(true);
19
    window.internals.settings.setTextAutosizingWindowSizeOverride(320, 480);
20
} else if (window.console && console.warn) {
21
    console.warn("This test depends on the Text Autosizing setting being true, so run it in DumpRenderTree, or manually enable Text Autosizing, and either use a mobile device with 320px device-width (like Nexus S or iPhone), or define HACK_FORCE_TEXT_AUTOSIZING_ON_DESKTOP.");
22
}
23
</script>
24
25
</head>
26
<body>
27
28
<div>
29
<div>
30
This tests the boosting of check boxes. This paragraph should be boosted, while
31
the check boxes below should not be autosized. +++++++++++++++++++++++++++++++++++++++++++++
32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
33
</div>
34
<div>
35
<form action="">
36
Check one or more:
37
<input type="checkbox" name="vehicle" value="Bike">I have a bike<br/>
38
<input type="checkbox" name="vehicle" value="Car">I have a car <br/>
39
</form>
40
</div>
41
</div>
42
43
</body>
44
</html>
- a/LayoutTests/fast/text-autosizing/form-controls-boosting-radio-input-element-expected.html +44 lines
Line 0 a/LayoutTests/fast/text-autosizing/form-controls-boosting-radio-input-element-expected.html_sec1
1
<!DOCTYPE html>
2
<html>
3
<head>
4
5
<meta name="viewport" content="width=800">
6
<style>
7
  body {
8
    width: 800px;
9
    margin: 0;
10
    overflow-y: hidden;
11
    font-family: Verdana, sans-serif;
12
    font-size: small;
13
  }
14
  
15
  #boosted {
16
    font-size: 2.05rem;
17
  }
18
</style>
19
20
21
</head>
22
<body>
23
24
<div>
25
<div id="boosted">
26
This tests the boosting of radio buttons. This paragraph should be boosted, while
27
the radio buttons below should not be autosized. +++++++++++++++++++++++++++++++++++++++++++
28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
29
</div>
30
<div>
31
<form action="">
32
Select one of:
33
<input type="radio" value="1" id="radio1" checked="checked"/><br/>
34
<label for="radio1">Radio1</label>
35
<input type="radio" value="2" id="radio2"/><br/>
36
<label for="radio2">Radio2</label>
37
<input type="radio" value="3" id="radio3"/><br/>
38
<label for="radio3">Radio3</label>
39
</form>
40
</div>
41
</div>
42
43
</body>
44
</html>
- a/LayoutTests/fast/text-autosizing/form-controls-boosting-radio-input-element.html +48 lines
Line 0 a/LayoutTests/fast/text-autosizing/form-controls-boosting-radio-input-element.html_sec1
1
<!DOCTYPE html>
2
<html>
3
<head>
4
5
<meta name="viewport" content="width=800">
6
<style>
7
  body {
8
    width: 800px;
9
    margin: 0;
10
    overflow-y: hidden;
11
    font-family: Verdana, sans-serif;
12
    font-size: small;
13
  }
14
</style>
15
16
<script>
17
if (window.internals) {
18
    window.internals.settings.setTextAutosizingEnabled(true);
19
    window.internals.settings.setTextAutosizingWindowSizeOverride(320, 480);
20
} else if (window.console && console.warn) {
21
    console.warn("This test depends on the Text Autosizing setting being true, so run it in DumpRenderTree, or manually enable Text Autosizing, and either use a mobile device with 320px device-width (like Nexus S or iPhone), or define HACK_FORCE_TEXT_AUTOSIZING_ON_DESKTOP.");
22
}
23
</script>
24
25
</head>
26
<body>
27
28
<div>
29
<div>
30
This tests the boosting of radio buttons. This paragraph should be boosted, while
31
the radio buttons below should not be autosized. +++++++++++++++++++++++++++++++++++++++++++
32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
33
</div>
34
<div>
35
<form action="">
36
Select one of:
37
<input type="radio" value="1" id="radio1" checked="checked"/><br/>
38
<label for="radio1">Radio1</label>
39
<input type="radio" value="2" id="radio2"/><br/>
40
<label for="radio2">Radio2</label>
41
<input type="radio" value="3" id="radio3"/><br/>
42
<label for="radio3">Radio3</label>
43
</form>
44
</div>
45
</div>
46
47
</body>
48
</html>
- a/LayoutTests/fast/text-autosizing/form-controls-boosting-select-element-expected.html +43 lines
Line 0 a/LayoutTests/fast/text-autosizing/form-controls-boosting-select-element-expected.html_sec1
1
<!DOCTYPE html>
2
<html>
3
<head>
4
5
<meta name="viewport" content="width=800">
6
<style>
7
  body {
8
    width: 800px;
9
    margin: 0;
10
    overflow-y: hidden;
11
    font-family: Verdana, sans-serif;
12
    font-size: small;
13
  }
14
  
15
  #boosted {
16
    font-size: 2.05rem;
17
  }
18
</style>
19
20
21
</head>
22
<body>
23
24
<div>
25
<div id="boosted">
26
This tests the boosting of a selection menu element. This paragraph should be boosted, while
27
the selection box below should not be autosized. +++++++++++++++++++++++++++++++++++++++++++
28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
29
</div>
30
<div>
31
<form action="">
32
Selection:
33
<select>
34
  <option selected value=default>Default</option>
35
  <option value=option1>Option 1</option>
36
  <option value=option2>Option 2</option>
37
</select>
38
</form>
39
</div>
40
</div>
41
42
</body>
43
</html>
- a/LayoutTests/fast/text-autosizing/form-controls-boosting-select-element.html +47 lines
Line 0 a/LayoutTests/fast/text-autosizing/form-controls-boosting-select-element.html_sec1
1
<!DOCTYPE html>
2
<html>
3
<head>
4
5
<meta name="viewport" content="width=800">
6
<style>
7
  body {
8
    width: 800px;
9
    margin: 0;
10
    overflow-y: hidden;
11
    font-family: Verdana, sans-serif;
12
    font-size: small;
13
  }
14
</style>
15
16
<script>
17
if (window.internals) {
18
    window.internals.settings.setTextAutosizingEnabled(true);
19
    window.internals.settings.setTextAutosizingWindowSizeOverride(320, 480);
20
} else if (window.console && console.warn) {
21
    console.warn("This test depends on the Text Autosizing setting being true, so run it in DumpRenderTree, or manually enable Text Autosizing, and either use a mobile device with 320px device-width (like Nexus S or iPhone), or define HACK_FORCE_TEXT_AUTOSIZING_ON_DESKTOP.");
22
}
23
</script>
24
25
</head>
26
<body>
27
28
<div>
29
<div>
30
This tests the boosting of a selection menu element. This paragraph should be boosted, while
31
the selection box below should not be autosized. +++++++++++++++++++++++++++++++++++++++++++
32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
33
</div>
34
<div>
35
<form action="">
36
Selection:
37
<select>
38
  <option selected value=default>Default</option>
39
  <option value=option1>Option 1</option>
40
  <option value=option2>Option 2</option>
41
</select>
42
</form>
43
</div>
44
</div>
45
46
</body>
47
</html>

Return to Bug 102560