Title: [101246] trunk/Source/WebKit/efl
Revision
101246
Author
[email protected]
Date
2011-11-28 04:18:23 -0800 (Mon, 28 Nov 2011)

Log Message

[EFL] Rename abbreviated value names to cpp style names.
https://bugs.webkit.org/show_bug.cgi?id=73193

Patch by JungJik Lee <[email protected]> on 2011-11-28
Reviewed by Andreas Kling.

Rename abbreviated values name to cpp style names in ewk_single/tiled_view.cpp.

* ewk/ewk_view_single.cpp:
(_ewk_view_4b_move_region_up):
(_ewk_view_4b_move_region_down):
(_ewk_view_4b_move_line_left):
(_ewk_view_4b_move_line_right):
(_ewk_view_4b_move_region_left):
(_ewk_view_4b_move_region_right):
(_ewk_view_4b_move_region):
(_ewk_view_single_scroll_process_single):
(_ewk_view_single_smart_repaints_process):
* ewk/ewk_view_tiled.cpp:
(_ewk_view_tiled_smart_scrolls_process):
(_ewk_view_tiled_smart_repaints_process):

Modified Paths

Diff

Modified: trunk/Source/WebKit/efl/ChangeLog (101245 => 101246)


--- trunk/Source/WebKit/efl/ChangeLog	2011-11-28 12:04:28 UTC (rev 101245)
+++ trunk/Source/WebKit/efl/ChangeLog	2011-11-28 12:18:23 UTC (rev 101246)
@@ -1,3 +1,26 @@
+2011-11-28  JungJik Lee  <[email protected]>
+
+        [EFL] Rename abbreviated value names to cpp style names.
+        https://bugs.webkit.org/show_bug.cgi?id=73193
+
+        Reviewed by Andreas Kling.
+
+        Rename abbreviated values name to cpp style names in ewk_single/tiled_view.cpp.
+
+        * ewk/ewk_view_single.cpp:
+        (_ewk_view_4b_move_region_up):
+        (_ewk_view_4b_move_region_down):
+        (_ewk_view_4b_move_line_left):
+        (_ewk_view_4b_move_line_right):
+        (_ewk_view_4b_move_region_left):
+        (_ewk_view_4b_move_region_right):
+        (_ewk_view_4b_move_region):
+        (_ewk_view_single_scroll_process_single):
+        (_ewk_view_single_smart_repaints_process):
+        * ewk/ewk_view_tiled.cpp:
+        (_ewk_view_tiled_smart_scrolls_process):
+        (_ewk_view_tiled_smart_repaints_process):
+
 2011-11-26  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r101193.

Modified: trunk/Source/WebKit/efl/ewk/ewk_view_single.cpp (101245 => 101246)


--- trunk/Source/WebKit/efl/ewk/ewk_view_single.cpp	2011-11-28 12:04:28 UTC (rev 101245)
+++ trunk/Source/WebKit/efl/ewk/ewk_view_single.cpp	2011-11-28 12:18:23 UTC (rev 101246)
@@ -90,251 +90,255 @@
 
 static inline void _ewk_view_4b_move_region_up(uint32_t* image, size_t rows, size_t x, size_t y, size_t width, size_t height, size_t rowSize)
 {
-    uint32_t* src;
-    uint32_t* dst;
+    uint32_t* source;
+    uint32_t* destination;
 
-    dst = image + x + y * rowSize;
-    src = "" + rows * rowSize;
+    destination = image + x + y * rowSize;
+    source = destination + rows * rowSize;
     height -= rows;
 
-    for (; height > 0; height--, dst += rowSize, src += rowSize)
-        memcpy(dst, src, width * 4);
+    for (; height > 0; height--, destination += rowSize, source += rowSize)
+        memcpy(destination, source, width * 4);
 }
 
 static inline void _ewk_view_4b_move_region_down(uint32_t* image, size_t rows, size_t x, size_t y, size_t width, size_t height, size_t rowSize)
 {
-    uint32_t* src;
-    uint32_t* dst;
+    uint32_t* source;
+    uint32_t* destination;
 
     height -= rows;
-    src = "" + x + (y + height - 1) * rowSize;
-    dst = src + rows * rowSize;
+    source = image + x + (y + height - 1) * rowSize;
+    destination = source + rows * rowSize;
 
-    for (; height > 0; height--, dst -= rowSize, src -= rowSize)
-        memcpy(dst, src, width * 4);
+    for (; height > 0; height--, destination -= rowSize, source -= rowSize)
+        memcpy(destination, source, width * 4);
 }
 
-static inline void _ewk_view_4b_move_line_left(uint32_t* dst, const uint32_t* src, size_t count)
+static inline void _ewk_view_4b_move_line_left(uint32_t* destination, const uint32_t* source, size_t count)
 {
-    uint32_t* dst_end = dst + count;
+    uint32_t* endOfDestination = destination + count;
     /* no memcpy() as it does not allow overlapping regions */
     /* no memmove() as it will copy to a temporary buffer */
     /* TODO: loop unrolling, copying up to quad-words would help */
-    for (; dst < dst_end; dst++, src++)
-        *dst = *src;
+    for (; destination < endOfDestination; destination++, source++)
+        *destination = *source;
 }
 
-static inline void _ewk_view_4b_move_line_right(uint32_t* dst, uint32_t* src, size_t count)
+static inline void _ewk_view_4b_move_line_right(uint32_t* destination, uint32_t* source, size_t count)
 {
-    uint32_t* dst_end = dst - count;
+    uint32_t* endOfDestination = destination - count;
     /* no memcpy() as it does not allow overlapping regions */
     /* no memmove() as it will copy to a temporary buffer */
     /* TODO: loop unrolling, copying up to quad-words would help */
-    for (; dst > dst_end; dst--, src--)
-        *dst = *src;
+    for (; destination > endOfDestination; destination--, source--)
+        *destination = *source;
 }
 
-static inline void _ewk_view_4b_move_region_left(uint32_t* image, size_t cols, size_t x, size_t y, size_t width, size_t height, size_t rowSize)
+static inline void _ewk_view_4b_move_region_left(uint32_t* image, size_t columns, size_t x, size_t y, size_t width, size_t height, size_t rowSize)
 {
-    uint32_t* src;
-    uint32_t* dst;
+    uint32_t* source;
+    uint32_t* destination;
 
-    dst = image + x + y * rowSize;
-    src = "" + cols;
-    width -= cols;
+    destination = image + x + y * rowSize;
+    source = destination + columns;
+    width -= columns;
 
-    for (; height > 0; height--, dst += rowSize, src += rowSize)
-        _ewk_view_4b_move_line_left(dst, src, width);
+    for (; height > 0; height--, destination += rowSize, source += rowSize)
+        _ewk_view_4b_move_line_left(destination, source, width);
 }
 
 static inline void _ewk_view_4b_move_region_right(uint32_t* image, size_t columns, size_t x, size_t y, size_t width, size_t height, size_t rowSize)
 {
-    uint32_t* src;
-    uint32_t* dst;
+    uint32_t* source;
+    uint32_t* destination;
 
     width -= columns;
-    src = "" + (x + width - 1) + y * rowSize;
-    dst = src + columns;
+    source = image + (x + width - 1) + y * rowSize;
+    destination = source + columns;
 
-    for (; height > 0; height--, dst += rowSize, src += rowSize)
-        _ewk_view_4b_move_line_right(dst, src, width);
+    for (; height > 0; height--, destination += rowSize, source += rowSize)
+        _ewk_view_4b_move_line_right(destination, source, width);
 }
 
 /* catch-all function, not as optimized as the others, but does the work. */
 static inline void _ewk_view_4b_move_region(uint32_t* image, int deltaX, int deltaY, size_t x, size_t y, size_t width, size_t height, size_t rowSize)
 {
-    uint32_t* src;
-    uint32_t* dst;
+    uint32_t* source;
+    uint32_t* destination;
 
     if (deltaY < 0) {
         height += deltaY;
-        dst = image + x + y * rowSize;
-        src = "" - deltaY * rowSize;
+        destination = image + x + y * rowSize;
+        source = destination - deltaY * rowSize;
         if (deltaX <= 0) {
             width += deltaX;
-            src -= deltaX;
-            for (; height > 0; height--, dst += rowSize, src += rowSize)
-                _ewk_view_4b_move_line_left(dst, src, width);
+            source -= deltaX;
+            for (; height > 0; height--, destination += rowSize, source += rowSize)
+                _ewk_view_4b_move_line_left(destination, source, width);
         } else {
             width -= deltaX;
-            src += width - 1;
-            dst += width + deltaX -1;
-            for (; height > 0; height--, dst += rowSize, src += rowSize)
-                _ewk_view_4b_move_line_right(dst, src, width);
+            source += width - 1;
+            destination += width + deltaX -1;
+            for (; height > 0; height--, destination += rowSize, source += rowSize)
+                _ewk_view_4b_move_line_right(destination, source, width);
         }
     } else {
         height -= deltaY;
-        src = "" + x + (y + height - 1) * rowSize;
-        dst = src + deltaY * rowSize;
+        source = image + x + (y + height - 1) * rowSize;
+        destination = source + deltaY * rowSize;
         if (deltaX <= 0) {
             width += deltaX;
-            src -= deltaX;
-            for (; height > 0; height--, dst -= rowSize, src -= rowSize)
-                _ewk_view_4b_move_line_left(dst, src, width);
+            source -= deltaX;
+            for (; height > 0; height--, destination -= rowSize, source -= rowSize)
+                _ewk_view_4b_move_line_left(destination, source, width);
         } else {
             width -= deltaX;
-            src += width - 1;
-            dst += width + deltaX - 1;
-            for (; height > 0; height--, dst -= rowSize, src -= rowSize)
-                _ewk_view_4b_move_line_right(dst, src, width);
+            source += width - 1;
+            destination += width + deltaX - 1;
+            for (; height > 0; height--, destination -= rowSize, source -= rowSize)
+                _ewk_view_4b_move_line_right(destination, source, width);
         }
     }
 }
 
 static inline void _ewk_view_single_scroll_process_single(Ewk_View_Smart_Data* smartData, void* pixels, Evas_Coord width, Evas_Coord height, const Ewk_Scroll_Request* scrollRequest)
 {
-    Evas_Coord sx, sy, sw, sh;
+    Evas_Coord scrollX, scrollY, scrollWidth, scrollHeight;
 
     DBG("%d,%d + %d,%d %+03d,%+03d, store: %p %dx%d",
         scrollRequest->x, scrollRequest->y, scrollRequest->w, scrollRequest->h, scrollRequest->dx, scrollRequest->dy, pixels, width, height);
 
-    sx = scrollRequest->x;
-    sy = scrollRequest->y;
-    sw = scrollRequest->w;
-    sh = scrollRequest->h;
+    scrollX = scrollRequest->x;
+    scrollY = scrollRequest->y;
+    scrollWidth = scrollRequest->w;
+    scrollHeight = scrollRequest->h;
 
-    if (abs(scrollRequest->dx) >= sw || abs(scrollRequest->dy) >= sh) {
+    if (abs(scrollRequest->dx) >= scrollWidth || abs(scrollRequest->dy) >= scrollHeight) {
         /* doubt webkit would be so stupid... */
         DBG("full page scroll %+03d,%+03d. convert to repaint %d,%d + %dx%d",
-            scrollRequest->dx, scrollRequest->dy, sx, sy, sw, sh);
-        ewk_view_repaint_add(smartData->_priv, sx, sy, sw, sh);
+            scrollRequest->dx, scrollRequest->dy, scrollX, scrollY, scrollWidth, scrollHeight);
+        ewk_view_repaint_add(smartData->_priv, scrollX, scrollY, scrollWidth, scrollHeight);
         return;
     }
 
-    if (sx < 0) {
-        sw += sx;
-        sx = 0;
+    if (scrollX < 0) {
+        scrollWidth += scrollX;
+        scrollX = 0;
     }
-    if (sy < 0) {
-        sh += sy;
-        sy = 0;
+    if (scrollY < 0) {
+        scrollHeight += scrollY;
+        scrollY = 0;
     }
 
-    if (sx + sw > width)
-        sw = width - sx;
-    if (sy + sh > height)
-        sh = height - sy;
+    if (scrollX + scrollWidth > width)
+        scrollWidth = width - scrollX;
+    if (scrollY + scrollHeight > height)
+        scrollHeight = height - scrollY;
 
-    if (sw < 0)
-        sw = 0;
-    if (sh < 0)
-        sh = 0;
+    if (scrollWidth < 0)
+        scrollWidth = 0;
+    if (scrollHeight < 0)
+        scrollHeight = 0;
 
-    EINA_SAFETY_ON_TRUE_RETURN(!sw || !sh);
+    EINA_SAFETY_ON_TRUE_RETURN(!scrollWidth || !scrollHeight);
     if (!scrollRequest->dx) {
         if (scrollRequest->dy < 0) {
             DBG("scroll up: %+03d,%+03d update=%d,%d+%dx%d, "
                 "repaint=%d,%d+%dx%d",
-                scrollRequest->dx, scrollRequest->dy, sx, sy, sw, sh + scrollRequest->dy,
-                sx, sy + sh + scrollRequest->dy, sw, -scrollRequest->dy);
+                scrollRequest->dx, scrollRequest->dy, scrollX, scrollY, scrollWidth, scrollHeight + scrollRequest->dy,
+                scrollX, scrollY + scrollHeight + scrollRequest->dy, scrollWidth, -scrollRequest->dy);
 
             _ewk_view_4b_move_region_up
-                (static_cast<uint32_t*>(pixels), -scrollRequest->dy, sx, sy, sw, sh, width);
+                (static_cast<uint32_t*>(pixels), -scrollRequest->dy, scrollX, scrollY, scrollWidth, scrollHeight, width);
             evas_object_image_data_update_add
-                (smartData->backing_store, sx, sy, sw, sh + scrollRequest->dy);
+                (smartData->backing_store, scrollX, scrollY, scrollWidth, scrollHeight + scrollRequest->dy);
 
-            ewk_view_repaint_add(smartData->_priv, sx, sy + sh + scrollRequest->dy, sw, -scrollRequest->dy);
+            ewk_view_repaint_add(smartData->_priv, scrollX, scrollY + scrollHeight + scrollRequest->dy, scrollWidth, -scrollRequest->dy);
         } else if (scrollRequest->dy > 0) {
             DBG("scroll down: %+03d,%+03d update=%d,%d+%dx%d, "
                 "repaint=%d,%d+%dx%d",
-                scrollRequest->dx, scrollRequest->dy, sx, sy + scrollRequest->dy, sw, sh - scrollRequest->dy,
-                sx, sy, sw, scrollRequest->dy);
+                scrollRequest->dx, scrollRequest->dy, scrollX, scrollY + scrollRequest->dy, scrollWidth, scrollHeight - scrollRequest->dy,
+                scrollX, scrollY, scrollWidth, scrollRequest->dy);
 
             _ewk_view_4b_move_region_down
-                (static_cast<uint32_t*>(pixels), scrollRequest->dy, sx, sy, sw, sh, width);
+                (static_cast<uint32_t*>(pixels), scrollRequest->dy, scrollX, scrollY, scrollWidth, scrollHeight, width);
             evas_object_image_data_update_add
-                (smartData->backing_store, sx, sy + scrollRequest->dy, sw, sh - scrollRequest->dy);
+                (smartData->backing_store, scrollX, scrollY + scrollRequest->dy, scrollWidth, scrollHeight - scrollRequest->dy);
 
-            ewk_view_repaint_add(smartData->_priv, sx, sy, sw, scrollRequest->dy);
+            ewk_view_repaint_add(smartData->_priv, scrollX, scrollY, scrollWidth, scrollRequest->dy);
         }
     } else if (!scrollRequest->dy) {
         if (scrollRequest->dx < 0) {
             DBG("scroll left: %+03d,%+03d update=%d,%d+%dx%d, "
                 "repaint=%d,%d+%dx%d",
-                scrollRequest->dx, scrollRequest->dy, sx, sy, sw + scrollRequest->dx, sh,
-                sx + sw + scrollRequest->dx, sy, -scrollRequest->dx, sh);
+                scrollRequest->dx, scrollRequest->dy, scrollX, scrollY, scrollWidth + scrollRequest->dx, scrollHeight,
+                scrollX + scrollWidth + scrollRequest->dx, scrollY, -scrollRequest->dx, scrollHeight);
 
             _ewk_view_4b_move_region_left
-                (static_cast<uint32_t*>(pixels), -scrollRequest->dx, sx, sy, sw, sh, width);
+                (static_cast<uint32_t*>(pixels), -scrollRequest->dx, scrollX, scrollY, scrollWidth, scrollHeight, width);
             evas_object_image_data_update_add
-                (smartData->backing_store, sx, sy, sw + scrollRequest->dx, sh);
+                (smartData->backing_store, scrollX, scrollY, scrollWidth + scrollRequest->dx, scrollHeight);
 
-            ewk_view_repaint_add(smartData->_priv, sx + sw + scrollRequest->dx, sy, -scrollRequest->dx, sh);
+            ewk_view_repaint_add(smartData->_priv, scrollX + scrollWidth + scrollRequest->dx, scrollY, -scrollRequest->dx, scrollHeight);
         } else if (scrollRequest->dx > 0) {
             DBG("scroll up: %+03d,%+03d update=%d,%d+%dx%d, "
                 "repaint=%d,%d+%dx%d",
-                scrollRequest->dx, scrollRequest->dy, sx + scrollRequest->dx, sy, sw - scrollRequest->dx, sh,
-                sx, sy, scrollRequest->dx, sh);
+                scrollRequest->dx, scrollRequest->dy, scrollX + scrollRequest->dx, scrollY, scrollWidth - scrollRequest->dx, scrollHeight,
+                scrollX, scrollY, scrollRequest->dx, scrollHeight);
 
             _ewk_view_4b_move_region_right
-                (static_cast<uint32_t*>(pixels), scrollRequest->dx, sx, sy, sw, sh, width);
+                (static_cast<uint32_t*>(pixels), scrollRequest->dx, scrollX, scrollY, scrollWidth, scrollHeight, width);
             evas_object_image_data_update_add
-                (smartData->backing_store, sx + scrollRequest->dx, sy, sw - scrollRequest->dx, sh);
+                (smartData->backing_store, scrollX + scrollRequest->dx, scrollY, scrollWidth - scrollRequest->dx, scrollHeight);
 
-            ewk_view_repaint_add(smartData->_priv, sx, sy, scrollRequest->dx, sh);
+            ewk_view_repaint_add(smartData->_priv, scrollX, scrollY, scrollRequest->dx, scrollHeight);
         }
     } else {
-        Evas_Coord mx, my, mw, mh, ax, ay, aw, ah, bx, by, bw, bh;
+        Evas_Coord moveX, moveY, moveWidth, moveHeight;
+        Evas_Coord verticalX, verticalY, verticalWidth, verticalHeight;
+        Evas_Coord horizontalX, horizontalY, horizontalWidth, horizontalHeight;
 
         if (scrollRequest->dx < 0) {
-            mx = sx;
-            mw = sw + scrollRequest->dx;
-            ax = mx + mw;
-            aw = -scrollRequest->dx;
+            moveX = scrollX;
+            moveWidth = scrollWidth + scrollRequest->dx;
+            verticalX = moveX + moveWidth;
+            verticalWidth = -scrollRequest->dx;
         } else {
-            ax = sx;
-            aw = scrollRequest->dx;
-            mx = ax + aw;
-            mw = sw - scrollRequest->dx;
+            verticalX = scrollX;
+            verticalWidth = scrollRequest->dx;
+            moveX = verticalX + verticalWidth;
+            moveWidth = scrollWidth - scrollRequest->dx;
         }
 
         if (scrollRequest->dy < 0) {
-            my = sy;
-            mh = sh + scrollRequest->dy;
-            by = my + mh;
-            bh = -scrollRequest->dy;
+            moveY = scrollY;
+            moveHeight = scrollHeight + scrollRequest->dy;
+            horizontalY = moveY + moveHeight;
+            horizontalHeight = -scrollRequest->dy;
         } else {
-            by = sy;
-            bh = scrollRequest->dy;
-            my = by + bh;
-            mh = sh - scrollRequest->dy;
+            horizontalY = scrollY;
+            horizontalHeight = scrollRequest->dy;
+            moveY = horizontalY + horizontalHeight;
+            moveHeight = scrollHeight - scrollRequest->dy;
         }
 
-        ay = my;
-        ah = mh;
-        bx = sx;
-        bw = sw;
+        verticalY = moveY;
+        verticalHeight = moveHeight;
+        horizontalX = scrollX;
+        horizontalWidth = scrollWidth;
 
         DBG("scroll diagonal: %+03d,%+03d update=%d,%d+%dx%d, "
             "repaints: h=%d,%d+%dx%d v=%d,%d+%dx%d",
-            scrollRequest->dx, scrollRequest->dy, mx, my, mw, mh, ax, ay, aw, ah, bx, by, bw, bh);
+            scrollRequest->dx, scrollRequest->dy, moveX, moveY, moveWidth, moveHeight,
+            verticalX, verticalY, verticalWidth, verticalHeight,
+            horizontalX, horizontalY, horizontalWidth, horizontalHeight);
 
         _ewk_view_4b_move_region
