Commit b032279b authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa Committed by Commit Bot

WebFrameTest: Rename |LocalFrameView()| to avoid naming conflicts

GCC is stricter than clang when it comes to class members' names and how
they can change the meaning of a previously existing symbol with the same
name:

    ../../third_party/WebKit/Source/core/exported/WebFrameTest.cpp: At global scope:
    ../../third_party/WebKit/Source/core/exported/WebFrameTest.cpp:12592:3: error: declaration of ‘blink::LocalFrameView* blink::SlimmingPaintWebFrameTest::LocalFrameView()’ [-fpermissive]
       }
       ^
    In file included from ../../third_party/WebKit/Source/core/frame/LocalFrame.h:41:0,
                     from ../../third_party/WebKit/Source/core/page/Page.h:33,
                     from ../../third_party/WebKit/Source/core/page/PageVisibilityObserver.h:31,
                     from ../../third_party/WebKit/Source/core/html/canvas/HTMLCanvasElement.h:44,
                     from ../../third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h:32,
                     from ../../third_party/WebKit/Source/core/html/canvas/ImageData.h:34,
                     from ../../third_party/WebKit/Source/bindings/core/v8/serialization/SerializedColorParams.h:8,
                     from ../../third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializer.h:11,
                    from ../../third_party/WebKit/Source/core/exported/WebFrameTest.cpp:45:
    ../../third_party/WebKit/Source/core/frame/LocalFrameView.h:105:19: error: changes meaning of ‘LocalFrameView’ from ‘class blink::LocalFrameView’ [-fpermissive]
     class CORE_EXPORT LocalFrameView final
                       ^~~~~~~~~~~~~~

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84709 contains a longer
explanation, but essentially having a |LocalFrameView()| method can change
the meaning of references to |LocalFrameView| in the code dependending on
where it is declared, which contradicts the C++ standard.

Fix it by renaming the method to |GetLocalFrameView()|.

Change-Id: I3aa9502080708653bdff68eaec51fe61850b4877
Reviewed-on: https://chromium-review.googlesource.com/968424Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#544028}
parent 897baccf
......@@ -12587,7 +12587,7 @@ class SlimmingPaintWebFrameTest : public PaintTestConfigurations,
WebLocalFrame* LocalMainFrame() { return web_view_helper_->LocalMainFrame(); }
LocalFrameView* LocalFrameView() {
LocalFrameView* GetLocalFrameView() {
return web_view_helper_->LocalMainFrame()->GetFrameView();
}
......@@ -12619,7 +12619,7 @@ class SlimmingPaintWebFrameTest : public PaintTestConfigurations,
private:
PaintArtifactCompositor* paint_artifact_compositor() {
return LocalFrameView()->GetPaintArtifactCompositorForTesting();
return GetLocalFrameView()->GetPaintArtifactCompositorForTesting();
}
FrameTestHelpers::TestWebViewClient web_view_client_;
std::unique_ptr<FrameTestHelpers::WebViewHelper> web_view_helper_;
......@@ -12703,7 +12703,7 @@ TEST_P(SlimmingPaintWebFrameTest, FrameViewScroll) {
WebView()->UpdateAllLifecyclePhases();
auto* scrollable_area = LocalFrameView()->LayoutViewportScrollableArea();
auto* scrollable_area = GetLocalFrameView()->LayoutViewportScrollableArea();
EXPECT_NE(nullptr, scrollable_area);
EXPECT_EQ(ScrollHitTestLayerCount(), 1u);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment