From 9dc6dc38bf9035ec6460fa20159c33d5ad7084ca Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 24 Jun 2010 14:05:08 +0200 Subject: Updated WebKit to 2f598e9b7b376d851fe089bc1dc729bcf0393a06 * Fixed QML packaging || || Add an inlineCapacity template parameter to ListHashSet and use it to shrink the positioned object list hash set. || || || Allocate the m_preloads list hash set dynamically and free it when done. || || || Do not render the full frame when there is some elements with fixed positioning || --- src/3rdparty/webkit/WebCore/ChangeLog | 78 ++++++++++++++++++++++ src/3rdparty/webkit/WebCore/WebCore.pro | 2 +- src/3rdparty/webkit/WebCore/loader/DocLoader.cpp | 15 +++-- src/3rdparty/webkit/WebCore/loader/DocLoader.h | 5 +- src/3rdparty/webkit/WebCore/page/FrameView.cpp | 12 ++-- .../webkit/WebCore/rendering/RenderBlock.cpp | 8 +-- .../webkit/WebCore/rendering/RenderBlock.h | 9 ++- .../webkit/WebCore/rendering/RenderLayer.cpp | 8 +++ .../webkit/WebCore/rendering/RenderLayer.h | 1 + 9 files changed, 117 insertions(+), 21 deletions(-) (limited to 'src/3rdparty/webkit/WebCore') diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index 687b76bee7..a84f1776ac 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,81 @@ +2010-06-24 Simon Hausmann + + Unreviewed Symbian build fix. + + The QML WebKit integration needs to be part of QtWebKit.sis + + * WebCore.pro: Deploy qmlwebkitplugin.dll. + +2010-06-23 Benjamin Poulain + + Reviewed by Kenneth Rohde Christiansen. + + Do not render the full frame when there is some elements with fixed positioning + https://bugs.webkit.org/show_bug.cgi?id=33150 + + Do not render the full frame when there is some elements with fixed positioning + https://bugs.webkit.org/show_bug.cgi?id=33150 + + The frame view take into acount the list of fixed object when scrolling + the view. If the number of object is lower than a certain threshold, the pixel + are blitted, and the invalidated area updated. + + * page/FrameView.cpp: + (WebCore::FrameView::addFixedObject): + (WebCore::FrameView::removeFixedObject): + (WebCore::FrameView::scrollContentsFastPath): + * page/FrameView.h: + * platform/ScrollView.cpp: + (WebCore::ScrollView::scrollContents): + (WebCore::ScrollView::scrollContentsFastPath): + * platform/ScrollView.h: + * rendering/RenderLayer.cpp: + (WebCore::RenderLayer::repaintRectIncludingDescendants): + * rendering/RenderLayer.h: + * rendering/RenderObject.cpp: + (WebCore::RenderObject::styleWillChange): + +2010-05-18 Anders Carlsson + + Reviewed by Sam Weinig. + + Allocate the m_preloads list hash set dynamically and free it when done. + https://bugs.webkit.org/show_bug.cgi?id=39309 + + + This saves about 6000 bytes on a fully loaded document. + + * loader/DocLoader.cpp: + (WebCore::DocLoader::requestPreload): + (WebCore::DocLoader::clearPreloads): + * loader/DocLoader.h: + +2010-05-18 Anders Carlsson + + Revert unintended indentation and unnecessary nested name specifier. + + * rendering/RenderBlock.cpp: + (WebCore::clipOutPositionedObjects): + (WebCore::RenderBlock::insertPositionedObject): + +2010-05-18 Anders Carlsson + + Reviewed by Sam Weinig. + + Add an inlineCapacity template parameter to ListHashSet and use it to shrink the positioned object list hash set. + https://bugs.webkit.org/show_bug.cgi?id=39304 + + + Set the inlineCapacity for the positionedObjects ListHashSet to 4 instead of 256. Since a RenderBlock usually has + few positioned objects, this saves memory. + + * WebCore.base.exp: + * rendering/RenderBlock.cpp: + (WebCore::clipOutPositionedObjects): + (WebCore::RenderBlock::insertPositionedObject): + * rendering/RenderBlock.h: + (WebCore::RenderBlock::positionedObjects): + 2010-06-22 Simon Hausmann Unreviewed Qt/Symbian build fix. diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index e208b5ff99..1162a52149 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -25,7 +25,7 @@ symbian: { webkitbackup.sources = ../WebKit/qt/symbian/backup_registration.xml webkitbackup.path = /private/10202D56/import/packages/$$replace(TARGET.UID3, 0x,) - contains(QT_CONFIG, declarative): { + contains(QT_CONFIG, declarative) { declarativeImport.sources = qmlwebkitplugin$${QT_LIBINFIX}.dll declarativeImport.sources += ../WebKit/qt/declarative/qmldir declarativeImport.path = c:$$QT_IMPORTS_BASE_DIR/QtWebKit diff --git a/src/3rdparty/webkit/WebCore/loader/DocLoader.cpp b/src/3rdparty/webkit/WebCore/loader/DocLoader.cpp index 0053e7bf67..4597704e6d 100644 --- a/src/3rdparty/webkit/WebCore/loader/DocLoader.cpp +++ b/src/3rdparty/webkit/WebCore/loader/DocLoader.cpp @@ -407,10 +407,14 @@ void DocLoader::requestPreload(CachedResource::Type type, const String& url, con encoding = charset.isEmpty() ? m_doc->frame()->loader()->encoding() : charset; CachedResource* resource = requestResource(type, url, encoding, true); - if (!resource || m_preloads.contains(resource)) + if (!resource || (m_preloads && m_preloads->contains(resource))) return; resource->increasePreloadCount(); - m_preloads.add(resource); + + if (!m_preloads) + m_preloads.set(new ListHashSet); + m_preloads->add(resource); + #if PRELOAD_DEBUG printf("PRELOADING %s\n", resource->url().latin1().data()); #endif @@ -421,8 +425,11 @@ void DocLoader::clearPreloads() #if PRELOAD_DEBUG printPreloadStats(); #endif - ListHashSet::iterator end = m_preloads.end(); - for (ListHashSet::iterator it = m_preloads.begin(); it != end; ++it) { + if (!m_preloads) + return; + + ListHashSet::iterator end = m_preloads->end(); + for (ListHashSet::iterator it = m_preloads->begin(); it != end; ++it) { CachedResource* res = *it; res->decreasePreloadCount(); if (res->canDelete() && !res->inCache()) diff --git a/src/3rdparty/webkit/WebCore/loader/DocLoader.h b/src/3rdparty/webkit/WebCore/loader/DocLoader.h index 8ec73e1248..66e4164d45 100644 --- a/src/3rdparty/webkit/WebCore/loader/DocLoader.h +++ b/src/3rdparty/webkit/WebCore/loader/DocLoader.h @@ -47,8 +47,7 @@ class ImageLoader; class KURL; // The DocLoader manages the loading of scripts/images/stylesheets for a single document. -class DocLoader : public Noncopyable -{ +class DocLoader : public Noncopyable { friend class Cache; friend class ImageLoader; @@ -117,7 +116,7 @@ private: int m_requestCount; - ListHashSet m_preloads; + OwnPtr > m_preloads; struct PendingPreload { CachedResource::Type m_type; String m_url; diff --git a/src/3rdparty/webkit/WebCore/page/FrameView.cpp b/src/3rdparty/webkit/WebCore/page/FrameView.cpp index a53db367f8..639414b428 100644 --- a/src/3rdparty/webkit/WebCore/page/FrameView.cpp +++ b/src/3rdparty/webkit/WebCore/page/FrameView.cpp @@ -884,7 +884,7 @@ bool FrameView::scrollContentsFastPath(const IntSize& scrollDelta, const IntRect { const size_t fixedObjectThreshold = 5; - ListHashSet* positionedObjects = 0; + RenderBlock::PositionedObjectsListHashSet* positionedObjects = 0; if (RenderView* root = m_frame->contentRenderer()) positionedObjects = root->positionedObjects(); @@ -896,14 +896,14 @@ bool FrameView::scrollContentsFastPath(const IntSize& scrollDelta, const IntRect // Get the rects of the fixed objects visible in the rectToScroll Vector subRectToUpdate; bool updateInvalidatedSubRect = true; - ListHashSet::const_iterator end = positionedObjects->end(); - for (ListHashSet::const_iterator it = positionedObjects->begin(); it != end; ++it) { + RenderBlock::PositionedObjectsListHashSet::const_iterator end = positionedObjects->end(); + for (RenderBlock::PositionedObjectsListHashSet::const_iterator it = positionedObjects->begin(); it != end; ++it) { RenderBox* renderBox = *it; if (renderBox->style()->position() != FixedPosition) continue; - IntRect topLevelRect; - IntRect updateRect = renderBox->paintingRootRect(topLevelRect); - updateRect.move(-scrollX(), -scrollY()); + IntRect updateRect = renderBox->layer()->repaintRectIncludingDescendants(); + updateRect = contentsToWindow(updateRect); + updateRect.intersect(rectToScroll); if (!updateRect.isEmpty()) { if (subRectToUpdate.size() >= fixedObjectThreshold) { diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp index a7b8a0227f..798663e0a5 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp @@ -1982,13 +1982,13 @@ void RenderBlock::paintSelection(PaintInfo& paintInfo, int tx, int ty) } #ifndef BUILDING_ON_TIGER -static void clipOutPositionedObjects(const RenderObject::PaintInfo* paintInfo, int tx, int ty, ListHashSet* positionedObjects) +static void clipOutPositionedObjects(const RenderObject::PaintInfo* paintInfo, int tx, int ty, RenderBlock::PositionedObjectsListHashSet* positionedObjects) { if (!positionedObjects) return; - ListHashSet::const_iterator end = positionedObjects->end(); - for (ListHashSet::const_iterator it = positionedObjects->begin(); it != end; ++it) { + RenderBlock::PositionedObjectsListHashSet::const_iterator end = positionedObjects->end(); + for (RenderBlock::PositionedObjectsListHashSet::const_iterator it = positionedObjects->begin(); it != end; ++it) { RenderBox* r = *it; paintInfo->context->clipOut(IntRect(tx + r->x(), ty + r->y(), r->width(), r->height())); } @@ -2274,7 +2274,7 @@ void RenderBlock::insertPositionedObject(RenderBox* o) { // Create the list of special objects if we don't aleady have one if (!m_positionedObjects) - m_positionedObjects = new ListHashSet; + m_positionedObjects = new PositionedObjectsListHashSet; m_positionedObjects->add(o); } diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderBlock.h b/src/3rdparty/webkit/WebCore/rendering/RenderBlock.h index 184f98384c..d555d3113e 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderBlock.h +++ b/src/3rdparty/webkit/WebCore/rendering/RenderBlock.h @@ -74,7 +74,9 @@ public: void insertPositionedObject(RenderBox*); void removePositionedObject(RenderBox*); void removePositionedObjects(RenderBlock*); - ListHashSet* positionedObjects() const { return m_positionedObjects; } + + typedef ListHashSet PositionedObjectsListHashSet; + PositionedObjectsListHashSet* positionedObjects() const { return m_positionedObjects; } void addPercentHeightDescendant(RenderBox*); static void removePercentHeightDescendant(RenderBox*); @@ -483,9 +485,10 @@ private: void setCollapsedBottomMargin(const MarginInfo&); // End helper functions and structs used by layoutBlockChildren. - typedef ListHashSet::const_iterator Iterator; + typedef PositionedObjectsListHashSet::const_iterator Iterator; DeprecatedPtrList* m_floatingObjects; - ListHashSet* m_positionedObjects; + + PositionedObjectsListHashSet* m_positionedObjects; // An inline can be split with blocks occurring in between the inline content. // When this occurs we need a pointer to our next object. We can basically be diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp index 3314772800..a012868291 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp @@ -325,6 +325,14 @@ void RenderLayer::updateLayerPositions(UpdateLayerPositionsFlags flags) m_marquee->updateMarqueePosition(); } +IntRect RenderLayer::repaintRectIncludingDescendants() const +{ + IntRect repaintRect = m_repaintRect; + for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) + repaintRect.unite(child->repaintRectIncludingDescendants()); + return repaintRect; +} + void RenderLayer::computeRepaintRects() { RenderBoxModelObject* repaintContainer = renderer()->containerForRepaint(); diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderLayer.h b/src/3rdparty/webkit/WebCore/rendering/RenderLayer.h index 81a66e1a98..e221f28718 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderLayer.h +++ b/src/3rdparty/webkit/WebCore/rendering/RenderLayer.h @@ -394,6 +394,7 @@ public: // Return a cached repaint rect, computed relative to the layer renderer's containerForRepaint. IntRect repaintRect() const { return m_repaintRect; } + IntRect repaintRectIncludingDescendants() const; void computeRepaintRects(); void updateRepaintRectsAfterScroll(bool fixed = false); void setNeedsFullRepaint(bool f = true) { m_needsFullRepaint = f; } -- cgit v1.2.1