-            (static_cast<uint32_t*>(pixels), scrollRequest->dx, scrollRequest->dy, sx, sy, sw, sh, width);
+            (static_cast<uint32_t*>(pixels), scrollRequest->dx, scrollRequest->dy, scrollX, scrollY, scrollWidth, scrollHeight, width);
 
-        evas_object_image_data_update_add(smartData->backing_store, mx, my, mw, mh);
-        ewk_view_repaint_add(smartData->_priv, ax, ay, aw, ah);
-        ewk_view_repaint_add(smartData->_priv, bx, by, bw, bh);
+        evas_object_image_data_update_add(smartData->backing_store, moveX, moveY, moveWidth, moveHeight);
+        ewk_view_repaint_add(smartData->_priv, verticalX, verticalY, verticalWidth, verticalHeight);
+        ewk_view_repaint_add(smartData->_priv, horizontalX, horizontalY, horizontalWidth, horizontalHeight);
     }
 }
 
@@ -443,19 +447,19 @@
         goto error_iterator;
     }
 
-    int sx, sy;
-    ewk_frame_scroll_pos_get(smartData->main_frame, &sx, &sy);
+    int scrollX, scrollY;
+    ewk_frame_scroll_pos_get(smartData->main_frame, &scrollX, &scrollY);
 
     EINA_ITERATOR_FOREACH(iterator, rect) {
         Eina_Rectangle scrolled_rect = {
-            rect->x + sx, rect->y + sy,
+            rect->x + scrollX, rect->y + scrollY,
             rect->w, rect->h
         };
 
         ewk_view_paint_context_save(context);
 
-        if ((sx) || (sy))
-            ewk_view_paint_context_translate(context, -sx, -sy);
+        if ((scrollX) || (scrollY))
+            ewk_view_paint_context_translate(context, -scrollX, -scrollY);
 
         ewk_view_paint_context_clip(context, &scrolled_rect);
         ewk_view_paint_context_paint_contents(context, &scrolled_rect);

Modified: trunk/Source/WebKit/efl/ewk/ewk_view_tiled.cpp (101245 => 101246)


--- trunk/Source/WebKit/efl/ewk/ewk_view_tiled.cpp	2011-11-28 12:04:28 UTC (rev 101245)
+++ trunk/Source/WebKit/efl/ewk/ewk_view_tiled.cpp	2011-11-28 12:18:23 UTC (rev 101246)
@@ -83,53 +83,53 @@
 
 static Eina_Bool _ewk_view_tiled_smart_scrolls_process(Ewk_View_Smart_Data* smartData)
 {
-    const Ewk_Scroll_Request* sr;
-    const Ewk_Scroll_Request* sr_end;
+    const Ewk_Scroll_Request* scrollRequest;
+    const Ewk_Scroll_Request* endOfScrollRequest;
     size_t count;
-    Evas_Coord vw, vh;
+    Evas_Coord contentsWidth, contentsHeight;
 
-    ewk_frame_contents_size_get(smartData->main_frame, &vw, &vh);
+    ewk_frame_contents_size_get(smartData->main_frame, &contentsWidth, &contentsHeight);
 
-    sr = ewk_view_scroll_requests_get(smartData->_priv, &count);
-    sr_end = sr + count;
-    for (; sr < sr_end; sr++) {
-        if (sr->main_scroll)
+    scrollRequest = ewk_view_scroll_requests_get(smartData->_priv, &count);
+    endOfScrollRequest = scrollRequest + count;
+    for (; scrollRequest < endOfScrollRequest; scrollRequest++) {
+        if (scrollRequest->main_scroll)
             ewk_tiled_backing_store_scroll_full_offset_add
-                (smartData->backing_store, sr->dx, sr->dy);
+                (smartData->backing_store, scrollRequest->dx, scrollRequest->dy);
         else {
-            Evas_Coord sx, sy, sw, sh;
+            Evas_Coord scrollX, scrollY, scrollWidth, scrollHeight;
 
-            sx = sr->x;
-            sy = sr->y;
-            sw = sr->w;
-            sh = sr->h;
+            scrollX = scrollRequest->x;
+            scrollY = scrollRequest->y;
+            scrollWidth = scrollRequest->w;
+            scrollHeight = scrollRequest->h;
 
-            if (abs(sr->dx) >= sw || abs(sr->dy) >= sh) {
+            if (abs(scrollRequest->dx) >= scrollWidth || abs(scrollRequest->dy) >= scrollHeight) {
                 /* doubt webkit would be so     stupid... */
                 DBG("full page scroll %+03d,%+03d. convert to repaint %d,%d + %dx%d",
-                    sr->dx, sr->dy, sx, sy, sw, sh);
-                ewk_view_repaint_add(smartData->_priv, sx, sy, sw, sh);
+                    scrollRequest->dx, scrollRequest->dy, scrollX, scrollY, scrollWidth, scrollHeight);
+                ewk_view_repaint_add(smartData->_priv, scrollX, scrollY, scrollWidth, scrollHeight);
                 continue;
             }
 
-            if (sx + sw > vw)
-                sw = vw - sx;
-            if (sy + sh > vh)
-                sh = vh - sy;
+            if (scrollX + scrollWidth > contentsWidth)
+                scrollWidth = contentsWidth - scrollX;
+            if (scrollY + scrollHeight > contentsHeight)
+                scrollHeight = contentsHeight - scrollY;
 
-            if (sw < 0)
-                sw = 0;
-            if (sh < 0)
-                sh = 0;
+            if (scrollWidth < 0)
+                scrollWidth = 0;
+            if (scrollHeight < 0)
+                scrollHeight = 0;
 
-            if (!sw || !sh)
+            if (!scrollWidth || !scrollHeight)
                 continue;
 
-            sx -= abs(sr->dx);
-            sy -= abs(sr->dy);
-            sw += abs(sr->dx);
-            sh += abs(sr->dy);
-            ewk_view_repaint_add(smartData->_priv, sx, sy, sw, sh);
+            scrollX -= abs(scrollRequest->dx);
+            scrollY -= abs(scrollRequest->dy);
+            scrollWidth += abs(scrollRequest->dx);
+            scrollHeight += abs(scrollRequest->dy);
+            ewk_view_repaint_add(smartData->_priv, scrollX, scrollY, scrollWidth, scrollHeight);
             INF("using repaint for inner frame scolling!");
         }
     }
@@ -139,21 +139,21 @@
 
 static Eina_Bool _ewk_view_tiled_smart_repaints_process(Ewk_View_Smart_Data* smartData)
 {
-    const Eina_Rectangle* pr, * pr_end;
+    const Eina_Rectangle* paintRect, * endOfpaintRect;
     size_t count;
-    int sx, sy;
+    int scrollX, scrollY;
 
-    ewk_frame_scroll_pos_get(smartData->main_frame, &sx, &sy);
+    ewk_frame_scroll_pos_get(smartData->main_frame, &scrollX, &scrollY);
 
-    pr = ewk_view_repaints_get(smartData->_priv, &count);
-    pr_end = pr + count;
-    for (; pr < pr_end; pr++) {
-        Eina_Rectangle r;
-        r.x = pr->x + sx;
-        r.y = pr->y + sy;
-        r.w = pr->w;
-        r.h = pr->h;
-        ewk_tiled_backing_store_update(smartData->backing_store, &r);
+    paintRect = ewk_view_repaints_get(smartData->_priv, &count);
+    endOfpaintRect = paintRect + count;
+    for (; paintRect < endOfpaintRect; paintRect++) {
+        Eina_Rectangle rect;
+        rect.x = paintRect->x + scrollX;
+        rect.y = paintRect->y + scrollY;
+        rect.w = paintRect->w;
+        rect.h = paintRect->h;
+        ewk_tiled_backing_store_update(smartData->backing_store, &rect);
     }
     ewk_tiled_backing_store_updates_process(smartData->backing_store);
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to