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

Side by Side Diff: sky/engine/core/frame/FrameView.cpp

Issue 1076623002: Remove our impressive amount of CSS Cursor code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « sky/engine/core/frame/FrameView.h ('k') | sky/engine/core/page/ChromeClient.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 359
360 AtomicString FrameView::mediaType() const 360 AtomicString FrameView::mediaType() const
361 { 361 {
362 // See if we have an override type. 362 // See if we have an override type.
363 String overrideType; 363 String overrideType;
364 if (!overrideType.isNull()) 364 if (!overrideType.isNull())
365 return AtomicString(overrideType); 365 return AtomicString(overrideType);
366 return m_mediaType; 366 return m_mediaType;
367 } 367 }
368 368
369 bool FrameView::shouldSetCursor() const
370 {
371 Page* page = frame().page();
372 return page && page->visibilityState() != PageVisibilityStateHidden && page- >focusController().isActive() && page->settings().deviceSupportsMouse();
373 }
374
375 // FIXME(sky): remove 369 // FIXME(sky): remove
376 IntSize FrameView::layoutSize() const 370 IntSize FrameView::layoutSize() const
377 { 371 {
378 return m_layoutSize; 372 return m_layoutSize;
379 } 373 }
380 374
381 void FrameView::setLayoutSize(const IntSize& size) 375 void FrameView::setLayoutSize(const IntSize& size)
382 { 376 {
383 ASSERT(!layoutSizeFixedToFrameSize()); 377 ASSERT(!layoutSizeFixedToFrameSize());
384 378
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 // FIXME(sky): Remove 741 // FIXME(sky): Remove
748 return true; 742 return true;
749 } 743 }
750 744
751 bool FrameView::isFlippedDocument() const 745 bool FrameView::isFlippedDocument() const
752 { 746 {
753 // FIXME(sky): Remove 747 // FIXME(sky): Remove
754 return false; 748 return false;
755 } 749 }
756 750
757 void FrameView::setCursor(const Cursor& cursor)
758 {
759 Page* page = frame().page();
760 if (!page || !page->settings().deviceSupportsMouse())
761 return;
762 page->setCursor(cursor);
763 }
764
765 void FrameView::setLayoutSizeInternal(const IntSize& size) 751 void FrameView::setLayoutSizeInternal(const IntSize& size)
766 { 752 {
767 if (m_layoutSize == size) 753 if (m_layoutSize == size)
768 return; 754 return;
769 755
770 m_layoutSize = size; 756 m_layoutSize = size;
771 contentsResized(); 757 contentsResized();
772 } 758 }
773 759
774 void FrameView::countObjectsNeedingLayout(unsigned& needsLayoutObjects, unsigned & totalObjects, bool& isPartial) 760 void FrameView::countObjectsNeedingLayout(unsigned& needsLayoutObjects, unsigned & totalObjects, bool& isPartial)
775 { 761 {
776 RenderObject* root = layoutRoot(); 762 RenderObject* root = layoutRoot();
777 isPartial = true; 763 isPartial = true;
778 if (!root) { 764 if (!root) {
779 isPartial = false; 765 isPartial = false;
780 root = m_frame->contentRenderer(); 766 root = m_frame->contentRenderer();
781 } 767 }
782 768
783 needsLayoutObjects = 0; 769 needsLayoutObjects = 0;
784 totalObjects = 0; 770 totalObjects = 0;
785 771
786 for (RenderObject* o = root; o; o = o->nextInPreOrder(root)) { 772 for (RenderObject* o = root; o; o = o->nextInPreOrder(root)) {
787 ++totalObjects; 773 ++totalObjects;
788 if (o->needsLayout()) 774 if (o->needsLayout())
789 ++needsLayoutObjects; 775 ++needsLayoutObjects;
790 } 776 }
791 } 777 }
792 778
793 } // namespace blink 779 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/frame/FrameView.h ('k') | sky/engine/core/page/ChromeClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698