Commit 55e2bf07 authored by Maks Orlovich's avatar Maks Orlovich

Merge in 3.5 changes

svn path=/trunk/KDE/kdelibs/; revision=466552
parent d63832cf
2005-09-18 Allan Sandfeld Jensen <kde@carewolf.com>
Implementation of real page-breaking algorithm respecting the CSS 2.1 specification.
* khtmlview.cpp:
Do layout for page-breaks before printing.
Use screen resolution as default instead of 72DPI.
* css/html4.css: Add the print media default styles
* rendering/render_style.*: Add RenderPageStyle as the style for the page-context. Not yet used.
* rendering/render_canvas.*:
Separate paged and static properties of printing.
Use rootHeight as pageHeight.
Add RenderPage as the page-context(@page). Not yet used.
* rendering/render_flow.*:
(deleteLastLineBox) new function to remove the last line (in order to redo it).
* rendering/render_line.*:
(removeFromLine) ditto
* rendering/bidi.cpp: New algorithm in layoutInlineChildren for doing page-breaks at layout-time,
and respecting orphans/widows CSS settings.
* rendering/render_block.cpp:
(makePageBreakAvoidBlocks) Function for collecting runs of page-break-after/before: avoid blocks, so
they can be moved across page-breaks collectively.
(layoutBlockChildren) New algorithm for doing page-breaks at layout time,
and respecting page-break-after/before/inside
* rendering/render_table.cpp: Force page-breaks to happen inside cells and not between rows.
(RenderTableSection::addSpaceAt) moves later table-rows down when one cell expands to handle a
page-break.
* rendering/render_list.cpp: Remove truncation logic from paint
* rendering/render_text.cpp: ditto
2005-08-18 Lus Pedro Coelho <luis@luispedro.org>
* rendering/render_image.cpp: Scale images correctly (adjust both height and width)
when max-width is used.
2005-08-10 Dawit Alemayehu <adawit@kde.org>
* ecma/xmlhttprequest.cpp: Convert a 304 (Not Modified) HTTP response in
XMLHttpRequest to a 200 (OK) response to make KHTML conform to IE's and
Mozilla's behavior. BUG: 110272
* ecma/xmlhttprequest.cpp: Factored out the HTTP status line parsing code
into a single function.
2005-08-02 Allan Sandfeld Jensen <kde@carewolf.com>
Imported background parsing and painting from WebCore.
......@@ -20,6 +62,9 @@
* html/htmlparser.cpp: Block <input type="image"> elements if SRC attribute is ad-filtered.
* khtml_part.cpp: Include <input type="image"> elements in AdBlocK filter runs.
2005-07-25 Dawit Alemayehu <adawit@kde.org>
* ecma/xmlhttprequest.cpp: Use the charset provided by the remote host through the HTTP headers.
2005-07-25 Andreas Kling <kling@impul.se>
Make new ad filters have instant effect (either hide affected elements
......
......@@ -14,7 +14,7 @@
# You should have received a copy of the GNU Library General Public License
# along with this library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
KDE_CXXFLAGS = $(WOVERLOADED_VIRTUAL)
......
......@@ -14,7 +14,7 @@
# You should have received a copy of the GNU Library General Public License
# along with this library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
KDE_CXXFLAGS = $(WOVERLOADED_VIRTUAL)
......
......@@ -20,7 +20,7 @@
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
......
......@@ -18,7 +18,7 @@
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
......
......@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
......
......@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
......
......@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#include "css_renderstyledeclarationimpl.h"
......
......@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#ifndef CSS_RENDERSTYLEIMPL_H
......
......@@ -17,7 +17,7 @@
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include "dom/css_rule.h"
......
......@@ -17,7 +17,7 @@
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
......
......@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
......
......@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
......
......@@ -17,7 +17,7 @@
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
......
......@@ -17,7 +17,7 @@
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
......
......@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
......
......@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
......
......@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
......
......@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef _CSS_cssparser_h_
......
......@@ -18,7 +18,7 @@
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
......@@ -3124,45 +3124,33 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
// rect
case CSS_PROP_CLIP:
{
Length top;
Length right;
Length bottom;
Length left;
bool hasClip = true;
if (isInherit) {
if (parentStyle->hasClip()) {
top = parentStyle->clipTop();
right = parentStyle->clipRight();
bottom = parentStyle->clipBottom();
left = parentStyle->clipLeft();
}
else {
hasClip = false;
top = right = bottom = left = Length();
Length top = Length();
Length right = Length();
Length bottom = Length();
Length left = Length();
bool hasClip = false;
if (isInherit && parentStyle->hasClip()) {
hasClip = true;
top = parentStyle->clipTop();
right = parentStyle->clipRight();
bottom = parentStyle->clipBottom();
left = parentStyle->clipLeft();
} else if (primitiveValue && primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_RECT) {
RectImpl *rect = primitiveValue->getRectValue();
if (rect) {
hasClip = true;
top = convertToLength( rect->top(), style, paintDeviceMetrics );
right = convertToLength( rect->right(), style, paintDeviceMetrics );
bottom = convertToLength( rect->bottom(), style, paintDeviceMetrics );
left = convertToLength( rect->left(), style, paintDeviceMetrics );
}
} else if (isInitial) {
hasClip = false;
top = right = bottom = left = Length();
} else if ( !primitiveValue ) {
break;
} else if ( primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_RECT ) {
RectImpl *rect = primitiveValue->getRectValue();
if ( !rect )
break;
top = convertToLength( rect->top(), style, paintDeviceMetrics );
right = convertToLength( rect->right(), style, paintDeviceMetrics );
bottom = convertToLength( rect->bottom(), style, paintDeviceMetrics );
left = convertToLength( rect->left(), style, paintDeviceMetrics );
}
style->setClip(top, right, bottom, left);
style->setHasClip(hasClip);
} else if ( primitiveValue->getIdent() != CSS_VAL_AUTO ) {
break;
}
// qDebug("setting clip top to %d", top.value );
// qDebug("setting clip right to %d", right.value );
// qDebug("setting clip bottom to %d", bottom.value );
// qDebug("setting clip left to %d", left.value );
style->setClip(top, right, bottom, left );
style->setHasClip(hasClip);
// rect, ident
break;
}
......
......@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
......
......@@ -374,7 +374,7 @@ INPUT { color: windowtext;
font-family: sans-serif;
font-size: small;
margin: 0__qem;
border: 0px -khtml-native;
border: 2px -khtml-native;
}
INPUT[type="hidden"] {
......@@ -415,7 +415,7 @@ TEXTAREA {
color: windowtext;
font-family: monospace;
margin: 0__qem;
border: 0px -khtml-native;
border: 2px -khtml-native;
}
/*
......@@ -562,18 +562,8 @@ marquee {
/* noscript is handled internally, as it depends on the html settings */
/* media rules are commented out for the moment. We'll have to add
* them later. Lars, 23.12.99
*/
/*
@media print {
@page { margin: 10% }
H1, H2, H3,
H4, H5, H6 { page-break-after: avoid; page-break-inside: avoid }
BLOCKQUOTE,
PRE { page-break-inside: avoid }
UL, OL, DL { page-break-before: avoid }
}
*/
@media print {
h1, h2, h3,
h4, h5, h6 { page-break-after: avoid }
ul, ol, dl { page-break-before: avoid }
}
......@@ -14,7 +14,7 @@
#
# You should have received a copy of the GNU Library General Public License
# along with this library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
#----------------------------------------------------------------------------
......
......@@ -14,7 +14,7 @@
#
# You should have received a copy of the GNU Library General Public License
# along with this library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
#----------------------------------------------------------------------------
......
......@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Steet, Fifth Floor,
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, when this file is copied by Bison into a
......@@ -180,7 +180,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
......
......@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Steet, Fifth Floor,
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, when this file is copied by Bison into a
......
......@@ -18,7 +18,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
......
......@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
......
......@@ -17,7 +17,7 @@
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
......
......@@ -14,7 +14,7 @@
# You should have received a copy of the GNU Library General Public License
# along with this library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
KDE_CXXFLAGS = $(USE_EXCEPTIONS) $(WOVERLOADED_VIRTUAL)
......
......@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
......
......@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
* This file includes excerpts from the Document Object Model (DOM)
......
......@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
......
......@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
* This file includes excerpts from the Document Object Model (DOM)
......
......@@ -17,7 +17,7 @@
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
......
......@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
* This file includes excerpts from the Document Object Model (DOM)
......
......@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
......
......@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
* This file includes excerpts from the Document Object Model (DOM)
......