Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 2715243004: [blink] Support (semi-)transparent background colors in WebView/Frame. (Closed)
Patch Set: address comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Simon Hausmann <hausmann@kde.org> 5 * 2000 Simon Hausmann <hausmann@kde.org>
6 * 2000 Stefan Schimanski <1Stein@gmx.de> 6 * 2000 Stefan Schimanski <1Stein@gmx.de>
7 * 2001 George Staikos <staikos@kde.org> 7 * 2001 George Staikos <staikos@kde.org>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
9 * rights reserved. 9 * rights reserved.
10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 ASSERT(!m_view || m_view != view); 278 ASSERT(!m_view || m_view != view);
279 ASSERT(!document() || !document()->isActive()); 279 ASSERT(!document() || !document()->isActive());
280 280
281 eventHandler().clear(); 281 eventHandler().clear();
282 282
283 m_view = view; 283 m_view = view;
284 } 284 }
285 285
286 void LocalFrame::createView(const IntSize& viewportSize, 286 void LocalFrame::createView(const IntSize& viewportSize,
287 const Color& backgroundColor, 287 const Color& backgroundColor,
288 bool transparent,
289 ScrollbarMode horizontalScrollbarMode, 288 ScrollbarMode horizontalScrollbarMode,
290 bool horizontalLock, 289 bool horizontalLock,
291 ScrollbarMode verticalScrollbarMode, 290 ScrollbarMode verticalScrollbarMode,
292 bool verticalLock) { 291 bool verticalLock) {
293 ASSERT(this); 292 ASSERT(this);
294 ASSERT(page()); 293 ASSERT(page());
295 294
296 bool isLocalRoot = this->isLocalRoot(); 295 bool isLocalRoot = this->isLocalRoot();
297 296
298 if (isLocalRoot && view()) 297 if (isLocalRoot && view())
299 view()->setParentVisible(false); 298 view()->setParentVisible(false);
300 299
301 setView(nullptr); 300 setView(nullptr);
302 301
303 FrameView* frameView = nullptr; 302 FrameView* frameView = nullptr;
304 if (isLocalRoot) { 303 if (isLocalRoot) {
305 frameView = FrameView::create(*this, viewportSize); 304 frameView = FrameView::create(*this, viewportSize);
306 305
307 // The layout size is set by WebViewImpl to support @viewport 306 // The layout size is set by WebViewImpl to support @viewport
308 frameView->setLayoutSizeFixedToFrameSize(false); 307 frameView->setLayoutSizeFixedToFrameSize(false);
309 } else { 308 } else {
310 frameView = FrameView::create(*this); 309 frameView = FrameView::create(*this);
311 } 310 }
312 311
313 frameView->setScrollbarModes(horizontalScrollbarMode, verticalScrollbarMode, 312 frameView->setScrollbarModes(horizontalScrollbarMode, verticalScrollbarMode,
314 horizontalLock, verticalLock); 313 horizontalLock, verticalLock);
315 314
316 setView(frameView); 315 setView(frameView);
317 316
318 frameView->updateBackgroundRecursively(backgroundColor, transparent); 317 frameView->updateBaseBackgroundColorRecursively(backgroundColor);
319 318
320 if (isLocalRoot) 319 if (isLocalRoot)
321 frameView->setParentVisible(true); 320 frameView->setParentVisible(true);
322 321
323 // FIXME: Not clear what the right thing for OOPI is here. 322 // FIXME: Not clear what the right thing for OOPI is here.
324 if (!ownerLayoutItem().isNull()) { 323 if (!ownerLayoutItem().isNull()) {
325 HTMLFrameOwnerElement* owner = deprecatedLocalOwner(); 324 HTMLFrameOwnerElement* owner = deprecatedLocalOwner();
326 ASSERT(owner); 325 ASSERT(owner);
327 // FIXME: OOPI might lead to us temporarily lying to a frame and telling it 326 // FIXME: OOPI might lead to us temporarily lying to a frame and telling it
328 // that it's owned by a FrameOwner that knows nothing about it. If we're 327 // that it's owned by a FrameOwner that knows nothing about it. If we're
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 912 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
914 m_frame->client()->frameBlameContext()->Enter(); 913 m_frame->client()->frameBlameContext()->Enter();
915 } 914 }
916 915
917 ScopedFrameBlamer::~ScopedFrameBlamer() { 916 ScopedFrameBlamer::~ScopedFrameBlamer() {
918 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 917 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
919 m_frame->client()->frameBlameContext()->Leave(); 918 m_frame->client()->frameBlameContext()->Leave();
920 } 919 }
921 920
922 } // namespace blink 921 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698