diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2009-06-24 13:42:15 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2009-06-24 13:42:15 +0200 |
commit | 259c32cd921fcbb85f79f21923d0efa0d6743d8a (patch) | |
tree | f9629c9be4b8488eb3221b48c0629a42a6ffce4c /src/3rdparty/webkit/WebCore/rendering/RenderDataGrid.cpp | |
parent | ff2b98cf81daf585bb657bee7f5f131769b38eca (diff) | |
download | qt4-tools-259c32cd921fcbb85f79f21923d0efa0d6743d8a.tar.gz |
Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit-4.6-snapshot-24062009 ( 6d5a2a0472a6af0b7f781da018e76bb8522d57a5 )
++ b/WebKit/qt/ChangeLog
2009-06-19 Daniel <qt-info@nokia.com>
Reviewed by Simon Hausmann.
Remove warnings for QString() constructions from const char *
By explicitly wrapping it with QLatin1String() / QLatin1Char()
* Api/qwebelement.cpp:
(QWebElement::classes): Use QLatin1String.
(QWebElement::addClass): Ditto.
(QWebElement::removeClass): Ditto.
(QWebElement::toggleClass): Ditto.
2009-06-18 Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed by Simon Hausmann.
Fixed MinGW compilation.
* Api/qwebelement.cpp:
(QWebElement::evaluateScript):
2009-06-18 Markus Goetz <Markus.Goetz@nokia.com>
Reviewed by Simon Hausman.
Clarify in docs how to compile with debug information.
* docs/qtwebkit.qdoc:
2009-06-17 Markus Goetz <Markus.Goetz@nokia.com>
Reviewed by Simon Hausmann.
QWebPage: Don't call supportsSsl()
This stops QWebPage from loading the OpenSSL libs,
certificates etc. when they are not needed for the non-HTTPS case.
Loading the SSL libraries can be a very slow operation.
* Api/qwebpage.cpp:
(QWebPage::userAgentForUrl):
2009-06-15 Benjamin C Meyer <benjamin.meyer@torchmobile.com>
Reviewed by Adam Treat.
Support the back/forward/stop/refresh multimedia keys and accept the
event when handling backspace and shift backspace as we should.
* Api/qwebpage.cpp:
(QWebPagePrivate::keyPressEvent):
2009-06-15 Andre Pedralho <andre.pedralho@openbossa.org>
Reviewed by Adam Treat.
https://bugs.webkit.org/show_bug.cgi?id=26351
Remove bool QWebHitTestResult::isScrollBar() const and make sure a null QWebHitTestResult is returned instead.
* Api/qwebframe.cpp:
(QWebFrame::hitTestContent):
* Api/qwebframe.h:
* Api/qwebpage.cpp:
(QWebPage::updatePositionDependentActions):
2009-06-15 Simon Hausmann <simon.hausmann@nokia.com>
Reviewed by Adam Treat.
Fix the logic for disabling the fixed layout feature, when an invalid
QSize is set.
* Api/qwebpage.cpp:
(QWebPage::setFixedContentsSize):
2009-06-13 Adam Barth <abarth@webkit.org>
Reviewed by Darin Fisher.
https://bugs.webkit.org/show_bug.cgi?id=24492
Move registerURLSchemeAsLocal from FrameLoader to SecurityOrigin.
* Api/qwebpage.cpp:
(QWebPage::acceptNavigationRequest):
Rubber-stamped by Simon Hausmann.
2009-06-09 Simon Hausmann <simon.hausmann@nokia.com>
Reviewed by Ariya Hidayat.
Renamed QWebSettings::AllowUniversalAccessFromFileUrls to
LocalContentCanAccessRemoteUrls, as discussed in the API review.
* Api/qwebsettings.cpp:
(QWebSettingsPrivate::apply):
(QWebSettings::QWebSettings):
* Api/qwebsettings.h:
2009-06-09 Simon Hausmann <simon.hausmann@nokia.com>
Reviewed by Ariya Hidayat.
Merged useFixedLayout property with fixedLayoutSize and
renamed the latter to fixedContentsSize.
* Api/qwebpage.cpp:
(QWebPage::fixedContentsSize):
(QWebPage::setFixedContentsSize):
* Api/qwebpage.h:
* WebCoreSupport/FrameLoaderClientQt.cpp:
(WebCore::FrameLoaderClientQt::transitionToCommittedForNewPage):
2009-06-09 Simon Hausmann <simon.hausmann@nokia.com>
Reviewed by Ariya Hidayat.
Renamed QWebHitTestResult::linkTarget to linkElement() and made it return
a QWebElement. The link target itself is always the target DOM attribute.
* Api/qwebframe.cpp:
(QWebHitTestResultPrivate::QWebHitTestResultPrivate):
(QWebHitTestResult::linkElement):
* Api/qwebframe.h:
* Api/qwebframe_p.h:
* tests/qwebframe/tst_qwebframe.cpp:
Diffstat (limited to 'src/3rdparty/webkit/WebCore/rendering/RenderDataGrid.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebCore/rendering/RenderDataGrid.cpp | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderDataGrid.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderDataGrid.cpp new file mode 100644 index 0000000000..32e67a434d --- /dev/null +++ b/src/3rdparty/webkit/WebCore/rendering/RenderDataGrid.cpp @@ -0,0 +1,110 @@ +/* + * Copyright (C) 2009 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "RenderDataGrid.h" + +#include "FocusController.h" +#include "Frame.h" +#include "GraphicsContext.h" +#include "Page.h" +#include "Scrollbar.h" + +using std::min; + +namespace WebCore { + +static const int cDefaultWidth = 300; + +RenderDataGrid::RenderDataGrid(Element* elt) + : RenderBlock(elt) +{ +} + +RenderDataGrid::~RenderDataGrid() +{ +} + +void RenderDataGrid::calcPrefWidths() +{ + m_minPrefWidth = 0; + m_maxPrefWidth = 0; + + if (style()->width().isFixed() && style()->width().value() > 0) + m_minPrefWidth = m_maxPrefWidth = calcContentBoxWidth(style()->width().value()); + else + m_maxPrefWidth = calcContentBoxWidth(cDefaultWidth); + + if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) { + m_maxPrefWidth = max(m_maxPrefWidth, calcContentBoxWidth(style()->minWidth().value())); + m_minPrefWidth = max(m_minPrefWidth, calcContentBoxWidth(style()->minWidth().value())); + } else if (style()->width().isPercent() || (style()->width().isAuto() && style()->height().isPercent())) + m_minPrefWidth = 0; + else + m_minPrefWidth = m_maxPrefWidth; + + if (style()->maxWidth().isFixed() && style()->maxWidth().value() != undefinedLength) { + m_maxPrefWidth = min(m_maxPrefWidth, calcContentBoxWidth(style()->maxWidth().value())); + m_minPrefWidth = min(m_minPrefWidth, calcContentBoxWidth(style()->maxWidth().value())); + } + + int toAdd = paddingLeft() + paddingRight() + borderLeft() + borderRight(); + m_minPrefWidth += toAdd; + m_maxPrefWidth += toAdd; + + setPrefWidthsDirty(false); +} + +void RenderDataGrid::paintObject(PaintInfo& paintInfo, int tx, int ty) +{ + if (style()->visibility() != VISIBLE) + return; + + // FIXME: Column and cell foregrounds will paint here. + + // Paint our background and border. + RenderBlock::paintObject(paintInfo, tx, ty); + + // FIXME: Row, cell and column backgrounds will paint here. +} + +// Scrolling implementation functions +void RenderDataGrid::valueChanged(Scrollbar*) +{ + // FIXME: Implement. +} + +void RenderDataGrid::invalidateScrollbarRect(Scrollbar*, const IntRect&) +{ + // FIXME: Implement. +} + +bool RenderDataGrid::isActive() const +{ + Page* page = document()->frame()->page(); + return page && page->focusController()->isActive(); +} + +} |