Bug 87342 - Elements in Shadow DOM is not resizable.
Summary: Elements in Shadow DOM is not resizable.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Shinya Kawanaka
URL:
Keywords:
Depends on:
Blocks: 82568 87230
  Show dependency treegraph
 
Reported: 2012-05-23 22:21 PDT by Shinya Kawanaka
Modified: 2012-05-24 02:16 PDT (History)
8 users (show)

See Also:


Attachments
Patch (4.48 KB, patch)
2012-05-23 22:36 PDT, Shinya Kawanaka
no flags Details | Formatted Diff | Diff
Patch for landing (4.46 KB, patch)
2012-05-23 23:01 PDT, Shinya Kawanaka
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Shinya Kawanaka 2012-05-23 22:21:10 PDT
When an element has CSS { resize: 'both' }, it should be resizable.
However if it is in Shadow DOM, it cannot be resizable.
Comment 1 Shinya Kawanaka 2012-05-23 22:27:06 PDT
Actually the root cause of this issue is the same as bug 82568, but this is testable...
Comment 2 Shinya Kawanaka 2012-05-23 22:36:36 PDT
Created attachment 143733 [details]
Patch
Comment 3 Shinya Kawanaka 2012-05-23 22:38:09 PDT
Unfortunately I couldn't succeed testing textarea in Shadow DOM yet. It should be resizable by this patch, however I cannot confirm it in DRT... Writing a test for it should be done in Bug 82568, I think.
Comment 4 Ryosuke Niwa 2012-05-23 22:41:56 PDT
Comment on attachment 143733 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=143733&action=review

> Source/WebCore/ChangeLog:3
> +        Elements in Shadow DOM is not resizable.

Nit: ARE not resizable.

> Source/WebCore/rendering/RenderLayer.cpp:1858
> +    Element* element = static_cast<Element*>(renderer()->node());

Don't we have toElement? We should at least assert that node() is Element*.

> LayoutTests/ChangeLog:3
> +        Elements in Shadow DOM is not resizable.

Ditto: are.

> LayoutTests/fast/dom/shadow/resize-in-shadow-dom.html:6
> +<script src="resources/polyfill.js"></script>
> +<script src="../resources/event-sender-util.js"></script>
> +<script src="../../js/resources/js-test-pre.js"></script>

You can put all of this in the body instead.

> LayoutTests/fast/dom/shadow/resize-in-shadow-dom.html:40
> +var element = document.elementFromPoint(x, y);

Why do we need this statement here?
Comment 5 Shinya Kawanaka 2012-05-23 23:01:32 PDT
Created attachment 143738 [details]
Patch for landing
Comment 6 Shinya Kawanaka 2012-05-23 23:02:22 PDT
(In reply to comment #4)
> (From update of attachment 143733 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=143733&action=review
> 
> > Source/WebCore/ChangeLog:3
> > +        Elements in Shadow DOM is not resizable.
> 
> Nit: ARE not resizable.
> 
> > Source/WebCore/rendering/RenderLayer.cpp:1858
> > +    Element* element = static_cast<Element*>(renderer()->node());
> 
> Don't we have toElement? We should at least assert that node() is Element*.
> 
> > LayoutTests/ChangeLog:3
> > +        Elements in Shadow DOM is not resizable.
> 
> Ditto: are.
> 
> > LayoutTests/fast/dom/shadow/resize-in-shadow-dom.html:6
> > +<script src="resources/polyfill.js"></script>
> > +<script src="../resources/event-sender-util.js"></script>
> > +<script src="../../js/resources/js-test-pre.js"></script>
> 
> You can put all of this in the body instead.
> 
> > LayoutTests/fast/dom/shadow/resize-in-shadow-dom.html:40
> > +var element = document.elementFromPoint(x, y);
> 
> Why do we need this statement here?

Thanks for very fast review! I've updated the patch. I will land it after the bots become green.
Comment 7 WebKit Review Bot 2012-05-24 02:16:22 PDT
Comment on attachment 143738 [details]
Patch for landing

Clearing flags on attachment: 143738

Committed r118338: <http://trac.webkit.org/changeset/118338>
Comment 8 WebKit Review Bot 2012-05-24 02:16:27 PDT
All reviewed patches have been landed.  Closing bug.