1. 21 Nov, 2002 1 commit
  2. 20 Nov, 2002 1 commit
    • rjw's avatar
      Fixed 3107007. Letter-spacing is causing width to be miscalculated. · 7d0b05a1
      rjw authored
              This also fixed some selection problems.
      
              * khtml/rendering/font.cpp:
              (Font::width):
      
      
              Fixed 3107007.  Letter-spacing is causing width to be miscalculated.
              This also fixed some selection problems.
      
              * WebCoreSupport.subproj/WebTextRenderer.m:
              (-[WebTextRenderer _floatWidthForCharacters:stringLength:fromCharacterPosition:numberOfCharacters:withPadding:applyRounding:attemptFontSubstitution:widths:fonts:glyphs:numGlyphs:letterSpacing:wordSpacing:]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2796 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7d0b05a1
  3. 12 Nov, 2002 2 commits
    • rjw's avatar
      Oops, removed debugging. · 80eba2b5
      rjw authored
              * khtml/rendering/font.cpp:
              (Font::drawText):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2641 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      80eba2b5
    • rjw's avatar
      Implemented letter-spacing and word-spacing CSS properties. · 16de6614
      rjw authored
              * khtml/rendering/font.cpp:
              (Font::drawText):
              (Font::floatWidth):
              (Font::floatCharacterWidths):
              * kwq/KWQFontMetrics.h:
              * kwq/KWQFontMetrics.mm:
              (QFontMetrics::width):
              (QFontMetrics::floatWidth):
              (QFontMetrics::floatCharacterWidths):
              * kwq/KWQPainter.h:
              * kwq/KWQPainter.mm:
              (QPainter::drawText):
              * kwq/WebCoreTextRenderer.h:
      
              Implemented letter-spacing and word-spacing CSS properties.
      
              * Misc.subproj/WebStringTruncator.m:
              (+[WebStringTruncator rightTruncateString:toWidth:withFont:]):
              (+[WebStringTruncator centerTruncateString:toWidth:withFont:]):
              * WebCoreSupport.subproj/WebTextRenderer.h:
              * WebCoreSupport.subproj/WebTextRenderer.m:
              (-[WebTextRenderer widthForCharacters:length:]):
              (-[WebTextRenderer drawCharacters:stringLength:fromCharacterPosition:toCharacterPosition:atPoint:withPadding:withTextColor:backgroundColor:rightToLeft:letterSpacing:wordSpacing:]):
              (-[WebTextRenderer floatWidthForCharacters:stringLength:characterPosition:]):
              (-[WebTextRenderer floatWidthForCharacters:stringLength:fromCharacterPosition:numberOfCharacters:]):
              (-[WebTextRenderer floatWidthForCharacters:stringLength:fromCharacterPosition:numberOfCharacters:withPadding:applyRounding:attemptFontSubstitution:widths:letterSpacing:wordSpacing:]):
              (-[WebTextRenderer _floatWidthForCharacters:stringLength:fromCharacterPosition:numberOfCharacters:withPadding:applyRounding:attemptFontSubstitution:widths:fonts:glyphs:numGlyphs:letterSpacing:wordSpacing:]):
      
              Changed to reflect method name change.
      
              * EtchedStringView.m:
              (-[EtchedStringView drawRect:]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2640 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      16de6614
  4. 26 Oct, 2002 1 commit
  5. 25 Oct, 2002 2 commits
    • rjw's avatar
      Removed debug logging. · e94b5b50
      rjw authored
              * khtml/rendering/font.cpp:
              (Font::drawText):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e94b5b50
    • rjw's avatar
      Implemented support for bidi text layout. · 9c5fbe8a
      rjw authored
              * WebCoreSupport.subproj/WebTextRenderer.m:
              (_drawGlyphs):
              (-[WebTextRenderer drawCharacters:stringLength:fromCharacterPosition:toCharacterPosition:atPoint:withPadding:withTextColor:backgroundColor:rightToLeft:]):
      
              Implemented support for bidi text layout.  WebCore
              temporarily depends on SPI to get unicode character
              attribute from CF.  This will change shortly.
      
              * khtml/rendering/font.cpp:
              (Font::drawText):
              * kwq/KWQChar.mm:
              (QChar::direction):
              * kwq/KWQPainter.mm:
              (QPainter::drawText):
              * kwq/WebCoreTextRenderer.h:
              * kwq/qt/qpainter.h:
      
              Updated to reflect change in WebKit SPI.
      
              * EtchedStringView.m:
              (-[EtchedStringView drawRect:]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2473 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9c5fbe8a
  6. 13 Sep, 2002 1 commit
    • rjw's avatar
      Made justified text work correctly in khtml for rendering · 83750876
      rjw authored
              and selection.  Optimized selection point calculation by
              only doing characters measurements once.
      
              * khtml/rendering/font.cpp:
              (Font::floatCharacterWidths):
              * khtml/rendering/font.h:
              * khtml/rendering/render_text.cpp:
              (TextSlave::checkSelectionPoint):
              (RenderText::position):
              * kwq/KWQFontMetrics.mm:
              (QFontMetrics::width):
              (QFontMetrics::floatWidth):
              (QFontMetrics::floatCharacterWidths):
              * kwq/KWQPainter.mm:
              (QPainter::drawText):
              * kwq/WebCoreTextRenderer.h:
              * kwq/qt/qfontmetrics.h:
      
              Adding padding and widths buffer to our canonical measurement
              method.  The padding argument is used to 'pad' measurements in
              that same way that drawing is padded.  The widths parameter
              allows a caller to pass a buffer to get all the individual
              character widths for the run of characters in the string.
      
              * Misc.subproj/WebStringTruncator.m:
              (+[WebStringTruncator rightTruncateString:toWidth:withFont:]):
              (+[WebStringTruncator centerTruncateString:toWidth:withFont:]):
              * WebCoreSupport.subproj/WebTextRenderer.h:
              * WebCoreSupport.subproj/WebTextRenderer.m:
              (-[WebTextRenderer widthForCharacters:length:]):
              (-[WebTextRenderer drawGlyphs:numGlyphs:fromGlyphPosition:toGlyphPosition:atPoint:withPadding:withTextColor:backgroundColor:]):
              (-[WebTextRenderer floatWidthForCharacters:stringLength:characterPosition:]):
              (-[WebTextRenderer floatWidthForCharacters:stringLength:fromCharacterPosition:numberOfCharacters:]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2062 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      83750876
  7. 06 Sep, 2002 1 commit
    • rjw's avatar
      Added support for khtml's justified text drawing. Additional padding is distributed · 979d2676
      rjw authored
              to space widths.  (Sites like www.osnews.com now render correctly.)
      
              Change word end rounding hack to use ceil of word width.  I'm still noticing a spacing anomaly
              that is fixed by a reload.  Occasionally text runs are still crammed together, but a reload uses
              correct spacing.  This anomaly is often visible on www.arstechnica.com.  Still investigating.
      
              * WebCoreSupport.subproj/WebTextRenderer.m:
              (-[WebTextRenderer drawGlyphs:numGlyphs:fromGlyphPosition:toGlyphPosition:atPoint:withPadding:withTextColor:backgroundColor:]):
              (-[WebTextRenderer slowDrawCharacters:length:fromCharacterPosition:toCharacterPosition:atPoint:withPadding:withTextColor:backgroundColor:attemptFontSubstitution:]):
              (-[WebTextRenderer _drawCharacters:length:fromCharacterPosition:toCharacterPosition:atPoint:withPadding:withTextColor:backgroundColor:]):
              (-[WebTextRenderer drawCharacters:stringLength:fromCharacterPosition:toCharacterPosition:atPoint:withPadding:withTextColor:backgroundColor:]):
              (-[WebTextRenderer slowFloatWidthForCharacters:stringLength:fromCharacterPostion:numberOfCharacters:applyRounding:]):
              (-[WebTextRenderer floatWidthForCharacters:stringLength:fromCharacterPosition:numberOfCharacters:applyRounding:attemptFontSubstitution:]):
      
              Tweaks to dragged image.
      
              * WebView.subproj/WebHTMLView.m:
              (-[WebHTMLView mouseDragged:]):
      
              Start using khtml's 'toAdd' parameter to justify text.
      
              * khtml/rendering/font.cpp:
              (Font::drawText):
      
              Normalize all calls to get width to minimize use of
              ObjC.  Will make it easier to use IMPL cache later.
      
              * kwq/KWQFontMetrics.mm:
              (QFontMetrics::width):
              (QFontMetrics::floatWidth):
              (QFontMetrics::floatCharacterWidth):
      
              Pass additional 'toAdd' parameter.
      
              * kwq/KWQPainter.mm:
              (QPainter::drawText):
              * kwq/qt/qpainter.h:
      
              Remove methods now that width calls are normalized to single
              method.
              * kwq/WebCoreTextRenderer.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1989 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      979d2676
  8. 23 Jul, 2002 2 commits
    • hyatt's avatar
      * khtml/rendering/font.cpp: · 2d633685
      hyatt authored
      	Fix deployment build bustage by including <algorithm>.
      
              * khtml/rendering/render_frames.cpp:
              (RenderPartObject::calcReplacedWidth):
      	Fix a bug with http://www.moveabletype.com's top portion
      	not showing up (bug 2986714).  A hack was being improperly
      	applied to fixed width plugins, when it should have only
      	been applied to variable width plugins.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1640 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2d633685
    • darin's avatar
      top level: · c7cde739
      darin authored
              * Tests/kde/kurl-test.cpp: (main): Add a lot of new tests.
      	One of them demonstrates the issue underlying bug 3004818.
      	The others are taken straight from the URI RFC (2396).
              * Tests/kde/kurl-test.chk: Expected results for new tests.
      
              * autogen.sh: Add the new WebCore timestamp file.
      
      WebCore:
      
      	Changes require a make clean because of the Project Builder bug.
      	So I added the "make clean timestamp" hackery.
      
              * .cvsignore: Ignore the new clean timestamp.
              * force-clean-timestamp: Added.
              * Makefile.am: Add rules for making clean happen.
      
              * khtml/html/html_formimpl.cpp:
              (HTMLGenericFormElementImpl::defaultEventHandler): Fix NULL dereference
      	bug in here that I ran into. Code later down in the same function has
      	the check for NULL, so clearly this is just a bug.
      
              * khtml/rendering/font.cpp:
              (Font::drawText): Simplify by using new drawText that takes a QChar array,
      	no need to make a QConstString.
              * khtml/rendering/render_text.cpp:
              (TextSlave::printDecoration): Simplify by using new drawUnderlineForText that
      	takes a QChar array, no need to make a QConstString.
      
              * kwq/WebCoreTextRenderer.h: Change underline-drawing to use a UniChar array.
      
              * kwq/qt/qpainter.h:
              * kwq/KWQPainter.mm:
              (QPainter::drawText): Change to take QChar array instead of a QString, but
      	also discovered a bizarre overloading thing that was happening before and
      	dealt with that by adding a new drawText that still does take a QString.
              (QPainter::drawUnderlineForText): Change to take QChar array.
      
              * kwq/qt/qcolor.h: Mark constructor explicit, so we don't get subtle strangess
      	like where the string to draw was being converted to a QColor.
      
              * khtml/css/cssstyleselector.cpp: No need for APPLE_CHANGES for
      	this change any more.
      
              * kwq/kdecore/kcharsets.h:
              * kwq/KWQKCharsets.mm: Remove unused functions.
      
              * kwq/khtml/khtml_settings.h:
              * kwq/KWQKHTMLSettings.mm: Remove unused functions.
      
              * kwq/qt/qfont.h:
              * kwq/KWQFont.mm: Simplify.
      
              * kwq/KWQPaintDeviceMetrics.mm: Simplify.
      
              * kwq/qt/qtextcodec.h:
              * kwq/KWQtextcodec.mm: (QTextCodec::codecForName): Remove unused parameter.
      
      WebKit:
      
              * WebCoreSupport.subproj/WebTextRenderer.m:
              (-[WebTextRenderer drawUnderlineForCharacters:stringLength:atPoint:withColor:]):
      	Change API to take character array instead of a string.
      
              * WebKit.pbproj/project.pbxproj: Took "subproj" off the names of some groups.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1638 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c7cde739
  9. 21 Jul, 2002 1 commit
    • darin's avatar
      JavaScriptCore: · 74f6ed62
      darin authored
              * kjs/*: Roll KDE 3.0.2 changes in. Also switch to not using APPLE_CHANGES
      	for some of the changes that we definitely want to contribute upstream.
      
      WebCore:
      
      	* khtml/*: Roll KDE 3.0.2 changes in. Also switch to not using APPLE_CHANGES
      	for some of the changes that we definitely want to contribute upstream.
      
              * WebCore.pbproj/project.pbxproj: Add KWQStyle.mm, remove KWQStyle.h, moving contents
      	into qstyle.h.
      
              * kwq/KWQApplication.mm: (QApplication::globalStrut): Remove _logNotYetImplemented().
      
              * kwq/KWQButton.mm: (QButton::QButton): Use plain release, not autorelease.
              * kwq/KWQComboBox.mm: (QComboBox::init): Use plain release, not autorelease.
              * kwq/KWQListBox.mm: (QListBox::QListBox): Use plain release, not autorelease.
              * kwq/KWQPainter.mm: (QPainter::drawArc): Use plain release, not autorelease.
      
              * kwq/KWQKHTMLPartBrowserExtension.mm: Remove import of KWQKHTMLPartImpl.h, now that
      	it's always part of khtml_part.h.
              * kwq/KWQKHTMLPartImpl.cpp: Simplify.
              * kwq/KWQKHTMLPartImpl.h: Add wrapper to allow multiple inclusion. Don't include
      	khtml_part.h any more, since that file now includes this one to minimize changes to
      	KDE code that needs to get to functions in here.
              * kwq/KWQKHTMLPartImpl.mm:
              (KHTMLPart::onURL), (KHTMLPart::nodeActivated), (KHTMLPart::setStatusBarText):
      	Moved here from khtml_part.cpp.
              * kwq/KWQLoaderImpl.mm: Include khtml_part.h instead of KWQKHTMLPartImpl.h.
      
              * kwq/KWQPushButton.mm:
              (buttonFontMetrics), (QPushButton::fontMetrics): Added. Used by the form code to size buttons.
              * kwq/KWQStyle.mm: Added.
              (QStyle::sizeFromContents): Added. Used by the form code to size buttons.
      
              * kwq/KWQStyle.h: Removed.
              * kwq/qt/qstyle.h: Moved contents of KWQStyle.h in here.
              * kwq/qt/qwidget.h: Include <qstyle.h> rather than KWQStyle.h.
      
              * kwq/WebCoreBridge.mm: (-[WebCoreBridge isFrameSet]): Call straight to impl.
      
              * kwq/kdeui/klineedit.h: Add KLineEdit::frameWidth().
              * kwq/qt/qnamespace.h: Remove GUIStyle, MacStyle, and WindowsStyle.
              * kwq/qt/qpaintdevice.h: Add QInternal, QInternal::Printer, and QPaintDevice::devType().
              * kwq/qt/qpainter.h: Add QPainter::device().
              * kwq/qt/qpushbutton.h: Add QPushButton::fontMetrics().
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1623 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      74f6ed62
  10. 28 Jun, 2002 1 commit
    • rjw's avatar
      · 7077c2f4
      rjw authored
              Use float character measurement to determine selection
              region.  Necessary to ensure accuracy of selection
              region.  First step towards weaning khtml off int
              measurements.
      
              * khtml/rendering/font.cpp:
              (Font::floatWidth):
              (Font::floatCharacterWidth):
              * khtml/rendering/font.h:
              * khtml/rendering/render_text.cpp:
              (TextSlave::checkSelectionPoint):
              * kwq/KWQFontMetrics.mm:
              (QFontMetrics::floatWidth):
              (QFontMetrics::floatCharacterWidth):
              * kwq/WebCoreTextRenderer.h:
              * kwq/qt/qfontmetrics.h:
      
              Use float character measurement to determine selection
              region.  Necessary to ensure accuracy of selection
              region.  First step towards weaning khtml off int
              measurements.
      
              * WebCoreSupport.subproj/IFImageRenderer.m:
              (-[IFImageRenderer tileInRect:fromPoint:]):
              Cleaned up use of loadStatus.
              * WebCoreSupport.subproj/IFTextRenderer.m:
              (-[IFTextRenderer slowFloatWidthForCharacters:stringLength:fromCharacterPostion:numberOfCharacters:applyRounding:]):
              (-[IFTextRenderer floatWidthForCharacters:stringLength:characterPosition:]):
              (-[IFTextRenderer floatWidthForCharacters:stringLength:fromCharacterPosition:numberOfCharacters:applyRounding:attemptFontSubstitution:]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1469 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7077c2f4
  11. 26 Jun, 2002 1 commit
    • rjw's avatar
      Many improvements to selection. More Cocoa like, · 5570ea20
      rjw authored
              normalized all text drawing code paths for selected
              and unselected cases.  Still need to work on
              TextSlave::checkSelectionPoint.  Fixed redraw region
              problems.
      
              khtml redraw the entire visible region when selection changes.
              This could be optimzed.
      
              * khtml/rendering/font.cpp:
              (Font::drawText):
              (Font::width):
              * khtml/rendering/render_text.cpp:
              (TextSlave::printSelection):
              * kwq/KWQPainter.mm:
              (QPainter::drawText):
              (QPainter::selectedTextBackgroundColor):
              * kwq/KWQScrollView.mm:
              (QScrollView::contentsX):
              (QScrollView::contentsY):
              * kwq/WebCoreTextRenderer.h:
              * kwq/qt/qpainter.h:
      
              Many improvements to selection.  More Cocoa like,
              normalized all text drawing code paths for selected
              and unselected cases.
      
              Still need to work on:
              1.  'slow' drawing cases, i.e. runs with non-base characters
                  or runs requiring font substitution.
              2.  Select All menu item.
              3.  Auto scrolling.
      
              * WebCoreSupport.subproj/IFTextRenderer.m:
              (-[IFTextRenderer drawString:atPoint:withColor:]):
              (-[IFTextRenderer drawGlyphs:numGlyphs:fromGlyphPosition:toGlyphPosition:atPoint:withTextColor:backgroundColor:]):
              (-[IFTextRenderer slowDrawCharacters:length:fromCharacterPosition:toCharacterPosition:atPoint:withTextColor:backgroundColor:attemptFontSubstitution:]):
              (-[IFTextRenderer _drawCharacters:length:fromCharacterPosition:toCharacterPosition:atPoint:withTextColor:backgroundColor:]):
              (-[IFTextRenderer drawCharacters:length:atPoint:withTextColor:backgroundColor:]):
              (-[IFTextRenderer drawCharacters:length:atPoint:withTextColor:]):
              (-[IFTextRenderer drawCharacters:stringLength:fromCharacterPosition:toCharacterPosition:atPoint:withTextColor:backgroundColor:]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1447 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5570ea20
  12. 25 Jun, 2002 1 commit
    • rjw's avatar
      Support for khtml style selection drawing. Ugly, · b7856bb7
      rjw authored
              we'll want to make this more Mac like.
      
              * khtml/rendering/font.cpp:
              (Font::drawText):
                  Enable khtml code path.  Removed APPLE_CHANGES
              * kwq/KWQFontMetrics.mm:
              (QFontMetrics::charWidth):
                  Implemented in terms of width().
              * kwq/KWQPainter.mm:
              (QPainter::drawText):
                  Implemented.
              * kwq/qt/qfontmetrics.h:
                  Added QFontMetrics::charWidth.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1435 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b7856bb7
  13. 10 Jun, 2002 1 commit
    • darin's avatar
      JavaScriptCore: · f028f81b
      darin authored
      	Merged in changes from KDE 3.0.1.
      
      	* kjs/collector.cpp:
      	* kjs/date_object.cpp:
      	* kjs/function.cpp:
      	* kjs/internal.cpp:
      	* kjs/lookup.h:
      	* kjs/object.cpp:
      	* kjs/operations.cpp:
      	* kjs/regexp.cpp:
      	* kjs/regexp_object.cpp:
      	* kjs/regexp_object.h:
      	* kjs/string_object.cpp:
      	* kjs/testkjs.cpp:
      	* kjs/ustring.cpp:
      	* kjs/value.cpp:
      	* kjs/value.h:
      	Do the merge, and add APPLE_CHANGES as needed to make things compile.
      
      	* kjs/date_object.lut.h: Re-generated.
      
      WebCore:
      
      	Merged in changes from KDE 3.0.1.
      
      	* kwq/kdecore/kurl.h:
      	* kwq/KWQKURL.mm: (operator==): New, needed by some 3.0.1 code.
      
      	* kwq/qt/qpalette.h: Add QPalette::NColorGroups and QColorGroup::NColorRoles.
      	* kwq/KWQPalette.mm: Simplify by getting rid of "private" indirection.
      	(QPalette::color): New, needed by some 3.0.1 code.
      	* kwq/KWQColorGroup.mm: Simplify by getting rid of "private" indirection.
      
      	* kwq/qt/qstring.h:
      	* kwq/KWQString.mm: (QConstString::QConstString): Change parameter to const QChar *
      	to match Qt so we compile.
      
      	* kwq/qt/qtextedit.h:
      	* kwq/KWQTextEdit.mm: (QTextEdit::setTabStopWidth): Add unimplemented placeholder,
      	needed by some 3.0.1 code.
      
      	* kwq/qt/qvaluelist.h:
      	* kwq/KWQValueListImpl.h:
      	* kwq/KWQValueListImpl.mm: Simplify implementation.
      
      	* WebCore-tests.exp: Update for changes in QValueList implementation.
      
      	* kwq/kdecore/klibloader.h: Add include of <kio/global.h> to make something compile.
      
      	* kwq/khtml/java/kjavaappletcontext.h: Add JType and constructor that takes DCOPObject*.
      
      	* kwq/kio/global.h: Add KIO::CacheControl.
      
      	* khtml/css/css_ruleimpl.cpp:
      	* khtml/css/css_ruleimpl.h:
      	* khtml/css/css_stylesheetimpl.cpp:
      	* khtml/css/css_stylesheetimpl.h:
      	* khtml/css/css_valueimpl.cpp:
      	* khtml/css/css_valueimpl.h:
      	* khtml/css/cssparser.cpp:
      	* khtml/css/cssparser.h:
      	* khtml/css/cssstyleselector.cpp:
      	* khtml/css/cssstyleselector.h:
      	* khtml/css/html4.css:
      	* khtml/dom/css_rule.cpp:
      	* khtml/dom/css_rule.h:
      	* khtml/dom/css_stylesheet.cpp:
      	* khtml/dom/css_stylesheet.h:
      	* khtml/dom/css_value.cpp:
      	* khtml/dom/dom2_events.cpp:
      	* khtml/dom/dom2_range.cpp:
      	* khtml/dom/dom2_range.h:
      	* khtml/dom/dom2_views.cpp:
      	* khtml/dom/dom_doc.cpp:
      	* khtml/dom/dom_element.cpp:
      	* khtml/dom/dom_exception.h:
      	* khtml/dom/dom_node.cpp:
      	* khtml/dom/dom_string.cpp:
      	* khtml/dom/dom_text.cpp:
      	* khtml/dom/dom_xml.cpp:
      	* khtml/dom/html_base.cpp:
      	* khtml/dom/html_block.cpp:
      	* khtml/dom/html_document.cpp:
      	* khtml/dom/html_element.cpp:
      	* khtml/dom/html_element.h:
      	* khtml/dom/html_form.cpp:
      	* khtml/dom/html_head.cpp:
      	* khtml/dom/html_image.cpp:
      	* khtml/dom/html_inline.cpp:
      	* khtml/dom/html_list.cpp:
      	* khtml/dom/html_misc.cpp:
      	* khtml/dom/html_object.cpp:
      	* khtml/dom/html_table.cpp:
      	* khtml/ecma/kjs_html.cpp:
      	* khtml/ecma/kjs_proxy.cpp:
      	* khtml/ecma/kjs_traversal.cpp:
      	* khtml/ecma/kjs_window.cpp:
      	* khtml/html/html_baseimpl.cpp:
      	* khtml/html/html_formimpl.cpp:
      	* khtml/html/html_miscimpl.h:
      	* khtml/html/html_objectimpl.cpp:
      	* khtml/html/html_objectimpl.h:
      	* khtml/html/htmlparser.cpp:
      	* khtml/html/htmlparser.h:
      	* khtml/html/htmltokenizer.cpp:
      	* khtml/html/htmltokenizer.h:
      	* khtml/khtml_part.cpp:
      	* khtml/khtmlpart_p.h:
      	* khtml/khtmlview.cpp:
      	* khtml/misc/helper.cpp:
      	* khtml/misc/khtmllayout.h:
      	* khtml/misc/loader.cpp:
      	* khtml/misc/loader.h:
      	* khtml/misc/loader_client.h:
      	* khtml/misc/shared.h: Added.
      	* khtml/rendering/bidi.cpp:
      	* khtml/rendering/break_lines.cpp:
      	* khtml/rendering/font.cpp:
      	* khtml/rendering/render_applet.cpp:
      	* khtml/rendering/render_applet.h:
      	* khtml/rendering/render_container.cpp:
      	* khtml/rendering/render_form.cpp:
      	* khtml/rendering/render_form.h:
      	* khtml/rendering/render_frames.cpp:
      	* khtml/rendering/render_image.cpp:
      	* khtml/rendering/render_object.cpp:
      	* khtml/rendering/render_object.h:
      	* khtml/rendering/render_replaced.cpp:
      	* khtml/rendering/render_replaced.h:
      	* khtml/rendering/render_root.cpp:
      	* khtml/rendering/render_style.cpp:
      	* khtml/rendering/render_style.h:
      	* khtml/rendering/render_table.cpp:
      	* khtml/rendering/render_table.h:
      	* khtml/rendering/render_text.cpp:
      	* khtml/rendering/render_text.h:
      	* khtml/xml/dom2_eventsimpl.h:
      	* khtml/xml/dom2_rangeimpl.h:
      	* khtml/xml/dom2_traversalimpl.cpp:
      	* khtml/xml/dom2_traversalimpl.h:
      	* khtml/xml/dom2_viewsimpl.h:
      	* khtml/xml/dom_docimpl.cpp:
      	* khtml/xml/dom_docimpl.h:
      	* khtml/xml/dom_elementimpl.h:
      	* khtml/xml/dom_nodeimpl.cpp:
      	* khtml/xml/dom_nodeimpl.h:
      	* khtml/xml/dom_stringimpl.cpp:
      	* khtml/xml/dom_stringimpl.h:
      	* khtml/xml/xml_tokenizer.h:
      	Merge in 3.0.1 changes and add APPLE_CHANGES as necessary to get it to compile.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1326 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f028f81b
  14. 03 May, 2002 1 commit
    • darin's avatar
      WebCore: · 458becea
      darin authored
      	* kwq/IFTextRenderer.h: Added.
      	* kwq/IFTextRendererFactory.h: Added.
      	* kwq/IFTextRendererFactory.m: Added.
      	These three are the new API for supplying text rendering machinery for WebCore.
      	The implementation is in WebKit. Later we might want to flesh out the default
      	implementation in WebCore so that it works OK by itself.
      
      	* khtml/rendering/font.cpp: (Font::width): Function is now "width" without
      	an underscore. We don't really need to hide the overload we added in this
      	case.
      
      	* kwq/qt/qfont.h: Simplify a lot. Doesn't hold an NSFont any more.
      	* kwq/KWQFont.mm:
      	(QFont::QFont): Eliminated the concept of "default font". Also, a QFont no
      	longer holds an NSFont object. That's handled inside IFTextRenderer machinery.
      	(QFont::~QFont): Simplify since we don't have an NSFont.
      	(QFont::setFamily): Simplify since we don't have an NSFont.
      	(QFont::setPixelSize): Simplify since we don't have an NSFont.
      	(QFont::setPixelSizeFloat): Simplify since we don't have an NSFont.
      	(QFont::setWeight): Simplify since we don't have an NSFont.
      	(QFont::weight): Fix a bug where it would return Normal for a QFont that was
      	both bold and italic.
      	(QFont::setItalic): Simplify since we don't have an NSFont.
      	(QFont::italic): Simplify since we have real "bool".
      	(QFont::bold): Simplify since we have real "bool".
      	(QFont::operator=): Simplify since we don't have an NSFont.
      	(QFont::operator==): Rewrite since we don't have an NSFont.
      
      	* kwq/qt/qfontmetrics.h: Simplify a little. The _width() method is now just an
      	overload of the width() method. The main change was removing the include of Cocoa.h.
      	* kwq/KWQFontMetrics.mm:
      	Move most of the code out of here into WebKit.
      	(QFontMetrics::ascent): Get it from the renderer.
      	(QFontMetrics::descent): Get it from the renderer.
      	(QFontMetrics::lineSpacing): Get it from the renderer.
      	(QFontMetrics::width): Get it from the renderer.
      	(QFontMetrics::boundingRect): Combine width and height that came from the renderer.
      	(QFontMetrics::size): Combine width and height that came from the renderer.
      
      	* kwq/Makefile.am: Add IFTextRendererFactory.m, remove KWQTextStorage.mm and KWQTextContainer.mm.
      	* kwq/KWQMetrics.h: Removed.
      	* kwq/KWQTextContainer.h: Removed.
      	* kwq/KWQTextContainer.mm: Removed.
      	* kwq/KWQTextStorage.h: Removed.
      	* kwq/KWQTextStorage.mm: Removed.
      
      	* kwq/KWQPainter.mm:
      	Move most of the code out of here into WebKit.
      	(QPainter::drawText): Call the renderer to do it.
      	(QPainter::drawUnderlineForText): Call the renderer to do it.
      
      	* libwebcore.exp: Export the IFTextRendererFactory class.
      
      WebKit:
      
      	* Misc.subproj/WebKitDebug.h: Add WEBKIT_LOG_MEMUSAGE, WEBKIT_LOG_FONTCACHE, and
      	WEBKIT_LOG_FONTCACHECHARMISS for font code moved here from WebCore.
      
      	* Resources/url_icon.tiff: New URL icon?
      
      	* WebCoreSupport.subproj/IFCachedTextRenderer.h: Added.
      	* WebCoreSupport.subproj/IFCachedTextRenderer.m: Added.
      	* WebCoreSupport.subproj/IFCachedTextRendererFactory.h: Added.
      	* WebCoreSupport.subproj/IFCachedTextRendererFactory.m: Added.
      	This has code moved here from WebCore.
      
      	* WebKit.pbproj/project.pbxproj: Add the new source files.
      
      	* Bookmarks.subproj/IFBookmarkLeaf.m:
      	(-[IFBookmarkLeaf setURLString:]): Use copy instead of initWithString.
      	* Bookmarks.subproj/IFBookmarkList.m:
      	(-[IFBookmarkList initWithTitle:image:group:]): Use copy instead of stringWithString.
      	(-[IFBookmarkList setTitle:]): Use copy instead of stringWithString.
      	* WebView.subproj/IFWebDataSourcePrivate.mm: (-[IFWebDataSource _setTitle:]):
      	Use mutableCopy instead of stringWithString.
      	* WebView.subproj/IFWebView.mm: (-[IFWebView initWithFrame:]): Use copy instead
      	of stringWithString.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1092 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      458becea
  15. 15 Apr, 2002 1 commit
    • darin's avatar
      Merged KDE 3.0 final code in and: · b70665a4
      darin authored
      JavaScriptCore:
      
      	* kjs/internal.cpp:
      	* kjs/property_map.cpp:
      	* kjs/ustring.h:
      	Removed some unneeded <config.h> includes so we are more similar
      	to the real KDE sources.
      
      	Merged changes from KDE 3.0 final and did some build fixes.
      
      	* JavaScriptCore.pbproj/project.pbxproj: Added nodes2string.cpp.
      
      	* kjs/grammar.*: Regenerated.
      	* kjs/*.lut.h: Regenerated.
      
      WebCore:
      
      	* src/kdelibs/khtml/rendering/render_text.cpp: (TextSlave::printDecoration):
      	Remove some minor gratuitous diffs vs. KDE.
      
      	* src/kdelibs/khtml/rendering/render_text.cpp: (TextSlave::printDecoration):
              Richard updated to reflect changes in KDE.
      
      	* src/kdelibs/khtml/css/css_valueimpl.cpp:
      	(FontFamilyValueImpl::FontFamilyValueImpl): Fix comment.
      	* src/kdelibs/khtml/css/cssstyleselector.cpp: Remove some gratuitous diffs vs. KDE.
      	* src/kdelibs/khtml/html/html_objectimpl.cpp:
      	(HTMLEmbedElementImpl::parseAttribute): Remove unneeded copy from KWQ's early days.
      	* src/kdelibs/khtml/html/html_tableimpl.cpp:
      	(HTMLTableElementImpl::parseAttribute),
      	(HTMLTablePartElementImpl::parseAttribute): Remove unneeded copy from KWQ's early days.
      	* src/kdelibs/khtml/html/htmltokenizer.cpp: (HTMLTokenizer::processToken): Redo the
      	APPLE_CHANGES ifdef here.
      	* src/kdelibs/khtml/khtmlpart_p.h: Update to latest kde.
      	* src/kdelibs/khtml/khtmlview.cpp: (KHTMLView::KHTMLView): Add ifdef APPLE_CHANGES.
      	(KHTMLView::~KHTMLView): Add ifdef APPLE_CHANGES.
      	(KHTMLView::print): Remove code left in here during merge process.
      	* src/kwq/KWQKHTMLPart.mm: Remove unused setFontSizes(), fontSizes(), and
      	resetFontSizes(). After the merge is landed, remove more.
      	* src/libwebcore.exp: Export updateStyleSelector() for WebKit.
      
      	Fix text to it displays at the right font size.
      
      	* src/kdelibs/khtml/css/cssstyleselector.cpp:
      	(CSSStyleSelector::computeFontSizes): Apply the same SCREEN_RESOLUTION hack here
      	that we do elsewhere.
      	* src/kdelibs/khtml/rendering/font.cpp: (Font::width): Use kMin instead of max (oops).
      	(Font::update): Turn off font database chicanery.
      	* src/kwq/KWQKHTMLPart.mm: (KHTMLPart::zoomFactor): Use zoom factor 100, not 1.
      
      	More fixes so text displays (still at wrong font size).
      
      	* src/kdelibs/khtml/rendering/font.cpp: (max): New helper.
      	(Font::drawText): Simplified implementation for now.
      	(Font::width): Simplified implementation for now.
      	* src/kwq/KWQColorGroup.mm: Reinstated QCOLOR_GROUP_SIZE.
      
      	* src/kwq/qt/qfontmetrics.h: Removed charWidth and changed _width to take QChar *.
      	* src/kwq/KWQFontMetrics.mm: Removed charWidth and changed _width to take QChar *.
      
      	Merged changes from KDE 3.0 final. Other fixes to get things compiling.
      
      	* src/kdelibs/khtml/css/css_valueimpl.cpp:
      	(CSSStyleDeclarationImpl::setProperty): Fix unused variable.
      	* src/kdelibs/khtml/khtmlview.cpp: (KHTMLView::contentsContextMenuEvent):
      	Fix unused variable.
      	* src/kdelibs/khtml/rendering/font.cpp: (Font::drawText), (Font::width),
      	(Font::update): Disable special "nsbp" logic for now. We can reenable it
      	if necessary.
      	* src/kdelibs/khtml/rendering/render_replaced.cpp: Fix mismerge.
      	* src/kdelibs/khtml/rendering/render_text.cpp: (RenderText::nodeAtPoint):
      	Fix unused variable.
      	* src/kwq/KWQApplication.mm: (QDesktopWidget::width), (QApplication::desktop):
      	Fix mismerge.
      	* src/kwq/KWQColorGroup.mm: Fix QCOLOR_GROUP_SIZE.
      	* src/kwq/KWQFontMetrics.mm: (QFontMetrics::lineSpacing): New.
      	(QFontMetrics::width): Remove unused optimization.
      	* src/kwq/qt/qfontmetrics.h: Add lineSpacing().
      
              Merged changes from previous merge pass.
      
              2002-03-25  Darin Adler  <darin@apple.com>
      
              Last bit of making stuff compile and link. Probably will drop the merge now
              and take it up again when it's time to merge in KDE 3.0 final.
      
      	* src/kwq/KWQEvent.mm: (QFocusEvent::reason): New.
      	* src/kwq/KWQPainter.mm: (QPainter::drawText): New overload.
      
              2002-03-25  Darin Adler  <darin@apple.com>
      
      	* src/kdelibs/khtml/rendering/font.cpp: (Font::width): Make it call _width so we
              don't lose the optimization.
      
      	* src/kwq/KWQApplication.mm: (QDesktopWidget::screenNumber): New.
      	(QDesktopWidget::screenGeometry): New.
              (QApplication::style): New.
      	* src/kwq/KWQColorGroup.mm: (QColorGroup::highlight): New.
      	(QColorGroup::highlightedText): New.
      	* src/kwq/KWQFont.mm: (QFont::setPixelSize): New.
      	* src/kwq/KWQFontMetrics.mm: (QFontMetrics::charWidth): New.
      	* src/kwq/KWQKGlobal.mm: (KGlobal::locale): Implement.
              (KLocale::KLocale): New.
      	(KLocale::languageList): New.
      	* src/kwq/KWQKHTMLPart.mm: (KHTMLPart::sheetUsed): New.
      	(KHTMLPart::setSheetUsed): New.
              (KHTMLPart::zoomFactor): New.
      	* src/kwq/KWQKHTMLSettings.mm: (KHTMLSettings::mediumFontSize): New.
      	* src/kwq/KWQScrollView.mm: (QScrollView::childX): New.
              (QScrollView::childY): New.
      
      	* src/kwq/qt/qapplication.h: style() returns a QStyle &.
      	* src/kwq/qt/qpalette.h: Add Highlight and HighlightedText.
      
              2002-03-24  Darin Adler  <darin@apple.com>
      
              More compiling. Still won't link.
      
      	* src/kdelibs/khtml/khtmlview.cpp: Disable printing and drag and drop code.
      	* src/kdelibs/khtml/rendering/render_text.cpp: (TextSlave::printDecoration):
              Temporarily turn off our smarter underlining since it relies on access to the
              string, and TextSlave doesn't have that any more.
      	(RenderText::nodeAtPoint): Get rid of a workaround we don't need any more for
              a bug that was fixed by KDE folks.
      	* src/kwq/KWQApplication.mm: (QApplication::desktop): Make the desktop be a
              QDesktopWidget.
      	* src/kwq/qt/qnamespace.h: Add MetaButton.
      	* src/kwq/qt/qtooltip.h: Add a maybeTip virtual function member and a virtual
              destructor.
      
              2002-03-24  Darin Adler  <darin@apple.com>
      
              Some fixes to get more stuff to compile.
      
      	* src/kdelibs/khtml/ecma/kjs_dom.cpp: (DOMDocument::getValueProperty):
              Don't try to look at the private m_bComplete to display "complete". Just do
              "loading" and "loaded".
              * src/kdelibs/khtml/khtmlpart_p.h: #ifdef this all out for APPLE_CHANGES.
      	* src/kdelibs/khtml/rendering/font.cpp: (Font::update): Add an explicit cast to
              int to avoid float -> int warning.
      	* src/kdelibs/khtml/rendering/render_table.cpp: (RenderTable::calcColMinMax):
              Add an explicit cast to int to avoid uint compared with int warning.
      	* src/kdelibs/khtml/xml/dom_docimpl.cpp: (DocumentImpl::recalcStyleSelector):
              Use sheetUsed() and setSheetUsed() functions on KHTMLPart intead of getting
              at private fields the way the real KDE code does.
      
              * src/kwq/KWQKHTMLPart.h: Declare zoomFactor(), sheetUsed(), and setSheetUsed().
      	* src/kwq/KWQStyle.h: Add PM_DefaultFramWidth as another metric.
      	* src/kwq/kdecore/klocale.h: Add languageList().
      	* src/kwq/khtml/khtml_settings.h: Add mediumFontSize().
      	* src/kwq/qt/qapplication.h: Add style() and QDesktopWidget.
      	* src/kwq/qt/qevent.h: Add reason().
      	* src/kwq/qt/qfont.h: Add setPixelSize(int).
      	* src/kwq/qt/qfontmetrics.h: Add charWidth() and _charWidth() functions.
      	* src/kwq/qt/qpainter.h: Add drawText() overload with position parameter.
      	* src/kwq/qt/qpalette.h: Add highlight() and highlightedText().
      	* src/kwq/qt/qscrollview.h: Add childX() and childY().
      
      	* src/kwq/KWQApplication.mm: Change KWQDesktopWidget to QDesktopWidget.
      
      WebKit:
      
      	* WebView.subproj/IFPreferences.h:
      	* WebView.subproj/IFPreferences.mm: (+[IFPreferences load]): Remove the old
      	WebKitFontSizes preference.
      	(-[IFPreferences mediumFontSize]), (-[IFPreferences setMediumFontSize:]): New.
      
      	* WebView.subproj/IFWebView.mm: (-[IFWebView reapplyStyles]): Call
      	updateStyleSelector() instead of recalcStyle().
      
              Merged changes from previous merge branch.
      
              2002-03-25  Darin Adler  <darin@apple.com>
      
      	* WebView.subproj/IFPreferences.mm: (+[IFPreferences load]):
              Add WebKitMediumFontSizePreferenceKey.
      
      WebBrowser:
      
      	* Preferences.subproj/TextPreferences.m: (-[TextPreferences defaultFontSize]),
      	(-[TextPreferences setDefaultFontSize:]): Just get and set the new mediumFontSize
      	preference rather than doing the whole fontSizes preference dance.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1024 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b70665a4
  16. 24 Mar, 2002 1 commit