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

Side by Side Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 2181953004: Changed ComputedStyle's EVisibility to be an enum class and fixed naming (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_move_computedstyle_around
Patch Set: Rebase Created 4 years, 4 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 WebSize WebLocalFrameImpl::contentsSize() const 647 WebSize WebLocalFrameImpl::contentsSize() const
648 { 648 {
649 if (FrameView* view = frameView()) 649 if (FrameView* view = frameView())
650 return view->contentsSize(); 650 return view->contentsSize();
651 return WebSize(); 651 return WebSize();
652 } 652 }
653 653
654 bool WebLocalFrameImpl::hasVisibleContent() const 654 bool WebLocalFrameImpl::hasVisibleContent() const
655 { 655 {
656 if (LayoutPart* layoutObject = frame()->ownerLayoutObject()) { 656 if (LayoutPart* layoutObject = frame()->ownerLayoutObject()) {
657 if (layoutObject->style()->visibility() != VISIBLE) 657 if (layoutObject->style()->visibility() != EVisibility::Visible)
658 return false; 658 return false;
659 } 659 }
660 660
661 if (FrameView* view = frameView()) 661 if (FrameView* view = frameView())
662 return view->visibleWidth() > 0 && view->visibleHeight() > 0; 662 return view->visibleWidth() > 0 && view->visibleHeight() > 0;
663 return false; 663 return false;
664 } 664 }
665 665
666 WebRect WebLocalFrameImpl::visibleContentRect() const 666 WebRect WebLocalFrameImpl::visibleContentRect() const
667 { 667 {
(...skipping 1547 matching lines...) Expand 10 before | Expand all | Expand 10 after
2215 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; 2215 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol;
2216 } else if (metric == "wasAlternateProtocolAvailable") { 2216 } else if (metric == "wasAlternateProtocolAvailable") {
2217 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; 2217 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable;
2218 } else if (metric == "connectionInfo") { 2218 } else if (metric == "connectionInfo") {
2219 feature = UseCounter::ChromeLoadTimesConnectionInfo; 2219 feature = UseCounter::ChromeLoadTimesConnectionInfo;
2220 } 2220 }
2221 UseCounter::count(frame(), feature); 2221 UseCounter::count(frame(), feature);
2222 } 2222 }
2223 2223
2224 } // namespace blink 2224 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698