summaryrefslogtreecommitdiffstats
path: root/tdehtml/html
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-10-02 18:38:22 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-10-02 18:40:04 -0500
commitcc5fd88be313142d3996c81f8bdfc1290485858c (patch)
tree36c6e1eef900d0ef1aa05e96d786194b4c5674d9 /tdehtml/html
parent2c850d93a7803e435504fe9c982cb974695d7a3b (diff)
downloadtdelibs-cc5fd88be313142d3996c81f8bdfc1290485858c.tar.gz
tdelibs-cc5fd88be313142d3996c81f8bdfc1290485858c.zip
Don't use insane (negative) layout values if layout engine does not allocate sufficient space for a text string
This resolves Bug 1950 Make most debugging statements work again Add new debugging statements Fix several annoying build warnings
Diffstat (limited to 'tdehtml/html')
-rw-r--r--tdehtml/html/html_imageimpl.cpp4
-rw-r--r--tdehtml/html/htmltokenizer.cpp13
2 files changed, 10 insertions, 7 deletions
diff --git a/tdehtml/html/html_imageimpl.cpp b/tdehtml/html/html_imageimpl.cpp
index a006b3bd0..e356d1e51 100644
--- a/tdehtml/html/html_imageimpl.cpp
+++ b/tdehtml/html/html_imageimpl.cpp
@@ -539,12 +539,12 @@ TQRegion HTMLAreaElementImpl::getRegion(int width_, int height_) const
m_coords[(i<<1)+1].minWidth(height_));
region = TQRegion(points);
}
- else if (shape==Circle && m_coordsLen>=3 || shape==Unknown && m_coordsLen == 3) {
+ else if ((shape==Circle && m_coordsLen>=3) || (shape==Unknown && m_coordsLen == 3)) {
int r = kMin(m_coords[2].minWidth(width_), m_coords[2].minWidth(height_));
region = TQRegion(m_coords[0].minWidth(width_)-r,
m_coords[1].minWidth(height_)-r, 2*r, 2*r,TQRegion::Ellipse);
}
- else if (shape==Rect && m_coordsLen>=4 || shape==Unknown && m_coordsLen == 4) {
+ else if ((shape==Rect && m_coordsLen>=4) || (shape==Unknown && m_coordsLen == 4)) {
int x0 = m_coords[0].minWidth(width_);
int y0 = m_coords[1].minWidth(height_);
int x1 = m_coords[2].minWidth(width_);
diff --git a/tdehtml/html/htmltokenizer.cpp b/tdehtml/html/htmltokenizer.cpp
index 292d1773d..edf44d84f 100644
--- a/tdehtml/html/htmltokenizer.cpp
+++ b/tdehtml/html/htmltokenizer.cpp
@@ -1385,11 +1385,11 @@ void HTMLTokenizer::write( const TokenizerString &str, bool appendData )
else if ( startTag )
{
startTag = false;
- bool endTag = false;
+ // bool endTag = false;
switch(cc) {
case '/':
- endTag = true;
+ // endTag = true;
break;
case '!':
{
@@ -1440,11 +1440,14 @@ void HTMLTokenizer::write( const TokenizerString &str, bool appendData )
// immediately before an endtag should be ignored.
// ### Gecko and MSIE though only ignores LF immediately after
// starttags and only for PRE elements -- asj (28/06-2005)
- if ( pending )
- if (!select)
+ if ( pending ) {
+ if (!select) {
addPending();
- else
+ }
+ else {
pending = NonePending;
+ }
+ }
// Cancel unused discards
discard = NoneDiscard;