Changeset 132696 in webkit


Ignore:
Timestamp:
Oct 26, 2012 2:36:46 PM (12 years ago)
Author:
scheib@chromium.org
Message:

Generated should not be supported for things with a shadow
https://bugs.webkit.org/show_bug.cgi?id=98836

Unreviewed rollout of rollout of http://trac.webkit.org/changeset/132269.
Initial rollout was speculative and was shown not to be related to crashes.
Change author: Elliott Sprehn <esprehn@chromium.org>

Source/WebCore:

As far as CSS is concerned inputs and things with shadow content inside
shouldn't support pseudo elements like :before, :after or :first-letter.
Neither Gecko or Presto supports it, and we only accidentally supported
it.

Until the spec tells us what to do we should disable support. This is
also neccesary because the new generated content implementation doesn't
support shadows.

Test: fast/forms/pseudo-elements.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::updateFirstLetter):

  • rendering/RenderListBox.h:
  • rendering/RenderObjectChildList.cpp:

(WebCore::RenderObjectChildList::updateBeforeAfterContent):

LayoutTests:

Change all pseudos on <input> tests to be ref tests and clean up the tests.
They now make sure we don't support generated content on things with a shadow.
Also added another test for the other form control types to ensure they don't
support pseudos either.

  • fast/forms/date-multiple-fields/date-multiple-fields-appearance-pseudo-elements-expected.html: Added.
  • fast/forms/date-multiple-fields/date-multiple-fields-appearance-pseudo-elements-expected.txt: Removed.
  • fast/forms/date-multiple-fields/date-multiple-fields-appearance-pseudo-elements.html:
  • fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements-expected.html: Added.
  • fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements-expected.txt: Removed.
  • fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements.html:
  • fast/forms/pseudo-elements-expected.html: Added.
  • fast/forms/pseudo-elements.html: Added.
  • fast/forms/time-multiple-fields/time-multiple-fields-appearance-pseudo-elements-expected.html: Added.
  • fast/forms/time-multiple-fields/time-multiple-fields-appearance-pseudo-elements-expected.txt: Removed.
  • fast/forms/time-multiple-fields/time-multiple-fields-appearance-pseudo-elements.html:
  • fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-elements-expected.html: Added.
  • fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-elements-expected.txt: Removed.
  • fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-elements.html:
  • platform/chromium-linux/fast/forms/date-multiple-fields/date-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
  • platform/chromium-linux/fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
  • platform/chromium-linux/fast/forms/time-multiple-fields/time-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
  • platform/chromium-linux/fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
  • platform/chromium-mac-lion/fast/forms/date-multiple-fields/date-multiple-fields-appearance-pseudo-elements-expected.png:
  • platform/chromium-mac-lion/fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
  • platform/chromium-mac-lion/fast/forms/time-multiple-fields/time-multiple-fields-appearance-pseudo-elements-expected.png:
  • platform/chromium-mac-lion/fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-elements-expected.png:
  • platform/chromium-mac-snowleopard/fast/forms/date-multiple-fields/date-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
  • platform/chromium-mac-snowleopard/fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
  • platform/chromium-mac-snowleopard/fast/forms/time-multiple-fields/time-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
  • platform/chromium-mac-snowleopard/fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
  • platform/chromium-mac/fast/forms/date-multiple-fields/date-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
  • platform/chromium-mac/fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
  • platform/chromium-mac/fast/forms/time-multiple-fields/time-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
  • platform/chromium-mac/fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
  • platform/chromium-win/fast/forms/date-multiple-fields/date-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
  • platform/chromium-win/fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
  • platform/chromium-win/fast/forms/time-multiple-fields/time-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
  • platform/chromium-win/fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
