diff options
Diffstat (limited to 'Source')
39 files changed, 173 insertions, 125 deletions
diff --git a/Source/WebCore/WebCore.exp.in b/Source/WebCore/WebCore.exp.in index f110846..c6c76bf 100644 --- a/Source/WebCore/WebCore.exp.in +++ b/Source/WebCore/WebCore.exp.in @@ -1595,7 +1595,6 @@ __ZN7WebCore17HTMLPlugInElement11getNPObjectEv __ZNK7WebCore14SecurityOrigin9canAccessEPKS0_ __ZNK7WebCore4KURL10protocolIsEPKc __ZNK7WebCore4KURL7hasPathEv -__ZNK7WebCore4KURL9prettyURLEv #endif #if ENABLE(ORIENTATION_EVENTS) diff --git a/Source/WebCore/fileapi/DOMFileSystemBase.cpp b/Source/WebCore/fileapi/DOMFileSystemBase.cpp index eafb815..5a2627f 100644 --- a/Source/WebCore/fileapi/DOMFileSystemBase.cpp +++ b/Source/WebCore/fileapi/DOMFileSystemBase.cpp @@ -63,7 +63,7 @@ bool DOMFileSystemBase::crackFileSystemURL(const KURL& url, AsyncFileSystem::Typ return false; KURL originURL(ParsedURLString, url.path()); - String path = originURL.path(); + String path = decodeURLEscapeSequences(originURL.path()); if (path.isEmpty() || path[0] != '/') return false; path = path.substring(1); diff --git a/Source/WebCore/html/HTMLAnchorElement.cpp b/Source/WebCore/html/HTMLAnchorElement.cpp index 4636f20..b05e7f5 100644 --- a/Source/WebCore/html/HTMLAnchorElement.cpp +++ b/Source/WebCore/html/HTMLAnchorElement.cpp @@ -405,7 +405,10 @@ void HTMLAnchorElement::setPathname(const String& value) String HTMLAnchorElement::port() const { - return String::number(href().port()); + if (href().hasPort()) + return String::number(href().port()); + + return ""; } void HTMLAnchorElement::setPort(const String& value) diff --git a/Source/WebCore/loader/FrameLoader.cpp b/Source/WebCore/loader/FrameLoader.cpp index f999fdb..670cf1f 100644 --- a/Source/WebCore/loader/FrameLoader.cpp +++ b/Source/WebCore/loader/FrameLoader.cpp @@ -993,7 +993,8 @@ void FrameLoader::loadArchive(PassRefPtr<Archive> prpArchive) ObjectContentType FrameLoader::defaultObjectContentType(const KURL& url, const String& mimeTypeIn, bool shouldPreferPlugInsForImages) { String mimeType = mimeTypeIn; - String extension = url.path().substring(url.path().reverseFind('.') + 1); + String decodedPath = decodeURLEscapeSequences(url.path()); + String extension = decodedPath.substring(decodedPath.reverseFind('.') + 1); // We don't use MIMETypeRegistry::getMIMETypeForPath() because it returns "application/octet-stream" upon failure if (mimeType.isEmpty()) diff --git a/Source/WebCore/page/Location.cpp b/Source/WebCore/page/Location.cpp index 4835a83..fb68a09 100644 --- a/Source/WebCore/page/Location.cpp +++ b/Source/WebCore/page/Location.cpp @@ -63,8 +63,7 @@ String Location::href() const if (!m_frame) return String(); - const KURL& url = this->url(); - return url.hasPath() ? url.prettyURL() : url.prettyURL() + "/"; + return url().string(); } String Location::protocol() const @@ -83,7 +82,7 @@ String Location::host() const // Note: this is the IE spec. The NS spec swaps the two, it says // "The hostname property is the concatenation of the host and port properties, separated by a colon." const KURL& url = this->url(); - return url.port() ? url.host() + ":" + String::number(url.port()) : url.host(); + return url.hasPort() ? url.host() + ":" + String::number(url.port()) : url.host(); } String Location::hostname() const @@ -100,7 +99,7 @@ String Location::port() const return String(); const KURL& url = this->url(); - return url.port() ? String::number(url.port()) : ""; + return url.hasPort() ? String::number(url.port()) : ""; } String Location::pathname() const @@ -147,15 +146,6 @@ String Location::getParameter(const String& name) const return parameters.get(name); } -String Location::toString() const -{ - if (!m_frame) - return String(); - - const KURL& url = this->url(); - return url.hasPath() ? url.prettyURL() : url.prettyURL() + "/"; -} - void Location::setHref(const String& urlString, DOMWindow* activeWindow, DOMWindow* firstWindow) { if (!m_frame) @@ -199,7 +189,7 @@ void Location::setPort(const String& portString, DOMWindow* activeWindow, DOMWin return; KURL url = m_frame->document()->url(); int port = portString.toInt(); - if (port < 0 || port > 0xFFFF) + if (port < 0 || port > 0xFFFF || portString.isEmpty()) url.removePort(); else url.setPort(port); diff --git a/Source/WebCore/page/Location.h b/Source/WebCore/page/Location.h index 1b68cee..0e89ecf 100644 --- a/Source/WebCore/page/Location.h +++ b/Source/WebCore/page/Location.h @@ -29,9 +29,9 @@ #ifndef Location_h #define Location_h -#include <wtf/Forward.h> #include <wtf/PassRefPtr.h> #include <wtf/RefCounted.h> +#include <wtf/text/WTFString.h> namespace WebCore { @@ -71,7 +71,7 @@ public: String hash() const; String origin() const; - String toString() const; + String toString() const { return href(); } String getParameter(const String&) const; diff --git a/Source/WebCore/platform/KURL.cpp b/Source/WebCore/platform/KURL.cpp index 88ad3d9..234d749 100644 --- a/Source/WebCore/platform/KURL.cpp +++ b/Source/WebCore/platform/KURL.cpp @@ -708,7 +708,7 @@ String KURL::query() const String KURL::path() const { - return decodeURLEscapeSequences(m_string.substring(m_portEnd, m_pathEnd - m_portEnd)); + return m_string.substring(m_portEnd, m_pathEnd - m_portEnd); } bool KURL::setProtocol(const String& s) @@ -866,7 +866,7 @@ void KURL::setPath(const String& s) parse(m_string.left(m_portEnd) + encodeWithURLEscapeSequences(path) + m_string.substring(m_pathEnd)); } -String KURL::prettyURL() const +String KURL::deprecatedString() const { if (!m_isValid) return m_string; @@ -996,7 +996,7 @@ static void appendEscapingBadChars(char*& buffer, const char* strStart, size_t l buffer = p; } -static void escapeAndAppendFragment(char*& buffer, const char* strStart, size_t length) +static void escapeAndAppendNonHierarchicalPart(char*& buffer, const char* strStart, size_t length) { char* p = buffer; @@ -1137,6 +1137,23 @@ static inline bool hostPortIsEmptyButCredentialsArePresent(int hostStart, int po return userEndChar == '@' && hostStart == portEnd; } +static bool isNonFileHierarchicalScheme(const char* scheme, size_t schemeLength) +{ + switch (schemeLength) { + case 2: + return equal("ws", 2, scheme, schemeLength); + case 3: + return equal("ftp", 3, scheme, schemeLength) || equal("wss", 3, scheme, schemeLength); + case 4: + return equal("http", 4, scheme, schemeLength); + case 5: + return equal("https", 5, scheme, schemeLength); + case 6: + return equal("gopher", 6, scheme, schemeLength); + } + return false; +} + void KURL::parse(const char* url, const String* originalString) { if (!url || url[0] == '\0') { @@ -1173,6 +1190,7 @@ void KURL::parse(const char* url, const String* originalString) int portEnd; bool hierarchical = url[schemeEnd + 1] == '/'; + bool hasSecondSlash = hierarchical && url[schemeEnd + 2] == '/'; bool isFile = schemeEnd == 4 && matchLetter(url[0], 'f') @@ -1186,12 +1204,15 @@ void KURL::parse(const char* url, const String* originalString) && matchLetter(url[3], 'p') && (url[4] == ':' || (matchLetter(url[4], 's') && url[5] == ':')); - if (hierarchical && url[schemeEnd + 2] == '/') { + if ((hierarchical && hasSecondSlash) || isNonFileHierarchicalScheme(url, schemeEnd)) { // The part after the scheme is either a net_path or an abs_path whose first path segment is empty. // Attempt to find an authority. - // FIXME: Authority characters may be scanned twice, and it would be nice to be faster. - userStart += 2; + + if (hierarchical) + userStart++; + if (hasSecondSlash) + userStart++; userEnd = userStart; int colonPos = 0; @@ -1394,12 +1415,14 @@ void KURL::parse(const char* url, const String* originalString) m_userStart = m_userEnd = m_passwordEnd = m_hostEnd = m_portEnd = p - buffer.data(); // For canonicalization, ensure we have a '/' for no path. - // Do this only for hierarchical URL with protocol http or https. - if (m_protocolInHTTPFamily && hierarchical && pathEnd == pathStart) + // Do this only for URL with protocol http or https. + if (m_protocolInHTTPFamily && pathEnd == pathStart) *p++ = '/'; // add path, escaping bad characters - if (!hierarchical || !hasSlashDotOrDotDot(url)) + if (!hierarchical) + escapeAndAppendNonHierarchicalPart(p, url + pathStart, pathEnd - pathStart); + else if (!hasSlashDotOrDotDot(url)) appendEscapingBadChars(p, url + pathStart, pathEnd - pathStart); else { CharBuffer pathBuffer(pathEnd - pathStart + 1); @@ -1425,7 +1448,7 @@ void KURL::parse(const char* url, const String* originalString) // add fragment, escaping bad characters if (fragmentEnd != queryEnd) { *p++ = '#'; - escapeAndAppendFragment(p, url + fragmentStart, fragmentEnd - fragmentStart); + escapeAndAppendNonHierarchicalPart(p, url + fragmentStart, fragmentEnd - fragmentStart); } m_fragmentEnd = p - buffer.data(); diff --git a/Source/WebCore/platform/KURL.h b/Source/WebCore/platform/KURL.h index db2dd42..192c10b 100644 --- a/Source/WebCore/platform/KURL.h +++ b/Source/WebCore/platform/KURL.h @@ -152,7 +152,9 @@ public: String baseAsString() const; - String prettyURL() const; + // This function is only used by location.href. It's likely we shouldn't + // use it for that purpose, but more study is necessary before we remove it. + String deprecatedString() const; String fileSystemPath() const; // Returns true if the current URL's protocol is the same as the null- diff --git a/Source/WebCore/platform/KURLGoogle.cpp b/Source/WebCore/platform/KURLGoogle.cpp index 0d11b99..54bcf16 100644 --- a/Source/WebCore/platform/KURLGoogle.cpp +++ b/Source/WebCore/platform/KURLGoogle.cpp @@ -593,7 +593,6 @@ String KURL::query() const String KURL::path() const { - // Note: KURL.cpp unescapes here. return m_url.componentString(m_url.m_parsed.path); } @@ -670,16 +669,12 @@ void KURL::setPort(unsigned short i) { KURLGooglePrivate::Replacements replacements; String portStr; - if (i) { - portStr = String::number(i); - replacements.SetPort( - reinterpret_cast<const url_parse::UTF16Char*>(portStr.characters()), - url_parse::Component(0, portStr.length())); - } else { - // Clear any existing port when it is set to 0. - replacements.ClearPort(); - } + portStr = String::number(i); + replacements.SetPort( + reinterpret_cast<const url_parse::UTF16Char*>(portStr.characters()), + url_parse::Component(0, portStr.length())); + m_url.replaceComponents(replacements); } @@ -772,7 +767,7 @@ void KURL::setPath(const String& path) // On Mac, this just seems to return the same URL, but with "/foo/bar" for // file: URLs instead of file:///foo/bar. We don't bother with any of this, // at least for now. -String KURL::prettyURL() const +String KURL::deprecatedString() const { if (!m_url.m_isValid) return String(); diff --git a/Source/WebCore/platform/graphics/android/fonts/GlyphMapAndroid.cpp b/Source/WebCore/platform/graphics/android/fonts/GlyphMapAndroid.cpp index a327b79..b9798e6 100644 --- a/Source/WebCore/platform/graphics/android/fonts/GlyphMapAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/fonts/GlyphMapAndroid.cpp @@ -44,12 +44,12 @@ namespace WebCore { #define NO_BREAK_SPACE_UNICHAR 0xA0 -static int substituteWithVerticalGlyphs(const FontPlatformData& platformData, uint16_t* glyphs, unsigned bufferLength) +static HB_Error substituteWithVerticalGlyphs(const FontPlatformData& platformData, uint16_t* glyphs, unsigned bufferLength) { HB_FaceRec_* hbFace = platformData.harfbuzzFace(); if (!hbFace->gsub) { // if there is no GSUB table, treat it as not covered - return 0Xffff; + return static_cast<HB_Error>(0Xffff); } HB_Buffer buffer; @@ -60,13 +60,19 @@ static int substituteWithVerticalGlyphs(const FontPlatformData& platformData, ui HB_UShort scriptIndex; HB_UShort featureIndex; - HB_GSUB_Select_Script(hbFace->gsub, HB_MAKE_TAG('D', 'F', 'L', 'T'), &scriptIndex); + HB_Error error = HB_GSUB_Select_Script(hbFace->gsub, HB_MAKE_TAG('D', 'F', 'L', 'T'), &scriptIndex); + if (error) { + if (error != HB_Err_Not_Covered) + return error; + scriptIndex = HB_Script_Common; // Set script to common script. + } + HB_GSUB_Select_Feature(hbFace->gsub, HB_MAKE_TAG('v', 'e', 'r', 't'), scriptIndex, 0xffff, &featureIndex); HB_GSUB_Add_Feature(hbFace->gsub, featureIndex, 1); HB_GSUB_Select_Feature(hbFace->gsub, HB_MAKE_TAG('v', 'r', 't', '2'), scriptIndex, 0xffff, &featureIndex); HB_GSUB_Add_Feature(hbFace->gsub, featureIndex, 1); - int error = HB_GSUB_Apply_String(hbFace->gsub, buffer); + error = HB_GSUB_Apply_String(hbFace->gsub, buffer); if (!error) { for (unsigned i = 0; i < bufferLength; ++i) glyphs[i] = static_cast<Glyph>(buffer->out_string[i].gindex); @@ -74,6 +80,14 @@ static int substituteWithVerticalGlyphs(const FontPlatformData& platformData, ui return error; } +static void convertToVerticalForms(UChar* src, UChar* dest, unsigned bufferLength) { + for (unsigned i = 0; i < bufferLength; ++i) { + dest[i] = VerticalTextMap::getVerticalForm(src[i]); + if (!dest[i]) + dest[i] = src[i]; + } +} + bool GlyphPage::fill(unsigned offset, unsigned length, UChar* buffer, unsigned bufferLength, const SimpleFontData* fontData) { if (SkUTF16_IsHighSurrogate(buffer[bufferLength-1])) { @@ -92,11 +106,7 @@ bool GlyphPage::fill(unsigned offset, unsigned length, UChar* buffer, unsigned b if (fontData->platformData().orientation() == Vertical && !fontData->hasVerticalGlyphs()) { // Convert to vertical form if there is no vertical glyphs. - for (unsigned i = 0; i < bufferLength; ++i) { - vTextBuffer[i] = VerticalTextMap::getVerticalForm(buffer[i]); - if (!vTextBuffer[i]) - vTextBuffer[i] = buffer[i]; - } + convertToVerticalForms(buffer, vTextBuffer, bufferLength); textBuffer = vTextBuffer; } @@ -111,11 +121,22 @@ bool GlyphPage::fill(unsigned offset, unsigned length, UChar* buffer, unsigned b for (unsigned i = 0; i < bufferLength; ++i) { if (!Font::isCJKIdeograph(textBuffer[i])) { lookVariants = true; - continue; + break; + } + } + if (lookVariants) { + if (substituteWithVerticalGlyphs(fontData->platformData(), glyphs, bufferLength)) { + // Convert text to vertical forms if substituteWithVerticalGlyphs() fails to access vert tables. + convertToVerticalForms(buffer, vTextBuffer, bufferLength); + textBuffer = vTextBuffer; + + unsigned count = paint.textToGlyphs(textBuffer, bufferLength << 1, glyphs); + if (count != length) { + SkDebugf("%s count != length\n", __FUNCTION__); + return false; + } } } - if (lookVariants) - substituteWithVerticalGlyphs(fontData->platformData(), glyphs, bufferLength); } unsigned allGlyphs = 0; // track if any of the glyphIDs are non-zero diff --git a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp index 81427b8..a02759d 100644 --- a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp @@ -884,7 +884,8 @@ void LayerAndroid::onDraw(SkCanvas* canvas, SkScalar opacity, return; } - if (masksToBounds() || !m_content) + // only continue drawing if layer is drawable + if (!m_content && !m_imageCRC) return; // we just have this save/restore for opacity... diff --git a/Source/WebCore/platform/graphics/android/rendering/GLUtils.cpp b/Source/WebCore/platform/graphics/android/rendering/GLUtils.cpp index 26bd55d..9435065 100644 --- a/Source/WebCore/platform/graphics/android/rendering/GLUtils.cpp +++ b/Source/WebCore/platform/graphics/android/rendering/GLUtils.cpp @@ -578,16 +578,6 @@ void GLUtils::createTextureWithBitmap(GLuint texture, const SkBitmap& bitmap, GL } glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter); - - // The following is a workaround -- remove when EGLImage texture upload is fixed. - GLuint fboID; - glGenFramebuffers(1, &fboID); - glBindFramebuffer(GL_FRAMEBUFFER, fboID); - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texture, 0); - glCheckFramebufferStatus(GL_FRAMEBUFFER); // should return GL_FRAMEBUFFER_COMPLETE - - glBindFramebuffer(GL_FRAMEBUFFER, 0); // rebind the standard FBO - glDeleteFramebuffers(1, &fboID); } void GLUtils::updateTextureWithBitmap(GLuint texture, const SkBitmap& bitmap, diff --git a/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp b/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp index 2510d52..a58a1d2 100644 --- a/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp +++ b/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp @@ -274,8 +274,8 @@ int TileGrid::nbTextures(IntRect& area, float scale) } void TileGrid::drawGL(const IntRect& visibleArea, float opacity, - const TransformationMatrix* transform, - const Color* background) + const TransformationMatrix* transform, + const Color* background) { m_area = computeTilesArea(visibleArea, m_scale); if (m_area.width() == 0 || m_area.height() == 0) @@ -322,7 +322,8 @@ void TileGrid::drawGL(const IntRect& visibleArea, float opacity, drawn++; } - if (semiOpaqueBaseSurface) + // log tile information for base, high res tiles + if (m_isBaseSurface && background) TilesManager::instance()->getProfiler()->nextTile(tile, invScale, tileInView); } diff --git a/Source/WebCore/platform/graphics/android/rendering/TransferQueue.cpp b/Source/WebCore/platform/graphics/android/rendering/TransferQueue.cpp index af19f30..a330b41 100644 --- a/Source/WebCore/platform/graphics/android/rendering/TransferQueue.cpp +++ b/Source/WebCore/platform/graphics/android/rendering/TransferQueue.cpp @@ -203,7 +203,6 @@ void TransferQueue::blitTileFromQueue(GLuint fboID, TileTexture* destTex, GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER); if (status != GL_FRAMEBUFFER_COMPLETE) { ALOGV("Error: glCheckFramebufferStatus failed"); - glBindFramebuffer(GL_FRAMEBUFFER, 0); return; } @@ -426,7 +425,6 @@ void TransferQueue::updateDirtyTiles() // dynamic switch possible. Moving this out from the loop can save some // milli-seconds. if (usedFboForUpload) { - glBindFramebuffer(GL_FRAMEBUFFER, 0); // rebind the standard FBO restoreGLState(); GLUtils::checkGlError("updateDirtyTiles"); } @@ -593,6 +591,7 @@ void TransferQueue::cleanupPendingDiscard() void TransferQueue::saveGLState() { + glGetIntegerv(GL_FRAMEBUFFER_BINDING, m_GLStateBeforeBlit.bufferId); glGetIntegerv(GL_VIEWPORT, m_GLStateBeforeBlit.viewport); glGetBooleanv(GL_SCISSOR_TEST, m_GLStateBeforeBlit.scissor); glGetBooleanv(GL_DEPTH_TEST, m_GLStateBeforeBlit.depth); @@ -616,6 +615,7 @@ void TransferQueue::setGLStateForCopy(int width, int height) void TransferQueue::restoreGLState() { + glBindFramebuffer(GL_FRAMEBUFFER, m_GLStateBeforeBlit.bufferId[0]); glViewport(m_GLStateBeforeBlit.viewport[0], m_GLStateBeforeBlit.viewport[1], m_GLStateBeforeBlit.viewport[2], diff --git a/Source/WebCore/platform/graphics/android/rendering/TransferQueue.h b/Source/WebCore/platform/graphics/android/rendering/TransferQueue.h index 65ff116..d1024a4 100644 --- a/Source/WebCore/platform/graphics/android/rendering/TransferQueue.h +++ b/Source/WebCore/platform/graphics/android/rendering/TransferQueue.h @@ -40,6 +40,7 @@ class Tile; class TileTexture; struct GLState { + GLint bufferId[1]; GLint viewport[4]; GLboolean scissor[1]; GLboolean depth[1]; diff --git a/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp b/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp index dc22fca..ec04035 100644 --- a/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp +++ b/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp @@ -180,9 +180,9 @@ static void ensureSessionIsInitialized(SoupSession* session) g_object_set_data(G_OBJECT(session), "webkit-init", reinterpret_cast<void*>(0xdeadbeef)); } -void ResourceHandle::prepareForURL(const KURL &url) +void ResourceHandle::prepareForURL(const KURL& url) { - GOwnPtr<SoupURI> soupURI(soup_uri_new(url.prettyURL().utf8().data())); + GOwnPtr<SoupURI> soupURI(soup_uri_new(url.string().utf8().data())); if (!soupURI) return; soup_session_prepare_for_uri(ResourceHandle::defaultSession(), soupURI.get()); diff --git a/Source/WebCore/platform/qt/KURLQt.cpp b/Source/WebCore/platform/qt/KURLQt.cpp index f6d2a86..674a933 100644 --- a/Source/WebCore/platform/qt/KURLQt.cpp +++ b/Source/WebCore/platform/qt/KURLQt.cpp @@ -50,4 +50,3 @@ String KURL::fileSystemPath() const } } - diff --git a/Source/WebCore/platform/win/ClipboardWin.cpp b/Source/WebCore/platform/win/ClipboardWin.cpp index 0b5a3d3..2e56cbc 100644 --- a/Source/WebCore/platform/win/ClipboardWin.cpp +++ b/Source/WebCore/platform/win/ClipboardWin.cpp @@ -191,7 +191,7 @@ static HGLOBAL createGlobalHDropContent(const KURL& url, String& fileName, Share WCHAR filePath[MAX_PATH]; if (url.isLocalFile()) { - String localPath = url.path(); + String localPath = decodeURLEscapeSequences(url.path()); // windows does not enjoy a leading slash on paths if (localPath[0] == '/') localPath = localPath.substring(1); diff --git a/Source/WebCore/rendering/RenderBlock.cpp b/Source/WebCore/rendering/RenderBlock.cpp index a90bf69..42d68a0 100644 --- a/Source/WebCore/rendering/RenderBlock.cpp +++ b/Source/WebCore/rendering/RenderBlock.cpp @@ -191,7 +191,7 @@ void RenderBlock::destroy() childBox->remove(); } } - } else if (isInline() && parent()) + } else if (parent()) parent()->dirtyLinesFromChangedChild(this); } diff --git a/Source/WebCore/rendering/RenderBox.cpp b/Source/WebCore/rendering/RenderBox.cpp index fb1dd2c..9c40d5b 100644 --- a/Source/WebCore/rendering/RenderBox.cpp +++ b/Source/WebCore/rendering/RenderBox.cpp @@ -3260,7 +3260,7 @@ bool RenderBox::shrinkToAvoidFloats() const bool RenderBox::avoidsFloats() const { - return isReplaced() || hasOverflowClip() || isHR() || isLegend() || isWritingModeRoot(); + return isReplaced() || hasOverflowClip() || isHR() || isLegend() || isWritingModeRoot() || isDeprecatedFlexItem(); } void RenderBox::addShadowOverflow() diff --git a/Source/WebCore/rendering/RenderBox.h b/Source/WebCore/rendering/RenderBox.h index 1bee989..a5dc1b2 100644 --- a/Source/WebCore/rendering/RenderBox.h +++ b/Source/WebCore/rendering/RenderBox.h @@ -378,6 +378,8 @@ public: virtual void markForPaginationRelayoutIfNeeded() { } bool isWritingModeRoot() const { return !parent() || parent()->style()->writingMode() != style()->writingMode(); } + + bool isDeprecatedFlexItem() const { return !isInline() && !isFloatingOrPositioned() && parent() && parent()->isFlexibleBox(); } virtual int lineHeight(bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const; virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const; diff --git a/Source/WebCore/rendering/RenderReplaced.cpp b/Source/WebCore/rendering/RenderReplaced.cpp index c27d336..09a7944 100644 --- a/Source/WebCore/rendering/RenderReplaced.cpp +++ b/Source/WebCore/rendering/RenderReplaced.cpp @@ -57,6 +57,14 @@ RenderReplaced::~RenderReplaced() { } +void RenderReplaced::destroy() +{ + if (!documentBeingDestroyed() && parent()) + parent()->dirtyLinesFromChangedChild(this); + + RenderBox::destroy(); +} + void RenderReplaced::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) { RenderBox::styleDidChange(diff, oldStyle); diff --git a/Source/WebCore/rendering/RenderReplaced.h b/Source/WebCore/rendering/RenderReplaced.h index d6ebba6..29fc71c 100644 --- a/Source/WebCore/rendering/RenderReplaced.h +++ b/Source/WebCore/rendering/RenderReplaced.h @@ -32,6 +32,8 @@ public: RenderReplaced(Node*, const IntSize& intrinsicSize); virtual ~RenderReplaced(); + virtual void destroy(); + protected: virtual void layout(); diff --git a/Source/WebCore/rendering/RenderWidget.cpp b/Source/WebCore/rendering/RenderWidget.cpp index 894d689..97444cd 100644 --- a/Source/WebCore/rendering/RenderWidget.cpp +++ b/Source/WebCore/rendering/RenderWidget.cpp @@ -125,6 +125,10 @@ void RenderWidget::destroy() document()->axObjectCache()->childrenChanged(this->parent()); document()->axObjectCache()->remove(this); } + + if (!documentBeingDestroyed() && parent()) + parent()->dirtyLinesFromChangedChild(this); + remove(); if (m_hasCounterNodeMap) diff --git a/Source/WebCore/workers/WorkerLocation.cpp b/Source/WebCore/workers/WorkerLocation.cpp index b934abd..319a528 100644 --- a/Source/WebCore/workers/WorkerLocation.cpp +++ b/Source/WebCore/workers/WorkerLocation.cpp @@ -36,7 +36,7 @@ namespace WebCore { String WorkerLocation::href() const { - return m_url.hasPath() ? m_url.prettyURL() : m_url.prettyURL() + "/"; + return m_url.string(); } String WorkerLocation::protocol() const @@ -74,11 +74,6 @@ String WorkerLocation::hash() const return m_url.fragmentIdentifier().isEmpty() ? "" : "#" + m_url.fragmentIdentifier(); } -String WorkerLocation::toString() const -{ - return m_url.hasPath() ? m_url.prettyURL() : m_url.prettyURL() + "/"; -} - } // namespace WebCore diff --git a/Source/WebCore/workers/WorkerLocation.h b/Source/WebCore/workers/WorkerLocation.h index 5200e35..692c0e3 100644 --- a/Source/WebCore/workers/WorkerLocation.h +++ b/Source/WebCore/workers/WorkerLocation.h @@ -30,10 +30,10 @@ #if ENABLE(WORKERS) #include "KURL.h" -#include <wtf/Forward.h> #include <wtf/PassRefPtr.h> #include <wtf/RefCounted.h> #include <wtf/RefPtr.h> +#include <wtf/text/WTFString.h> namespace WebCore { @@ -57,7 +57,7 @@ namespace WebCore { String search() const; String hash() const; - String toString() const; + String toString() const { return href(); } private: WorkerLocation(const KURL& url) : m_url(url) { } diff --git a/Source/WebKit/android/jni/WebCoreJni.cpp b/Source/WebKit/android/jni/WebCoreJni.cpp index 6dfc9f1..72ded59 100644 --- a/Source/WebKit/android/jni/WebCoreJni.cpp +++ b/Source/WebKit/android/jni/WebCoreJni.cpp @@ -118,8 +118,10 @@ jobject intRectToRect(JNIEnv* env, const WebCore::IntRect& rect) ALOG_ASSERT(rectClass, "Could not find android/graphics/Rect"); jmethodID rectInit = env->GetMethodID(rectClass, "<init>", "(IIII)V"); ALOG_ASSERT(rectInit, "Could not find init method on Rect"); - return env->NewObject(rectClass, rectInit, rect.x(), rect.y(), + jobject jrect = env->NewObject(rectClass, rectInit, rect.x(), rect.y(), rect.maxX(), rect.maxY()); + env->DeleteLocalRef(rectClass); + return jrect; } jobjectArray intRectVectorToRectArray(JNIEnv* env, Vector<WebCore::IntRect>& rects) diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp index 0b5989d..ae00941 100644 --- a/Source/WebKit/android/jni/WebViewCore.cpp +++ b/Source/WebKit/android/jni/WebViewCore.cpp @@ -108,6 +108,7 @@ #include "ResourceRequest.h" #include "RuntimeEnabledFeatures.h" #include "SchemeRegistry.h" +#include "ScopedLocalRef.h" #include "ScriptController.h" #include "SelectionController.h" #include "SelectText.h" @@ -3336,12 +3337,14 @@ jobject WebViewCore::createTextFieldInitData(Node* node) { JNIEnv* env = JSC::Bindings::getJNIEnv(); TextFieldInitDataGlue* classDef = m_textFieldInitDataGlue; - jclass clazz = env->FindClass("android/webkit/WebViewCore$TextFieldInitData"); - jobject initData = env->NewObject(clazz, classDef->m_constructor); + ScopedLocalRef<jclass> clazz(env, + env->FindClass("android/webkit/WebViewCore$TextFieldInitData")); + jobject initData = env->NewObject(clazz.get(), classDef->m_constructor); env->SetIntField(initData, classDef->m_fieldPointer, reinterpret_cast<int>(node)); - env->SetObjectField(initData, classDef->m_text, + ScopedLocalRef<jstring> inputText(env, wtfStringToJstring(env, getInputText(node), true)); + env->SetObjectField(initData, classDef->m_text, inputText.get()); env->SetIntField(initData, classDef->m_type, getInputType(node)); env->SetBooleanField(initData, classDef->m_isSpellCheckEnabled, isSpellCheckEnabled(node)); @@ -3355,16 +3358,18 @@ jobject WebViewCore::createTextFieldInitData(Node* node) isTextInput(document->previousFocusableNode(node, tabEvent.get()))); env->SetBooleanField(initData, classDef->m_isAutoCompleteEnabled, isAutoCompleteEnabled(node)); - env->SetObjectField(initData, classDef->m_name, + ScopedLocalRef<jstring> fieldName(env, wtfStringToJstring(env, getFieldName(node), false)); - env->SetObjectField(initData, classDef->m_name, + env->SetObjectField(initData, classDef->m_name, fieldName.get()); + ScopedLocalRef<jstring> label(env, wtfStringToJstring(env, requestLabel(document->frame(), node), false)); + env->SetObjectField(initData, classDef->m_name, label.get()); env->SetIntField(initData, classDef->m_maxLength, getMaxLength(node)); LayerAndroid* layer = 0; int layerId = platformLayerIdFromNode(node, &layer); IntRect bounds = absoluteContentRect(node, layer); - env->SetObjectField(initData, classDef->m_contentBounds, - intRectToRect(env, bounds)); + ScopedLocalRef<jobject> jbounds(env, intRectToRect(env, bounds)); + env->SetObjectField(initData, classDef->m_contentBounds, jbounds.get()); env->SetIntField(initData, classDef->m_nodeLayerId, layerId); IntRect contentRect; RenderTextControl* rtc = toRenderTextControl(node); @@ -3373,8 +3378,8 @@ jobject WebViewCore::createTextFieldInitData(Node* node) contentRect.setHeight(rtc->scrollHeight()); contentRect.move(-rtc->scrollLeft(), -rtc->scrollTop()); } - env->SetObjectField(initData, classDef->m_contentRect, - intRectToRect(env, contentRect)); + ScopedLocalRef<jobject> jcontentRect(env, intRectToRect(env, contentRect)); + env->SetObjectField(initData, classDef->m_contentRect, jcontentRect.get()); return initData; } @@ -3389,9 +3394,9 @@ void WebViewCore::initEditField(Node* node) int end = 0; getSelectionOffsets(node, start, end); SelectText* selectText = createSelectText(focusedFrame()->selection()->selection()); + ScopedLocalRef<jobject> initData(env, createTextFieldInitData(node)); env->CallVoidMethod(javaObject.get(), m_javaGlue->m_initEditField, - start, end, reinterpret_cast<int>(selectText), - createTextFieldInitData(node)); + start, end, reinterpret_cast<int>(selectText), initData.get()); checkException(env); } diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp index 44ad1c5..22598eb 100644 --- a/Source/WebKit/android/nav/WebView.cpp +++ b/Source/WebKit/android/nav/WebView.cpp @@ -711,13 +711,17 @@ class GLDrawFunctor : Functor { int titlebarHeight = webViewRect.height() - viewRect.height(); uirenderer::DrawGlInfo* info = reinterpret_cast<uirenderer::DrawGlInfo*>(data); - WebCore::IntRect localViewRect = viewRect; - if (info->isLayer) - localViewRect.move(-1 * localViewRect.x(), -1 * localViewRect.y()); - WebCore::IntRect clip(info->clipLeft, info->clipTop, info->clipRight - info->clipLeft, info->clipBottom - info->clipTop); + + WebCore::IntRect localViewRect = viewRect; + if (info->isLayer) { + // When webview is on a layer, we need to use the viewport relative + // to the FBO, rather than the screen(which will use viewRect). + localViewRect.setX(clip.x()); + localViewRect.setY(info->height - clip.y() - clip.height()); + } bool shouldDraw = (messageId == uirenderer::DrawGlInfo::kModeDraw); TilesManager::instance()->shader()->setWebViewMatrix(info->transform, info->isLayer); int returnFlags = (*wvInstance.*funcPtr)(localViewRect, &inval, webViewRect, diff --git a/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp b/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp index ce2ac1b..6459887 100644 --- a/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp +++ b/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp @@ -360,7 +360,7 @@ void ChromeClientEfl::mouseDidMoveOverElement(const HitTestResult& hit, unsigned if (!url.isEmpty() && url != m_hoveredLinkURL) { const char* link[2]; TextDirection dir; - CString urlStr = url.prettyURL().utf8(); + CString urlStr = url.string().utf8(); CString titleStr = hit.title(dir).utf8(); link[0] = urlStr.data(); link[1] = titleStr.data(); diff --git a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp b/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp index 9a409f2..021188a 100644 --- a/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp +++ b/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp @@ -209,7 +209,7 @@ void FrameLoaderClientEfl::dispatchDidCancelAuthenticationChallenge(DocumentLoad void FrameLoaderClientEfl::dispatchWillSendRequest(DocumentLoader* loader, unsigned long identifier, ResourceRequest& coreRequest, const ResourceResponse& coreResponse) { - CString url = coreRequest.url().prettyURL().utf8(); + CString url = coreRequest.url().string().utf8(); DBG("Resource url=%s", url.data()); Ewk_Frame_Resource_Request request = { 0, identifier }; @@ -236,7 +236,7 @@ bool FrameLoaderClientEfl::shouldUseCredentialStorage(DocumentLoader*, unsigned void FrameLoaderClientEfl::assignIdentifierToInitialRequest(unsigned long identifier, DocumentLoader*, const ResourceRequest& coreRequest) { - CString url = coreRequest.url().prettyURL().utf8(); + CString url = coreRequest.url().string().utf8(); DBG("Resource url=%s", url.data()); Ewk_Frame_Resource_Request request = { 0, identifier }; @@ -309,7 +309,7 @@ void FrameLoaderClientEfl::dispatchDecidePolicyForNavigationAction(FramePolicyFu ASSERT(m_frame); // if not acceptNavigationRequest - look at Qt -> PolicyIgnore; // FIXME: do proper check and only reset forms when on PolicyIgnore - char* url = strdup(resourceRequest.url().prettyURL().utf8().data()); + char* url = strdup(resourceRequest.url().string().utf8().data()); Ewk_Frame_Resource_Request request = { url, 0 }; Eina_Bool ret = ewk_view_navigation_policy_decision(m_view, &request); free(url); @@ -764,7 +764,7 @@ void FrameLoaderClientEfl::download(ResourceHandle*, const ResourceRequest& requ if (!m_view) return; - CString url = request.url().prettyURL().utf8(); + CString url = request.url().string().utf8(); Ewk_Download download; download.url = url.data(); @@ -784,7 +784,7 @@ enum { ResourceError FrameLoaderClientEfl::cancelledError(const ResourceRequest& request) { - ResourceError error("Error", -999, request.url().prettyURL(), + ResourceError error("Error", -999, request.url().string(), "Request cancelled"); error.setIsCancellation(true); return error; @@ -792,7 +792,7 @@ ResourceError FrameLoaderClientEfl::cancelledError(const ResourceRequest& reques ResourceError FrameLoaderClientEfl::blockedError(const ResourceRequest& request) { - return ResourceError("Error", WebKitErrorCannotUseRestrictedPort, request.url().prettyURL(), + return ResourceError("Error", WebKitErrorCannotUseRestrictedPort, request.url().string(), "Request blocked"); } diff --git a/Source/WebKit/efl/ewk/ewk_frame.cpp b/Source/WebKit/efl/ewk/ewk_frame.cpp index 4e52b56..e865d39 100644 --- a/Source/WebKit/efl/ewk/ewk_frame.cpp +++ b/Source/WebKit/efl/ewk/ewk_frame.cpp @@ -1162,7 +1162,7 @@ Ewk_Hit_Test* ewk_frame_hit_test_new(const Evas_Object* o, int x, int y) hit_test->frame = kit(result.innerNonSharedNode()->document()->frame()); hit_test->link.text = eina_stringshare_add(result.textContent().utf8().data()); - hit_test->link.url = eina_stringshare_add(result.absoluteLinkURL().prettyURL().utf8().data()); + hit_test->link.url = eina_stringshare_add(result.absoluteLinkURL().string().utf8().data()); hit_test->link.title = eina_stringshare_add(result.titleDisplayString().utf8().data()); hit_test->link.target_frame = kit(result.targetFrame()); @@ -2014,7 +2014,7 @@ Eina_Bool ewk_frame_uri_changed(Evas_Object* o) { EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE); EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE); - WTF::CString uri(sd->frame->document()->url().prettyURL().utf8()); + WTF::CString uri(sd->frame->document()->url().string().utf8()); INF("uri=%s", uri.data()); if (!uri.data()) { diff --git a/Source/WebKit/efl/ewk/ewk_view.cpp b/Source/WebKit/efl/ewk/ewk_view.cpp index a6749de..f830426 100644 --- a/Source/WebKit/efl/ewk/ewk_view.cpp +++ b/Source/WebKit/efl/ewk/ewk_view.cpp @@ -577,7 +577,7 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd) priv->page_settings->setUsesEncodingDetector(true); url = priv->page_settings->userStyleSheetLocation(); - priv->settings.user_stylesheet = eina_stringshare_add(url.prettyURL().utf8().data()); + priv->settings.user_stylesheet = eina_stringshare_add(url.string().utf8().data()); priv->settings.encoding_default = eina_stringshare_add (priv->page_settings->defaultTextEncodingName().utf8().data()); @@ -4077,7 +4077,7 @@ WTF::PassRefPtr<WebCore::Frame> ewk_view_frame_create(Evas_Object* o, Evas_Objec { DBG("o=%p, frame=%p, name=%s, ownerElement=%p, url=%s, referrer=%s", o, frame, name.utf8().data(), ownerElement, - url.prettyURL().utf8().data(), referrer.utf8().data()); + url.string().utf8().data(), referrer.utf8().data()); EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0); @@ -4109,7 +4109,7 @@ WTF::PassRefPtr<WebCore::Widget> ewk_view_plugin_create(Evas_Object* o, Evas_Obj { DBG("o=%p, frame=%p, size=%dx%d, element=%p, url=%s, mimeType=%s", o, frame, pluginSize.width(), pluginSize.height(), element, - url.prettyURL().utf8().data(), mimeType.utf8().data()); + url.string().utf8().data(), mimeType.utf8().data()); EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0); sd->changed.frame_rect = EINA_TRUE; diff --git a/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp index 9f21139..4ee9c1a 100644 --- a/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp +++ b/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp @@ -549,7 +549,7 @@ void ChromeClient::mouseDidMoveOverElement(const HitTestResult& hit, unsigned mo if (!url.isEmpty() && url != m_hoveredLinkURL) { TextDirection dir; CString titleString = hit.title(dir).utf8(); - CString urlString = url.prettyURL().utf8(); + CString urlString = url.string().utf8(); g_signal_emit_by_name(m_webView, "hovering-over-link", titleString.data(), urlString.data()); m_hoveredLinkURL = url; } diff --git a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp index 539675a..de85a67 100644 --- a/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp +++ b/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp @@ -895,7 +895,7 @@ void FrameLoaderClient::dispatchDidChangeLocationWithinPage() { WebKitWebFramePrivate* priv = m_frame->priv; g_free(priv->uri); - priv->uri = g_strdup(core(m_frame)->document()->url().prettyURL().utf8().data()); + priv->uri = g_strdup(core(m_frame)->document()->url().string().utf8().data()); g_object_notify(G_OBJECT(m_frame), "uri"); WebKitWebView* webView = getViewFromFrame(m_frame); if (m_frame == webkit_web_view_get_main_frame(webView)) @@ -986,7 +986,7 @@ void FrameLoaderClient::dispatchDidCommitLoad() WebKitWebFramePrivate* priv = m_frame->priv; g_free(priv->uri); - priv->uri = g_strdup(core(m_frame)->loader()->activeDocumentLoader()->url().prettyURL().utf8().data()); + priv->uri = g_strdup(core(m_frame)->loader()->activeDocumentLoader()->url().string().utf8().data()); g_free(priv->title); priv->title = NULL; g_object_notify(G_OBJECT(m_frame), "uri"); diff --git a/Source/WebKit/gtk/webkit/webkitwebview.cpp b/Source/WebKit/gtk/webkit/webkitwebview.cpp index 85ad904..3b9ebe3 100644 --- a/Source/WebKit/gtk/webkit/webkitwebview.cpp +++ b/Source/WebKit/gtk/webkit/webkitwebview.cpp @@ -5034,7 +5034,7 @@ WebKitHitTestResult* webkit_web_view_get_hit_test_result(WebKitWebView* webView, G_CONST_RETURN gchar* webkit_web_view_get_icon_uri(WebKitWebView* webView) { g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), 0); - String iconURL = iconDatabase().synchronousIconURLForPageURL(core(webView)->mainFrame()->document()->url().prettyURL()); + String iconURL = iconDatabase().synchronousIconURLForPageURL(core(webView)->mainFrame()->document()->url().string()); webView->priv->iconURI = iconURL.utf8(); return webView->priv->iconURI.data(); } diff --git a/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp index ea2c826..f30e0f8 100644 --- a/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp +++ b/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp @@ -497,7 +497,7 @@ void ChromeClientQt::mouseDidMoveOverElement(const HitTestResult& result, unsign lastHoverURL = result.absoluteLinkURL(); lastHoverTitle = result.title(dir); lastHoverContent = result.textContent(); - emit m_webPage->linkHovered(lastHoverURL.prettyURL(), + emit m_webPage->linkHovered(lastHoverURL.string(), lastHoverTitle, lastHoverContent); } } diff --git a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp index d083f8f..c35cf3b 100644 --- a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp +++ b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp @@ -797,7 +797,7 @@ void FrameLoaderClientQt::updateGlobalHistory() QWebHistoryInterface* history = QWebHistoryInterface::defaultInterface(); WebCore::DocumentLoader* loader = m_frame->loader()->documentLoader(); if (history) - history->addHistoryEntry(loader->urlForHistory().prettyURL()); + history->addHistoryEntry(loader->urlForHistory().string()); if (dumpHistoryCallbacks) { printf("WebView navigated to url \"%s\" with title \"%s\" with HTTP equivalent method \"%s\". The navigation was %s and was %s%s.\n", @@ -921,7 +921,7 @@ void FrameLoaderClientQt::committedLoad(WebCore::DocumentLoader* loader, const c WebCore::ResourceError FrameLoaderClientQt::cancelledError(const WebCore::ResourceRequest& request) { - ResourceError error = ResourceError("QtNetwork", QNetworkReply::OperationCanceledError, request.url().prettyURL(), + ResourceError error = ResourceError("QtNetwork", QNetworkReply::OperationCanceledError, request.url().string(), QCoreApplication::translate("QWebFrame", "Request cancelled", 0, QCoreApplication::UnicodeUTF8)); error.setIsCancellation(true); return error; @@ -941,7 +941,7 @@ enum { WebCore::ResourceError FrameLoaderClientQt::blockedError(const WebCore::ResourceRequest& request) { - return ResourceError("WebKitErrorDomain", WebKitErrorCannotUseRestrictedPort, request.url().prettyURL(), + return ResourceError("WebKitErrorDomain", WebKitErrorCannotUseRestrictedPort, request.url().string(), QCoreApplication::translate("QWebFrame", "Request blocked", 0, QCoreApplication::UnicodeUTF8)); } @@ -1345,7 +1345,7 @@ void FrameLoaderClientQt::transferLoadingResourceFromPage(unsigned long, Documen ObjectContentType FrameLoaderClientQt::objectContentType(const KURL& url, const String& mimeTypeIn, bool shouldPreferPlugInsForImages) { - // qDebug()<<" ++++++++++++++++ url is "<<url.prettyURL()<<", mime = "<<mimeTypeIn; + // qDebug()<<" ++++++++++++++++ url is "<<url.string()<<", mime = "<<mimeTypeIn; QFileInfo fi(url.path()); String extension = fi.suffix(); if (mimeTypeIn == "application/x-qt-plugin" || mimeTypeIn == "application/x-qt-styled-widget") @@ -1508,8 +1508,8 @@ private: PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize, HTMLPlugInElement* element, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually) { - // qDebug()<<"------ Creating plugin in FrameLoaderClientQt::createPlugin for "<<url.prettyURL() << mimeType; - // qDebug()<<"------\t url = "<<url.prettyURL(); + // qDebug()<<"------ Creating plugin in FrameLoaderClientQt::createPlugin for "<<url.string() << mimeType; + // qDebug()<<"------\t url = "<<url.string(); if (!m_webFrame) return 0; diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp b/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp index 61c2a3a..ace9599 100644 --- a/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp +++ b/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp @@ -51,7 +51,7 @@ enum { ResourceError cancelledError(const ResourceRequest& request) { - ResourceError error = ResourceError("QtNetwork", QNetworkReply::OperationCanceledError, request.url().prettyURL(), + ResourceError error = ResourceError("QtNetwork", QNetworkReply::OperationCanceledError, request.url().string(), QCoreApplication::translate("QWebFrame", "Request cancelled", 0, QCoreApplication::UnicodeUTF8)); error.setIsCancellation(true); return error; @@ -59,7 +59,7 @@ ResourceError cancelledError(const ResourceRequest& request) ResourceError blockedError(const ResourceRequest& request) { - return ResourceError("WebKit", WebKitErrorCannotUseRestrictedPort, request.url().prettyURL(), + return ResourceError("WebKit", WebKitErrorCannotUseRestrictedPort, request.url().string(), QCoreApplication::translate("QWebFrame", "Request blocked", 0, QCoreApplication::UnicodeUTF8)); } |
