[-]
[+]
|
Changed |
_service:tar_git:khtml.spec
|
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/CMakeLists.txt
^
|
@@ -2,7 +2,7 @@
project(KHtml)
-find_package(ECM 1.0.0 REQUIRED NO_MODULE)
+find_package(ECM 1.2.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
include(FeatureSummary)
include(GenerateExportHeader)
@@ -16,8 +16,8 @@
include(KDEFrameworkCompilerSettings)
include(KDECMakeSettings)
-set(KF5_VERSION "5.0.0") # handled by release scripts
-set(KF5_DEP_VERSION "5.0.0") # handled by release scripts
+set(KF5_VERSION "5.3.0") # handled by release scripts
+set(KF5_DEP_VERSION "5.2.0") # handled by release scripts
find_package(KF5Archive ${KF5_DEP_VERSION} REQUIRED)
find_package(KF5Codecs ${KF5_DEP_VERSION} REQUIRED)
find_package(KF5GlobalAccel ${KF5_DEP_VERSION} REQUIRED)
@@ -84,8 +84,12 @@
find_package(Qt5 5.2.0 CONFIG REQUIRED X11Extras)
endif()
+if(WIN32)
+ find_package(KDEWin REQUIRED)
+ INCLUDE_DIRECTORIES(${KDEWIN_INCLUDES})
+ LINK_LIBRARIES(${KDEWIN_LIBRARIES})
+endif()
-remove_definitions(-DQT_NO_CAST_TO_ASCII)
remove_definitions(-DQT_NO_CAST_FROM_ASCII)
remove_definitions(-DQT_NO_CAST_FROM_BYTEARRAY)
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/README.md
^
|
@@ -36,9 +36,3 @@
industry support.
-## Links
-
-- Home page: <https://projects.kde.org/projects/frameworks/khtml>
-- Mailing list: <https://mail.kde.org/mailman/listinfo/kde-frameworks-devel>
-- IRC channel: #khtml on Freenode
-- Git repository: <https://projects.kde.org/projects/frameworks/khtml/repository>
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/metainfo.yaml
^
|
@@ -7,3 +7,7 @@
portingAid: true
deprecated: true
release: true
+libraries:
+ - qmake: KHtml
+ cmake: "KF5::KHtml"
+cmakename: KF5KHtml
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/CMakeLists.txt
^
|
@@ -574,7 +574,7 @@
KF5::KIOWidgets # KUrlRequester
KF5::GlobalAccel
)
-if(NOT APPLE)
+if(NOT WIN32 AND NOT APPLE AND X11_FOUND)
target_link_libraries(KF5KHtml PRIVATE Qt5::X11Extras)
endif()
@@ -786,10 +786,8 @@
install(FILES khtml.desktop khtmlimage.desktop
khtmladaptorpart.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
-# XmlGui files are expected in GenericDataLocation/ComponentName
-# (ie: ${DATA_INSTALL_DIR}/khtml), so we version the files themselves
-install(FILES khtml.rc DESTINATION ${DATA_INSTALL_DIR}/khtml RENAME khtml5.rc )
-install(FILES khtml_browser.rc DESTINATION ${DATA_INSTALL_DIR}/khtml RENAME khtml5_browser.rc )
+install(FILES khtml.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/khtml)
+install(FILES khtml_browser.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/khtml)
# install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.KHtmlPart.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR} )
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/css/css_renderstyledeclarationimpl.cpp
^
|
@@ -1274,9 +1274,10 @@
// ### emit error since we're read-only
}
-void RenderStyleDeclarationImpl::removePropertiesInSet(const int *, unsigned)
+bool RenderStyleDeclarationImpl::removePropertiesInSet(const int *, unsigned)
{
// ### emit error since we're read-only
+ return false;
}
bool RenderStyleDeclarationImpl::setProperty(int, const DOM::DOMString &, bool, int &ec)
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/css/css_renderstyledeclarationimpl.h
^
|
@@ -51,7 +51,7 @@
unsigned long length() const;
virtual void removeProperty(int propertyID, DOM::DOMString *old = 0);
- virtual void removePropertiesInSet(const int *set, unsigned length);
+ virtual bool removePropertiesInSet(const int *set, unsigned length);
virtual bool isPropertyImplicit(int /*propertyID*/) const
{
return false;
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/css/css_valueimpl.cpp
^
|
@@ -531,8 +531,6 @@
#define SET_SHORTHAND_MAP_ENTRY(map, propID, array) \
map.insert(propID, PropertyLonghand(array, sizeof(array) / sizeof(array[0])))
- // FIXME: The 'font' property has "shorthand nature" but is not parsed as a shorthand.
-
// Do not change the order of the following four shorthands, and keep them together.
static const int borderProperties[4][3] = {
{ CSS_PROP_BORDER_TOP_COLOR, CSS_PROP_BORDER_TOP_STYLE, CSS_PROP_BORDER_TOP_WIDTH },
@@ -676,18 +674,29 @@
};
SET_SHORTHAND_MAP_ENTRY(shorthandMap, CSS_PROP_MARKER, markerProperties);
+ static const int fontProperties[] = {
+ CSS_PROP_FONT_STYLE,
+ CSS_PROP_FONT_VARIANT,
+ CSS_PROP_FONT_WEIGHT,
+ CSS_PROP_FONT_SIZE,
+ CSS_PROP_LINE_HEIGHT,
+ CSS_PROP_FONT_FAMILY
+ };
+ SET_SHORTHAND_MAP_ENTRY(shorthandMap, CSS_PROP_FONT, fontProperties);
+
#undef SET_SHORTHAND_MAP_ENTRY
}
// -------------------------------------------
-void CSSStyleDeclarationImpl::removeProperty(int propertyID,
- DOM::DOMString *old)
+void CSSStyleDeclarationImpl::removeProperty(int propertyID, DOM::DOMString *old)
{
if (!m_lstValues) {
return;
}
+ bool changed = false;
+
static QHash<int, PropertyLonghand> shorthandMap;
if (shorthandMap.isEmpty()) {
initShorthandMap(shorthandMap);
@@ -695,11 +704,11 @@
PropertyLonghand longhand = shorthandMap.value(propertyID);
if (longhand.length()) {
- removePropertiesInSet(longhand.properties(), longhand.length());
- // FIXME: Return an equivalent shorthand when possible.
- return;
+ changed = removePropertiesInSet(longhand.properties(), longhand.length());
}
+ // FIXME: Return an equivalent shorthand when possible.
+
QMutableListIterator<CSSProperty *> lstValuesIt(*m_lstValues);
CSSProperty *current;
lstValuesIt.toBack();
@@ -711,13 +720,17 @@
}
delete lstValuesIt.value();
lstValuesIt.remove();
- setChanged();
+ changed = true;
break;
}
}
+
+ if (changed) {
+ setChanged();
+ }
}
-void CSSStyleDeclarationImpl::removePropertiesInSet(const int *set, unsigned length)
+bool CSSStyleDeclarationImpl::removePropertiesInSet(const int *set, unsigned length)
{
bool changed = false;
for (unsigned i = 0; i < length; i++) {
@@ -734,9 +747,8 @@
}
}
}
- if (changed) {
- setChanged();
- }
+
+ return changed;
}
void CSSStyleDeclarationImpl::setChanged()
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/css/css_valueimpl.h
^
|
@@ -58,7 +58,7 @@
virtual unsigned long length() const;
CSSRuleImpl *parentRule() const;
virtual void removeProperty(int propertyID, DOM::DOMString *old = 0);
- virtual void removePropertiesInSet(const int *set, unsigned length);
+ virtual bool removePropertiesInSet(const int *set, unsigned length);
virtual bool setProperty(int propertyId, const DOM::DOMString &value, bool important, int &ec);
virtual bool setProperty(int propertyId, const DOM::DOMString &value, bool important = false);
virtual void setProperty(int propertyId, int value, bool important = false);
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/css/cssparser.cpp
^
|
@@ -967,7 +967,7 @@
if (id >= CSS_VAL_XX_SMALL && id <= CSS_VAL_LARGER) {
valid_primitive = true;
} else {
- valid_primitive = (validUnit(value, FLength | FPercent, strict));
+ valid_primitive = validUnit(value, FLength | FPercent | FNonNeg, strict);
}
break;
@@ -1279,16 +1279,9 @@
};
return parse4Values(propId, properties, important);
}
- case CSS_PROP_FONT:
- // [ [ 'font-style' || 'font-variant' || 'font-weight' ]? 'font-size' [ / 'line-height' ]?
- // 'font-family' ] | caption | icon | menu | message-box | small-caption | status-bar | inherit
- if (id >= CSS_VAL_CAPTION && id <= CSS_VAL_STATUS_BAR) {
- valid_primitive = true;
- } else {
- ShorthandScope scope(this, CSS_PROP_FONT);
- return parseFont(important);
- }
- break;
+ case CSS_PROP_FONT: {
+ return parseFontShorthand(important);
+ }
case CSS_PROP_LIST_STYLE: {
return parseListStyleShorthand(important);
}
@@ -1970,7 +1963,7 @@
if (value->id == CSS_VAL_AUTO) {
parsedValue1 = new CSSPrimitiveValueImpl(0, CSSPrimitiveValue::CSS_UNKNOWN);
} else {
- if (!validUnit(value, FLength | FPercent, strict)) {
+ if (!validUnit(value, FLength | FPercent | FNonNeg, strict)) {
return 0;
}
parsedValue1 = new CSSPrimitiveValueImpl(value->fValue, (CSSPrimitiveValue::UnitTypes)value->unit);
@@ -1981,7 +1974,7 @@
if (value->id == CSS_VAL_AUTO) {
parsedValue2 = new CSSPrimitiveValueImpl(0, CSSPrimitiveValue::CSS_UNKNOWN);
} else {
- if (!validUnit(value, FLength | FPercent, strict)) {
+ if (!validUnit(value, FLength | FPercent | FNonNeg, strict)) {
delete parsedValue1;
return 0;
}
@@ -2219,13 +2212,24 @@
return false;
}
-// [ 'font-style' || 'font-variant' || 'font-weight' ]? 'font-size' [ / 'line-height' ]? 'font-family'
-bool CSSParser::parseFont(bool important)
+// [ [ <'font-style'> || <'font-variant'> || <'font-weight'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] |
+// caption | icon | menu | message-box | small-caption | status-bar
+bool CSSParser::parseFontShorthand(bool important)
{
Value *value = valueList->current();
+ if (valueList->size() == 1) {
+ // Must be a system font identifier
+ if (value->id >= CSS_VAL_CAPTION && value->id <= CSS_VAL_STATUS_BAR) {
+ addProperty(CSS_PROP_FONT, new CSSPrimitiveValueImpl(value->id), important);
+ return true;
+ }
+ return false;
+ }
CSSValueListImpl *family = 0;
CSSPrimitiveValueImpl *style = 0, *variant = 0, *weight = 0, *size = 0, *lineHeight = 0;
+ ShorthandScope scope(this, CSS_PROP_FONT);
+
// optional font-style, font-variant and font-weight
while (value) {
//qWarning() << "got value" << value->id << "/" <<
@@ -2277,7 +2281,7 @@
// <absolute-size> | <relative-size> | <length> | <percentage> | inherit
if (value->id >= CSS_VAL_XX_SMALL && value->id <= CSS_VAL_LARGER) {
size = new CSSPrimitiveValueImpl(value->id);
- } else if (validUnit(value, FLength | FPercent, strict)) {
+ } else if (validUnit(value, FLength | FPercent | FNonNeg, strict)) {
size = new CSSPrimitiveValueImpl(value->fValue, (CSSPrimitiveValue::UnitTypes) value->unit);
}
if (!size) {
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/css/cssparser.h
^
|
@@ -191,7 +191,7 @@
void addBackgroundValue(CSSValueImpl *&lval, CSSValueImpl *rval);
bool parseShape(int propId, bool important);
- bool parseFont(bool important);
+ bool parseFontShorthand(bool important);
bool parseFontFaceSrc();
bool parseCounter(int propId, bool increment, bool important);
bool parseListStyleShorthand(bool important);
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/css/cssstyleselector.cpp
^
|
@@ -523,18 +523,14 @@
#else
Q_UNUSED(isFixed);
- // ### get rid of float / double
- float toPix = logicalDpiY / 72.0f;
- if (toPix < 96.0f / 72.0f) {
- toPix = 96.0f / 72.0f;
- }
+ const float toPix = qMax(logicalDpiY, 96) / 72.0f;
#endif // ######### fix isFixed code again.
fontSizes.resize(MAXFONTSIZES);
float scale = 1.0;
static const float fontFactors[] = {3.0f / 5.0f, 3.0f / 4.0f, 8.0f / 9.0f, 1.0f, 6.0f / 5.0f, 3.0f / 2.0f, 2.0f, 3.0f};
static const float smallFontFactors[] = {3.0f / 4.0f, 5.0f / 6.0f, 8.0f / 9.0f, 1.0f, 6.0f / 5.0f, 3.0f / 2.0f, 2.0f, 3.0f};
- float mediumFontSize, minFontSize, factor;
+ float mediumFontSize, factor;
if (!khtml::printpainter) {
scale *= zoomFactor / 100.0;
#ifdef APPLE_CHANGES
@@ -543,17 +539,17 @@
} else
#endif
mediumFontSize = settings->mediumFontSize() * toPix;
- minFontSize = settings->minFontSize() * toPix;
+ m_minFontSize = settings->minFontSize() * toPix;
} else {
// ### depending on something / configurable ?
mediumFontSize = 12;
- minFontSize = 6;
+ m_minFontSize = 6;
}
const float *factors = scale * mediumFontSize >= 12.5 ? fontFactors : smallFontFactors;
for (int i = 0; i < MAXFONTSIZES; i++) {
factor = scale * factors[i];
- fontSizes[i] = int(qMax(mediumFontSize * factor + .5f, minFontSize));
- //qDebug() << "index: " << i << " factor: " << factors[i] << " font pix size: " << int(qMax( mediumFontSize*factor +.5f, minFontSize));
+ fontSizes[i] = qMax(qRound(mediumFontSize * factor), m_minFontSize);
+ //qDebug() << "index:" << i << "factor:" << factors[i] << "font pix size:" << fontSizes[i];
}
}
@@ -1054,16 +1050,16 @@
int firstLen = values ? values->count() : 0;
int secondLen = nonCSSValues ? nonCSSValues->count() : 0;
- uint totalLen = firstLen + secondLen;
+ int totalLen = firstLen + secondLen;
- if ((unsigned)inlineProps.size() < totalLen) {
+ if (inlineProps.size() < totalLen) {
inlineProps.resize(totalLen + 1);
}
propsToApply.reserveCapacity(propsToApply.size() + totalLen);
bool inNonCSSDecls = false;
CSSOrderedProperty *array = (CSSOrderedProperty *)inlineProps.data();
- for (int i = 0; i < (int)totalLen; i++) {
+ for (int i = 0; i < totalLen; i++) {
if (i == firstLen) {
values = nonCSSValues;
inNonCSSDecls = true;
@@ -2165,6 +2161,7 @@
CSSInitialValueImpl i(true);
applyRule(CSS_PROP_FONT_SIZE, &i);
style->htmlFont().update(logicalDpiY);
+ fontDirty = false;
}
void CSSStyleSelector::buildLists()
@@ -2321,7 +2318,7 @@
if (item->isStyleRule()) {
CSSStyleRuleImpl *r = static_cast<CSSStyleRuleImpl *>(item);
QList<CSSSelector *> *s = r->selector();
- for (int j = 0; j < (int)s->count(); j++) {
+ for (int j = 0; j < s->count(); j++) {
CSSOrderedRule *rule = new CSSOrderedRule(r, s->at(j), count());
QList<CSSOrderedRule *>::append(rule);
//qDebug() << "appending StyleRule!";
@@ -2357,7 +2354,7 @@
static_cast<CSSStyleRuleImpl *>(childItem);
QList<CSSSelector *> *s = styleRule->selector();
- for (int j = 0; j < (int) s->count(); j++) {
+ for (int j = 0; j < s->count(); j++) {
CSSOrderedRule *orderedRule = new CSSOrderedRule(
styleRule, s->at(j), count());
QList<CSSOrderedRule *>::append(orderedRule);
@@ -3691,24 +3688,10 @@
case CSS_PROP_FONT_SIZE: {
FontDef fontDef = style->htmlFont().fontDef;
- int oldSize;
- float size = 0;
-
- float toPix = logicalDpiY / 72.0f;
- if (toPix < 96.0f / 72.0f) {
- toPix = 96.0f / 72.0f;
- }
-
- float minFontSize = settings->minFontSize() * toPix;
-
- if (parentNode) {
- oldSize = parentStyle->font().pixelSize();
- } else {
- oldSize = m_fontSizes[3];
- }
+ int size = 0;
if (isInherit) {
- size = oldSize;
+ size = parentStyle->font().pixelSize();
} else if (isInitial) {
size = m_fontSizes[3];
} else if (primitiveValue->getIdent()) {
@@ -3720,6 +3703,12 @@
#else
const QVector<int> &fontSizes = m_fontSizes;
#endif
+ int oldSize;
+ if (parentNode) {
+ oldSize = parentStyle->font().pixelSize();
+ } else {
+ oldSize = m_fontSizes[3];
+ }
switch (primitiveValue->getIdent()) {
case CSS_VAL_XX_SMALL: size = fontSizes[0]; break;
case CSS_VAL_X_SMALL: size = fontSizes[1]; break;
@@ -3743,33 +3732,27 @@
int type = primitiveValue->primitiveType();
if (type > CSSPrimitiveValue::CSS_PERCENTAGE && type < CSSPrimitiveValue::CSS_DEG) {
if (!khtml::printpainter && type != CSSPrimitiveValue::CSS_EMS && type != CSSPrimitiveValue::CSS_EXS &&
- view && view->part())
- size = primitiveValue->computeLengthFloat(parentStyle, logicalDpiY) *
- view->part()->fontScaleFactor() / 100.0;
- else {
- size = primitiveValue->computeLengthFloat(parentStyle, logicalDpiY);
+ view && view->part()) {
+ size = qRound(primitiveValue->computeLengthFloat(parentStyle, logicalDpiY) * view->part()->fontScaleFactor() / 100.0);
+ } else {
+ size = qRound(primitiveValue->computeLengthFloat(parentStyle, logicalDpiY));
}
} else if (type == CSSPrimitiveValue::CSS_PERCENTAGE)
- size = primitiveValue->floatValue(CSSPrimitiveValue::CSS_PERCENTAGE)
- * parentStyle->font().pixelSize() / 100.0;
+ size = qRound(primitiveValue->floatValue(CSSPrimitiveValue::CSS_PERCENTAGE) * parentStyle->font().pixelSize() / 100.0);
else {
return;
}
- }
- if (size < 0) {
- return;
- }
-
- // we never want to get smaller than the minimum font size to keep fonts readable
- // do not however maximize zero as that is commonly used for fancy layouting purposes
- if (size && size < minFontSize) {
- size = minFontSize;
+ // we never want to get smaller than the minimum font size to keep fonts readable
+ // do not however maximize zero as that is commonly used for fancy layouting purposes
+ if (size) {
+ size = qMax(size, m_minFontSize);
+ }
}
//qDebug() << "computed raw font size: " << size;
- fontDef.size = qRound(size);
+ fontDef.size = size;
fontDirty |= style->setFontDef(fontDef);
return;
}
@@ -4036,7 +4019,7 @@
#ifdef APPLE_CHANGES
fontDef.family = initialDef.firstFamily();
#else
- fontDef.family.clear();
+ fontDef.family = initialDef.family;
#endif
if (style->setFontDef(fontDef)) {
fontDirty = true;
@@ -4307,30 +4290,9 @@
fontDirty |= style->setFontDef(fontDef);
} else if (isInitial) {
FontDef fontDef;
+ fontDef.size = m_fontSizes[3];
style->setLineHeight(RenderStyle::initialLineHeight());
- if (style->setFontDef(fontDef)) {
- fontDirty = true;
- }
- } else if (value->isFontValue()) {
- FontValueImpl *font = static_cast<FontValueImpl *>(value);
- if (!font->style || !font->variant || !font->weight ||
- !font->size || !font->lineHeight || !font->family) {
- return;
- }
- applyRule(CSS_PROP_FONT_STYLE, font->style);
- applyRule(CSS_PROP_FONT_VARIANT, font->variant);
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/css/cssstyleselector.h
^
|
@@ -347,6 +347,7 @@
RenderStyle *m_rootDefaultStyle;
QVector<int> m_fontSizes;
QVector<int> m_fixedFontSizes;
+ int m_minFontSize;
bool fontDirty;
DOM::CSSFontSelector *m_fontSelector;
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/dom/dom_node.cpp
^
|
@@ -522,7 +522,7 @@
return impl->nodeIndex();
}
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
QString Node::toHTML()
{
if (!impl) {
@@ -540,7 +540,7 @@
impl->recalcStyle(NodeImpl::Inherit);
}
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
void Node::getCursor(int offset, int &_x, int &_y, int &height)
{
if (!impl) {
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/dom/dom_node.h
^
|
@@ -942,14 +942,14 @@
* @internal returns the index of a node
*/
unsigned long index() const;
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
KHTML_DEPRECATED QString toHTML();
#endif
void applyChanges();
/**
* @deprecated without substitution since 3.2
*/
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
KHTML_DEPRECATED void getCursor(int offset, int &_x, int &_y, int &height);
#endif
/**
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/dom/html_form.cpp
^
|
@@ -574,7 +574,7 @@
}
/* The next two are provided for backwards compatibility. */
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
DOMString HTMLInputElement::size() const
{
if (!impl) {
@@ -584,7 +584,7 @@
}
#endif
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
void HTMLInputElement::setSize(const DOMString &value)
{
if (impl) {
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/dom/html_form.h
^
|
@@ -537,14 +537,14 @@
/**
* @deprecated
*/
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
KHTML_DEPRECATED DOMString size() const;
#endif
/**
* @deprecated
*/
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
KHTML_DEPRECATED void setSize(const DOMString &);
#endif
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/dom/html_image.cpp
^
|
@@ -260,7 +260,7 @@
}
}
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
long HTMLImageElement::border() const
{
if (!impl) {
@@ -271,7 +271,7 @@
}
#endif
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
void HTMLImageElement::setBorder(long value)
{
if (impl) {
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/dom/html_image.h
^
|
@@ -258,14 +258,14 @@
/**
* @deprecated
*/
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
KHTML_DEPRECATED long border() const;
#endif
/**
* @deprecated
*/
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
KHTML_DEPRECATED void setBorder(long);
#endif
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/dom/html_misc.cpp
^
|
@@ -84,7 +84,7 @@
}
}
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
DOMString HTMLBaseFontElement::size() const
{
if (!impl) {
@@ -94,7 +94,7 @@
}
#endif
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
void HTMLBaseFontElement::setSize(const DOMString &value)
{
if (impl) {
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/dom/html_misc.h
^
|
@@ -108,14 +108,14 @@
/**
* @deprecated
*/
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
KHTML_DEPRECATED DOMString size() const;
#endif
/**
* @deprecated
*/
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
KHTML_DEPRECATED void setSize(const DOMString &);
#endif
};
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/dom/html_object.cpp
^
|
@@ -147,7 +147,7 @@
}
}
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
DOMString HTMLAppletElement::hspace() const
{
if (!impl) {
@@ -157,7 +157,7 @@
}
#endif
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
void HTMLAppletElement::setHspace(const DOMString &value)
{
if (impl) {
@@ -211,7 +211,7 @@
}
}
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
DOMString HTMLAppletElement::vspace() const
{
if (!impl) {
@@ -221,7 +221,7 @@
}
#endif
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
void HTMLAppletElement::setVspace(const DOMString &value)
{
if (impl) {
@@ -437,7 +437,7 @@
}
}
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
DOMString HTMLObjectElement::hspace() const
{
if (!impl) {
@@ -447,7 +447,7 @@
}
#endif
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
void HTMLObjectElement::setHspace(const DOMString &value)
{
if (impl) {
@@ -547,7 +547,7 @@
}
}
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
DOMString HTMLObjectElement::vspace() const
{
if (!impl) {
@@ -557,7 +557,7 @@
}
#endif
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
void HTMLObjectElement::setVspace(const DOMString &value)
{
if (impl) {
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/dom/html_object.h
^
|
@@ -169,14 +169,14 @@
/**
* @deprecated
*/
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
KHTML_DEPRECATED DOMString hspace() const;
#endif
/**
* @deprecated
*/
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
KHTML_DEPRECATED void setHspace(const DOMString &value);
#endif
@@ -226,14 +226,14 @@
/**
* @deprecated
*/
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
KHTML_DEPRECATED DOMString vspace() const;
#endif
/**
* @deprecated
*/
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
KHTML_DEPRECATED void setVspace(const DOMString &);
#endif
@@ -431,14 +431,14 @@
/**
* @deprecated
*/
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
KHTML_DEPRECATED DOMString hspace() const;
#endif
/**
* @deprecated
*/
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
KHTML_DEPRECATED void setHspace(const DOMString &);
#endif
@@ -528,14 +528,14 @@
/**
* @deprecated
*/
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
KHTML_DEPRECATED DOMString vspace() const;
#endif
/**
* @deprecated
*/
-#ifndef KDE_NO_DEPRECATED
+#ifndef KHTML_NO_DEPRECATED
KHTML_DEPRECATED void setVspace(const DOMString &);
#endif
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/html/html_canvasimpl.cpp
^
|
@@ -81,6 +81,11 @@
using namespace khtml;
using namespace std;
+// on Windows fmod might be a macro so std::fmod will not work
+#ifdef fmod
+#undef fmod
+#endif
+
// -------------------------------------------------------------------------
HTMLCanvasElementImpl::HTMLCanvasElementImpl(DocumentImpl *doc)
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/html/html_imageimpl.cpp
^
|
@@ -34,7 +34,6 @@
#include "css/cssstyleselector.h"
#include "css/cssproperties.h"
#include "css/cssvalues.h"
-#include "css/csshelper.h"
#include "xml/dom2_eventsimpl.h"
#include <QtCore/QCharRef>
@@ -86,10 +85,9 @@
setChanged();
//Start loading the image already, to generate events
- DOMString url = attr->value();
- if (!url.isEmpty()) { //### why do we not hide or something when setting this?
- DOMString parsedURL = khtml::parseURL(url);
- CachedImage *newImage = document()->docLoader()->requestImage(parsedURL);
+ DOMString imgSrcUrl = attr->value();
+ if (!imgSrcUrl.isEmpty()) { //### why do we not hide or something when setting this?
+ CachedImage *newImage = document()->docLoader()->requestImage(imgSrcUrl);
if (newImage && newImage != m_image) {
CachedImage *oldImage = m_image;
loadEventSent = false;
@@ -100,9 +98,11 @@
}
}
- QUrl fullURL(document()->completeURL(parsedURL.string()));
- if (document()->origin()->taintsCanvas(fullURL)) {
- unsafe = true;
+ if (m_image) {
+ const QUrl fullURL = QUrl(m_image->url().string());
+ if (document()->origin()->taintsCanvas(fullURL)) {
+ unsafe = true;
+ }
}
}
}
@@ -155,7 +155,7 @@
if (attr->value()[0] == '#') {
usemap = attr->value().lower();
} else {
- QString url = document()->completeURL(khtml::parseURL(attr->value()).string());
+ QString url = document()->completeURL(attr->value().string());
// ### we remove the part before the anchor and hope
// the map is on the same html page....
usemap = url;
@@ -443,7 +443,7 @@
break;
} else {
// add name with full url:
- QString url = document()->completeURL(khtml::parseURL(attr->value()).string());
+ QString url = document()->completeURL(attr->value().string());
if (document()->isHTMLDocument()) {
static_cast<HTMLDocumentImpl *>(document())->mapMap[url] = this;
}
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/html/htmltokenizer.cpp
^
|
@@ -30,7 +30,7 @@
// KDE HTML Widget - Tokenizers
// #define TOKEN_DEBUG 1
-//#define TOKEN_DEBUG 2
+// #define TOKEN_DEBUG 2
#include "htmltokenizer.h"
#include "html_documentimpl.h"
@@ -1090,11 +1090,10 @@
checkBuffer();
#if defined(TOKEN_DEBUG) && TOKEN_DEBUG > 1
uint l = 0;
- while (l < src.length() && (src.toString()[l]).toLatin1().constData() != '>') {
+ while (l < src.length() && (src.toString()[l]).toLatin1() != '>') {
l++;
}
- qDebug("src is now: *%s*, tquote: %d",
- src.toString().left(l).toLatin1().constData(), tquote);
+ qDebug("src is now: *%s*, tquote: %d", src.toString().left(l).toLatin1().constData(), tquote);
#endif
switch (tag) {
case NoTag:
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/java/kjavaappletviewer.desktop
^
|
@@ -62,7 +62,7 @@
Name[nl]=Ingebed Java Applet-weergaveprogramma
Name[nn]=Innebyggbar Java-programvisar
Name[or]=ସନ୍ନିବେଶିତ ଜାଭା ଏପଲେଟ ପ୍ରଦର୍ଶକ
-Name[pa]=ਸ਼ਾਮਲ Java Applet ਦਰਸ਼ਕ
+Name[pa]=ਸ਼ਾਮਿਲ Java Applet ਦਰਸ਼ਕ
Name[pl]=Wbudowana przeglądarka apletów Javy
Name[ps]=راتاو جاوا څېرمه کړنلار ليدانی
Name[pt]=Visualizador Incorporado de 'Applets' Java
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/khtml.desktop
^
|
@@ -63,7 +63,7 @@
Comment[nl]=Ingebed HTML-weergavecomponent
Comment[nn]=Innebyggbar komponent for HTML-vising
Comment[or]=ସନ୍ନିବେଶଯୋଗ୍ୟ HTML ପ୍ରଦର୍ଶନୀୟ ଉପାଦାନ
-Comment[pa]=ਸ਼ਾਮਲ HTML ਵੇਖਣਯੋਗ ਹਿੱਸਾ
+Comment[pa]=ਸ਼ਾਮਿਲ HTML ਵੇਖਣਯੋਗ ਹਿੱਸਾ
Comment[pl]=Składnik do przeglądania plików HTML
Comment[ps]=ليدانی رغتوک HTML راتاوېدونکی
Comment[pt]=Componente de visualização de HTML incorporada
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/khtml_part.cpp
^
|
@@ -220,9 +220,9 @@
void KHTMLPart::init(KHTMLView *view, GUIProfile prof)
{
if (prof == DefaultGUI) {
- setXMLFile("khtml5.rc");
+ setXMLFile("khtml.rc");
} else if (prof == BrowserViewGUI) {
- setXMLFile("khtml5_browser.rc");
+ setXMLFile("khtml_browser.rc");
}
d = new KHTMLPartPrivate(this, parent());
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/kmultipart/kmultipart.cpp
^
|
@@ -41,7 +41,7 @@
"0.1",
i18n("Embeddable component for multipart/mixed"),
KAboutLicense::GPL,
- i18n("Copyright 2001-2011, David Faure <email>faure@kde.org</email>"));
+ i18n("Copyright 2001-2011, David Faure <faure@kde.org>"));
return aboutData;
}
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/rendering/SVGInlineTextBox.h
^
|
@@ -33,9 +33,9 @@
{
using namespace khtml;
-class SVGChar;
+struct SVGChar;
class SVGRootInlineBox;
-class SVGTextDecorationInfo;
+struct SVGTextDecorationInfo;
class SVGInlineTextBox : public InlineTextBox
{
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/rendering/font.cpp
^
|
@@ -36,9 +36,6 @@
# endif
#endif
-#include <khtml_global.h>
-#include <khtml_settings.h>
-
#include <QDebug>
#include <QtCore/QHash>
@@ -668,11 +665,9 @@
void Font::update(int logicalDpiY) const
{
- QString familyName = fontDef.family.isEmpty() ? KHTMLGlobal::defaultHTMLSettings()->stdFontName() : fontDef.family;
- CachedFontFamily *family = queryFamily(familyName, fontDef.weight, fontDef.italic);
+ CachedFontFamily *family = queryFamily(fontDef.family, fontDef.weight, fontDef.italic);
int size = fontDef.size;
- const int lDpiY = qMax(logicalDpiY, 96);
// ok, now some magic to get a nice unscaled font
// all other font properties should be set before this one!!!!
@@ -681,6 +676,7 @@
// lets see if we find a nice looking font, which is not too far away
// from the requested one.
// qDebug() << "khtml::setFontSize family = " << f.family() << " size requested=" << size;
+ const float toPix = qMax(logicalDpiY, 96) / 72.0f;
float diff = 1; // ### 100% deviation
float bestSize = 0;
@@ -689,7 +685,7 @@
const QList<int>::ConstIterator itEnd = pointSizes.end();
for (; it != itEnd; ++it) {
- float newDiff = ((*it) * (lDpiY / 72.) - float(size)) / float(size);
+ float newDiff = (((*it) * toPix) - float(size)) / float(size);
//qDebug() << "smooth font size: " << *it << " diff=" << newDiff;
if (newDiff < 0) {
newDiff = -newDiff;
@@ -701,7 +697,7 @@
}
//qDebug() << "best smooth font size: " << bestSize << " diff=" << diff;
if (bestSize != 0 && diff < 0.2) { // 20% deviation, otherwise we use a scaled font...
- size = (int)((bestSize * lDpiY) / 72);
+ size = static_cast<int>(bestSize * toPix);
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/rendering/font.h
^
|
@@ -25,6 +25,9 @@
#ifndef KHTMLFONT_H
#define KHTMLFONT_H
+#include <khtml_global.h>
+#include <khtml_settings.h>
+
#include <QCache>
#include <QFont>
#include <QFontMetrics>
@@ -109,7 +112,7 @@
{
public:
FontDef()
- : size(0), italic(false), smallCaps(false), weight(QFont::Normal/*50*/) {}
+ : family(KHTMLGlobal::defaultHTMLSettings()->stdFontName()), size(0), italic(false), smallCaps(false), weight(QFont::Normal) {}
bool operator == (const FontDef &other) const
{
return (family == other.family &&
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/rendering/render_style.cpp
^
|
@@ -106,6 +106,8 @@
BackgroundLayer::BackgroundLayer()
: m_image(RenderStyle::initialBackgroundImage()),
+ m_xPosition(RenderStyle::initialBackgroundXPosition()),
+ m_yPosition(RenderStyle::initialBackgroundYPosition()),
m_bgAttachment(RenderStyle::initialBackgroundAttachment()),
m_bgClip(RenderStyle::initialBackgroundClip()),
m_bgOrigin(RenderStyle::initialBackgroundOrigin()),
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/rendering/render_style.h
^
|
@@ -2489,11 +2489,11 @@
}
static Length initialBackgroundXPosition()
{
- return Length();
+ return Length(0.0, Percent);
}
static Length initialBackgroundYPosition()
{
- return Length();
+ return Length(0.0, Percent);
}
static short initialBorderHorizontalSpacing()
{
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/svg/SVGGlyphElement.h
^
|
@@ -36,7 +36,7 @@
{
using khtml::AtomicString;
-struct SVGFontData;
+class SVGFontData;
// Describe a SVG <glyph> element
struct SVGGlyphIdentifier {
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/svg/SVGHKernElement.h
^
|
@@ -38,7 +38,7 @@
//class AtomicString;
using khtml::AtomicString;
-struct SVGFontData;
+class SVGFontData;
// Describe an SVG <hkern> element
struct SVGHorizontalKerningPair {
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/src/xml/dom_docimpl.cpp
^
|
@@ -1447,26 +1447,14 @@
RenderStyle *_style = new RenderStyle();
_style->setDisplay(BLOCK);
_style->setVisuallyOrdered(visuallyOrdered);
- // ### make the font stuff _really_ work!!!!
+ // ### make the font stuff _really_ work!!!! (??)
- khtml::FontDef fontDef;
- QFont f = QFontDatabase::systemFont(QFontDatabase::GeneralFont);
- fontDef.family = f.family();
- fontDef.italic = f.italic();
- fontDef.weight = f.weight();
- if (m_view) {
- const KHTMLSettings *settings = m_view->part()->settings();
- QString stdfont = settings->stdFontName();
- if (!stdfont.isEmpty()) {
- fontDef.family = stdfont;
- }
-
- fontDef.size = m_styleSelector->fontSizes()[3];
- }
-
- //qDebug() << "DocumentImpl::attach: setting to charset " << settings->charset();
+ FontDef fontDef = FontDef();
+ // Initial fontDef.size is 0
+ fontDef.size = m_styleSelector->fontSizes()[3];
_style->setFontDef(fontDef);
_style->htmlFont().update(0);
+
if (inCompatMode()) {
_style->setHtmlHacks(true); // enable html specific rendering tricks
}
|
[-]
[+]
|
Changed |
_service:tar_git:khtml-5.2.0.tar.xz/upstream/tests/CMakeLists.txt
^
|
@@ -1,6 +1,6 @@
include(ECMMarkAsTest)
-if(NOT APPLE)
+if(NOT WIN32 AND NOT APPLE AND X11_FOUND)
find_package(Qt5X11Extras "${REQUIRED_QT_VERSION}" CONFIG REQUIRED)
set_package_properties(Qt5X11Extras PROPERTIES PURPOSE "Required for tests")
endif()
|
[-]
[+]
|
Changed |
_service:tar_git:khtml.yaml
^
|
@@ -1,5 +1,5 @@
Name : khtml
-Version : 5.1.0
+Version : 5.2.0
Release : 1
Group : System/Base
License : GPLv2+
|