[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
rjw
rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:52:26 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit f47a6aa5818cab24ec59383d370941cc18a99bb4
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Aug 20 18:24:23 2003 +0000
Fixed 3242508. Japanese (and other non latin1 scripts) line breaking incorrect when mixed with latin1.
Reviewed by Dave.
* khtml/rendering/break_lines.cpp:
Checkin fix for earlier bug that was already approved!
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::attributedString):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4848 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index a5bb3ae..35cc5f5 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,16 @@
+2003-08-20 Richard Williamson <rjw at apple.com>
+
+ Fixed 3242508. Japanese (and other non latin1 scripts) line breaking incorrect when mixed with latin1.
+
+ Reviewed by Dave.
+
+ * khtml/rendering/break_lines.cpp:
+
+ Checkin fix for earlier bug that was already approved!
+
+ * kwq/KWQKHTMLPart.mm:
+ (KWQKHTMLPart::attributedString):
+
2003-08-19 David Hyatt <hyatt at apple.com>
Fixes for 3380766 and 3381867. One is a table bug with amazon.com where colspans
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index a5bb3ae..35cc5f5 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,16 @@
+2003-08-20 Richard Williamson <rjw at apple.com>
+
+ Fixed 3242508. Japanese (and other non latin1 scripts) line breaking incorrect when mixed with latin1.
+
+ Reviewed by Dave.
+
+ * khtml/rendering/break_lines.cpp:
+
+ Checkin fix for earlier bug that was already approved!
+
+ * kwq/KWQKHTMLPart.mm:
+ (KWQKHTMLPart::attributedString):
+
2003-08-19 David Hyatt <hyatt at apple.com>
Fixes for 3380766 and 3381867. One is a table bug with amazon.com where colspans
diff --git a/WebCore/WebCore.pbproj/project.pbxproj b/WebCore/WebCore.pbproj/project.pbxproj
index 3e5c41a..a644b6d 100644
--- a/WebCore/WebCore.pbproj/project.pbxproj
+++ b/WebCore/WebCore.pbproj/project.pbxproj
@@ -30,6 +30,8 @@
buildSettings = {
COPY_PHASE_STRIP = YES;
DEBUGGING_SYMBOLS = NO;
+ DEPLOYMENT_LOCATION = YES;
+ DEPLOYMENT_POSTPROCESSING = YES;
GCC_ENABLE_FIX_AND_CONTINUE = NO;
INSTALL_PATH = "@executable_path/../Frameworks";
OTHER_LDFLAGS = "-seg1addr $(LOCAL_SEG1_ADDR)";
diff --git a/WebCore/khtml/rendering/break_lines.cpp b/WebCore/khtml/rendering/break_lines.cpp
index 9ed2a22..3d03bd4 100644
--- a/WebCore/khtml/rendering/break_lines.cpp
+++ b/WebCore/khtml/rendering/break_lines.cpp
@@ -88,7 +88,9 @@ bool isBreakable( const QChar *s, int pos, int len)
return true;
}
- if (ch > 0x7f){
+ // If current character, or the previous character aren't simple latin1 then
+ // use the UC line break locator.
+ if (ch > 0x7f || (pos > 0 && (s+pos-1)->unicode() > 0x7f)){
status = UCCreateTextBreakLocator (NULL, 0, kUCTextBreakLineMask, &breakLocator);
if (status == 0){
findStatus = UCFindTextBreak (breakLocator, kUCTextBreakLineMask, NULL, (const UniChar *)s, len, pos, &end);
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 8959432..d65131d 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -31,6 +31,7 @@
#import "render_frames.h"
#import "render_image.h"
#import "render_list.h"
+#import "render_style.h"
#import "render_table.h"
#import "render_text.h"
#import "khtmlpart_p.h"
@@ -1919,6 +1920,8 @@ static NodeImpl *inList(NodeImpl *e)
}
#define BULLET_CHAR 0x2022
+#define SQUARE_CHAR 0x25AA
+#define CIRCLE_CHAR 0x25E6
NSAttributedString *KWQKHTMLPart::attributedString(NodeImpl *_startNode, int startOffset, NodeImpl *endNode, int endOffset)
{
@@ -2059,22 +2062,29 @@ NSAttributedString *KWQKHTMLPart::attributedString(NodeImpl *_startNode, int sta
listText += '\t';
if (itemParent){
// Ick! Avoid use of itemParent->id() which confuses ObjC++.
- if (Node(itemParent).elementId() == ID_UL) {
- // Always use bullets. Perhaps we could use other characters
- // for square and disc type lists.
- listText += ((QChar)BULLET_CHAR);
- if ([font pointSize] > maxMarkerWidth)
- maxMarkerWidth = [font pointSize];
- }
- else {
- RenderListItem *listRenderer = static_cast<RenderListItem*>(renderer);
- QString marker = listRenderer->markerStringValue();
- listText += marker;
- // Use AppKit metrics. Will be rendered by AppKit.
- float markerWidth = [font widthOfString: marker.getNSString()];
- if (markerWidth > maxMarkerWidth)
- maxMarkerWidth = markerWidth;
+ khtml::RenderListItem *listRenderer = static_cast<khtml::RenderListItem*>(renderer);
+
+ maxMarkerWidth = MAX([font pointSize], maxMarkerWidth);
+ switch(listRenderer->style()->listStyleType()) {
+ case khtml::DISC:
+ listText += ((QChar)BULLET_CHAR);
+ break;
+ case khtml::CIRCLE:
+ listText += ((QChar)CIRCLE_CHAR);
+ break;
+ case khtml::SQUARE:
+ listText += ((QChar)SQUARE_CHAR);
+ break;
+ case khtml::LNONE:
+ break;
+ default:
+ QString marker = listRenderer->markerStringValue();
+ listText += marker;
+ // Use AppKit metrics. Will be rendered by AppKit.
+ float markerWidth = [font widthOfString: marker.getNSString()];
+ maxMarkerWidth = MAX(markerWidth, maxMarkerWidth);
}
+
listText += ' ';
listText += '\t';
@@ -2240,9 +2250,11 @@ NSAttributedString *KWQKHTMLPart::attributedString(NodeImpl *_startNode, int sta
unsigned i, count = listItems.count();
ElementImpl *e;
ListItemInfo info;
- int containingBlockX, containingBlockY;
- NodeImpl *containingBlock;
+#ifdef POSITION_LIST
+ NodeImpl *containingBlock;
+ int containingBlockX, containingBlockY;
+
// Determine the position of the outermost containing block. All paragraph
// styles and tabs should be relative to this position. So, the horizontal position of
// each item in the list (in the resulting attributed string) will be relative to position
@@ -2254,6 +2266,7 @@ NSAttributedString *KWQKHTMLPart::attributedString(NodeImpl *_startNode, int sta
}
containingBlock->renderer()->absolutePosition(containingBlockX, containingBlockY);
}
+#endif
for (i = 0; i < count; i++){
e = listItems.at(i);
@@ -2264,15 +2277,21 @@ NSAttributedString *KWQKHTMLPart::attributedString(NodeImpl *_startNode, int sta
RenderObject *r = e->renderer();
RenderStyle *style = r->style();
- int rx, ry;
- r->absolutePosition(rx, ry);
- rx -= containingBlockX;
-
+
+ int rx;
NSFont *font = style->font().getNSFont();
float pointSize = [font pointSize];
+#ifdef POSITION_LIST
+ int ry;
+ r->absolutePosition(rx, ry);
+ rx -= containingBlockX;
+
// Ensure that the text is indented at least enough to allow for the markers.
rx = MAX(rx, (int)maxMarkerWidth);
+#else
+ rx = (int)MAX(maxMarkerWidth, pointSize);
+#endif
// The bullet text will be right aligned at the first tab marker, followed
// by a space, followed by the list item text. The space is arbitrarily
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list