Re-name Page::layoutMilestones() to Page::requestedLayoutMilestones()
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Apr 2013 03:55:36 +0000 (03:55 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Apr 2013 03:55:36 +0000 (03:55 +0000)
https://bugs.webkit.org/show_bug.cgi?id=114713

Reviewed by Simon Fraser.

Source/WebCore:

* page/FrameView.cpp:
(WebCore::FrameView::performPostLayoutTasks):
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::addLayoutMilestones):
(WebCore::Page::removeLayoutMilestones):
(WebCore::Page::isCountingRelevantRepaintedObjects):
* page/Page.h:
(WebCore::Page::requestedLayoutMilestones):
(Page):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):

Source/WebKit/mac:

* WebView/WebView.mm:
(-[WebView _layoutMilestones]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@148590 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/Page.cpp
Source/WebCore/page/Page.h
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebView.mm

index 69fd5dd..6758511 100644 (file)
@@ -1,3 +1,23 @@
+2013-04-16  Beth Dakin  <bdakin@apple.com>
+
+        Re-name Page::layoutMilestones() to Page::requestedLayoutMilestones()
+        https://bugs.webkit.org/show_bug.cgi?id=114713
+
+        Reviewed by Simon Fraser.
+
+        * page/FrameView.cpp:
+        (WebCore::FrameView::performPostLayoutTasks):
+        * page/Page.cpp:
+        (WebCore::Page::Page):
+        (WebCore::Page::addLayoutMilestones):
+        (WebCore::Page::removeLayoutMilestones):
+        (WebCore::Page::isCountingRelevantRepaintedObjects):
+        * page/Page.h:
+        (WebCore::Page::requestedLayoutMilestones):
+        (Page):
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
+
 2013-04-16  Patrick Gansterer  <paroga@webkit.org>
 
         [CMake] Fix dependecy calculation for generated inspector files
index 5b920e2..9c078c6 100644 (file)
@@ -2697,17 +2697,17 @@ void FrameView::performPostLayoutTasks()
     m_frame->selection()->setCaretRectNeedsUpdate();
     m_frame->selection()->updateAppearance();
 
-    LayoutMilestones milestonesOfInterest = 0;
+    LayoutMilestones requestedMilestones = 0;
     LayoutMilestones milestonesAchieved = 0;
     Page* page = m_frame->page();
     if (page)
-        milestonesOfInterest = page->layoutMilestones();
+        requestedMilestones = page->requestedLayoutMilestones();
 
     if (m_nestedLayoutCount <= 1) {
         if (m_firstLayoutCallbackPending) {
             m_firstLayoutCallbackPending = false;
             m_frame->loader()->didFirstLayout();
-            if (milestonesOfInterest & DidFirstLayout)
+            if (requestedMilestones & DidFirstLayout)
                 milestonesAchieved |= DidFirstLayout;
             if (page) {
                 if (page->mainFrame() == m_frame)
@@ -2722,7 +2722,7 @@ void FrameView::performPostLayoutTasks()
         // If the layout was done with pending sheets, we are not in fact visually non-empty yet.
         if (m_isVisuallyNonEmpty && !m_frame->document()->didLayoutWithPendingStylesheets() && m_firstVisuallyNonEmptyLayoutCallbackPending) {
             m_firstVisuallyNonEmptyLayoutCallbackPending = false;
-            if (milestonesOfInterest & DidFirstVisuallyNonEmptyLayout)
+            if (requestedMilestones & DidFirstVisuallyNonEmptyLayout)
                 milestonesAchieved |= DidFirstVisuallyNonEmptyLayout;
         }
     }
index e3a356c..07e729b 100644 (file)
@@ -174,7 +174,7 @@ Page::Page(PageClients& pageClients)
     , m_visibilityState(PageVisibilityStateVisible)
 #endif
     , m_displayID(0)
-    , m_layoutMilestones(0)
+    , m_requestedLayoutMilestones(0)
     , m_isCountingRelevantRepaintedObjects(false)
 #ifndef NDEBUG
     , m_isPainting(false)
@@ -1271,12 +1271,12 @@ PageVisibilityState Page::visibilityState() const
 void Page::addLayoutMilestones(LayoutMilestones milestones)
 {
     // In the future, we may want a function that replaces m_layoutMilestones instead of just adding to it.
-    m_layoutMilestones |= milestones;
+    m_requestedLayoutMilestones |= milestones;
 }
 
 void Page::removeLayoutMilestones(LayoutMilestones milestones)
 {
-    m_layoutMilestones &= ~milestones;
+    m_requestedLayoutMilestones &= ~milestones;
 }
 
 // These are magical constants that might be tweaked over time.
@@ -1285,7 +1285,7 @@ static double gMaximumUnpaintedAreaRatio = 0.04;
 
 bool Page::isCountingRelevantRepaintedObjects() const
 {
-    return m_isCountingRelevantRepaintedObjects && (m_layoutMilestones & DidHitRelevantRepaintedObjectsAreaThreshold);
+    return m_isCountingRelevantRepaintedObjects && (m_requestedLayoutMilestones & DidHitRelevantRepaintedObjectsAreaThreshold);
 }
 
 void Page::startCountingRelevantRepaintedObjects()
index bd533e3..f3031a1 100644 (file)
@@ -353,7 +353,7 @@ public:
 
     void addLayoutMilestones(LayoutMilestones);
     void removeLayoutMilestones(LayoutMilestones);
-    LayoutMilestones layoutMilestones() const { return m_layoutMilestones; }
+    LayoutMilestones requestedLayoutMilestones() const { return m_requestedLayoutMilestones; }
 
     bool isCountingRelevantRepaintedObjects() const;
     void startCountingRelevantRepaintedObjects();
@@ -502,7 +502,7 @@ private:
 #endif
     PlatformDisplayID m_displayID;
 
-    LayoutMilestones m_layoutMilestones;
+    LayoutMilestones m_requestedLayoutMilestones;
 
     HashSet<RenderObject*> m_relevantUnpaintedRenderObjects;
     Region m_topRelevantPaintedRegion;
index cda592c..500df17 100644 (file)
@@ -379,7 +379,7 @@ void RenderLayerCompositor::flushPendingLayerChanges(bool isFlushRoot)
     if (m_headerLayerAwaitingFirstFlush) {
         m_headerLayerAwaitingFirstFlush = false;
         if (Page* page = this->page()) {
-            if (page->layoutMilestones() & DidFirstFlushForHeaderLayer) {
+            if (page->requestedLayoutMilestones() & DidFirstFlushForHeaderLayer) {
                 if (Frame* frame = page->mainFrame())
                     frame->loader()->didLayout(DidFirstFlushForHeaderLayer);
             }
index 6ee9aad..b55d6b1 100644 (file)
@@ -1,3 +1,13 @@
+2013-04-16  Beth Dakin  <bdakin@apple.com>
+
+        Re-name Page::layoutMilestones() to Page::requestedLayoutMilestones()
+        https://bugs.webkit.org/show_bug.cgi?id=114713
+
+        Reviewed by Simon Fraser.
+
+        * WebView/WebView.mm:
+        (-[WebView _layoutMilestones]):
+
 2013-04-15  Sam Weinig  <sam@webkit.org>
 
         Remove more #includes from Frame.h
index 05bf837..9076f0e 100644 (file)
@@ -2931,7 +2931,7 @@ static Vector<String> toStringVector(NSArray* patterns)
     if (!page)
         return 0;
 
-    return kitLayoutMilestones(page->layoutMilestones());
+    return kitLayoutMilestones(page->requestedLayoutMilestones());
 }
 
 - (void)_setVisibilityState:(WebPageVisibilityState)visibilityState isInitialState:(BOOL)isInitialState