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

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

Issue 1406133005: Calculate paint invalidation rect for scrollbars (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 IntSize VisualViewport::contentsSize() const 536 IntSize VisualViewport::contentsSize() const
537 { 537 {
538 LocalFrame* frame = mainFrame(); 538 LocalFrame* frame = mainFrame();
539 539
540 if (!frame || !frame->view()) 540 if (!frame || !frame->view())
541 return IntSize(); 541 return IntSize();
542 542
543 return frame->view()->visibleContentRect(IncludeScrollbars).size(); 543 return frame->view()->visibleContentRect(IncludeScrollbars).size();
544 } 544 }
545 545
546 void VisualViewport::invalidateScrollbarRect(Scrollbar*, const IntRect&)
547 {
548 // Do nothing. Visual scrollbars live on the compositor thread and will
549 // be updated when the viewport is synced to the CC.
550 }
551
552 void VisualViewport::setScrollOffset(const IntPoint& offset, ScrollType scrollTy pe) 546 void VisualViewport::setScrollOffset(const IntPoint& offset, ScrollType scrollTy pe)
553 { 547 {
554 setScrollOffset(DoublePoint(offset), scrollType); 548 setScrollOffset(DoublePoint(offset), scrollType);
555 } 549 }
556 550
557 void VisualViewport::setScrollOffset(const DoublePoint& offset, ScrollType) 551 void VisualViewport::setScrollOffset(const DoublePoint& offset, ScrollType)
558 { 552 {
559 setLocation(toFloatPoint(offset)); 553 setLocation(toFloatPoint(offset));
560 } 554 }
561 555
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 } else if (graphicsLayer == m_rootTransformLayer) { 731 } else if (graphicsLayer == m_rootTransformLayer) {
738 name = "Root Transform Layer"; 732 name = "Root Transform Layer";
739 } else { 733 } else {
740 ASSERT_NOT_REACHED(); 734 ASSERT_NOT_REACHED();
741 } 735 }
742 736
743 return name; 737 return name;
744 } 738 }
745 739
746 } // namespace blink 740 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/VisualViewport.h ('k') | third_party/WebKit/Source/core/layout/LayoutBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698