Location:
trunk
Files:
6 added
21 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r132694 r132696  
     12012-10-26  Vincent Scheib  <scheib@chromium.org>
     2
     3        Generated should not be supported for things with a shadow
     4        https://bugs.webkit.org/show_bug.cgi?id=98836
     5
     6        Unreviewed rollout of rollout of http://trac.webkit.org/changeset/132269.
     7        Initial rollout was speculative and was shown not to be related to crashes.
     8        Change author: Elliott Sprehn  <esprehn@chromium.org>
     9
     10        Change all pseudos on <input> tests to be ref tests and clean up the tests.
     11        They now make sure we don't support generated content on things with a shadow.
     12        Also added another test for the other form control types to ensure they don't
     13        support pseudos either.
     14
     15        * fast/forms/date-multiple-fields/date-multiple-fields-appearance-pseudo-elements-expected.html: Added.
     16        * fast/forms/date-multiple-fields/date-multiple-fields-appearance-pseudo-elements-expected.txt: Removed.
     17        * fast/forms/date-multiple-fields/date-multiple-fields-appearance-pseudo-elements.html:
     18        * fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements-expected.html: Added.
     19        * fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements-expected.txt: Removed.
     20        * fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements.html:
     21        * fast/forms/pseudo-elements-expected.html: Added.
     22        * fast/forms/pseudo-elements.html: Added.
     23        * fast/forms/time-multiple-fields/time-multiple-fields-appearance-pseudo-elements-expected.html: Added.
     24        * fast/forms/time-multiple-fields/time-multiple-fields-appearance-pseudo-elements-expected.txt: Removed.
     25        * fast/forms/time-multiple-fields/time-multiple-fields-appearance-pseudo-elements.html:
     26        * fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-elements-expected.html: Added.
     27        * fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-elements-expected.txt: Removed.
     28        * fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-elements.html:
     29        * platform/chromium-linux/fast/forms/date-multiple-fields/date-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
     30        * platform/chromium-linux/fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
     31        * platform/chromium-linux/fast/forms/time-multiple-fields/time-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
     32        * platform/chromium-linux/fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
     33        * platform/chromium-mac-lion/fast/forms/date-multiple-fields/date-multiple-fields-appearance-pseudo-elements-expected.png:
     34        * platform/chromium-mac-lion/fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
     35        * platform/chromium-mac-lion/fast/forms/time-multiple-fields/time-multiple-fields-appearance-pseudo-elements-expected.png:
     36        * platform/chromium-mac-lion/fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-elements-expected.png:
     37        * platform/chromium-mac-snowleopard/fast/forms/date-multiple-fields/date-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
     38        * platform/chromium-mac-snowleopard/fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
     39        * platform/chromium-mac-snowleopard/fast/forms/time-multiple-fields/time-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
     40        * platform/chromium-mac-snowleopard/fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
     41        * platform/chromium-mac/fast/forms/date-multiple-fields/date-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
     42        * platform/chromium-mac/fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
     43        * platform/chromium-mac/fast/forms/time-multiple-fields/time-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
     44        * platform/chromium-mac/fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
     45        * platform/chromium-win/fast/forms/date-multiple-fields/date-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
     46        * platform/chromium-win/fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
     47        * platform/chromium-win/fast/forms/time-multiple-fields/time-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
     48        * platform/chromium-win/fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-elements-expected.png: Removed.
     49
    1502012-10-26  Aaron Colwell  <acolwell@chromium.org>
    251
  • trunk/LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-appearance-pseudo-elements.html

    r132529 r132696  
    1 <html>
    2 <head>
    3 <style type="text/css">
     1<!DOCTYPE html>
     2
     3<style>
    44.after:after { content: "[after]"; }
    55.before:before { content: "[before]"; }
    66.first-letter:first-letter { color: green; font-size: 200%; }
    77</style>
    8 </head>
    9 <body>
    10 <ul>
    11     <li><input type="date" value="1234-05-07" class="after"></li>
    12     <li><input type="date" value="1234-05-07" class="before"></li>
    13     <li><input type="date" value="1234-05-07" class="first-letter"></li>
    14 </ul>
    15 <script>
    16 if (window.testRunner)
    17     testRunner.dumpAsText(true);
    18 </script>
    19 </body>
    20 </html>
     8
     9<input type="date" value="1234-05-07" class="after"><br>
     10<input type="date" value="1234-05-07" class="before"><br>
     11<input type="date" value="1234-05-07" class="first-letter">
  • trunk/LayoutTests/fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements.html

    r132529 r132696  
    1 <html>
    2 <head>
    3 <style type="text/css">
     1<!DOCTYPE html>
     2
     3<style>
    44.after:after { content: "[after]"; }
    55.before:before { content: "[before]"; }
    66.first-letter:first-letter { color: green; font-size: 200%; }
    77</style>
    8 </head>
    9 <body>
    10 <ul>
    11     <li><input type="month" value="1982-11" class="after"></li>
    12     <li><input type="month" value="1982-11" class="before"></li>
    13     <li><input type="month" value="1982-11" class="first-letter"></li>
    14 </ul>
    15 </body>
    16 <script>
    17 if (window.testRunner)
    18     testRunner.dumpAsText(true);
    19 </script>
    20 </html>
     8
     9<input type="month" value="1982-11" class="after"><br>
     10<input type="month" value="1982-11" class="before"><br>
     11<input type="month" value="1982-11" class="first-letter">
  • trunk/LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-appearance-pseudo-elements.html

    r132529 r132696  
    1 <html>
    2 <head>
    3 <style type="text/css">
     1<!DOCTYPE html>
     2
     3<style>
    44.after:after { content: "[after]"; }
    55.before:before { content: "[before]"; }
    66.first-letter:first-letter { color: green; font-size: 200%; }
    77</style>
    8 </head>
    9 <body>
    10 <ul>
    11     <li><input type="time" value="12:34" class="after"></li>
    12     <li><input type="time" value="12:34" class="before"></li>
    13     <li><input type="time" value="12:34" class="first-letter"></li>
    14 </ul>
    15 </body>
    16 <script>
    17 if (window.testRunner) {
    18     testRunner.dumpAsText(true);
    19 }
    20 </script>
    21 </html>
     8
     9<input type="time" value="12:34" class="after"><br>
     10<input type="time" value="12:34" class="before"><br>
     11<input type="time" value="12:34" class="first-letter">
  • trunk/LayoutTests/fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-elements.html

    r132529 r132696  
    1 <html>
    2 <head>
    3 <style type="text/css">
     1<!DOCTYPE html>
     2
     3<style>
    44.after:after { content: "[after]"; }
    55.before:before { content: "[before]"; }
    66.first-letter:first-letter { color: green; font-size: 200%; }
    77</style>
    8 </head>
    9 <body>
    10 <ul>
    11     <li><input type="week" value="1982-W25" class="after"></li>
    12     <li><input type="week" value="1982-W25" class="before"></li>
    13     <li><input type="week" value="1982-W25" class="first-letter"></li>
    14 </ul>
    15 </body>
    16 <script>
    17 if (window.testRunner)
    18     testRunner.dumpAsText(true);
    19 </script>
    20 </html>
     8
     9<input type="week" value="1982-W25" class="after"><br>
     10<input type="week" value="1982-W25" class="before"><br>
     11<input type="week" value="1982-W25" class="first-letter">
  • trunk/Source/WebCore/ChangeLog

    r132695 r132696  
     12012-10-26  Vincent Scheib  <scheib@chromium.org>
     2
     3        Generated should not be supported for things with a shadow
     4        https://bugs.webkit.org/show_bug.cgi?id=98836
     5
     6        Unreviewed rollout of rollout of http://trac.webkit.org/changeset/132269.
     7        Initial rollout was speculative and was shown not to be related to crashes.
     8        Change author: Elliott Sprehn  <esprehn@chromium.org>
     9
     10        As far as CSS is concerned inputs and things with shadow content inside
     11        shouldn't support pseudo elements like :before, :after or :first-letter.
     12        Neither Gecko or Presto supports it, and we only accidentally supported
     13        it.
     14 
     15        Until the spec tells us what to do we should disable support. This is
     16        also neccesary because the new generated content implementation doesn't
     17        support shadows.
     18
     19        Test: fast/forms/pseudo-elements.html
     20
     21        * rendering/RenderBlock.cpp:
     22        (WebCore::RenderBlock::updateFirstLetter):
     23        * rendering/RenderListBox.h:
     24        * rendering/RenderObjectChildList.cpp:
     25        (WebCore::RenderObjectChildList::updateBeforeAfterContent):
     26
    1272012-10-26  Brady Eidson  <beidson@apple.com>
    228
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r132602 r132696  
    65186518        return;
    65196519
     6520    // Disallow generated content in shadows until the spec says what to do. See: http://webkit.org/b/98836
     6521    if (isShadowHost(firstLetterBlock->node()))
     6522        return;
     6523
    65206524    // If the child already has style, then it has already been created, so we just want
    65216525    // to update it.
  • trunk/Source/WebCore/rendering/RenderListBox.h

    r132529 r132696  
    6868    virtual bool canBeReplacedWithInlineRunIn() const OVERRIDE;
    6969    virtual bool hasControlClip() const { return true; }
     70    virtual bool canHaveGeneratedChildren() const OVERRIDE { return false; }
    7071    virtual void paintObject(PaintInfo&, const LayoutPoint&);
    7172    virtual LayoutRect controlClipRect(const LayoutPoint&) const;
  • trunk/Source/WebCore/rendering/RenderObjectChildList.cpp

    r132591 r132696  
    3030#include "AXObjectCache.h"
    3131#include "ContentData.h"
     32#include "Element.h"
    3233#include "RenderBlock.h"
    3334#include "RenderCounter.h"
     
    339340        styledObject = owner;
    340341
     342    // Disallow generated content in shadows until the spec says what to do. See: http://webkit.org/b/98836
     343    if (isShadowHost(styledObject->node()))
     344        return;
     345
    341346    RenderStyle* pseudoElementStyle = styledObject->getCachedPseudoStyle(type);
    342347    RenderObject* child;
Note: See TracChangeset for help on using the changeset viewer.