diff options
Diffstat (limited to 'Source/WebCore/inspector/InspectorPageAgent.cpp')
-rw-r--r-- | Source/WebCore/inspector/InspectorPageAgent.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/Source/WebCore/inspector/InspectorPageAgent.cpp b/Source/WebCore/inspector/InspectorPageAgent.cpp index c6b06bfa6..707c7515e 100644 --- a/Source/WebCore/inspector/InspectorPageAgent.cpp +++ b/Source/WebCore/inspector/InspectorPageAgent.cpp @@ -74,11 +74,11 @@ #include "TextEncoding.h" #include "TextResourceDecoder.h" #include "UserGestureIndicator.h" - #include <wtf/CurrentTime.h> #include <wtf/ListHashSet.h> #include <wtf/Vector.h> #include <wtf/text/Base64.h> +#include <wtf/text/StringBuilder.h> using namespace std; @@ -197,8 +197,7 @@ bool InspectorPageAgent::cachedResourceContent(CachedResource* cachedResource, S if (!decoder) return false; String content = decoder->decode(buffer->data(), buffer->size()); - content += decoder->flush(); - *result = content; + *result = content + decoder->flush(); return true; } default: @@ -503,7 +502,7 @@ void InspectorPageAgent::getCookies(ErrorString*, RefPtr<TypeBuilder::Array<Type ListHashSet<Cookie> rawCookiesList; // If we can't get raw cookies - fall back to String representation - String stringCookiesList; + StringBuilder stringCookiesList; // Return value to getRawCookies should be the same for every call because // the return value is platform/network backend specific, and the call will @@ -519,7 +518,7 @@ void InspectorPageAgent::getCookies(ErrorString*, RefPtr<TypeBuilder::Array<Type if (!rawCookiesImplemented) { // FIXME: We need duplication checking for the String representation of cookies. ExceptionCode ec = 0; - stringCookiesList += document->cookie(ec); + stringCookiesList.append(document->cookie(ec)); // Exceptions are thrown by cookie() in sandboxed frames. That won't happen here // because "document" is the document of the main frame of the page. ASSERT(!ec); @@ -539,7 +538,7 @@ void InspectorPageAgent::getCookies(ErrorString*, RefPtr<TypeBuilder::Array<Type *cookiesString = ""; } else { cookies = TypeBuilder::Array<TypeBuilder::Page::Cookie>::create(); - *cookiesString = stringCookiesList; + *cookiesString = stringCookiesList.toString(); } } @@ -899,7 +898,7 @@ void InspectorPageAgent::didPaint() Color(0, 0, 0xFF, 0x3F), }; - m_overlay->drawOutline(*m_lastPaintContext, m_lastPaintRect, colors[colorSelector++ % WTF_ARRAY_LENGTH(colors)]); + m_overlay->drawOutline(m_lastPaintContext, m_lastPaintRect, colors[colorSelector++ % WTF_ARRAY_LENGTH(colors)]); m_lastPaintContext = 0; } @@ -915,6 +914,12 @@ void InspectorPageAgent::didLayout() if (currentWidth && currentHeight) m_client->autoZoomPageToFitWidth(); + m_overlay->update(); +} + +void InspectorPageAgent::didScroll() +{ + m_overlay->update(); } PassRefPtr<TypeBuilder::Page::Frame> InspectorPageAgent::buildObjectForFrame(Frame* frame) |