Bug 120208 - RenderView::frameView() should return a reference.
Summary: RenderView::frameView() should return a reference.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-23 07:49 PDT by Andreas Kling
Modified: 2013-08-23 09:37 PDT (History)
9 users (show)

See Also:


Attachments
EWS experiment (85.42 KB, patch)
2013-08-23 07:50 PDT, Andreas Kling
eflews.bot: commit-queue-
Details | Formatted Diff | Diff
Proposed patch (86.08 KB, patch)
2013-08-23 08:28 PDT, Andreas Kling
webkit-ews: commit-queue-
Details | Formatted Diff | Diff
Proposed patch (86.45 KB, patch)
2013-08-23 08:43 PDT, Andreas Kling
koivisto: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2013-08-23 07:49:45 PDT
A RenderView should always have a corresponding FrameView.
Comment 1 Andreas Kling 2013-08-23 07:50:22 PDT
Created attachment 209461 [details]
EWS experiment
Comment 2 WebKit Commit Bot 2013-08-23 07:52:22 PDT
Attachment 209461 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/accessibility/AccessibilityRenderObject.cpp', u'Source/WebCore/editing/FrameSelection.cpp', u'Source/WebCore/rendering/InlineFlowBox.cpp', u'Source/WebCore/rendering/RenderBlock.cpp', u'Source/WebCore/rendering/RenderBox.cpp', u'Source/WebCore/rendering/RenderBoxModelObject.cpp', u'Source/WebCore/rendering/RenderEmbeddedObject.cpp', u'Source/WebCore/rendering/RenderHTMLCanvas.cpp', u'Source/WebCore/rendering/RenderImage.cpp', u'Source/WebCore/rendering/RenderLayer.cpp', u'Source/WebCore/rendering/RenderLayerBacking.cpp', u'Source/WebCore/rendering/RenderLayerCompositor.cpp', u'Source/WebCore/rendering/RenderLayerModelObject.cpp', u'Source/WebCore/rendering/RenderListBox.cpp', u'Source/WebCore/rendering/RenderObject.cpp', u'Source/WebCore/rendering/RenderScrollbarPart.cpp', u'Source/WebCore/rendering/RenderText.cpp', u'Source/WebCore/rendering/RenderTheme.cpp', u'Source/WebCore/rendering/RenderThemeMac.mm', u'Source/WebCore/rendering/RenderView.cpp', u'Source/WebCore/rendering/RenderView.h', u'Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm', u'Source/WebKit/mac/WebView/WebFullScreenController.mm', u'Source/WebKit2/WebProcess/FullScreen/WebFullScreenManager.cpp']" exit_code: 1
Source/WebCore/rendering/RenderView.cpp:520:  Should have only a single space after a punctuation in a comment.  [whitespace/comments] [5]
Total errors found: 1 in 24 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 EFL EWS Bot 2013-08-23 07:56:23 PDT
Comment on attachment 209461 [details]
EWS experiment

Attachment 209461 [details] did not pass efl-ews (efl):
Output: http://webkit-queues.appspot.com/results/1542305
Comment 4 Early Warning System Bot 2013-08-23 07:56:57 PDT
Comment on attachment 209461 [details]
EWS experiment

Attachment 209461 [details] did not pass qt-ews (qt):
Output: http://webkit-queues.appspot.com/results/1555241
Comment 5 EFL EWS Bot 2013-08-23 07:57:10 PDT
Comment on attachment 209461 [details]
EWS experiment

Attachment 209461 [details] did not pass efl-wk2-ews (efl-wk2):
Output: http://webkit-queues.appspot.com/results/1526661
Comment 6 Early Warning System Bot 2013-08-23 07:58:21 PDT
Comment on attachment 209461 [details]
EWS experiment

Attachment 209461 [details] did not pass qt-wk2-ews (qt-wk2):
Output: http://webkit-queues.appspot.com/results/1546291
Comment 7 Andreas Kling 2013-08-23 08:28:03 PDT
Created attachment 209463 [details]
Proposed patch
Comment 8 Early Warning System Bot 2013-08-23 08:33:49 PDT
Comment on attachment 209463 [details]
Proposed patch

Attachment 209463 [details] did not pass qt-ews (qt):
Output: http://webkit-queues.appspot.com/results/1525974
Comment 9 EFL EWS Bot 2013-08-23 08:34:23 PDT
Comment on attachment 209463 [details]
Proposed patch

Attachment 209463 [details] did not pass efl-wk2-ews (efl-wk2):
Output: http://webkit-queues.appspot.com/results/1525975
Comment 10 EFL EWS Bot 2013-08-23 08:34:30 PDT
Comment on attachment 209463 [details]
Proposed patch

Attachment 209463 [details] did not pass efl-ews (efl):
Output: http://webkit-queues.appspot.com/results/1557166
Comment 11 kov's GTK+ EWS bot 2013-08-23 08:34:34 PDT
Comment on attachment 209463 [details]
Proposed patch

Attachment 209463 [details] did not pass gtk-ews (gtk):
Output: http://webkit-queues.appspot.com/results/1520989
Comment 12 Early Warning System Bot 2013-08-23 08:34:44 PDT
Comment on attachment 209463 [details]
Proposed patch

Attachment 209463 [details] did not pass qt-wk2-ews (qt-wk2):
Output: http://webkit-queues.appspot.com/results/1546301
Comment 13 Andreas Kling 2013-08-23 08:43:58 PDT
Created attachment 209464 [details]
Proposed patch
Comment 14 Andreas Kling 2013-08-23 09:33:16 PDT
Committed r154488: <http://trac.webkit.org/changeset/154488>
Comment 15 Antti Koivisto 2013-08-23 09:35:52 PDT
Comment on attachment 209464 [details]
Proposed patch

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

> Source/WebCore/rendering/RenderBox.cpp:2992
> +    FrameView* frameView = view() ? &view()->frameView() : 0;
>      if (fixedElementLaysOutRelativeToFrame(frame, frameView))
>          return (view()->isHorizontalWritingMode() ? frameView->visibleWidth() : frameView->visibleHeight()) / frame->frameScaleFactor();

Some of this stuff could probably be converted to be even more & based in the future.
Comment 16 Antti Koivisto 2013-08-23 09:37:35 PDT
(In reply to comment #15)
> (From update of attachment 209464 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=209464&action=review
> 
> > Source/WebCore/rendering/RenderBox.cpp:2992
> > +    FrameView* frameView = view() ? &view()->frameView() : 0;
> >      if (fixedElementLaysOutRelativeToFrame(frame, frameView))
> >          return (view()->isHorizontalWritingMode() ? frameView->visibleWidth() : frameView->visibleHeight()) / frame->frameScaleFactor();
> 
> Some of this stuff could probably be converted to be even more & based in the future.

It is not clear at all why the code above is safe. Not the fault of this patch but still.