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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 1977 matching lines...) Expand 10 before | Expand all | Expand 10 after
1988 } 1988 }
1989 1989
1990 PassRefPtr<ComputedStyle> Document::styleForPage(int pageIndex) 1990 PassRefPtr<ComputedStyle> Document::styleForPage(int pageIndex)
1991 { 1991 {
1992 updateDistribution(); 1992 updateDistribution();
1993 return ensureStyleResolver().styleForPage(pageIndex); 1993 return ensureStyleResolver().styleForPage(pageIndex);
1994 } 1994 }
1995 1995
1996 bool Document::isPageBoxVisible(int pageIndex) 1996 bool Document::isPageBoxVisible(int pageIndex)
1997 { 1997 {
1998 return styleForPage(pageIndex)->visibility() != HIDDEN; // display property doesn't apply to @page. 1998 return styleForPage(pageIndex)->visibility() != EVisibility::Hidden; // disp lay property doesn't apply to @page.
1999 } 1999 }
2000 2000
2001 void Document::pageSizeAndMarginsInPixels(int pageIndex, IntSize& pageSize, int& marginTop, int& marginRight, int& marginBottom, int& marginLeft) 2001 void Document::pageSizeAndMarginsInPixels(int pageIndex, IntSize& pageSize, int& marginTop, int& marginRight, int& marginBottom, int& marginLeft)
2002 { 2002 {
2003 RefPtr<ComputedStyle> style = styleForPage(pageIndex); 2003 RefPtr<ComputedStyle> style = styleForPage(pageIndex);
2004 2004
2005 int width = pageSize.width(); 2005 int width = pageSize.width();
2006 int height = pageSize.height(); 2006 int height = pageSize.height();
2007 switch (style->getPageSizeType()) { 2007 switch (style->getPageSizeType()) {
2008 case PAGE_SIZE_AUTO: 2008 case PAGE_SIZE_AUTO:
(...skipping 4039 matching lines...) Expand 10 before | Expand all | Expand 10 after
6048 } 6048 }
6049 6049
6050 void showLiveDocumentInstances() 6050 void showLiveDocumentInstances()
6051 { 6051 {
6052 WeakDocumentSet& set = liveDocumentSet(); 6052 WeakDocumentSet& set = liveDocumentSet();
6053 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6053 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6054 for (Document* document : set) 6054 for (Document* document : set)
6055 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); 6055 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data());
6056 } 6056 }
6057 #endif 6057 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698