blob: 17ea462b2d4dfe0c7a9dc85857d051d2f74d2ebd [file] [log] [blame]
2002-12-03 David Hyatt <hyatt@apple.com>
Fix for 3078227, hanging in table code. Make sure <form>s
don't get wrapped in anonymous rows and cells.
Reviewed by: rjw
* khtml/rendering/render_table.cpp:
(RenderTable::addChild):
(RenderTableSection::addChild):
(RenderTableRow::addChild):
2002-12-03 David Hyatt <hyatt@apple.com>
Backing out a file that I did not intend to check in.
* khtml/misc/loader.cpp:
2002-12-03 Richard Williamson <rjw@apple.com>
D'oh. Fixed last minute change that broke the build.
* kwq/KWQFont.mm:
(QFont::getNSFont):
2002-12-03 David Hyatt <hyatt@apple.com>
Remove the moveWidgetsAside function. This fixes all the
form controls on livepage.apple.com that were getting hosed
by the scrolling marquee.
Reviewed by: darin
* khtml/html/html_tableimpl.cpp:
(HTMLTableRowElementImpl::addChild):
* khtml/misc/loader.cpp:
* khtml/rendering/render_root.cpp:
(RenderRoot::layout):
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::KWQKHTMLPart):
(KWQKHTMLPart::paint):
2002-12-03 Richard Williamson <rjw@apple.com>
Fixed 3019986. Use an array of font families instead of a single
font family to support CSS family lists.
r=hyatt
* kwq/KWQFont.h:
* kwq/KWQFont.mm:
(QFont::getNSFont):
* kwq/KWQFontMetrics.mm:
(QFontMetrics::width):
(QFontMetrics::floatWidth):
(QFontMetrics::floatCharacterWidths):
* kwq/KWQPainter.mm:
(QPainter::drawText):
(QPainter::drawUnderlineForText):
* kwq/WebCoreTextRenderer.h:
* kwq/WebCoreTextRendererFactory.h:
* kwq/WebCoreTextRendererFactory.m:
(-[WebCoreTextRendererFactory rendererWithFamilies:traits:size:]):
(-[WebCoreTextRendererFactory fontWithFamilies:traits:size:]):
2002-12-03 David Hyatt <hyatt@apple.com>
Fix for 3112599, aol.com shopping page doesn't work. Apply
the same form demotion trick to <tr> that I did already for
<tbody> and <table>.
r=gramps
* khtml/html/dtd.cpp:
(DOM::checkChild):
* khtml/html/html_tableimpl.cpp:
(HTMLTableRowElementImpl::addChild):
* khtml/html/html_tableimpl.h:
2002-12-03 David Hyatt <hyatt@apple.com>
Fix link feedback regression on aintitcool.com. Observe
the wacky feedback we give now (yes, it matches MacIE and
Gecko). Gotta love this malformed page.
<a><h4>...</h4></a>
r=mjs
* khtml/rendering/render_object.cpp:
(RenderObject::nodeAtPoint):
2002-12-03 David Hyatt <hyatt@apple.com>
Eliminate the KONQBLOCK hack. Fixes ipodhacks.com (a mislayout
caused by malformed html... <table><br>...)
r=mjs
* khtml/css/html4.css:
* khtml/html/dtd.cpp:
(DOM::checkChild):
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::isInline):
* khtml/html/htmlparser.cpp:
(KHTMLParser::reset):
(KHTMLParser::insertNode):
* khtml/html/htmlparser.h:
* khtml/misc/htmltags.c:
(hash_tag):
(findTag):
* khtml/misc/htmltags.h:
* khtml/misc/htmltags.in:
* khtml/rendering/render_flow.cpp:
(RenderFlow::layoutBlockChildren):
2002-12-02 David Hyatt <hyatt@apple.com>
Fix for 3032557, wsj.com DHTML elements in the wrong position.
This patch adds support for img.x and img.y (a Mozilla extension
from NS4 days), which is used by the site to position the menus.
r=kocienda on the patch.
* khtml/dom/html_image.cpp:
(HTMLImageElement::x):
(HTMLImageElement::y):
* khtml/dom/html_image.h:
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLElement::getValueProperty):
* khtml/ecma/kjs_html.h:
* khtml/ecma/kjs_html.lut.h:
2002-12-02 David Hyatt <hyatt@apple.com>
Undo my changes to margin collapsing for blocks inside inlines.
Although they may be correct in a strict mode, they don't
work with the real-world Web. For now, I'm just backing out
the code. The CSS WG hasn't decided how this should work yet
anyway, so I'll just let the quirk behavior be our behavior
in both modes.
This fixes aintitcool.com.
* khtml/rendering/render_flow.cpp:
(RenderFlow::layoutBlockChildren):
2002-12-01 David Hyatt <hyatt@apple.com>
Convert the WebCore cache from LRU to size-adjusted and
popularity-aware LRU (LRU-SP). With the improved cache,
the size restriction on images can be relaxed back to 40K
(from 16K) while retaining the same score on cvs-base.
This should result in better real-world performance.
* khtml/misc/loader.cpp:
(CachedObject::ref):
(CachedObject::setSize):
(m_tail):
(LRUList::~LRUList):
(Cache::flush):
(FastLog2):
(Cache::getLRUListFor):
(Cache::removeFromLRUList):
(Cache::insertInLRUList):
(Cache::adjustSize):
* khtml/misc/loader.h:
2002-11-29 Don Melton <gramps@apple.com>
* khtml/css/html4.css:
Finally tweak headline font sizes and margins to match Gecko and CSS
standard:
- increase H1 font-size from 1.7em to 2em
- increase H2 font-size from 1.4em to 1.5em
- make H2 top and bottom margin match (bottom was strangely .87em)
- increase H4 margin from 1.0em to 1.33em
2002-11-27 David Hyatt <hyatt@apple.com>
Fix DHTML on phoenix.com. Add support for window.addEventListener
and window.removeEventListener.
* khtml/ecma/kjs_window.cpp:
(Window::get):
(WindowFunc::tryCall):
* khtml/ecma/kjs_window.h:
* khtml/ecma/kjs_window.lut.h:
2002-11-27 Maciej Stachowiak <mjs@apple.com>
- avoid doing any work when setting the document's link colors if
there is no change. This avoids superfluous style updates and
results in a 20% improvment on the JavaScript iBench.
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLDocument::putValue):
2002-11-27 David Hyatt <hyatt@apple.com>
Fix <br clear=""> and <br clear> to just behave like <br>
rather than <br clear="all">. Matches behavior in other
browsers.
* khtml/html/html_inlineimpl.cpp:
(HTMLBRElementImpl::parseAttribute):
2002-11-27 David Hyatt <hyatt@apple.com>
Numerous overflow: hidden improvements to fix espn.com.
First stop absolute positioned overflow hidden elements
from growing to accommodate their overflow. (Actually
absolute positioned elements should never grow to do this,
but fixing it for non-overflow hidden elements is hard,
so later.)
Second fix the render layer code to not allow background/borders
of the object with overflow: hidden from being clipped. This
involves an extra paint step where the object paints its
background and borders prior to establishing the clip rect
for the children. (This will also be necessary for overflow:auto
and overflow:scroll).
* ChangeLog:
* khtml/rendering/render_box.cpp:
(RenderBox::getClipRect):
(RenderBox::calcAbsoluteVertical):
* khtml/rendering/render_layer.cpp:
(RenderLayer::paint):
* khtml/rendering/render_object.h:
2002-11-27 David Hyatt <hyatt@apple.com>
* khtml/rendering/render_box.cpp:
(RenderBox::getClipRect):
(RenderBox::calcAbsoluteVertical):
* khtml/rendering/render_layer.cpp:
(RenderLayer::paint):
2002-11-27 David Hyatt <hyatt@apple.com>
Fix for 3105502. drop-downs wrapping to next line.
* khtml/css/html4.css:
2002-11-26 David Hyatt <hyatt@apple.com>
Smarter block inside inline handling. Eliminate whitespace
that is in between blocks inside inilnes.
* khtml/xml/dom_textimpl.cpp:
(TextImpl::attach):
2002-11-26 David Hyatt <hyatt@apple.com>
Don't let blocks inside inlines collapse with their surroundings
ever.
* khtml/rendering/render_flow.cpp:
(RenderFlow::layoutBlockChildren):
2002-11-26 David Hyatt <hyatt@apple.com>
Fix a collapsing margin regression on aintitcool caused by
my support of blocks inside inlines. A block could be wrapped
by an inline, e.g., <font><p>foo</p></font>, and in this case,
you do not apply the collapsing margin quirk. The margin stays.
* khtml/rendering/render_flow.cpp:
(RenderFlow::layoutBlockChildren):
2002-11-26 David Hyatt <hyatt@apple.com>
Fix the font family stuff to be refcounted, so copying
fonts stays cheap. Re-enabling it.
Patch the render_arena code with some debugging info
to help detect when memory gets trashed.
Fix the background painting code to deal with negative
x and y bakcground positions. Fixes the brain on
brainjar.com.
* khtml/css/cssstyleselector.cpp:
* khtml/rendering/render_arena.cpp:
(RenderArena::free):
* khtml/rendering/render_box.cpp:
(RenderBox::paintBackground):
* kwq/KWQFont.h:
* kwq/KWQFont.mm:
(QFontFamily::QFontFamily):
(QFontFamily::operator=):
=== Alexander-34 ===
2002-11-26 David Hyatt <hyatt@apple.com>
Backing out support for multiple font families for now.
The support is still there in QFont. I've just stopped
the style selector from walking the entire value list (it
will only put the first family into the font).
The original change caused a 5% perf regression.
I'm going to see what kinds of tricks I can pull to get
some of this back before re-enabling the feature.
* khtml/css/cssstyleselector.cpp:
2002-11-26 David Hyatt <hyatt@apple.com>
Fix render object removal to remerge adjacent anonymous inline boxes
when an intervening block box gets removed.
* khtml/rendering/render_flow.cpp:
(RenderFlow::removeChild):
* khtml/rendering/render_flow.h:
2002-11-25 Richard Williamson <rjw@apple.com>
Cleanup up leaking objects in page cache.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::openURLFromPageCache):
* kwq/WebCoreBridge.mm:
(-[KWQPageState initWithDocument:DOM::URL:windowProperties:KJS::locationProperties:KJS::]):
(-[KWQPageState dealloc]):
2002-11-25 Richard Williamson <rjw@apple.com>
Added check for non-nil doc.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::setView):
2002-11-25 David Hyatt <hyatt@apple.com>
Fix for the DHTML on hrweb. With these changes it works
except for some odd vertical spacing issues.
* khtml/rendering/render_flow.cpp:
(RenderFlow::addChildToFlow):
(RenderFlow::makeChildrenNonInline):
2002-11-25 Richard Williamson <rjw@apple.com>
Tweaked some debugging info.
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::~DocumentImpl):
(DocumentImpl::detach):
2002-11-25 Chris Blumenberg <cblu@apple.com>
Use ^= to refer to OBJECTs with TYPEs that start with "image/". This is better than hard-coding image mime types.
* khtml/css/html4.css:
2002-11-25 Chris Blumenberg <cblu@apple.com>
Fixed: 2987001 - spurious mime-type errors from <object> images
KHTML didn't seem to have any clean support for OBJECT tags that are images. Added support for that.
* khtml/css/html4.css: OBJECTs that are images should be rendered inline
* khtml/html/html_objectimpl.cpp:
(HTMLObjectElementImpl::attach): if the type is an image, create a render image
* khtml/rendering/render_image.cpp:
(RenderImage::updateFromElement): if the element is an object, use DATA for the URL
* kwq/KWQDOMNode.cpp:
(isImage): if it is an OBJECT element, check the type
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge elementAtPoint:]): if the element is an object, use DATA for the URL
2002-11-25 David Hyatt <hyatt@apple.com>
Fix this even further. JUst drop support for arbitrary
property lookup by name on the document. Mac IE and
Gecko only do this for img and form, and this makes things
a lot faster.
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLDocument::hasProperty):
(KJS::HTMLDocument::tryGet):
2002-11-25 David Hyatt <hyatt@apple.com>
Rewrite the img/form document property lookup strategy. This
should be faster and actually work (gasp!). Fixes the dhtml
on hrweb to at least show up.
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLDocument::tryGet):
* khtml/html/html_miscimpl.cpp:
(HTMLCollectionImpl::nextItem):
2002-11-25 David Hyatt <hyatt@apple.com>
Add support to QFont for multiple families. NOw all that's left
is getting the multiple families out of the font and down into
WebKit.
* khtml/css/cssstyleselector.cpp:
* khtml/rendering/font.cpp:
(Font::update):
* khtml/rendering/font.h:
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::recalcStyle):
* kwq/KWQFont.h:
* kwq/KWQFont.mm:
(QFontFamily::QFontFamily):
(QFontFamily::operator=):
(QFontFamily::family):
(QFontFamily::setFamily):
(QFontFamily::operator==):
(QFont::QFont):
(QFont::family):
(QFont::setFamily):
(QFont::getNSFontWithFamily):
2002-11-25 Richard Williamson <rjw@apple.com>
Changes for back/forward. Currently disabled.
* ForwardingHeaders/kjs/property_map.h: Added.
* khtml/ecma/kjs_window.cpp:
(Window::hasTimeouts):
(WindowQObject::hasTimeouts):
* khtml/ecma/kjs_window.h:
* khtml/khtmlpart_p.h:
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::DocumentImpl):
(DocumentImpl::detach):
(DocumentImpl::inPageCache):
(DocumentImpl::setInPageCache):
* khtml/xml/dom_docimpl.h:
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::setView):
(KWQKHTMLPart::userAgent):
(KWQKHTMLPart::nextKeyViewForWidget):
(KWQKHTMLPart::canCachePage):
(KWQKHTMLPart::saveWindowProperties):
(KWQKHTMLPart::saveLocationProperties):
(KWQKHTMLPart::restoreWindowProperties):
(KWQKHTMLPart::restoreLocationProperties):
(KWQKHTMLPart::openURLFromPageCache):
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge openURL:reload:headers:lastModified:pageCache:]):
(-[WebCoreBridge saveDocumentToPageCache]):
(-[WebCoreBridge canCachePage]):
(attributedString):
(-[KWQPageState initWithDocument:DOM::URL:windowProperties:KJS::locationProperties:KJS::]):
(-[KWQPageState dealloc]):
(-[KWQPageState DOM::]):
(-[KWQPageState URL]):
(-[KWQPageState KJS::]):
2002-11-25 David Hyatt <hyatt@apple.com>
Fix for 3025963. Ensure that KJS looks for the form on the
element itself when pushing it onto the scope chain, since
the <form> may not be an ancestor of the element.
* khtml/ecma/kjs_html.cpp:
(getForm):
(KJS::HTMLElement::pushEventHandlerScope):
* khtml/html/html_elementimpl.h:
2002-11-25 David Hyatt <hyatt@apple.com>
Fix for 3020493, another fun little margin collapsing quirk
that I missed. (<td><div><p>). The <div> has to pick up the quirk
from the <p> so that the margins of the <p> still get collapsed
away.
* khtml/rendering/render_flow.cpp:
(RenderFlow::layoutBlockChildren):
2002-11-25 David Hyatt <hyatt@apple.com>
Don't add in the halfleading for align=texttop. That's incorrect.
* khtml/rendering/render_object.cpp:
(RenderObject::getVerticalPosition):
2002-11-24 Maciej Stachowiak <mjs@apple.com>
Fixed support for onLoad handlers on images - this is in
APPLE_CHANGES because khtml used a different mechanism. Also
implemented onError on images. As a result:
- fixed 3084916 - blank page at aol
- fixed 3093162 - golfswitch doesn't work
* khtml/html/html_imageimpl.cpp:
(HTMLImageElementImpl::parseAttribute): Remove "implement this"
comment from onError attribute.
* khtml/misc/loader.h:
* khtml/misc/loader.cpp:
(CachedImage::CachedImage): Initialize m_loading to true.
(CachedImage::ref): Send notifyFinished to the new client if the
image is not loading.
(CachedImage::data): If at eof, set m_loading to false and notify.
(CachedImage::error): Set m_loading to false and notify.
(CachedImage::checkNotify): New method to notify all clients of
changes.
* khtml/rendering/render_image.cpp:
(RenderImage::notifyFinished): Deliver the appropriate choice of
LOAD_EVENT or ERROR_EVENT.
2002-11-24 David Hyatt <hyatt@apple.com>
This landing adds support for blocks inside inlines. It
gets rid of the old broken way KHTML used to handle this
and implements a brand new mechanism.
With this change, I have decreased the tag priority of <font>
and <a> to match other inlines (<i>, <span>, etc.), and I
now allow all the inlines to contain blocks for relaxed parsing.
Now if you open an <i> or a <b> and just leave it open across
blocks, this will work.
I also fixed a bad DHTML bug caused by the WebCoreBridge
forceLayout method. The basic pattern is that someone does
a tiny repaint of just a sliver of the window, then someone
schedules a layout (which means they want a full repaint), but
then drawRect comes along and calls forceLayout which unschedules
the layout, thus preventing the full repaint from occurring.
Any basic DHTML that used append/remove child was broken because
of this pattern. For now I have just removed the unscheduleLayout
call at the end of forceLayout.
* khtml/html/dtd.cpp:
(DOM::checkChild):
* khtml/html/htmlparser.cpp:
(KHTMLParser::popInlineBlocks):
* khtml/rendering/render_container.cpp:
(RenderContainer::removeChild):
(RenderContainer::removeLeftoverAnonymousBoxes):
* khtml/rendering/render_flow.cpp:
(RenderFlow::setStyle):
(RenderFlow::layoutBlockChildren):
(RenderFlow::continuationBefore):
(cloneInline):
(RenderFlow::splitInlines):
(RenderFlow::splitFlow):
(RenderFlow::addChildWithContinuation):
(RenderFlow::addChild):
(RenderFlow::addChildToFlow):
* khtml/rendering/render_flow.h:
* khtml/rendering/render_object.cpp:
(RenderObject::mouseInside):
* khtml/rendering/render_object.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::forceLayout):
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge copyRenderNode:copier:]):
2002-11-24 Chris Blumenberg <cblu@apple.com>
Added element keys for the image ALT and link TITLE attributes. This will eventually be used to fix other bugs. Also made WebKit and WebCore use the same element keys to simplify the conversion of the element dictionary.
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge elementAtPoint:]):
2002-11-24 Darin Adler <darin@apple.com>
* force-js-clean-timestamp: Touch for ScopeChain change.
2002-11-24 Maciej Stachowiak <mjs@apple.com>
- fixed 3067939 - no support for window.document.lastModified
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge openURL:reload:headers:lastModified:]): Set
"modified" metadata based on passed in last mdified date.
2002-11-24 Maciej Stachowiak <mjs@apple.com>
- fixed 3081946 - bookmarklet reports the wrong "windowfull" size
This isn't really beta 1 material but the fix was so tirivial I
couldn't resist.
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLDocument::tryGet): Use contentWidth and contentHeight
for document.width and document.height instead of visibleWidth for
both.
2002-11-22 Darin Adler <darin@apple.com>
* khtml/ecma/kjs_window.cpp: Remove _COLLECTOR hack.
* kwq/WebCoreJavaScript.h:
* kwq/WebCoreJavaScript.mm:
(+[WebCoreJavaScript rootObjectClasses]):
Update for name change -- root object classes, not all live object classes.
* force-js-clean-timestamp: Make sure we don't have more build problems.
2002-11-22 David Hyatt <hyatt@apple.com>
Fix for 3107658, text doubling problem caused by layers being
constructed for <td>s. Just disallow positioning of <td>.
* khtml/rendering/render_box.cpp:
(RenderBox::setStyle):
* khtml/rendering/render_flow.cpp:
(RenderFlow::setStyle):
2002-11-22 David Hyatt <hyatt@apple.com>
Oops. I meant to do that for <input type=button> and not
<button>. Just do it for <select>s for now.
* khtml/rendering/render_box.cpp:
(RenderBox::calcReplacedWidth):
2002-11-22 David Hyatt <hyatt@apple.com>
Make <select>s and <button>s ignore a CSS-specified width if that
width is smaller than their intrinsic width.
Fixes the <select> at the top of livepage.apple.com.
* khtml/rendering/render_box.cpp:
(RenderBox::calcReplacedWidth):
2002-11-22 Darin Adler <darin@apple.com>
- started checking in all our generated source files for the benefit of B&I
* .cvsignore:
* WebCore-combined.exp: Added.
* khtml/css/.cvsignore:
* khtml/css/cssproperties.c: Added.
* khtml/css/cssproperties.h: Added.
* khtml/css/cssvalues.c: Added.
* khtml/css/cssvalues.h: Added.
* khtml/ecma/.cvsignore:
* khtml/ecma/kjs_css.lut.h: Added.
* khtml/ecma/kjs_dom.lut.h: Added.
* khtml/ecma/kjs_events.lut.h: Added.
* khtml/ecma/kjs_html.lut.h: Added.
* khtml/ecma/kjs_navigator.lut.h: Added.
* khtml/ecma/kjs_range.lut.h: Added.
* khtml/ecma/kjs_traversal.lut.h: Added.
* khtml/ecma/kjs_views.lut.h: Added.
* khtml/ecma/kjs_window.lut.h: Added.
* khtml/html/.cvsignore:
* khtml/html/kentities.c: Added.
* khtml/misc/.cvsignore:
* khtml/misc/htmlattrs.c: Added.
* khtml/misc/htmlattrs.h: Added.
* khtml/misc/htmltags.c: Added.
* khtml/misc/htmltags.h: Added.
* kwq/.cvsignore:
* kwq/KWQCharsetData.c: Added.
2002-11-22 David Hyatt <hyatt@apple.com>
Fix for the table/form regressions. Also landing beginnings
of the block/inline work.
* khtml/html/html_tableimpl.cpp:
(HTMLTableSectionElementImpl::addChild):
* khtml/html/html_tableimpl.h:
* khtml/rendering/render_flow.cpp:
(RenderFlow::RenderFlow):
* khtml/rendering/render_flow.h:
2002-11-22 Darin Adler <darin@apple.com>
* khtml/ecma/kjs_dom.cpp: (DOMNode::pushEventHandlerScope): Change to push handlers
on an existing scope chain rather than returning one. Name change too.
* khtml/ecma/kjs_dom.h: More of the same.
* khtml/ecma/kjs_html.cpp: (KJS::HTMLElement::pushEventHandlerScope): And here.
* khtml/ecma/kjs_html.h: And here.
* khtml/ecma/kjs_events.cpp: (JSEventListener::handleEvent): Use the pushEventHandlerScope
function, and also don't worry about optimizing the "no change" case, because that already
works pretty efficiently.
2002-11-22 David Hyatt <hyatt@apple.com>
Fix for the weather.com, slate and espn malformations that
could occur. Also reverting an earlier change for handling
font tags like other inlines. Both FONT and A need to be
given special treatment until I can implement a strategy that
will allow them to be handled just like the other inlines.
* khtml/html/dtd.cpp:
(DOM::checkChild):
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::isInline):
* khtml/html/html_elementimpl.h:
* khtml/xml/dom_nodeimpl.h:
2002-11-21 Darin Adler <darin@apple.com>
* khtml/ecma/kjs_dom.cpp: (DOMNode::eventHandlerScope): List -> ScopeChain.
* khtml/ecma/kjs_dom.h: List -> ScopeChain.
* khtml/ecma/kjs_events.cpp: (JSEventListener::handleEvent): List -> ScopeChain.
* khtml/ecma/kjs_html.cpp: (KJS::HTMLElement::eventHandlerScope): List -> ScopeChain.
* khtml/ecma/kjs_html.h: List -> ScopeChain.
* force-js-clean-timestamp: Not sure this is required, but better safe than sorry.
2002-11-21 Maciej Stachowiak <mjs@apple.com>
* force-js-clean-timestamp: Touch so other people's builds work.
2002-11-21 David Hyatt <hyatt@apple.com>
Nested <a>s are never allowed. Make sure to always pop the
<a> blocks.
* khtml/html/htmlparser.cpp:
(KHTMLParser::getElement):
2002-11-21 David Hyatt <hyatt@apple.com>
Stop table cells from repainting the whole table when they
get a repaint. Gives another big boost to link rollover
performance when links' containing blocks are table cells.
* khtml/rendering/render_table.cpp:
(RenderTableCell::repaint):
2002-11-21 David Hyatt <hyatt@apple.com>
Fix <font> so that behaves just like <i>, <b>, etc. Stop
the (incorrect) allowance of blocks inside <font> tags.
This fixes the mispositioning on avoyagetoarcturus.blogspot.com
and fixes the vertical gaps on www.ve3d.com.
* khtml/html/dtd.cpp:
(DOM::checkChild):
2002-11-21 Maciej Stachowiak <mjs@apple.com>
* Makefile.am: Pass symroots for this tree to pbxbuild.
2002-11-21 David Hyatt <hyatt@apple.com>
Fixed for tables. Make the percentage height calculation
more robust. Also add a hack for replaced elements to
subtract out their margins when computing percentage widths.
This keeps them from spilling out of table cells.
* khtml/rendering/render_box.cpp:
(RenderBox::calcReplacedWidth):
(RenderBox::calcReplacedHeight):
* khtml/rendering/render_table.cpp:
(RenderTable::layoutRows):
* khtml/xml/dom_nodeimpl.h:
=== Alexander-33 ===
2002-11-21 Richard Williamson <rjw@apple.com>
Fixed from SK's copy/paste whitespace issue.
This fixes 3076236 and a regression due to additional whitespace
in the DOM.
* kwq/WebCoreBridge.mm:
(attributedString):
2002-11-21 David Hyatt <hyatt@apple.com>
Fix mac.com regression (and weather.com regression).
* khtml/rendering/bidi.cpp:
(RenderFlow::findNextLineBreak):
2002-11-21 Richard Williamson <rjw@apple.com>
Fixed performance regression! Argh.
* khtml/rendering/font.cpp:
(Font::width):
2002-11-21 Darin Adler <darin@apple.com>
* force-js-clean-timestamp: Trigger a rebuild because of the
size change in ValueImp.
2002-11-21 Darin Adler <darin@apple.com>
- fixed 3107286 -- REGRESSION: unrepro assertion failure in KWQKHTMLPart.mm keyEvent
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::keyEvent):
Handle case of nil document as well as case of nil focus node.
* kwq/WebCoreBridge.mm: Tweak whitespace.
2002-11-20 Darin Adler <darin@apple.com>
- fixed 3107383 -- clicking link on cnet.com leads to assertion failure
When we removed a frame, we were leaving behind an empty WebView. Yuck.
* kwq/KWQScrollView.mm:
(QScrollView::addChild): Use the new getOuterView.
(QScrollView::removeChild): Ditto. This was the bug fix.
* kwq/KWQWidget.h: Add getOuterView.
* kwq/KWQWidget.mm:
(QWidget::frameGeometry): Use the new getOuterView.
(QWidget::setFrameGeometry): Ditto.
(QWidget::getOuterView): Added. Does the WebCoreFrameView magic to find
the WebView instead of the WebHTMLView. Yuck.
(QWidget::paint): Use the new getOuterView.
2002-11-20 Darin Adler <darin@apple.com>
* force-js-clean-timestamp: Again.
2002-11-20 David Hyatt <hyatt@apple.com>
Fix the mac.com line-breaking bug. This was not a regression
but was present in Konq.
* khtml/rendering/bidi.cpp:
(RenderFlow::findNextLineBreak):
2002-11-20 Maciej Stachowiak <mjs@apple.com>
* force-js-clean-timestamp: Work around PB lameness yet again.
2002-11-19 Darin Adler <darin@apple.com>
* force-js-clean-timestamp: Make other people's builds work.
2002-11-19 David Hyatt <hyatt@apple.com>
I screwed up the line breaking for inline replaced elements.
* khtml/rendering/render_flow.cpp:
(RenderFlow::calcInlineMinMaxWidth):
2002-11-19 Darin Adler <darin@apple.com>
- another atomic identifier scrub pass; make the conversion to Identifier explicit
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLCollection::tryCall): Add explicit Identifier() conversion.
(KJS::HTMLCollectionProtoFunc::tryCall): Ditto.
* khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): And again.
2002-11-19 David Hyatt <hyatt@apple.com>
Fix for 3049663. Table cells don't grow to accommodate block
overflow.
* khtml/rendering/bidi.cpp:
(RenderFlow::layoutInlineChildren):
* khtml/rendering/render_flow.cpp:
(RenderFlow::RenderFlow):
(RenderFlow::layout):
(RenderFlow::layoutBlockChildren):
* khtml/rendering/render_flow.h:
* khtml/rendering/render_object.h:
2002-11-19 Darin Adler <darin@apple.com>
- next step towards atomic identifiers; Identifier is no longer derived from UString
* khtml/ecma/kjs_binding.cpp:
(Identifier::string): Added.
(Identifier::qstring): Added.
* khtml/ecma/kjs_binding.h:
* khtml/ecma/kjs_css.cpp:
(jsNameToProp):
(DOMCSSStyleDeclaration::tryPut):
(DOMStyleSheet::tryPut):
(DOMStyleSheetList::tryGet):
(DOMMediaList::tryGet):
(DOMCSSRuleList::tryGet):
(DOMCSSValueList::tryGet):
* khtml/ecma/kjs_dom.cpp:
(DOMNodeList::hasProperty):
(DOMNodeList::tryGet):
(DOMNodeListFunc::DOMNodeListFunc):
(DOMElement::tryGet):
(DOMNamedNodeMap::hasProperty):
(DOMNamedNodeMap::tryGet):
(DOMNamedNodesCollection::tryGet):
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLDocument::tryGet):
(HTMLElementFunction::HTMLElementFunction):
(KJS::HTMLElement::putValue):
(KJS::HTMLCollection::hasProperty):
(KJS::HTMLCollection::tryGet):
(KJS::HTMLSelectCollection::tryPut):
(OptionConstructorImp::OptionConstructorImp):
* khtml/ecma/kjs_navigator.cpp:
(Plugins::get):
(MimeTypes::get):
(Plugin::get):
* khtml/ecma/kjs_window.cpp:
(WindowFunc::tryCall):
(FrameArray::get):
Use lengthPropertyName instead of "length" for better speed.
2002-11-19 David Hyatt <hyatt@apple.com>
Fix backgrounds not painting in deployment builds.
* khtml/rendering/render_box.cpp:
(RenderBox::paintBackground):
2002-11-19 Darin Adler <darin@apple.com>
- a first step towards atomic identifiers in JavaScript
Most places that work with identifiers now use Identifier
instead of UString.
* khtml/ecma/kjs_binding.cpp:
* khtml/ecma/kjs_binding.h:
* khtml/ecma/kjs_css.cpp:
* khtml/ecma/kjs_css.h:
* khtml/ecma/kjs_dom.cpp:
* khtml/ecma/kjs_dom.h:
* khtml/ecma/kjs_events.cpp:
* khtml/ecma/kjs_events.h:
* khtml/ecma/kjs_html.cpp:
* khtml/ecma/kjs_html.h:
* khtml/ecma/kjs_navigator.cpp:
* khtml/ecma/kjs_navigator.h:
* khtml/ecma/kjs_range.cpp:
* khtml/ecma/kjs_range.h:
* khtml/ecma/kjs_traversal.cpp:
* khtml/ecma/kjs_traversal.h:
* khtml/ecma/kjs_views.cpp:
* khtml/ecma/kjs_views.h:
* khtml/ecma/kjs_window.cpp:
* khtml/ecma/kjs_window.h:
2002-11-18 Darin Adler <darin@apple.com>
* force-js-clean-timestamp: Another Object change.
2002-11-18 David Hyatt <hyatt@apple.com>
Implement phased painting to correct the paint order of blocks,
floats, and inlines.
* khtml/rendering/render_body.cpp:
(RenderBody::paintBoxDecorations):
* khtml/rendering/render_body.h:
* khtml/rendering/render_box.cpp:
(RenderBox::paint):
(RenderBox::paintBoxDecorations):
(RenderBox::paintBackground):
* khtml/rendering/render_box.h:
* khtml/rendering/render_br.h:
* khtml/rendering/render_flow.cpp:
(RenderFlow::paint):
(RenderFlow::paintObject):
(RenderFlow::paintFloats):
(RenderFlow::addChild):
* khtml/rendering/render_flow.h:
* khtml/rendering/render_html.cpp:
(RenderHtml::setStyle):
(RenderHtml::paint):
(RenderHtml::paintBoxDecorations):
* khtml/rendering/render_html.h:
* khtml/rendering/render_image.cpp:
(RenderImage::setStyle):
(RenderImage::paintObject):
* khtml/rendering/render_image.h:
* khtml/rendering/render_layer.cpp:
(RenderLayer::paint):
(RenderLayer::nodeAtPoint):
* khtml/rendering/render_list.cpp:
(RenderListItem::paint):
(RenderListItem::paintObject):
(RenderListMarker::paint):
(RenderListMarker::paintObject):
* khtml/rendering/render_list.h:
* khtml/rendering/render_object.cpp:
(RenderObject::RenderObject):
(RenderObject::paintBorder):
(RenderObject::paintOutline):
(RenderObject::paint):
(RenderObject::dump):
(RenderObject::setStyle):
* khtml/rendering/render_object.h:
* khtml/rendering/render_replaced.cpp:
(RenderReplaced::paint):
(RenderWidget::setStyle):
(RenderWidget::paintObject):
* khtml/rendering/render_replaced.h:
* khtml/rendering/render_root.cpp:
(RenderRoot::paint):
(RenderRoot::paintObject):
* khtml/rendering/render_root.h:
* khtml/rendering/render_table.cpp:
(RenderTable::paint):
(RenderTableCell::RenderTableCell):
(RenderTableCell::setStyle):
(RenderTableCell::paint):
(RenderTableCell::paintBoxDecorations):
* khtml/rendering/render_table.h:
* khtml/rendering/render_text.cpp:
(TextSlave::paintSelection):
(TextSlave::paintDecoration):
(TextSlave::paintBoxDecorations):
(RenderText::paintObject):
(RenderText::paint):
(RenderText::paintTextOutline):
* khtml/rendering/render_text.h:
2002-11-18 Darin Adler <darin@apple.com>
* force-js-clean-timestamp: I changed the size of ObjectImp.
2002-11-18 David Hyatt <hyatt@apple.com>
Fix crazyapplerumors.com. I had the logic backwards. CSS
padding beats cellpadding.
* khtml/rendering/render_table.cpp:
(RenderTableCell::paddingTop):
(RenderTableCell::paddingBottom):
(RenderTableCell::paddingLeft):
(RenderTableCell::paddingRight):
2002-11-18 David Hyatt <hyatt@apple.com>
Fix crash on espn.com.
* khtml/rendering/render_object.cpp:
(RenderObject::setLayouted):
2002-11-18 David Hyatt <hyatt@apple.com>
Fix my <konqblock> regression on ign.com.
* khtml/html/htmlparser.cpp:
(KHTMLParser::insertNode):
2002-11-18 Maciej Stachowiak <mjs@apple.com>
* force-js-clean-timestamp: Rebuild for JSC changes.
2002-11-18 Darin Adler <darin@apple.com>
* force-js-clean-timestamp: Touch files to make the build work.
2002-11-18 Richard Williamson <rjw@apple.com>
Fixed 3103004. REGRESSION: word-spacing/letter-spacing applied when they shouldn't be
This was actually NOT a regression. khtml wasn't recognizing the 'normal' value for the
word and letter spacing properties. So it incorrectly substituted a -1 spacing.
* khtml/css/cssstyleselector.cpp:
2002-11-18 David Hyatt <hyatt@apple.com>
Fix render_body's repaint method.
* khtml/rendering/render_body.cpp:
(RenderBody::repaint):
* khtml/rendering/render_body.h:
2002-11-18 Maciej Stachowiak <mjs@apple.com>
- fixed 3103711 - Alexander does not complete JavaScript iBench
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLDocument::putValue): Resolve URL for location property
relative to the base URL of the frame where the JavaScript is
executing, not the target frame.
2002-11-18 David Hyatt <hyatt@apple.com>
Yay! Found the main cause of :hover feedback being so
slow on links. The diff function for styles was
considering a color change as a containing block layout
instead of just a repaint. With this fix, we will no
longer lay out when you hover over a link whose color
is different (remember that laying out causes the whole
page to repaint).
There's still some work to do to optimize this further,
since we do repaint the containing block still, but this
should be good enough for beta.
* khtml/rendering/render_style.cpp:
(RenderStyle::diff):
2002-11-17 David Hyatt <hyatt@apple.com>
Don't use the immediate painting code for now. Revert
to non-immediate code. Using the non-immediate path I
have managed to fix all the regressions except for
mrskin losing updates in its marquee (this works only with
immediate painting) and the general scrollbar regression
(which I just don't understand).
* khtml/html/html_documentimpl.cpp:
(HTMLDocumentImpl::close):
* khtml/rendering/render_object.cpp:
(RenderObject::setLayouted):
* khtml/rendering/render_root.cpp:
(RenderRoot::repaintRectangle):
(RenderRoot::repaint):
2002-11-17 David Hyatt <hyatt@apple.com>
More refinements to immediate painting code. Still doesn't
fix the scrollbar problem though. :(
* khtml/html/html_documentimpl.cpp:
(HTMLDocumentImpl::close):
* khtml/khtmlview.cpp:
(KHTMLView::init):
(KHTMLView::timerEvent):
2002-11-17 David Hyatt <hyatt@apple.com>
Make immediate repainting of the root element more robust.
* khtml/html/html_documentimpl.cpp:
(HTMLDocumentImpl::close):
* khtml/khtmlview.cpp:
(KHTMLView::unscheduleRepaint):
* khtml/khtmlview.h:
* khtml/rendering/render_root.cpp:
(RenderRoot::repaint):
2002-11-17 Darin Adler <darin@apple.com>
- moved all NSURL and CFURL use out of WebCore
* kwq/KWQKURL.h: Remove getNSURL() and getNSURLFromString().
* kwq/KWQKURL.mm: Ditto.
* kwq/KWQKCookieJar.mm:
(KWQKCookieJar::cookie): Pass an NSString instead of an NSURL.
(KWQKCookieJar::setCookie): Ditto.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::openURL): Ditto.
(KWQKHTMLPart::openURLRequest): Ditto.
(KWQKHTMLPart::submitForm): Ditto.
(KWQKHTMLPart::urlSelected): Ditto.
(KWQKHTMLPart::createPart): Ditto.
(KWQKHTMLPart::redirectionTimerStartedOrStopped): Ditto.
(KWQKHTMLPart::userAgent): Ditto.
(KWQKHTMLPart::requestedURLString): Receive an NSString instead of an NSURL.
* kwq/KWQKHTMLPartBrowserExtension.mm:
(KHTMLPartBrowserExtension::createNewWindow): Pass an NSString instead of an NSURL.
(KHTMLPartBrowserExtension::setIconURL): Ditto.
(KHTMLPartBrowserExtension::setTypedIconURL): Ditto.
* kwq/KWQKJavaAppletWidget.h: Remove use of NSURL, just use QString instead.
* kwq/KWQKJavaAppletWidget.mm:
(KJavaAppletWidget::KJavaAppletWidget): No need to set the QString to nil.
(KJavaAppletWidget::~KJavaAppletWidget): No need to release the QString.
(KJavaAppletWidget::showApplet): Pass an NSString instead of an NSURL.
* kwq/KWQLoader.mm:
(KWQServeRequest): Pass an NSString instead of an NSURL.
(KWQCheckCacheObjectStatus): Ditto.
* kwq/WebCoreBridge.h: Change all methods to use NSString instead of NSURL.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge openURL:reload:headers:]): Receive an NSString instead of an NSURL.
(-[WebCoreBridge completeURLForDOMString:]): Return an NSString instead of an NSURL.
(-[WebCoreBridge elementAtPoint:]): WebCoreElementLinkURL and WebCoreElementImageURL
are now strings.
(-[WebCoreBridge URL]): Return an NSString instead of an NSURL.
* kwq/WebCoreCookieAdapter.h: Change all methods to use NSString instead of NSURL.
* kwq/WebCoreCookieAdapter.m:
(-[WebCoreCookieAdapter cookiesForURL:]): Ditto.
(-[WebCoreCookieAdapter setCookies:forURL:policyBaseURL:]): Ditto.
* khtml/rendering/render_applet.cpp: (RenderApplet::processArguments):
Tweaked this file a tiny bit, mainly because header dependencies weren't working
and we need this file to be recompiled due to inline function changes.
2002-11-17 David Hyatt <hyatt@apple.com>
Add support for specifying whether repaint should be immediate or
not. Default to async for now to maintain current behavior.
For clipped object repainting (e.g., livepage.apple.com and mrskin)
switch to immediate repainting, since this makes the marquees
faster, stops dropping updates, and keeps the hover effects and
painting on the rest of the page fast (since the marquee rect doesn't
get unioned with links or images that you roll over).
* khtml/rendering/render_box.cpp:
(RenderBox::repaint):
(RenderBox::repaintRectangle):
* khtml/rendering/render_box.h:
* khtml/rendering/render_html.cpp:
(RenderHtml::repaint):
* khtml/rendering/render_html.h:
* khtml/rendering/render_object.cpp:
(RenderObject::setLayouted):
(RenderObject::repaintRectangle):
* khtml/rendering/render_object.h:
* khtml/rendering/render_root.cpp:
(RenderRoot::repaintRectangle):
(RenderRoot::repaint):
* khtml/rendering/render_root.h:
* khtml/rendering/render_table.cpp:
(RenderTableRow::repaint):
(RenderTableCell::repaintRectangle):
(RenderTableCell::repaint):
* khtml/rendering/render_table.h:
* khtml/rendering/render_text.cpp:
(RenderText::repaint):
* khtml/rendering/render_text.h:
2002-11-17 Maciej Stachowiak <mjs@apple.com>
- fixed 2949193 - implement onKeyDown, onKeyPress, and onKeyUp event handlers
* khtml/html/html_formimpl.cpp:
(HTMLGenericFormElementImpl::defaultEventHandler):
* kwq/KWQEvent.h:
* kwq/KWQEvent.mm:
(QKeyEvent::QKeyEvent): Implemented.
(QKeyEvent::key): Likewise.
(QKeyEvent::state): Likewise.
(QKeyEvent::accept): Likewise.
(QKeyEvent::ignore): Likewise.
(QKeyEvent::isAutoRepeat): Likewise.
(QKeyEvent::text): Likewise.
(QKeyEvent::ascii): Likewise.
(QKeyEvent::count): Likewise.
(QKeyEvent::isAccepted): Likewise.
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::keyEvent): Translate the event to a QEvent and send
it through the DOM event mechanism.
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge interceptKeyEvent:toView:]): Pass event to the
KWQ part.
* kwq/WebCoreBridgePrivate.h: Added.
* WebCore.pbproj/project.pbxproj: Added new file.
2002-11-17 David Hyatt <hyatt@apple.com>
Don't discard linefeeds after elements with no close tag
(e.g., <img> or <input>).
* khtml/html/htmltokenizer.cpp:
(HTMLTokenizer::parseTag):
2002-11-17 David Hyatt <hyatt@apple.com>
Fix for slashdot table mispositioning in the upper right.
Now that we fixed <td> to set to -konq-center when align="center"
is specified, the style rules are no longer necessary in
html4.css (and are in fact harmful).
* khtml/css/html4.css:
2002-11-17 David Hyatt <hyatt@apple.com>
Fix for 3038168. Duh. Remember to be case-insensitive when
checking the type of the <style> attribute.
* khtml/html/html_headimpl.cpp:
(HTMLStyleElementImpl::parseAttribute):
2002-11-17 David Hyatt <hyatt@apple.com>
This is a fix for bug 3058470. The bug was that replaced elements
were computing their min and max widths wrong. Specifically they
were not adding in borders and padding! This means that any image
with a border around it would potentially break to another line
too early.
Once I fixed this for replaced elements I then went in and
fixed form controls. I added two APPLE_CHANGES features for
our form controls. First I overrode the border/padding functions
to always return 0 for all form controls, since no Aqua control
honors border/padding (nor should it). This fixes the menulist
at the top of wired.com.
Second I made sure that certain controls will ignore CSS-specified
heights and always use their intrinsic heights. These include
<select size=1> (combobox), single line text fields, and buttons.
I allow listboxes and textareas to honor height.
* khtml/rendering/render_box.cpp:
(RenderBox::contentWidth):
(RenderBox::contentHeight):
(RenderBox::calcWidth):
(RenderBox::calcHeight):
* khtml/rendering/render_form.h:
* khtml/rendering/render_image.h:
* khtml/rendering/render_object.h:
* khtml/rendering/render_replaced.cpp:
(RenderReplaced::calcMinMaxWidth):
2002-11-16 David Hyatt <hyatt@apple.com>
Fix for 3078240, <pre> should not establish its own text-align,
but should instead inherit from its parent.
* khtml/css/html4.css:
2002-11-16 David Hyatt <hyatt@apple.com>
Rewrite the calculation of min and max width for <pre>s. This
is the second stage of the whitespace rewrite (third stage
will be to stop morphing newlines).
This should fix a bunch of bugs, e.g., especially if you ever
did the following:
<td><pre><span>foo</span>
more text after the newline</pre></td>
The new code now properly handles building up the correct min/max
width for the <pre>.
If anyone recalls seeing any bugs like this, let me know and
I can close them.
* khtml/rendering/render_flow.cpp:
(RenderFlow::calcInlineMinMaxWidth):
* khtml/rendering/render_text.cpp:
(RenderText::trimmedMinMaxWidth):
(RenderText::calcMinMaxWidth):
2002-11-16 David Hyatt <hyatt@apple.com>
Fix more edge cases with whitespace handling that caused some
lines to be too long (and unselectable).
* khtml/rendering/bidi.cpp:
(appendRunsForObject):
2002-11-16 David Hyatt <hyatt@apple.com>
Make <caption> error-handling more robust.
Specifically, handle <tr> and <td> misplaced inside
<caption>s and still make them be part of the table.
* khtml/html/htmlparser.cpp:
(KHTMLParser::insertNode):
2002-11-16 David Hyatt <hyatt@apple.com>
Implement the collapsing top margin quirk for <body> (the same
quirk used for table cells) and make sure it works even when the
<body> has margins of its own.
Fixes www.eflightpacks.com (the top frame was shoved down because
the <p> margin didn't collapse away).
* khtml/rendering/render_flow.cpp:
(RenderFlow::layoutBlockChildren):
2002-11-16 David Hyatt <hyatt@apple.com>
Sigh. Amazingly enough, all other browsers seem to treat
stray </p>s as <p></p> (Mac IE treats it as <br>, but
I'm going with the WinIE/Gecko behavior of <p></p>).
This fixes bug 3063699.
* khtml/html/htmlparser.cpp:
(KHTMLParser::processCloseTag):
(KHTMLParser::popBlock):
2002-11-15 David Hyatt <hyatt@apple.com>
Fix for livepage.apple.com slowness. Ensure that
clipped regions only paint their own rectangles
when they or any children inside of them need to
be reflowed.
This fix is intended as an interim band-aid for a much
larger problem (that all of layout doesn't just auto-invalidate
the regions it needs to, and that DHTML doesn't have
specialized behavior to avoid async repainting or even
relayout when only a repaint is required).
* khtml/khtmlview.cpp:
(KHTMLView::timerEvent):
* khtml/rendering/render_container.cpp:
(RenderContainer::removeChildNode):
(RenderContainer::appendChildNode):
(RenderContainer::insertChildNode):
(RenderContainer::layout):
* khtml/rendering/render_object.cpp:
(RenderObject::setLayouted):
(RenderObject::scheduleRelayout):
* khtml/rendering/render_root.cpp:
(RenderRoot::repaintRectangle):
2002-11-15 David Hyatt <hyatt@apple.com>
Fix the problem where the last lines of paragrpahs were getting
justified incorrectly.
* khtml/rendering/bidi.cpp:
(RenderFlow::findNextLineBreak):
2002-11-15 David Hyatt <hyatt@apple.com>
Fix bustage with <nobr> tags. Inline nowrap elements were
breaking on images when they shouldn't have.
* khtml/rendering/render_flow.cpp:
(RenderFlow::calcInlineMinMaxWidth):
2002-11-15 Ken Kocienda <kocienda@apple.com>
Fix for this bug:
Radar 3102708 (REGRESSION: assertion failure backing up to page)
KWQCheckCacheObjectStatus did not create an NSURL in a way that
dealt with the fact that we handle non-NSURL-compliant URL strings.
I have fixed it so it does, and in the process, factored out
the code to do it into a new KURL static function (KURL::getNSURLFromString).
* kwq/KWQKURL.h:
* kwq/KWQKURL.mm:
(KURL::getNSURL): Now calls through to KURL::getNSURLFromString
(KURL::encode_string)
(KURL::getNSURLFromString): New function to handle NSURL creation
* kwq/KWQLoader.mm:
(KWQCheckCacheObjectStatus)
2002-11-15 David Hyatt <hyatt@apple.com>
Fix asserts in tables.
* khtml/rendering/render_table.cpp:
(RenderTableRow::layout):
2002-11-15 David Hyatt <hyatt@apple.com>
Fix for whitespace regressions that caused text overlapping
and text spilling.
* khtml/rendering/bidi.cpp:
(appendRunsForObject):
2002-11-15 David Hyatt <hyatt@apple.com>
Fix newlines getting stripped out of textareas by not making
rendertext objects for children of textareas.
* khtml/rendering/render_form.h:
* khtml/rendering/render_object.h:
* khtml/xml/dom_textimpl.cpp:
(TextImpl::attach):
2002-11-15 David Hyatt <hyatt@apple.com>
Make <form> inside <table> stay inside the <table> but demote
itself to a leaf. Then the children of the <form> are treated
as though they occurred underneath the <table> itself. Everything
KHTML does with this is completely wrong but this band-aid should
hopefully suffice until 1.0.
Also allowing <input type="hidden"> to be constructed and attached
under <table>s. Since they have no render objects this is safe.
Again, total hack, since CSS2 anonymous table construction should be
implemented and that would have fixed all this.
This collection of hacks makes travelocity render correctly on the
PLT.
* khtml/css/html4.css:
* khtml/html/dtd.cpp:
(DOM::checkChild):
* khtml/html/html_tableimpl.cpp:
(HTMLTableElementImpl::addChild):
* khtml/html/htmlparser.cpp:
(KHTMLParser::parseToken):
(KHTMLParser::insertNode):
2002-11-15 David Hyatt <hyatt@apple.com>
Fix Hixie's blog. Background images can be transparent, so
if the root's color isn't valid always do a fixup even if you
have a valid background image.
* khtml/rendering/render_html.cpp:
(RenderHtml::printBoxDecorations):
2002-11-15 Darin Adler <darin@apple.com>
* kwq/KWQWindowWidget.mm: (KWQWindowWidget::setFrameGeometry):
Oops. Make that display:YES.
2002-11-15 Darin Adler <darin@apple.com>
- fixed 3090219 -- Window jumps up and down when loading nikon page
* kwq/KWQWindowWidget.mm: (KWQWindowWidget::setFrameGeometry):
Don't pass display:NO when resizing the window.
2002-11-15 Ken Kocienda <kocienda@apple.com>
Remove characters RFC 2396 describes as "unwise" from the
BadChar character class. This causes them to remain unescaped
in KURL objects. As a result, some extra escaping needed to
be added into the getNSURL() function to enable NSURL
objects to be created using a KURL.
This enables me to fix this bug:
Radar 3050437 (Clicking link leads to page with garbled content)
Note, however, that my fix for 3050437 relies on this bug remaining unfixed:
Radar 3102332 (Square bracket characters "sneak through" CFURL illegal character checks)
* kwq/KWQKURL.mm:
(KURL::getNSURL)
2002-11-15 Darin Adler <darin@apple.com>
- fixed 3027460 -- text areas don't have focus rectangles
- fixed 2937204 -- text areas have solid black borders
* kwq/KWQSignal.mm: (KWQSignal::disconnect):
Add a special case so we don't hear about finishedParsing all the time.
* kwq/KWQTextArea.mm:
(-[KWQTextArea initWithFrame:]): Use a bezel border, not a line border.
(-[KWQTextArea getCursorPositionAsIndex:inParagraph:]): Fix bug where it would
return a bogus value for an empty text area.
(-[KWQTextArea setCursorPositionToIndex:inParagraph:]): Use setSelectedRange:
ratherr than setMarkedText:selectedRange:.
(-[KWQTextArea drawRect:]): Draw a focus ring if our text view is first responder.
(-[KWQTextArea _KWQ_setKeyboardFocusRingNeedsDisplay]): Added.
(-[KWQTextAreaTextView becomeFirstResponder]): Call _KWQ_setKeyboardFocusRingNeedsDisplay.
(-[KWQTextAreaTextView resignFirstResponder]): Call _KWQ_setKeyboardFocusRingNeedsDisplay.
(-[NSView _KWQ_setKeyboardFocusRingNeedsDisplay]): Calls the same thing on parent.
* WebCore.pbproj/project.pbxproj: PB is a cruel master.
2002-11-15 Maciej Stachowiak <mjs@apple.com>
* khtml/html/html_formimpl.cpp:
(HTMLInputElementImpl::attach): Removed a stray printf.
2002-11-14 Darin Adler <darin@apple.com>
- fixed most of the problems with OPTGROUP
* khtml/html/htmlparser.cpp: (KHTMLParser::insertNode):
Make OPTGROUPs pop out of other unclosed OPTGROUPs, not just out of options.
* kwq/KWQListBox.h: Add private member function.
* kwq/KWQListBox.mm:
(QListBox::insertItem): Use shared insertItem function.
(QListBox::insertGroupLabel): Create an attributed string for the group label,
with bold font.
(-[KWQListBoxTableViewDelegate tableView:shouldSelectRow:]): Return YES only
for the plain strings, that way you can't select the group labels.
* WebCore.pbproj/project.pbxproj: Let PB do its thing.
2002-11-14 David Hyatt <hyatt@apple.com>
Fix spinner.com mislayout on the PLT. Make sure
<input type=image> honors the width attribute and
make sure that its render object calls updateFromElement.
* khtml/html/html_formimpl.cpp:
(HTMLInputElementImpl::parseAttribute):
(HTMLInputElementImpl::attach):
2002-11-14 David Hyatt <hyatt@apple.com>
Move text measurement and layout beyond onload. This
shoudl speed up i-bench substantially and morrison's
PLT test slightly.
Also allow <table>s as children of <p> and <h1>-<h6>.
This fixes floats on slashdot.org (the left side) and
the floating tables in articles on wired.com.
* khtml/html/dtd.cpp:
(DOM::checkChild):
* khtml/html/html_documentimpl.cpp:
(HTMLDocumentImpl::HTMLDocumentImpl):
(HTMLDocumentImpl::close):
* khtml/html/html_documentimpl.h:
* khtml/html/htmlparser.cpp:
(KHTMLParser::insertNode):
2002-11-14 Richard Williamson <rjw@apple.com>
Fixed 3099505. With the recent white space changes, multiple slaves may
be created for contiguous text on the same line. The fix changes the
iteration order of over the slave array. Now, when searching for the end
point of a line we'll always find the last slave on a line first.
* khtml/khtml_part.cpp:
(lastSlaveAt):
2002-11-14 Darin Adler <darin@apple.com>
- fixed 3095854 -- small select boxes get no scrollbar
* kwq/KWQListBox.mm: (QListBox::sizeForNumberOfLines):
Always use a minimum of 4 lines.
=== Alexander-32 ===
2002-11-14 Darin Adler <darin@apple.com>
- fixed 3099240 -- REGRESSION: repro assert d->m_doc->parsing
Don't force all redirects to be reloads, because the ones from JavaScript must
not be. Maybe a better solution post-Alex-32 will be to pass a flag that distinguishes
redirects from other location changes.
* khtml/khtml_part.cpp: (KHTMLPart::slotRedirect): Don't ignore the anchor when
comparing URLs to see if they should be a reload. We'll still do a reload if the URLs
are actually equal, but if they differ in anchor we will just go to the anchor.
This is the bug fix.
* kwq/WebCoreBridge.h: Add reload parameter.
* kwq/WebCoreBridge.mm: (-[WebCoreBridge openURL:reload:headers:]): Stuff the reload
parameter into the URLArgs.
2002-11-14 Darin Adler <darin@apple.com>
- fixed 3100235 -- nil-deference in khtml::RenderTable at money.cnn.com
* kwq/WebCoreBridge.h: Add needsLayout.
* kwq/WebCoreBridge.mm: (-[WebCoreBridge needsLayout]): Return true if the render
tree root says "layouted" is false. It would be more elegant to use more of this
WebCore layout logic and have less of our own on the WebKit side.
* WebCore.pbproj/project.pbxproj: Oh, that Project Builder.
2002-11-13 Darin Adler <darin@apple.com>
- fixed 3100895 -- REGRESSION: Crash (was assertion) on http://www.w3.org/Style/CSS/
* khtml/rendering/render_text.h: Add an optional arena parameter to deleteSlaves.
* khtml/rendering/render_text.cpp:
(RenderText::detach): Pass the render arena in to deleteSlaves.
(RenderText::deleteSlaves): Use the passed-in arena.
2002-11-13 Darin Adler <darin@apple.com>
- fixed another crash on http://www.w3.org/Style/CSS/, but still not done
* khtml/rendering/render_box.cpp: (RenderBox::setStyle): Call renderArena()
from RenderObject rather than going at the document directly. Safer because
it works even when we don't have a node yet.
* khtml/rendering/render_flow.cpp: (RenderFlow::addChild): Ditto.
* khtml/rendering/render_layer.cpp:
(RenderLayer::paint): Ditto.
(RenderLayer::nodeAtPoint): Ditto.
(RenderLayer::constructZTree): Ditto.
* khtml/rendering/render_list.cpp:
(RenderListItem::setStyle): Ditto.
* khtml/rendering/render_text.cpp:
(RenderText::deleteSlaves): Ditto.
(RenderText::position): Ditto. This is the one that actually crashed.
* khtml/misc/makeattrs: Fixed handling of failure case.
* khtml/misc/maketags: Ditto.
* WebCore.pbproj/project.pbxproj: Project Builder wanted to touch this.
2002-11-13 Darin Adler <darin@apple.com>
- fixed 3100895 -- REGRESSION: Assertion on http://www.w3.org/Style/CSS/
A few arena-related fixes.
* khtml/rendering/bidi.h: Don't define the operator new without the arena parameter.
That way, we get a link failure if we use it by accident, rather than an assert at runtime.
It would be even better to get a compile-time error, but I don't know how to make that happen.
* khtml/rendering/render_layer.h: Ditto.
* khtml/rendering/render_object.h: Ditto.
* khtml/rendering/render_text.h: Ditto.
* khtml/rendering/render_container.cpp:
(RenderContainer::addChild): Create the RenderTable with the appropriate arena.
(RenderContainer::insertPseudoChild): Create the RenderFlow objects with the appropriate arena.
* khtml/rendering/render_text.cpp: (RenderText::deleteSlaves): Don't try to get the arena
when there are no slaves. This can happen after the element is nil, and in that case we will
do a nil-dereference.
2002-11-13 Darin Adler <darin@apple.com>
* kwq/KWQLineEdit.mm: (QLineEdit::sizeForCharacterWidth):
Use the "0" instead of the "x" as the canonical character for width.
This is slightly wider and is better for credit card numbers, for example.
* WebCore.pbproj/project.pbxproj: Tweak.
2002-11-13 Darin Adler <darin@apple.com>
- fixed 3083982 -- Logging into AOL gives null view
Turns out AOL was using a refresh header, which we were not supporting.
* khtml/khtml_part.h: Declare receivedFirstData, a private member function.
* khtml/khtml_part.cpp:
(KHTMLPart::receivedFirstData): Separate out the part of slotData we
want to share, which really seems kinda separate anyway.
(KHTMLPart::slotData): More of the same.
* kwq/KWQKHTMLPart.h: Declare addMetaData.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::slotData): Call receivedFirstData instead of doing the same
thing ourselves.
(KWQKHTMLPart::addMetaData): Added. Puts metadata into the job.
* kwq/KWQKHTMLPartBrowserExtension.mm:
(KHTMLPartBrowserExtension::createNewWindow): Fix bug where this was calling
openURL: but meant to call loadURL:.
* kwq/WebCoreBridge.h: Add headers to openURL method. Remove setContentType.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge openURL:withHeaders:]): Handle Content-Type and Refresh.
This method is big enough that I should probably move the guts to KWQKHTMLPart.
- other things
* kwq/KWQListImpl.mm: (KWQListImpl::~KWQListImpl): I overlooked something
while doing my "bug fix" in here a while back. Change an assignment statement
to an assert.
2002-11-13 David Hyatt <hyatt@apple.com>
Fix for floats. Force relayout if collapsing margins
have to adjust the position of an object.
* khtml/rendering/render_flow.cpp:
(RenderFlow::layoutBlockChildren):
2002-11-13 David Hyatt <hyatt@apple.com>
Rewrite cellpadding to not use the style system at all and
to make table cells just get the padding from the table
itself (overriding style).
* khtml/html/html_tableimpl.cpp:
(HTMLTableElementImpl::HTMLTableElementImpl):
(HTMLTableElementImpl::attach):
(HTMLTableElementImpl::parseAttribute):
(HTMLTableCellElementImpl::init):
* khtml/html/html_tableimpl.h:
* khtml/rendering/bidi.cpp:
(RenderFlow::layoutInlineChildren):
* khtml/rendering/render_box.cpp:
(RenderBox::contentWidth):
(RenderBox::contentHeight):
* khtml/rendering/render_flow.cpp:
(RenderFlow::layoutBlockChildren):
(RenderFlow::leftOffset):
(RenderFlow::rightOffset):
(RenderFlow::calcMinMaxWidth):
* khtml/rendering/render_object.h:
* khtml/rendering/render_table.cpp:
(RenderTable::RenderTable):
(RenderTableCell::paddingTop):
(RenderTableCell::paddingBottom):
(RenderTableCell::paddingLeft):
(RenderTableCell::paddingRight):
* khtml/rendering/render_table.h:
2002-11-13 Ken Kocienda <kocienda@apple.com>
Bump WebCore cache to 4 MB (was 1 MB).
* khtml/misc/loader.cpp
2002-11-13 Maciej Stachowiak <mjs@apple.com>
- fixed 3050447 - Policy handlers have no way of telling client
that the proposed navigation is a form post
* khtml/khtml_part.cpp:
(KHTMLPart::submitForm): Call kwq->submitForm
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::openURL): Adjusted for bridge API change.
(KWQKHTMLPart::openURLRequest): Removed POST handling.
(KWQKHTMLPart::submitForm): Added this back, because we need to
know what URL navigations are caused by form submission, even if
they are not POSTs.
(KWQKHTMLPart::urlSelected): Adjusted for bridge API change.
* kwq/WebCoreBridge.h: Add triggeringEvent: parameter to postURL:
and isFormSubmission: parameter to loadURL:.
2002-11-12 David Hyatt <hyatt@apple.com>
Fix for 3032869, the background image for the body was being
propagated up to the root properly but was not being tiled over
the whole canvas.
* khtml/rendering/render_box.cpp:
(RenderBox::printBackground):
* khtml/rendering/render_html.cpp:
(RenderHtml::printBoxDecorations):
2002-11-12 David Hyatt <hyatt@apple.com>
Fix the top of moveabletype.org. The maxwidth/minwidth
calculation for blocks with inline content did not properly
deal with margins and padding on inline elements like <a>.
* khtml/rendering/render_flow.cpp:
(RenderFlow::calcInlineMinMaxWidth):
2002-11-12 David Hyatt <hyatt@apple.com>
Fix for 2953367, padding is incorrectly inherited into table cells
and also incorrectly overrides cellpadding on the table itself.
Fixes dailyf1.com.
* khtml/css/html4.css:
* khtml/html/html_tableimpl.cpp:
(HTMLTableElementImpl::parseAttribute):
(HTMLTableCellElementImpl::init):
* khtml/html/html_tableimpl.h:
2002-11-12 David Hyatt <hyatt@apple.com>
For now make text/xml files use HTML parsing/documents.
This avoids the infinite loop we get into when loading
text/xml. If/when we finally support XML, we can undo
this change.
* khtml/khtml_part.cpp:
(KHTMLPart::begin):
2002-11-12 David Hyatt <hyatt@apple.com>
Fix for 3086321, stylesheets not loading if titles are
specified. Note that 4 of the pages on the PLT were
affected by this, so I fully expect a slight performance
degradation (the boost from the regression was artificial).
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::recalcStyleSelector):
2002-11-12 Richard Williamson <rjw@apple.com>
Oops, removed debugging.
* khtml/rendering/font.cpp:
(Font::drawText):
2002-11-12 Richard Williamson <rjw@apple.com>
Implemented letter-spacing and word-spacing CSS properties.
* 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:
2002-11-12 David Hyatt <hyatt@apple.com>
Revert floats so that they don't use layers any more.
Floats have to be able to paint in between the background
and foreground of inlines, so they can't have layers.
* khtml/rendering/render_box.cpp:
(RenderBox::setStyle):
* khtml/rendering/render_flow.cpp:
(RenderFlow::printObject):
(RenderFlow::paintFloats):
(RenderFlow::addOverHangingFloats):
(RenderFlow::nodeAtPoint):
* khtml/rendering/render_flow.h:
* khtml/rendering/render_layer.cpp:
(RenderLayer::constructZTree):
* khtml/rendering/render_list.cpp:
(RenderListItem::printObject):
2002-11-12 Darin Adler <darin@apple.com>
* kwq/KWQCursor.mm: (QCursor::QCursor): Use nil instead of [NSCursor arrowCursor].
This will probably fix the performance regression.
2002-11-12 Darin Adler <darin@apple.com>
- fixed 3080250 -- Hands-free crash at wired.com in
KHTMLPart::slotChildStarted
* kwq/KWQListImpl.mm:
(KWQListImpl::~KWQListImpl): Set the node of each iterator to NULL too,
not just the list. This is the bug fix for the bug above.
(KWQListIteratorImpl::toFirst): Check for list of NULL.
(KWQListIteratorImpl::toLast): ditto.
* kwq/KWQSlot.mm: Tweaks.
2002-11-12 David Hyatt <hyatt@apple.com>
This patch lands a rewrite of whitespace-handling in the
layout engine and adds support for the CSS2 white-space
property.
It also includes a rewrite of inlines' min/max width
calculations (for both flow inlines and raw text).
A problem with <form> margins has been fixed (this is a
regression I caused with my collapsing margin checkin).
* WebCore.pbproj/project.pbxproj:
* khtml/css/html4.css:
* khtml/html/dtd.cpp:
(DOM::checkChild):
* khtml/html/html_baseimpl.cpp:
(HTMLBodyElementImpl::attach):
(HTMLFrameElementImpl::attach):
(HTMLFrameSetElementImpl::attach):
(HTMLHtmlElementImpl::attach):
(HTMLIFrameElementImpl::attach):
* khtml/html/html_formimpl.cpp:
(HTMLFormElementImpl::HTMLFormElementImpl):
(HTMLInputElementImpl::attach):
(HTMLSelectElementImpl::attach):
(HTMLTextAreaElementImpl::attach):
* khtml/html/html_formimpl.h:
* khtml/html/html_imageimpl.cpp:
(HTMLImageElementImpl::attach):
* khtml/html/html_inlineimpl.cpp:
(HTMLBRElementImpl::attach):
* khtml/html/html_objectimpl.cpp:
(HTMLAppletElementImpl::attach):
(HTMLEmbedElementImpl::attach):
(HTMLObjectElementImpl::attach):
* khtml/html/htmlparser.cpp:
(KHTMLParser::reset):
(KHTMLParser::parseToken):
(KHTMLParser::insertNode):
(KHTMLParser::popBlock):
(KHTMLParser::popOneBlock):
* khtml/html/htmlparser.h:
* khtml/html/htmltokenizer.cpp:
(HTMLTokenizer::addPending):
(HTMLTokenizer::write):
* khtml/misc/arena.cpp: Added.
(CeilingLog2):
(InitArenaPool):
(ArenaAllocate):
(ArenaGrow):
(FreeArenaList):
(ArenaRelease):
(FreeArenaPool):
(FinishArenaPool):
(ArenaFinish):
* khtml/misc/arena.h: Added.
* khtml/rendering/bidi.cpp:
(BidiIterator::detach):
(throw):
(BidiIterator::operator delete):
(appendRunsForObject):
(appendRun):
(RenderFlow::bidiReorderLine):
(deleteMidpoints):
(RenderFlow::layoutInlineChildren):
(RenderFlow::findNextLineBreak):
* khtml/rendering/bidi.h:
* khtml/rendering/render_arena.cpp: Added.
(RenderArena::RenderArena):
(RenderArena::~RenderArena):
(RenderArena::allocate):
(RenderArena::free):
* khtml/rendering/render_arena.h: Added.
* khtml/rendering/render_box.cpp:
(RenderBox::setStyle):
(RenderBox::~RenderBox):
(RenderBox::detach):
* khtml/rendering/render_box.h:
* khtml/rendering/render_br.cpp:
(RenderBR::RenderBR):
* khtml/rendering/render_container.cpp:
(RenderContainer::~RenderContainer):
(RenderContainer::detach):
* khtml/rendering/render_container.h:
* khtml/rendering/render_flow.cpp:
(RenderFlow::setStyle):
(RenderFlow::layout):
(RenderFlow::calcInlineMinMaxWidth):
(RenderFlow::calcBlockMinMaxWidth):
(RenderFlow::calcMinMaxWidth):
(RenderFlow::addChild):
(RenderFlow::makeChildrenNonInline):
* khtml/rendering/render_flow.h:
* khtml/rendering/render_html.cpp:
(RenderHtml::RenderHtml):
* khtml/rendering/render_layer.cpp:
(RenderLayer::~RenderLayer):
(throw):
(RenderLayer::operator delete):
(RenderLayer::detach):
(RenderLayer::paint):
(RenderLayer::nodeAtPoint):
(RenderLayer::constructZTree):
(RenderLayer::RenderLayerElement::operator delete):
(RenderLayer::RenderLayerElement::detach):
(RenderLayer::RenderZTreeNode::operator delete):
(RenderLayer::RenderZTreeNode::detach):
* khtml/rendering/render_layer.h:
* khtml/rendering/render_list.cpp:
(RenderListItem::setStyle):
* khtml/rendering/render_object.cpp:
(throw):
(RenderObject::operator delete):
(RenderObject::createObject):
(RenderObject::renderArena):
(RenderObject::detach):
* khtml/rendering/render_object.h:
* khtml/rendering/render_replaced.cpp:
(RenderWidget::detach):
* khtml/rendering/render_replaced.h:
* khtml/rendering/render_root.cpp:
(RenderRoot::RenderRoot):
* khtml/rendering/render_table.cpp:
(RenderTable::addChild):
(RenderTable::calcWidth):
(RenderTable::setCellWidths):
(RenderTableSection::addChild):
(RenderTableRow::addChild):
* khtml/rendering/render_text.cpp:
(TextSlave::detach):
(throw):
(TextSlave::operator delete):
(TextSlaveArray::TextSlaveArray):
(RenderText::RenderText):
(RenderText::~RenderText):
(RenderText::detach):
(RenderText::deleteSlaves):
(RenderText::trimmedMinMaxWidth):
(RenderText::calcMinMaxWidth):
(RenderText::position):
* khtml/rendering/render_text.h:
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::DocumentImpl):
(DocumentImpl::~DocumentImpl):
(DocumentImpl::attach):
(DocumentImpl::detach):
* khtml/xml/dom_docimpl.h:
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::detach):
(NodeImpl::isReadOnly):
(NodeImpl::previousRenderer):
* khtml/xml/dom_nodeimpl.h:
* khtml/xml/dom_stringimpl.cpp:
* khtml/xml/dom_stringimpl.h:
* khtml/xml/dom_textimpl.cpp:
(CharacterDataImpl::containsOnlyWhitespace):
(TextImpl::attach):
* khtml/xml/dom_textimpl.h:
2002-11-12 Darin Adler <darin@apple.com>
- fixed 3094819 -- Crash in -[KWQObjectTimerTarget timerFired]
* kwq/KWQObject.mm: (QObject::~QObject): Call the _destroyed signal.
(QObject::killTimers): Simplify the code a bit using makeObjectsPerformSelector:.
2002-11-12 Darin Adler <darin@apple.com>
- fixed 3079499 -- blank page at http://www.sonyericsson.com/T68i/
* khtml/misc/loader.cpp:
(CachedCSSStyleSheet::checkNotify): Copy the clients list before iterating
over it, since clients can move around in the list or be removed.
(CachedScript::checkNotify): Ditto.
(CachedImage::do_notify): Ditto.
(CachedImage::movieStatus): Ditto.
- fixed double calls to openURL I noticed
* khtml/khtml_part.cpp: (KHTMLPart::processObjectRequest):
Don't call openURL here at all. That happens indirectly as a result
of the load we kick off.
* kwq/KWQKHTMLPart.mm: Tweaks.
2002-11-12 Darin Adler <darin@apple.com>
- fixed 3083043 -- Alex doesn't decode % sequences in javascript: URLs
Some places here did KURL::decode_string, but others didn't.
* khtml/khtml_part.cpp:
(KHTMLPart::slotShowDocument): Added call to KURL::decode_string.
(KHTMLPart::overURL): Ditto.
(KHTMLPart::urlSelected): Ditto.
(KHTMLPart::requestFrame): Ditto.
(KHTMLPart::slotChildURLRequest): Ditto.
2002-11-11 Darin Adler <darin@apple.com>
* kwq/KWQWidget.mm: (QWidget::setCursor): Remove printf I left
in by accident.
2002-11-11 Darin Adler <darin@apple.com>
- tighten up cursor handling a bit more
* kwq/KWQWidget.mm:
(QWidget::setCursor): Use setDocumentCursor: instead of our own protocol.
(QWidget::cursor): Use documentCursor instead of storing our own cursor.
* kwq/WebCoreFrameView.h: Remove setCursor: method.
2002-11-11 Darin Adler <darin@apple.com>
- fixed 3084704 -- crash in HTMLTokenizer on page with JavaScript
HTMLDocument::Close inside a <script>
I think it's going to work this time. The key was to hook up the
KHTML submitFormAgain machinery.
* khtml/khtml_part.cpp: (KHTMLPart::submitForm): Take out the APPLE_CHANGES
ifdef that was disabling the submitFormAgain logic.
* kwq/KWQKHTMLPart.h: Remove submitForm(), because openURLRequest() handles it fine.
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::openURLRequest): Move the logic for handling
POST here from submitForm() and remove submitForm().
* kwq/KWQSlot.mm:
(KWQSlot::KWQSlot): Add support for the submitFormAgain slot.
(KWQSlot::call): Ditto.
2002-11-11 Darin Adler <darin@apple.com>
- fixed 3092421 -- javascript: URL that opens window crashes Alex if typed into empty window
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::KWQKHTMLPart): Set _ownsView to false.
(KWQKHTMLPart::~KWQKHTMLPart): Delete the view if we own it. Also release
_currentEvent to fix a leak.
(KWQKHTMLPart::setView): Delete the old view if we own it. Also, set the
_ownsView flag.
(KWQKHTMLPart::createDummyDocument): Create a dummy view too.
* kwq/KWQDummyView.h: Added.
* kwq/KWQDummyView.m: Added.
* WebCore.pbproj/project.pbxproj: Added KWQDummyView.
* kwq/WebCoreBridge.h: Remove bridgeOwnsKHTMLView and currentEvent.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge createKHTMLViewWithNSView:marginWidth:marginHeight:]):
Pass true to setView instead of setting bridgeOwnsKHTMLView.
(-[WebCoreBridge removeFromFrame]): Just call setView on the part. It
knows how to handle ownership now.
(-[WebCoreBridge installInFrame:]): Call setOwnsView instead of setting
bridgeOwnsKHTMLView.
2002-11-11 Trey Matteson <trey@apple.com>
* khtml/khtml_part.cpp:
(KHTMLPart::requestFrameName): Call through bridge to get generated frame name.
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::generateFrameName): New call that just forwards through the bridge.
* kwq/WebCoreBridge.h:
2002-11-11 Darin Adler <darin@apple.com>
- fixed 3097253 -- text tagged <small> inside <h1> is too small
* khtml/css/html4.css: Change BIG to use "font-size: larger" rather
than "font-size: large" and SMALL to use "font-size: smaller" rather
than "font-size: small".
2002-11-11 Darin Adler <darin@apple.com>
* kwq/WebCoreBridge.h: Remove unused modifierTrackingEnabled method.
2002-11-08 Maciej Stachowiak <mjs@apple.com>
- fixed 3096451 - REGRESSION: clicking on link to open window only
works when pop-up suppression is off
* khtml/ecma/kjs_binding.cpp:
(ScriptInterpreter::ScriptInterpreter): Initialize m_timerCallback
to false.
b2002-11-08 Darin Adler <darin@apple.com>
* kwq/KWQComboBox.mm: Bump fudge factor up one pixel. You could see
it was wrong with strings like "0".
2002-11-08 Darin Adler <darin@apple.com>
- fixed 3090452 -- REGRESSION: orbitz Box extends way over margins
* kwq/KWQComboBox.h: Added _width and _widthGood.
* kwq/KWQComboBox.mm:
(QComboBox::QComboBox): Set _widthGood to false.
(QComboBox::insertItem): Set _widthGood to false.
(QComboBox::sizeHint): Compute the width by measuring the text ourselves.
Turns out the cell isn't helpful for that.
(QComboBox::clear): Set _widthGood to false.
2002-11-08 Richard Williamson <rjw@apple.com>
Cleanup of fix to 3083281. Never call stopAnimating from
QPixmap's destructor. With the fix it wouldn't have been
called anyway.
* kwq/KWQPixmap.mm:
(QPixmap::~QPixmap):
2002-11-08 Darin Adler <darin@apple.com>
* kwq/WebCoreBridge.mm: (attributedString): Remove some dead code.
2002-11-07 Darin Adler <darin@apple.com>
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::slotData):
Add an assert in the hopes of catching bug 3084704 a little earlier.
2002-11-07 Richard Williamson <rjw@apple.com>
Don't stop animating unless we're the last referee. (3083281)
* kwq/KWQPixmap.mm:
(QPixmap::~QPixmap):
=== Alexander-31 ===
2002-11-06 Richard Williamson <rjw@apple.com>
Use our notion of unicode whitespace from lookup tables
and isspace for latin1. This is more correct than CF.
Fixed issues Dave ran into with whitespace calculations.
* kwq/KWQChar.mm:
(QChar::isSpace):
2002-11-05 Darin Adler <darin@apple.com>
- fixed 3092722 -- assertion failed
* kwq/KWQResourceLoader.mm: (-[KWQResourceLoader reportError]):
Removed the assertion. It wasn't needed.
2002-11-05 Darin Adler <darin@apple.com>
- re-fixed 3070484 -- icon rollovers are very slow on Mac OS X website
Had to roll back some of the files I changed yesterday. I had missed the
one line of useful code among much stuff we don't need.
* khtml/khtml_part.cpp:
(KHTMLPart::init):
(KHTMLPart::~KHTMLPart):
(KHTMLPart::slotLoaderRequestStarted):
(KHTMLPart::slotLoaderRequestDone):
* kwq/KWQSignal.h:
* kwq/KWQSignal.mm:
(KWQSignal::call):
* kwq/KWQSignalStubs.mm:
(Loader::requestDone):
(Loader::requestFailed):
(Loader::requestStarted):
* kwq/KWQSlot.h:
* kwq/KWQSlot.mm:
(KWQSlot::KWQSlot):
(KWQSlot::call):
Just roll back all the changes from my 3091714 check-in below, except
for the bug fix itself in loader.cpp and KWQResourceLoader.mm.
2002-11-05 Maciej Stachowiak <mjs@apple.com>
- fixed 3027404 - pop-up ads not always suppressed
* khtml/ecma/kjs_binding.cpp:
(ScriptInterpreter::isWindowOpenAllowed): Don't allow opening if
we are in a timer callback - for reasons unexplained this will
always show up as an inline script.
* khtml/ecma/kjs_binding.h:
* khtml/ecma/kjs_window.cpp:
(ScheduledAction::execute): Note that we're in a timer callback.
2002-11-04 Richard Williamson <rjw@apple.com>
Changes to support cursive letter forms.
* kwq/KWQChar.mm:
* kwq/WebCoreUnicode.h:
2002-11-04 Darin Adler <darin@apple.com>
- fixed 3091714 -- reproducible assert cachedObject->response
in KWQCheckCacheObjectStatus
* khtml/misc/loader.cpp: (Loader::slotFinished):
For APPLE_CHANGES, don't finish the load if it's an error.
* kwq/KWQResourceLoader.mm:
(-[KWQResourceLoader finishJobAndHandle]): Shared code for the
three following methods.
(-[KWQResourceLoader cancel]): Use setError(1) again instead of
just keeping the load around forever.
(-[KWQResourceLoader reportError]): Ditto.
(-[KWQResourceLoader finish]): Use finishJobAndHandle to share
code with the two above.
* khtml/khtml_part.cpp:
(KHTMLPart::init): Put the slotLoaderRequestStarted and
slotLoaderRequestDone connect lines inside ifdefs.
(KHTMLPart::~KHTMLPart): Same for disconnect.
* kwq/KWQSignal.h: Remove code for the DocLoader signals.
* kwq/KWQSignal.mm: (KWQSignal::call): Ditto.
* kwq/KWQSignalStubs.mm:
(Loader::requestDone): Ditto.
(Loader::requestFailed): Ditto.
(Loader::requestStarted): Ditto.
* kwq/KWQSlot.h: Ditto.
* kwq/KWQSlot.mm:
(KWQSlot::KWQSlot): Ditto.
(KWQSlot::call): Ditto.
2002-11-04 Maciej Stachowiak <mjs@apple.com>
Changes to send NSEvents all the way through WebCore and then pass
them back out to WebKit, so that click policy can have a
WebResourceRequest added.
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::KWQKHTMLPart):
(KWQKHTMLPart::openURL):
(KWQKHTMLPart::openURLRequest):
(KWQKHTMLPart::urlSelected):
(KWQKHTMLPart::submitForm):
(KWQKHTMLPart::createDummyDocument):
(KWQKHTMLPart::setCurrentEvent):
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge mouseUp:]):
2002-11-03 Darin Adler <darin@apple.com>
- fixed 3091300 -- "prelighting" on local page is still slow, despite recent bug fix
Turns out all updating would be slow if any resources on the page failed to load.
* kwq/WebCoreResourceLoader.h: Add reportError, distinct from
cancel and finish.
* kwq/KWQResourceLoader.mm: (-[KWQResourceLoader reportError]):
Set the error boolean on the job and then call through to [finish].
2002-11-03 Darin Adler <darin@apple.com>
- fixed 3091275 -- can't type into Answer field in RealOne Player order form
* khtml/rendering/render_form.cpp:
(RenderLineEdit::updateFromElement): Treat 0 as max (1024) as other browsers do.
(RenderFileButton::updateFromElement): Ditto, although this is in !APPLE_CHANGES code
that we don't use in WebCore.
2002-11-01 Darin Adler <darin@apple.com>
- applied the same "subclass responsibility" pattern here as in
some of the other WebCore classes
* kwq/WebCoreImageRendererFactory.h: Move the subclass responsibility into a protocol.
* kwq/WebCoreImageRendererFactory.m: Remove now-unneeded stubs.
2002-11-01 Richard Williamson <rjw@apple.com>
Removed old implementation.
* kwq/KWQChar.mm:
(QChar::direction):
Renamed JoiningCenter -> JoiningCausing.
* kwq/WebCoreUnicode.h:
2002-11-01 Darin Adler <darin@apple.com>
- fixed 3062598 -- meta refresh of 0.1s fails
KHTML was using an integer for the delay.
* khtml/khtml_part.h: Make scheduleRedirection take a double.
* khtml/khtmlpart_p.h: Make m_delayRedirect be a double.
* khtml/khtml_part.cpp:
(KHTMLPart::slotData): Use a double when parsing meta refresh.
(KHTMLPart::checkCompleted): Cast to int when passing to timer start.
(KHTMLPart::scheduleRedirection): Cast to int when passing to timer
start; also check for absurd values and do nothing.
(KHTMLPart::slotParentCompleted): Cast to int when passing to timer start.
* khtml/xml/dom_docimpl.cpp: (DocumentImpl::processHttpEquiv):
Use a double when parsing meta refresh.
* kwq/KWQKDebug.h: Add overloads for unsigned int and double to keep us
compiling now that we use a double in one place.
2002-11-01 Darin Adler <darin@apple.com>
- fixed 3090249 -- random crash on page load
- fixed 3090286 -- assert _job in KWQResourceLoader cancel
* kwq/KWQResourceLoader.mm: (-[KWQResourceLoader cancel]):
This function needs to handle the case where the load is already cancelled.
I think this also caused Avie's crash.
2002-10-31 Darin Adler <darin@apple.com>
- fixed huge leak when doing page load test
* khtml/ecma/kjs_binding.h:
* khtml/ecma/kjs_binding.cpp: Remove ScriptInterpreter::mark().
We don't want to mark the elements of m_domObjects, because we don't want
to keep them around the entire lifetime of the interpreter. This is fine
because we already have forgetDOMObject(), which takes care of when they
are deallocated.
* khtml/ecma/kjs_dom.cpp:
* khtml/ecma/kjs_dom.h:
* khtml/ecma/kjs_html.cpp:
* khtml/ecma/kjs_html.h:
Changed lots of parameters to pass by const reference for a bit of a code
size and performance gain.
2002-10-31 Richard Williamson <rjw@apple.com>
Turned on use of lookup tables.
* kwq/KWQChar.mm:
(QChar::direction):
(QChar::mirrored):
(QChar::mirroredChar):
2002-10-31 Maciej Stachowiak <mjs@apple.com>
- fixed 3075803 - yahoo customize layout - delete, ordering of items doesn't work
* khtml/html/html_formimpl.h:
* khtml/html/html_formimpl.cpp:
(HTMLSelectElementImpl::recalcStyle): New method to insure the
select element updates if the contents of the option subelements
are changed.
=== Alexander-30 ===
2002-10-30 Maciej Stachowiak <mjs@apple.com>
- fixed 3049853 - Javascript: setInterval incorrectly acts as single shot
* kwq/KWQObject.mm:
(QObject::startTimer): Set a recurring timer instead of
single-shot, to match QObject semantics.
2002-10-30 Richard Williamson <rjw@apple.com>
More work on bidi and contextual forms.
Table lookup code is up in WebKit. Function
pointers are used to isolate WebCore from private
implementation in WebKit. Needs to be fast, so
the usual ObjC abstraction won't work.
* WebCore.exp:
* WebCore.pbproj/project.pbxproj:
* kwq/KWQChar.mm:
(QChar::direction):
* kwq/KWQString.h:
* kwq/WebCoreUnicode.cpp: Added.
* kwq/WebCoreUnicode.h: Added.
2002-10-30 Darin Adler <darin@apple.com>
- fixed crash when you open an empty window and just hit tab, tab, tab
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::nextKeyViewInFrame): Check for nil.
2002-10-30 Darin Adler <darin@apple.com>
- fixed 3083982 -- Logging into AOL gives null view, crash
I fixed the crash part. Not the "gives null view" part.
The key was to disentangle the references and lifetimes of the transfer job class,
and the resource loader object that KWQ uses to connect it with WebKit.
* kwq/KWQKJobClasses.h: Change the job to keep a loader reference, not a
handle reference. The job needs to inform the loader when it's being deallocated.
* kwq/KWQKJobClasses.mm: Use jobWillBeDeallocated instead of cancel when the
job is deallocated.
* kwq/KWQLoader.mm: (KWQServeRequest): Use KWQResourceLoader, now with a home in
a separate file.
* kwq/KWQResourceLoader.h: Added.
* kwq/KWQResourceLoader.mm: Added.
* WebCore.pbproj/project.pbxproj: Added KWQResourceLoader files.
2002-10-30 Darin Adler <darin@apple.com>
- fixed 3086564 -- REGRESSION: meta-refresh to the same page doesn't refresh
The key is to get args.reload passed through to the bridge.
* kwq/WebCoreBridge.h: Add reload parameter to loadURL:.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::openURL): Pass NO for reload.
(KWQKHTMLPart::openURLRequest): Pass args.reload for reload.
(KWQKHTMLPart::urlSelected): Pass args.reload for reload.
(KWQKHTMLPart::submitForm): Pass args.reload for reload.
- fixed a memory problem with the use of NSBrowser in KWQListBox
- fixed 2863040 -- multiple default items in select list not selected
Switched to use NSTableView instead of NSBrowser. This should also create
a measurable speedup due to other changes to this class.
* kwq/KWQListBox.h: Remove firstItem(), the insertItem() that takes a QListBoxItem
parameter, and deleteItems(). Add _items, _width, and _widthGood. Removed _head.
Removed the QListBoxItem and QListBoxText classes.
* kwq/KWQListBox.mm:
(QListBox::QListBox): Create a KWQListBoxScrollView and put an NSTableView
inside it. Also create an NSMutableArray to hold the items.
(QListBox::~QListBox): Disconnect the table view from the delegate before
releasing it. Also release the items array.
(QListBox::count): Return the array count.
(QListBox::clear): Do a reloadData here instead of loadColumnZero.
(QListBox::setSelectionMode): Update for table view.
(QListBox::insertItem): Update for table view.
(QListBox::insertGroupLabel): Just calls insertItem for now.
(QListBox::endBatchInsert): Update for table view.
(QListBox::setSelected): Update for table view, including support for multiple
selection.
(QListBox::isSelected): Update for table view.
(QListBox::sizeForNumberOfLines): Use the table view cell for width, and
cache it so we don't have to measure all the strings over and over again.
(-[KWQListBoxScrollView setFrameSize:]): Resize the table view column whenever
the entire scroll view is resized.
(-[KWQListBoxTableViewDelegate initWithListBox:]): Store box pointer and
pointer to items array.
(-[KWQListBoxTableViewDelegate numberOfRowsInTableView:]): Return count.
(-[KWQListBoxTableViewDelegate tableView:objectValueForTableColumn:row:]):
Get the data from the items array.
(-[KWQListBoxTableViewDelegate tableViewSelectionDidChange:]): Call both the
selection-changed signal and the clicked signal.
* khtml/rendering/render_form.cpp: (RenderSelect::updateFromElement):
Get rid of the one place here that gets at a list box item by calling a KWQ
function insertGroupLabel instead of making a QListBoxText. Also call
beginBatchInsert() before clear() for a slight additional speed boost.
- fixed 3067572 -- javascript: URLs typed into page address field or
bookmarks don't work in empty window
We needed a document for DOM, so we make a dummy one. This works for an empty
window, and also for a window with non-HTML content.
* kwq/KWQKHTMLPart.h: Added createDummyDocument().
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::createDummyDocument): Create an empty
DOM document if there isn't one already.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge stringByEvaluatingJavaScriptFromString:]): Call the new
createDummyDocument() instead of checking and doing nothing if there is no
document present when this is called.
- other stuff
* kwq/WebCoreBridge.mm: (-[WebCoreBridge DOMDocument]): Removed a stray printf.
* kwq/KWQTextArea.mm: Tweaked code a little.
2002-10-28 Darin Adler <darin@apple.com>
* khtml/khtml_part.cpp: (KHTMLPart::checkCompleted):
Update so it handles nil for the view.
2002-10-28 Darin Adler <darin@apple.com>
- fixed 3070484 -- icon rollovers are very slow on Mac OS X website
The problem was simply that the part didn't know it was complete.
To let it know, I hooked up some loader signals, and now it works.
* khtml/khtml_part.cpp:
(KHTMLPart::init): Create the KWQKHTMLPart a little earlier so we have
a chance to initialize the cache before it's used.
(KHTMLPart::slotLoaderRequestStarted): Take this out of ifdefs.
(KHTMLPart::slotLoaderRequestDone): Ditto.
* khtml/misc/loader.h: Add a KWQLoader pointer to the loader.
* khtml/misc/loader.cpp:
(Loader::Loader): Create a KWQLoader;
(Loader::~Loader): Destroy the KWQLoader.
(Loader::load): Take out ifdefs around code that emits requestStarted.
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::KWQKHTMLPart): Call Cache::init().
* kwq/KWQLoader.h: Add a class KWQLoader, with three signals in it.
* kwq/KWQLoader.mm: (KWQLoader::KWQLoader): Initialize the three signals.
* kwq/KWQSignalStubs.mm:
(Loader::requestDone): Emit the signal using KWQLoader.
(Loader::requestFailed): Ditto.
(Loader::requestStarted): Ditto.
* kwq/KWQSlot.h: Add an overload for slots with loader and cached object
parameters so we can handle the new slots.
* kwq/KWQSlot.mm:
(KWQSlot::KWQSlot): Added slotLoaderRequestDone and slotLoaderRequestStarted.
(KWQSlot::call): Added the new overload to handle those two signals.
* kwq/KWQSignal.h: Add an overload for signals with loader and cached object
parameters so we can handle the new signals.
* kwq/KWQSignal.mm: (KWQSignal::call): Ditto.
* kwq/KWQObject.mm: (QObject::connect): Remove the special casing that
prevents complaints about slotLoaderRequestDone and slotLoaderRequestStarted,
since we support those now.
2002-10-28 Darin Adler <darin@apple.com>
- fixed storage leak of items in QListBox
* kwq/KWQListBox.h: Added private deleteItems method.
* kwq/KWQListBox.mm:
(QListBox::~QListBox): Call deleteItems().
(QListBox::deleteItems): Move the code to delete all the items
here from clear(), since clear() is not called on destruction.
(QListBox::clear): Call deleteItems().
2002-10-28 Chris Blumenberg <cblu@apple.com>
Lowercase the text encoding name.
* kwq/KWQCharsets.mm:
(KWQCFStringEncodingFromIANACharsetName):
2002-10-28 Richard Williamson <rjw@apple.com>
Fixed 3086188 - REGRESSION: Justified text is broken
Bogus special case for DirW(hite)S(pace). This
should be correctly detected by CF, but is not.
Revert to explicit checking for ' ' character. This'll
work most of the time. All the more reason to do
our own unicode attribute database.
* kwq/KWQChar.mm:
(QChar::direction):
2002-10-28 Chris Blumenberg <cblu@apple.com>
Fixed: 3056726 - View Source window always displays the source in current system encoding
Fixed: 3019352 - Text encoding is not handled when viewing plain text
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(+[WebCoreBridge stringWithData:textEncoding:]): added, creates a string with data using the WebCore's decoding logic.
(+[WebCoreBridge stringWithData:textEncodingName:]): added, calls stringWithData:textEncoding: after getting the encoding for a text encoding name
2002-10-28 Don Melton <gramps@apple.com>
* khtml/html/htmlparser.cpp:
(KHTMLParser::insertNode):
* khtml/html/htmltokenizer.cpp:
(HTMLTokenizer::write):
Backed our Dave's whitespace hack because it was adding newlines, i.e.
vertical margins, to web pages all over.
2002-10-28 Darin Adler <darin@apple.com>
- fixed 3015800 -- bad URL error - unescaped # in URL
Actually this has to be fixed both here and in NSURLExtras.
* kwq/KWQKURL.mm: Set the "BadChar" flag for "#" so we escape any
"#" characters we see after the first one.
2002-10-27 Darin Adler <darin@apple.com>
- fixed 3058845 -- <input type=file> uses hard-coded width of 200
pixels for filename
* khtml/rendering/render_form.cpp:
(RenderLineEdit::calcMinMaxWidth): Use a default of 20 "x-widths" wide, to
match Mozilla, rather than the 17 that is in KHTML by default.
(RenderFileButton::calcMinMaxWidth): Pass in a character width here, using
the same 20-character rule as above.
* kwq/KWQFileButton.h: Replace sizeHint() with sizeForCharacterWidth(int).
* kwq/KWQFileButton.mm:
(KWQFileButton::sizeForCharacterWidth): Pass character count to the WebCoreFileButton.
(KWQFileButton::baselinePosition): Fix baseline computation. It was computing some huge
negative number before and was obviously broken.
* kwq/KWQLineEdit.mm: (QLineEdit::sizeForCharacterWidth): Add an assertion.
* kwq/WebCoreViewFactory.h: Replace bestVisualFrameSize with
bestVisualFrameSizeForCharacterCount:.
2002-10-27 Don Melton <gramps@apple.com>
* khtml/ecma/kjs_navigator.cpp:
(Navigator::getValueProperty):
Tweaked AppName, Product, and Vendor logic.
2002-10-27 Darin Adler <darin@apple.com>
* kwq/KWQLoader.mm: (KWQServeRequest): Add a missing "delete job" for one
particular failure case.
2002-10-26 Darin Adler <darin@apple.com>
- fixed a bug in the WebCore cache that caused it to not cache very much after
a while, and also caused a crash I saw twice on my machine
Adjust total size of items in the LRU list, when the size of one of the
items that's in the list is changed.
* khtml/misc/loader.h: Added a size parameter (default 0) to the CachedObject
constructor. Added a protected CachedObject::setSize() and made m_size private.
Added Cache::adjustSize() and Cache::checkLRUAndUncacheableListIntegrity().
* khtml/misc/loader.cpp:
(CachedObject::setSize): Added. This is now the only legal way to change
the size of a cached object, and it calls Cache::adjustSize.
(CachedCSSStyleSheet::CachedCSSStyleSheet): Pass the length into the base
class's constructor instead of setting m_size.
(CachedCSSStyleSheet::data): Call setSize() instead of setting m_size.
Also get the size back with size() rather than m_size.
(CachedScript::CachedScript): Pass the length into the base class's
constructor instead of setting m_size.
(CachedScript::data): Call setSize() instead of setting m_size. Also get
the size back with size() rather than m_size.
(CachedImage::CachedImage): Don't set m_size to 0, since the base class's
constructor does that already.
(CachedImage::clear): Use setSize() to set the size to 0 instead of setting
m_size directly.
(CachedImage::data): Use setSize() instead of setting m_size directly.
(Cache::checkLRUAndUncacheableListIntegrity): Useful debugging function.
Left in but ifdef'd out.
(Cache::adjustSize): Added. Changes the "total LRU list size" by the
passed-in delta, but only if the passed-in object is in the LRU list.
* kwq/KWQLineEdit.mm:
* kwq/KWQTextField.h:
* kwq/KWQTextField.mm:
Renamed the Objective C class KWQNSTextField to KWQTextField.
2002-10-26 Darin Adler <darin@apple.com>
- removed forwarding headers that are not actually needed
* ForwardingHeaders/kcmdlineargs.h: Removed.
* ForwardingHeaders/kinstance.h: Removed.
* ForwardingHeaders/kio/kprinter.h: Removed.
* ForwardingHeaders/kio/ktrader.h: Removed.
* ForwardingHeaders/kio/scheduler.h: Removed.
* ForwardingHeaders/kparts/factory.h: Removed.
* ForwardingHeaders/kparts/historyprovider.h: Removed.
* ForwardingHeaders/kstddirs.h: Removed.
* ForwardingHeaders/qarray.h: Removed.
* ForwardingHeaders/qbrush.h: Removed.
* ForwardingHeaders/qbutton.h: Removed.
* ForwardingHeaders/qcollection.h: Removed.
* ForwardingHeaders/qcombobox.h: Removed.
* ForwardingHeaders/qframe.h: Removed.
* ForwardingHeaders/qglobal.h: Removed.
* ForwardingHeaders/qiodevice.h: Removed.
* ForwardingHeaders/qlineedit.h: Removed.
* ForwardingHeaders/qnamespace.h: Removed.
* ForwardingHeaders/qpen.h: Removed.
* ForwardingHeaders/qprinter.h: Removed.
* ForwardingHeaders/qsize.h: Removed.
* ForwardingHeaders/qstack.h: Removed.
2002-10-26 Darin Adler <darin@apple.com>
- fixed a couple of files accidentally checked in with KWQQ names
* ForwardingHeaders/qasyncio.h: Change names.
* ForwardingHeaders/qstylesheet.h: Ditto.
* WebCore.pbproj/project.pbxproj: Ditto.
* kwq/KWQMovie.h: Ditto.
2002-10-26 Darin Adler <darin@apple.com>
- changed to use #if APPLE_CHANGES and #if !APPLE_CHANGES consistently
We no longer do #ifdef APPLE_CHANGES or #ifndef APPLE_CHANGES.
* lots of files
2002-10-26 Darin Adler <darin@apple.com>
- changed naming scheme in KWQ for files like qstring.h
Now use names like KWQString.h and a forwarding header called qstring.h.
* tons of files
2002-10-26 Darin Adler <darin@apple.com>
- fixed 3068404 -- eliminate all user-visible messages from WebCore
* khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Use runJavaScriptPrompt
function instead of the more generic QInputDialog.
* khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::altText): Get
submit alt text for input element from the view factory, rather than using
i18n, since we don't support that.
* khtml/html/htmlparser.cpp: (KHTMLParser::handleIsindex): Ditto, for the
intro that says "This is a searchable index".
* khtml/rendering/render_form.cpp:
(RenderSubmitButton::defaultLabel): Ditto, for "Submit".
(RenderResetButton::defaultLabel): Ditto, for "Reset".
(RenderFileButton::slotClicked): Ifdef'd out this unused code that had i18n text in it.
* khtml/xml/xml_tokenizer.cpp:
(XMLHandler::errorString): Put in an ifdef and a FIXME to avoid i18n.
(XMLHandler::fatalError): Ditto.
(XMLTokenizer::finish): Ditto.
* khtml/misc/decoder.cpp: (Decoder::decode): Ifdef'd the check for the first
language being "ja", since that's not how we're going to trigger Japanese
auto-detect.
* khtml/rendering/render_applet.cpp: (RenderEmptyApplet::RenderEmptyApplet):
Turned off the code that does the empty applet label. I don't think it worked,
and it used i18n. We'll have to tackle this eventually.
* kwq/KWQKHTMLPartImpl.h: Added runJavaScriptPrompt.
* kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::runJavaScriptPrompt): Moved the code
here that used to be in KWQInputDialog.
* kwq/kdecore/klocale.h: Remove i18n() and KLocale::languageList(), added the functions
that are listed below.
* kwq/KWQKLocale.mm:
(inputElementAltText): Added specific function for getting one of the very few
translated strings that we need in WebCore.
(resetButtonDefaultLabel): Ditto.
(searchableIndexIntroduction): Ditto.
(submitButtonDefaultLabel): Ditto.
(KLocale::language): Use the view factory to ask for the language code, since there's no
public API to get it that WebCore can use.
* kwq/WebCoreViewFactory.h: Add new API for above.
* ForwardingHeaders/qinputdialog.h: Added empty file.
* kwq/qt/qinputdialog.h: Removed.
* kwq/KWQInputDialog.mm: Removed.
* WebCore.pbproj/project.pbxproj: Removed QInputDialog files.
2002-10-25 Darin Adler <darin@apple.com>
Remove some user-visible strings. We can't have any strings that need
localization in WebCore, given our translation strategy.
* khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::encoding):
Put APPLE_CHANGES around some i18n dialog code.
* khtml/khtml_part.cpp: (KHTMLPart::submitForm): Ditto.
* khtml/rendering/render_frames.cpp:
(RenderPartObject::slotPartLoadingErrorNotify): Ditto.
* khtml/ecma/kjs_window.cpp:
(Window::get): Ditto.
(Window::scheduleClose): Ditto.
(WindowFunc::tryCall): Put APPLE_CHANGES in to use JavaScript-specific methods
in the part of calling the generic ones from KMessageBox.
* ForwardingHeaders/kmessagebox.h: Added (empty file).
* kwq/KWQKHTMLPartImpl.h: Added new runJavaScript functions.
* kwq/KWQKHTMLPartImpl.mm:
(KWQKHTMLPartImpl::runJavaScriptAlert): Added.
(KWQKHTMLPartImpl::runJavaScriptConfirm): Added.
* kwq/WebCoreViewFactory.h: Added runJavaScriptAlertPanelWithMessage and
runJavaScriptConfirmPanelWithMessage.
* kwq/kdeui/kmessagebox.h: Removed.
* kwq/KWQKMessageBox.mm: Removed.
* WebCore.pbproj/project.pbxproj: Removed the KMessageBox files.
2002-10-25 Richard Williamson <rjw@apple.com>
Removed debug logging.
* khtml/rendering/font.cpp:
(Font::drawText):
2002-10-25 Richard Williamson <rjw@apple.com>
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:
2002-10-25 Chris Blumenberg <cblu@apple.com>
Cleaned up the frame searching shenanigans. Things are much cleaner and clearer now.
* kwq/KWQKHTMLPartBrowserExtension.mm:
(KHTMLPartBrowserExtension::createNewWindow): call findFrameNamed
* kwq/KWQKHTMLPartImpl.mm:
(KWQKHTMLPartImpl::bridgeForFrameName): call findOrCreateFramedNamed
* kwq/WebCoreBridge.h:
2002-10-25 Maciej Stachowiak <mjs@apple.com>
- fixed 3065638 - "undefined" output to screen on empty document.write()
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLDocFunction::tryCall): Don;t assume there is at least
one argument.
2002-10-25 Maciej Stachowiak <mjs@apple.com>
- fixed 3048031 - innerHTML is incorrectly null
* kwq/KWQString.mm:
(QString::isNull): Check for NULL by comparing to
shared_null_handle instead of checking for 0 length, so
garden-variety empty strings don't show as NULL.
(QString::QString): Make sure that string created with a NULL char
* uses the shared null handle, so it's properly NULL.
2002-10-24 Richard Williamson <rjw@apple.com>
Updated to reflect new calling parameter semantic of floatCharacterWidths(),
which now returns the entire array of widths up the last character requested.
* khtml/rendering/render_text.cpp:
(TextSlave::checkSelectionPoint):
2002-10-24 David Hyatt <hyatt@apple.com>
<pre>, <xmp> and <plaintext> should all have a top margin of 1em.
Fixes a bunch of sites that use <pre>.
* khtml/css/html4.css:
2002-10-24 Chris Blumenberg <cblu@apple.com>
Removed didAddSubview calls because that can easily be done in WebKit. Duh!
* khtml/rendering/render_frames.cpp:
(RenderPart::setWidget):
* kwq/KWQKHTMLPartImpl.h:
* kwq/KWQKHTMLPartImpl.mm:
* kwq/KWQKJavaAppletWidget.mm:
(KJavaAppletWidget::showApplet):
* kwq/WebCoreBridge.h:
2002-10-24 Darin Adler <darin@apple.com>
A step in the direction of making KWQ headers much nicer.
Move all empty headers out of kwq, and into ForwardingHeaders.
* ForwardingHeaders/kcmdlineargs.h: Added.
* ForwardingHeaders/kdatastream.h: Added.
* ForwardingHeaders/khtml_iface.h: Added.
* ForwardingHeaders/khtml_printsettings.h: Added.
* ForwardingHeaders/khtml_run.h: Added.
* ForwardingHeaders/kio/kprinter.h: Added.
* ForwardingHeaders/kio/kprotocolmanager.h:
* ForwardingHeaders/kio/ktrader.h: Added.
* ForwardingHeaders/kio/scheduler.h: Added.
* ForwardingHeaders/kmultipledrag.h: Added.
* ForwardingHeaders/kprinter.h: Added.
* ForwardingHeaders/kprotocolmanager.h: Added.
* ForwardingHeaders/ksslcertchain.h: Added.
* ForwardingHeaders/ksslinfodlg.h: Added.
* ForwardingHeaders/kstdaction.h: Added.
* ForwardingHeaders/ktempfile.h: Added.
* ForwardingHeaders/ktrader.h: Added.
* ForwardingHeaders/kurldrag.h: Added.
* ForwardingHeaders/kxmlguifactory.h: Added.
* ForwardingHeaders/qasyncimageio.h: Added.
* ForwardingHeaders/qbitmap.h: Added.
* ForwardingHeaders/qclipboard.h: Added.
* ForwardingHeaders/qfontdatabase.h: Added.
* ForwardingHeaders/qglobal.h: Added.
* ForwardingHeaders/qhbox.h: Added.
* ForwardingHeaders/qintcache.h: Added.
* ForwardingHeaders/qintdict.h: Added.
* ForwardingHeaders/qmetaobject.h: Added.
* ForwardingHeaders/qobjectlist.h: Added.
* ForwardingHeaders/scheduler.h: Added.
* kwq/dcop/kdatastream.h: Removed.
* kwq/kdecore/kcmdlineargs.h: Removed.
* kwq/kdecore/kmultipledrag.h: Removed.
* kwq/kdecore/ktempfile.h: Removed.
* kwq/kdecore/kurldrag.h: Removed.
* kwq/kdeui/kstdaction.h: Removed.
* kwq/kdeui/kxmlguifactory.h: Removed.
* kwq/khtml/khtml_iface.h: Removed.
* kwq/khtml/khtml_printsettings.h: Removed.
* kwq/khtml/khtml_run.h: Removed.
* kwq/kio/kprinter.h: Removed.
* kwq/kio/kprotocolmanager.h: Removed.
* kwq/kio/kssl/ksslcertchain.h: Removed.
* kwq/kio/kssl/ksslinfodlg.h: Removed.
* kwq/kio/ktrader.h: Removed.
* kwq/kio/scheduler.h: Removed.
* kwq/qt/qasyncimageio.h: Removed.
* kwq/qt/qbitmap.h: Removed.
* kwq/qt/qclipboard.h: Removed.
* kwq/qt/qfontdatabase.h: Removed.
* kwq/qt/qglobal.h: Removed.
* kwq/qt/qhbox.h: Removed.
* kwq/qt/qintcache.h: Removed.
* kwq/qt/qintdict.h: Removed.
* kwq/qt/qmetaobject.h: Removed.
* kwq/qt/qobjectlist.h: Removed.
* WebCore.pbproj/project.pbxproj: Removed all the above headers from
the project.
2002-10-24 Darin Adler <darin@apple.com>
* ForwardingHeaders/private/qucomextra_p.h: Emptied this out.
* kwq/qt/private/qucomextra_p.h: Removed.
2002-10-24 David Hyatt <hyatt@apple.com>
Make sure that KHTML's initial layout happens after KHTML
fires the onload. This means that in the case where we
beat the timer, we will now fire the onload before both
the initial layout and the initial paint.
* khtml/html/html_documentimpl.cpp:
(HTMLDocumentImpl::close):
=== Alexander-29 ===
2002-10-24 Chris Blumenberg <cblu@apple.com>
Use "MIMEType" instead of "serviceType".
* kwq/KWQKHTMLPartImpl.mm:
(KWQKHTMLPartImpl::createPart):
* kwq/WebCoreBridge.h:
2002-10-24 Darin Adler <darin@apple.com>
* kwq/KWQKLocale.mm: (i18n): Make it obvious when non-localized
strings from WebCore show up in the UI, but putting the string
"not localized: " in front.
* kwq/KWQKMessageBox.mm:
(KMessageBox::error): Fix use of NSRunAlertPanel so that we won't
accidentally try to interpret % sequences in the messages we are displaying.
(KMessageBox::warningYesNo): Ditto.
(KMessageBox::questionYesNo): Ditto.
(KMessageBox::sorry): Ditto.
(KMessageBox::information): Ditto.
2002-10-23 Chris Blumenberg <cblu@apple.com>
WebKit now gets called when render_frame subviews are added.
* khtml/rendering/render_frames.cpp:
(RenderPart::setWidget): call didAddWidget on the part
* kwq/KWQKHTMLPartImpl.h:
* kwq/KWQKHTMLPartImpl.mm:
(KWQKHTMLPartImpl::didAddWidget): added, calls didAddSubview on the bridge
2002-10-23 Chris Blumenberg <cblu@apple.com>
Change for plug-in package API changes.
* kwq/KWQKConfigBase.mm:
(KConfig::readEntry):
* kwq/WebCoreBridge.h: added didAddSubview, called when a render_frame's view is added as a subview of the main view.
* kwq/WebCoreViewFactory.h: added didAddSubview
2002-10-23 Darin Adler <darin@apple.com>
- finished up the job of moving the file button to WebKit
I did this mainly for localization reasons.
* kwq/KWQFileButton.h: Remove filename(), add filenameChanged(),
make KWQFileButton be a QWidget subclass, not a QPushButton one.
Remove clicked() and paint() virtual functions, _filename, _icon,
and _label data members.
* kwq/KWQFileButton.mm:
(KWQFileButton::KWQFileButton): Just make a WebCoreFileButton.
(KWQFileButton::~KWQFileButton): Less to do here now.
(KWQFileButton::setFilename): Call the button to do the work.
(KWQFileButton::sizeHint): Ditto.
(KWQFileButton::frameGeometry): Ditto.
(KWQFileButton::setFrameGeometry): Ditto.
(KWQFileButton::baselinePosition): Ditto.
(KWQFileButton::filenameChanged): Added. Sends message.
(-[KWQFileButtonAdapter initWithKWQFileButton:]): Observe the "filename
changed notification".
(-[KWQFileButtonAdapter dealloc]): Stop observing.
(-[KWQFileButtonAdapter filenameChanged:]): Send a signal when the notification
comes in, so KHTML finds out.
* kwq/KWQSlot.mm:
(KWQSlot::KWQSlot): Remove handling for RenderFileButton slotReturnPressed.
(KWQSlot::call): Ditto.
* kwq/WebCoreViewFactory.h: Remove bestSize. Add setVisualFrame, visualFrame, and
bestVisualFrameSize.
* kwq/KWQInputDialog.mm: Tweaked includes. Long-term we want to use "", not <>.
* kwq/KWQKConfigBase.mm: Ditto.
* kwq/KWQKHTMLPartImpl.mm: Ditto.
2002-10-23 Chris Blumenberg <cblu@apple.com>
Call the arguments for plug-ins "attributes" everywhere.
* kwq/KWQKHTMLPartImpl.mm:
(KWQKHTMLPartImpl::createPart):
* kwq/KWQKJavaAppletWidget.mm:
(KJavaAppletWidget::showApplet):
* kwq/WebCoreBridge.h:
2002-10-23 Chris Blumenberg <cblu@apple.com>
For the new plug-in API, we need to pass a WebPluginContainer to the plug-in view upon creation. The is owned by the WebFrame. To make this all work, I had to move the WebCore plug-in and java view constructors to WebBridge from WebViewFactory since WebBridge has the frame.
* khtml/khtml_part.cpp:
(KHTMLPart::createJavaContext): New APPLE_CHANGES around the java context constructor so we pass the part.
* kwq/KWQKHTMLPartImpl.mm:
(KWQKHTMLPartImpl::createPart): call the bridge to create the view
* kwq/KWQKJavaAppletWidget.mm:
(KJavaAppletWidget::KJavaAppletWidget): save the context
(KJavaAppletWidget::showApplet): call the bridge to create the view
* kwq/WebCoreBridge.h:
* kwq/WebCoreViewFactory.h:
* kwq/khtml/java/kjavaappletcontext.h: made constructor take the part
* kwq/khtml/java/kjavaappletwidget.h: ivar for the context
2002-10-23 Darin Adler <darin@apple.com>
- fixed 3080478 -- reproducible incomplete load on apple.com
* kwq/KWQLoaderImpl.mm:
(-[WebCoreResourceLoader receivedResponse:]): Add an assert.
(-[WebCoreResourceLoader cancel]): Don't finish here, just disconnect the handle
from the job, and disconnect the job from the WebCoreResourceLoader, and let the
KHTML code finish the cleanup later. This is the bug fix.
(KWQCheckCacheObjectStatus): Add an assertion.
* kwq/KWQKjobclasses.mm:
(TransferJob::~TransferJob): Don't call kill(); do the work here instead.
(TransferJob::kill): Self-destruct. Need this to avoid a storage leak.
* khtml/misc/loader.cpp:
(CachedObject::~CachedObject): Put some Apple-specific code inside APPLE_CHANGES.
(CachedObject::setResponse): Streamlined this function.
(Loader::receivedResponse): Added assertions.
* kwq/qt/qxml.h: Add more stubs.
* kwq/KWQxml.mm: Ditto.
* kwq/WebCoreViewFactory.h: Add [WebCoreViewFactory fileButton], the
WebCoreFileButton protocol, and WebCoreFileButtonFilenameChanged.
* kwq/WebCoreViewFactory.m: Add WebCoreFileButtonFilenameChanged.
* WebCore.exp: Export _WebCoreFileButtonFilenameChanged.
2002-10-22 Maciej Stachowiak <mjs@apple.com>
Forgot to check this in earlier:
- fixed 3077084 - debugging output when suppressing or allowing
pop-ups
* khtml/ecma/kjs_window.cpp:
(WindowFunc::tryCall):
* kwq/KWQLogging.h:
* kwq/KWQLogging.m:
2002-10-22 David Hyatt <hyatt@apple.com>
Get XML files closer. An XML doc is at least made. No
parsing works yet though.
* kwq/KWQKHTMLPartImpl.mm:
(KWQKHTMLPartImpl::setPolicyBaseURL):
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge setContentType:]):
2002-10-22 Chris Blumenberg <cblu@apple.com>
Fixed: 3023814 - contexual menus and dragging doesn't work for some images
Added a innerNonSharedNode to NodeInfo that points to the node which is not shared by another node. In this case, the innerNonSharedNode is the image node not the area node.
* khtml/rendering/render_frames.cpp:
(RenderFrameSet::nodeAtPoint): call setInnerNonSharedNode
* khtml/rendering/render_image.cpp:
(RenderImage::nodeAtPoint): call setInnerNonSharedNode
* khtml/rendering/render_object.cpp:
(RenderObject::nodeAtPoint): call setInnerNonSharedNode
* khtml/rendering/render_object.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge elementAtPoint:]): use the innerNonSharedNode
2002-10-22 David Hyatt <hyatt@apple.com>
Fix slashdot. Make sure the KONQBLOCK hack just throws away
margins at the tops and bottoms of kids.
* khtml/css/html4.css:
* khtml/rendering/render_flow.cpp:
(RenderFlow::layoutBlockChildren):
2002-10-22 David Hyatt <hyatt@apple.com>
Fix for left-hand-side of wired.com. A disturbingly basic
bug. I was applying a parent's margins to its children
when collapsing, even if the parent had a border/padding set
that should have separated it from its kids.
* khtml/rendering/render_flow.cpp:
(RenderFlow::layoutBlockChildren):
2002-10-22 David Hyatt <hyatt@apple.com>
Optimize my inline margin discarding to be smart about the
case when the inline has a block and its beginning or
end. Fixes aintitcool.com.
* khtml/rendering/render_flow.cpp:
(RenderFlow::layoutBlockChildren):
2002-10-22 David Hyatt <hyatt@apple.com>
Removing konq's flow-around-floats hack for <blockquote> and
<dl>. These objects are allowed to flow under floats. Fixes
www.webreference.com's front page.
Also fixing a bug in my <td> margin collapsing quirk that
prevented lists (ol,ul,dl,menu,dir) from collapsing their
top margins into the td.
* khtml/css/html4.css:
* khtml/rendering/render_flow.cpp:
(RenderFlow::layoutBlockChildren):
(RenderFlow::addChild):
2002-10-22 David Hyatt <hyatt@apple.com>
Fix a typo in my change to the h1 rule.
* khtml/css/html4.css:
2002-10-22 David Hyatt <hyatt@apple.com>
Ok, this patch does a lot of stuff. It contains a complete
rewrite of the WinIE quirk for handling collapsing margins
at the tops and bottoms of table cells. We match WinIE's
behavior for all HTML4 block-level elements.
This patch also applies a bottom margin to <form> elements,
which is what was causing the missing space on livepage.apple.com
underneath the textfield on the right. WinIE and Gecko both
put a bottom margin on all forms.
This patch also updates the collapsing margin code to detect
inlines that have been morphed into blocks by KHTML (this is
so wrong, don't even get me started, you can't treat an inline
as a block, this code is lame, etc. etc.) and to properly ignore
their margins completely. Fixing the code to not morph inlines
is another architectural problem that will have to be dealt
with (sigh).
* khtml/css/css_valueimpl.h:
* khtml/css/cssparser.cpp:
(StyleBaseImpl::parseValue):
(StyleBaseImpl::parseUnit):
* khtml/css/cssparser.h:
* khtml/css/cssstyleselector.cpp:
* khtml/css/html4.css:
* khtml/misc/khtmllayout.h:
* khtml/rendering/render_flow.cpp:
(RenderFlow::RenderFlow):
(RenderFlow::layout):
(RenderFlow::layoutBlockChildren):
(RenderFlow::addChild):
* khtml/rendering/render_flow.h:
* khtml/rendering/render_object.h:
2002-10-21 Darin Adler <darin@apple.com>
* kwq/KWQInputDialog.mm: (QInputDialog::getText): Call the view factory to do the
heavy lifting.
* kwq/WebCoreViewFactory.h: Add runJavaScriptTextInputPanelWithPrompt:defaultText:returningText:.
Use a protocol for the subclass responsibility.
* kwq/WebCoreViewFactory.m: Remove stub methods not needed because of the subclass responsibility
technique we are using.
* kwq/qt/qstylesheet.h: Made this inline, since it does nothing.
* kwq/KWQStyleSheet.mm: Removed.
* WebCore.pbproj/project.pbxproj: Removed KWQStyleSheet.mm.
2002-10-21 David Hyatt <hyatt@apple.com>
Implement support for a new @-rule called @konq-quirks. This
will allow us to put style rules into html4.css that only
apply for pages in quirks mode.
* khtml/css/css_ruleimpl.cpp:
(CSSQuirksRuleImpl::CSSQuirksRuleImpl):
(CSSQuirksRuleImpl::~CSSQuirksRuleImpl):
(CSSQuirksRuleImpl::cssRules):
(CSSQuirksRuleImpl::appendRule):
(CSSQuirksRuleImpl::insertRule):
(CSSQuirksRuleImpl::deleteRule):
* khtml/css/css_ruleimpl.h:
* khtml/css/cssparser.cpp:
(StyleBaseImpl::parseAtRule):
* khtml/css/cssparser.h:
* khtml/css/cssstyleselector.cpp:
* khtml/css/cssstyleselector.h:
* khtml/dom/css_rule.h:
2002-10-21 Darin Adler <darin@apple.com>
Remove closeEntireTree now that deferred close takes care of that case.
* khtml/html/htmlparser.cpp: (KHTMLParser::startBody):
* khtml/rendering/render_object.h:
2002-10-21 Darin Adler <darin@apple.com>
- fixed 3075041 -- text larger/smaller increment too large when font-size specified as %
* khtml/css/cssstyleselector.cpp: Don't apply the zoom factor to a font size that
already has the zoom factor applied.
2002-10-21 Darin Adler <darin@apple.com>
* khtml/khtmlview.cpp: (KHTMLView::clear): Default to fast scrolling.
I'm pretty sure this was just backwards here.
2002-10-21 David Hyatt <hyatt@apple.com>
DLs are supposed to have margins.
* khtml/css/html4.css:
2002-10-21 David Hyatt <hyatt@apple.com>
Fix for margin problems on aintitcool.com. There was a subtlety
to WinIE's quirk. For <h1>-<h6> only, they don't collapse the
bottom margin for table cells (they still collapse the top
margin). I just love emulating the odd behavior of WinIE.
Wheee.
* khtml/rendering/render_flow.cpp:
(RenderFlow::layoutBlockChildren):
2002-10-20 Darin Adler <darin@apple.com>
Redid my fix. It was just an ordering thing. The image had to already be
installed as the current image before calling ref(), because in the cached
case, you get the loading complete callback right then.
* khtml/rendering/render_image.cpp: (RenderImage::updateFromElement):
Call deref on the old image later. Basically, instead of moving the ref
of the new image up, I moved the deref of the old image down.
2002-10-20 Darin Adler <darin@apple.com>
Roll out my render_image.cpp change. It was causing a big problem
getting images from the cache. I need to study further to figure out why.
* khtml/rendering/render_image.cpp: (RenderImage::updateFromElement):
Roll back the change.
2002-10-20 David Hyatt <hyatt@apple.com>
Rewrite the clearing code for floats. Rewrote the
collapsing margin code to really work with floating and
clearing. This fixes the right hand side of wired.com.
* khtml/rendering/render_flow.cpp:
(RenderFlow::layoutBlockChildren):
(RenderFlow::checkClear):
(RenderFlow::addChild):
2002-10-20 Darin Adler <darin@apple.com>
- fixed 3007961 -- Crash in DOM::HTMLImageElementImpl::parseAttribute
* khtml/rendering/render_image.cpp: (RenderImage::updateFromElement):
Be sure to call ref on the new image before calling deref on the old
image. That's because deref on the old image causes a cache flush,
which might cause the image to go away in certain cases.
2002-10-20 Chris Blumenberg <cblu@apple.com>
Fixed possible build failure.
* kwq/KWQDOMNode.cpp:
(isImage): remove unused variable.
2002-10-20 Chris Blumenberg <cblu@apple.com>
Partial fix for:
3023814 - contexual menus and dragging doesn't work for some images
The image map case is still broken because I need to find a way to get the RenderImage for an AREA node. Anyone know how?
* kwq/KWQDOMNode.cpp:
(isImage): Also return true if the node is an INPUT tag with TYPE set to "image"
2002-10-20 Darin Adler <darin@apple.com>
- fixed 3076390 -- crash in DOM::DocumentImpl::setParsing loading thread detail page
at groups.apple.com
* khtml/khtml_part.cpp: (KHTMLPart::openURL): Don't do any redirect special case
if the document is nil. Just do a normal load in that case.
2002-10-20 Darin Adler <darin@apple.com>
- fixed 3079864 -- REGRESSION: assertion failure on any page with a form element
* khtml/html/html_formimpl.cpp: (HTMLGenericFormElementImpl::attach):
Roll back the parent call to use NodeBaseImpl::attach. Not sure why I changed that
at the last minute before my last checkin, but it was *bad*.
- fixed a crash I observed when clicking on an about:blank page
* kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]): Check for nil renderer.
2002-10-19 Darin Adler <darin@apple.com>
- fixed 3075032 -- textarea contents sometimes aren't shown
The root of the problem is that we weren't delivering close calls to
the render objects in the case where we created them late due to our FOUC
fix. I taught the DOM implementation to remember that a close call is
due, and deliver it when the render object is created. We can probably
replace the closeEntireTree hack with this too. I'll talk to Dave about
that on Monday.
* khtml/xml/dom_nodeimpl.h: Add m_rendererNeedsClose and closeRenderer.
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::NodeImpl): Initialize m_rendererNeedsClose to false.
(NodeImpl::closeRenderer): Call close on the renderer if it's created, otherwise
set m_rendererNeedsClose.
(NodeImpl::attach): If the renderer is created and m_rendererNeedsClose is true
call close on the renderer and set it to false.
* khtml/html/html_formimpl.cpp: (HTMLGenericFormElementImpl::attach):
Rearrange this so that the base class attach is called before updateFromElement
is called. This allows the base attach to do a close for us before we update.
* khtml/html/htmlparser.cpp:
(KHTMLParser::insertNode): Call closeRenderer on the DOM node rather than
calling close on the render node.
(KHTMLParser::popOneBlock): Ditto.
* khtml/xml/xml_tokenizer.cpp:
(XMLHandler::endElement): Ditto.
(XMLTokenizer::finish): Ditto.
2002-10-19 David Hyatt <hyatt@apple.com>
A couple of whitespace fixes. What's really odd about these
fixes is that they *work* but only if you load the page by
hitting "Back". I suspect that I've now fixed the bugs on
KHTML's end, and we have some sort of whitepsace dropping
problem on our end.
* khtml/html/htmlparser.cpp:
(KHTMLParser::insertNode):
* khtml/html/htmltokenizer.cpp:
(HTMLTokenizer::write):
2002-10-18 Richard Williamson <rjw@apple.com>
Fixed khtml to ignore <title> tags after the first tag.
Fixed setting document.title from JavaScript.
* khtml/dom/html_document.cpp:
(HTMLDocument::setTitle):
* khtml/html/html_headimpl.cpp:
(HTMLTitleElementImpl::insertedIntoDocument):
(HTMLTitleElementImpl::childrenChanged):
2002-10-18 Darin Adler <darin@apple.com>
- fixed 3078293 -- Implement evaluateJavaScript on WebController
* kwq/KWQVariant.mm: (QVariant::asString): Made this return reasonable
values for types other than string. Still may be loose ends left, but
this takes care of most of it.
2002-10-18 Darin Adler <darin@apple.com>
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge stringByEvaluatingJavaScriptFromString:]):
Changed to return a string and changed name.
2002-10-18 David Hyatt <hyatt@apple.com>
The collapsing margin rewrite. Also fixes a bug where
we stay in quirks mode for strict HTML4 dtds when we
shouldn't.
* khtml/html/html_documentimpl.cpp:
(HTMLDocumentImpl::determineParseMode):
* khtml/rendering/render_flow.cpp:
(RenderFlow::layout):
(RenderFlow::layoutBlockChildren):
* khtml/rendering/render_flow.h:
* khtml/rendering/render_object.h:
2002-10-18 Darin Adler <darin@apple.com>
* Makefile.am: Move dependency so clean happens before build.
2002-10-17 Richard Williamson <rjw@apple.com>
Support for drawing frame borders and frame resizing. (fixes 2982466).
* khtml/rendering/render_frames.cpp:
(RenderFrameSet::userResize):
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge frameBorderStyle]):
* kwq/qt/qframe.h:
2002-10-17 Darin Adler <darin@apple.com>
- fixed 2807340 -- Alex is case sensitive for anchors, but
should not be in quirks mode (other browsers aren't)
* khtml/dom/html_misc.cpp: Touched this file to prevent us from requiring a
full build. Damned header dependencies still don't work right.
* khtml/html/html_miscimpl.h: Add caseSensitive parameters.
* khtml/html/html_miscimpl.cpp:
(HTMLCollectionImpl::getNamedItem): Add caseSensitive parameter, and compare
by converting both to lower case if it's false and pass it on when recursing.
(HTMLCollectionImpl::namedItem): Pass along a caseSensitive parameter.
(HTMLFormCollectionImpl::getNamedItem): Pass along a caseSensitive parameter.
(HTMLFormCollectionImpl::getNamedFormItem): Pass along, and handle, it.
(HTMLFormCollectionImpl::getNamedImgItem): Ditto.
(HTMLFormCollectionImpl::nextNamedItemInternal): Pass true for caseSensitive.
* khtml/khtml_part.cpp: (KHTMLPart::gotoAnchor):
Pass false for the new caseSensitive parameter to namedItem when the document
mode is not strict.
* kwq/KWQListBox.mm: (QListBox::sizeForNumberOfLines): Removed a stray NSLog
that I left in by accident.
2002-10-17 Darin Adler <darin@apple.com>
- fixed 3052547 -- <select> doesn't size properly (size > 1)
* khtml/rendering/render_form.cpp:
(RenderLineEdit::slotReturnPressed): #if !APPLE_CHANGES around some unused
code in here.
(RenderSelect::updateFromElement): Fix bug where it was using Multi here, but
Extended elsewhere for the selection mode.
(RenderSelect::layout): Change code so that QListBox handles the sizing.
* kwq/KWQListBox.h: Removed a lot of unused stuff, made other things use inlines.
* kwq/KWQListBox.mm: Rewrote most of the file contents. Made a new
QListBox::sizeForNumberOfLines method. We will have to port this to NSTableView
rather than NSBrowser.
2002-10-17 Darin Adler <darin@apple.com>
- fixed 3078245 -- REGRESSION: lightgrey displays as black, used
to display as white, should display light gray
* kwq/KWQColor.mm: (getNamedColors): For every color with the name
"gray" in it, also include the version spelled "grey" as other
browsers seem to.
2002-10-17 David Hyatt <hyatt@apple.com>
Make navigator.product dynamic based off user agent (i.e.,
make it participate in spoofing too).
* khtml/ecma/kjs_navigator.cpp:
(Navigator::getValueProperty):
=== Alexander-28 ===
2002-10-17 Darin Adler <darin@apple.com>
- fixed 3077856 -- REGRESSION: scroll to fragment doesn't work
(except when Alex started from command line)
* kwq/kparts/browserextension.h: Initialize reload to false. It was
uninitialized, and when true was preventing anchor navigation from working.
2002-10-17 Darin Adler <darin@apple.com>
- fixed 3075992 -- Hang in khtml::RenderFlow::lowestPosition() trying to
render http://avoyagetoarcturus.blogspot.com/
* khtml/rendering/render_flow.cpp:
(RenderFlow::lowestPosition): Don't recurse on the same child twice.
(RenderFlow::rightmostPosition): Ditto.
2002-10-17 David Hyatt <hyatt@apple.com>
Fix bayarea.com. My implementation of offsetParent was
flawed. And to think I was blaming Gecko... ;)
* khtml/rendering/render_object.cpp:
(RenderObject::offsetParent):
2002-10-16 Darin Adler <darin@apple.com>
- fixed 3061103 -- Line-breaks lost when submitting after pasting text from
MSIE into Alexander textarea
* kwq/KWQLineEdit.mm: (QLineEdit::text):
* kwq/KWQTextEdit.mm: (QTextEdit::text):
Turn \r\n sequences and standalone \r characters into \n characters on the way
out of AppKit land and into KHTML land. I didn't try to make this efficient
for the common case because these are not time-critical functions.
2002-10-16 Richard Williamson <rjw@apple.com>
Fixed a few regressions in drawing of frame resize handle
in preparation for drawing frame borders and completing
2982466.
* khtml/rendering/render_frames.cpp:
(RenderFrameSet::userResize):
* kwq/KWQPainter.mm:
(QPainter::drawRect):
* kwq/qt/qscrollview.h:
* kwq/KWQScrollView.mm:
(QScrollView::updateContents):
* kwq/KWQWidget.mm:
(QWidget::enableFlushDrawing):
Use static_cast everywhere DOM::NodeImpl is cast to
subclass.
* kwq/WebCoreDOMNode.mm:
(-[WebCoreDOMNode DOM::]):
(-[WebCoreDOMNodeList DOM::]):
(-[WebCoreDOMNamedNodeMap DOM::]):