Use explicit HTMLFrameElementBase cast
Created attachment 207039 [details] Patch
Comment on attachment 207039 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=207039&action=review > Source/WebCore/ChangeLog:9 > + It should be HTMLFrameElementBase that embraces both HTMLFrameElement and HTMLIFrameElement. > + This also makes correct toFooElement possible. Can we also fix RenderLayer::scrollRectToVisible not to cast the pointer to HTMLFrameElement?
I also think it'll be valuable to add toHTMLFrameElementBase calls in the same patch.
Created attachment 207045 [details] Patch
Took Ryosuke's comment into consideration.
Comment on attachment 207045 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=207045&action=review > Source/WebCore/rendering/RenderLayer.cpp:2267 > -static inline bool frameElementAndViewPermitScroll(HTMLFrameElement* frameElement, FrameView* frameView) > +static inline bool frameElementAndViewPermitScroll(HTMLFrameElementBase* frameElementBase, FrameView* frameView) What I meant to say is that we should fix the caller of this function where we're incorrectly casting HTMLIFrameElement to HTMLFrameElement.
Comment on attachment 207045 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=207045&action=review > Source/WebCore/rendering/RenderFrameBase.cpp:76 > - HTMLFrameElementBase* element = static_cast<HTMLFrameElementBase*>(node()); > + HTMLFrameElementBase* element = toHTMLFrameElementBase(node()); > bool isScrollable = element->scrollingMode() != ScrollbarAlwaysOff; It seems like this local variable is used only once. You might as well as do: toHTMLFrameElementBase(node())->scrollingMode() != ScrollbarAlwaysOff instead.
Created attachment 207058 [details] Patch
Comment on attachment 207058 [details] Patch Clearing flags on attachment: 207058 Committed r152889: <http://trac.webkit.org/changeset/152889>
All reviewed patches have been landed. Closing bug.