summaryrefslogtreecommitdiff
path: root/src/3rdparty/webkit/WebCore
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2010-06-24 14:05:08 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2010-06-24 14:05:08 +0200
commit9dc6dc38bf9035ec6460fa20159c33d5ad7084ca (patch)
tree9f4ec84eee1e995c5b695e132580ee40602771eb /src/3rdparty/webkit/WebCore
parent3119f5e2d675ba5d39e94cdae26db9eb8f373eab (diff)
downloadqt4-tools-9dc6dc38bf9035ec6460fa20159c33d5ad7084ca.tar.gz
Updated WebKit to 2f598e9b7b376d851fe089bc1dc729bcf0393a06
* Fixed QML packaging || <https://webkit.org/b/39304> || Add an inlineCapacity template parameter to ListHashSet and use it to shrink the positioned object list hash set. || || <https://webkit.org/b/39309> || Allocate the m_preloads list hash set dynamically and free it when done. || || <https://webkit.org/b/33150> || Do not render the full frame when there is some elements with fixed positioning ||
Diffstat (limited to 'src/3rdparty/webkit/WebCore')
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog78
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro2
-rw-r--r--src/3rdparty/webkit/WebCore/loader/DocLoader.cpp15
-rw-r--r--src/3rdparty/webkit/WebCore/loader/DocLoader.h5
-rw-r--r--src/3rdparty/webkit/WebCore/page/FrameView.cpp12
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp8
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderBlock.h9
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp8
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderLayer.h1
9 files changed, 117 insertions, 21 deletions
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 <simon.hausmann@nokia.com>
+
+ 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 <benjamin.poulain@nokia.com>
+
+ 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 <andersca@apple.com>
+
+ 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
+ <rdar://problem/7998495>
+
+ 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 <andersca@apple.com>
+
+ Revert unintended indentation and unnecessary nested name specifier.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::clipOutPositionedObjects):
+ (WebCore::RenderBlock::insertPositionedObject):
+
+2010-05-18 Anders Carlsson <andersca@apple.com>
+
+ 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
+ <rdar://problem/7998366>
+
+ 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 <simon.hausmann@nokia.com>
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<CachedResource*>);
+ 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<CachedResource*>::iterator end = m_preloads.end();
- for (ListHashSet<CachedResource*>::iterator it = m_preloads.begin(); it != end; ++it) {
+ if (!m_preloads)
+ return;
+
+ ListHashSet<CachedResource*>::iterator end = m_preloads->end();
+ for (ListHashSet<CachedResource*>::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<CachedResource*> m_preloads;
+ OwnPtr<ListHashSet<CachedResource*> > 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<RenderBox*>* 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<IntRect, fixedObjectThreshold> subRectToUpdate;
bool updateInvalidatedSubRect = true;
- ListHashSet<RenderBox*>::const_iterator end = positionedObjects->end();
- for (ListHashSet<RenderBox*>::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<RenderBox*>* positionedObjects)
+static void clipOutPositionedObjects(const RenderObject::PaintInfo* paintInfo, int tx, int ty, RenderBlock::PositionedObjectsListHashSet* positionedObjects)
{
if (!positionedObjects)
return;
- ListHashSet<RenderBox*>::const_iterator end = positionedObjects->end();
- for (ListHashSet<RenderBox*>::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<RenderBox*>;
+ 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<RenderBox*>* positionedObjects() const { return m_positionedObjects; }
+
+ typedef ListHashSet<RenderBox*, 4> 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<RenderBox*>::const_iterator Iterator;
+ typedef PositionedObjectsListHashSet::const_iterator Iterator;
DeprecatedPtrList<FloatingObject>* m_floatingObjects;
- ListHashSet<RenderBox*>* 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; }