blob: 02dfacc6c41d9d66b39cfcedb6fd74dedc61d767 [file] [log] [blame]
2006-08-24 David Harrison <harrison@apple.com>
Reinstate r15966 because layout test changes are correct.
<rdar://problem/4522205> Represent controls in AXAttributedStringForTextMarkerRange
* editing/TextIterator.cpp:
(WebCore::TextIterator::advance):
2006-08-24 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by ap.
http://bugzilla.opendarwin.org/show_bug.cgi?id=10467
WebKit should have Qt platform support (Part II)
Adapt the KCanvas Qt device to Rob's KCanvasMatrix removal.
Use AffineTransform everywhere instead.
* kcanvas/device/qt/KRenderingDeviceQt.cpp:
(WebCore::KRenderingDeviceContextQt::KRenderingDeviceContextQt):
(WebCore::KRenderingDeviceContextQt::concatCTM):
(WebCore::KRenderingDeviceContextQt::ctm):
* kcanvas/device/qt/KRenderingDeviceQt.h:
* kcanvas/device/qt/KRenderingPaintServerGradientQt.cpp:
(WebCore::KRenderingPaintServerLinearGradientQt::setup):
(WebCore::KRenderingPaintServerRadialGradientQt::setup):
2006-08-24 Rob Buis <buis@kde.org>
Reviewed by Darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=10524
svg transform: comma delimiting breaks display
Properly parse transforms which use ',' as seperators.
* ksvg2/svg/SVGTransformable.cpp:
(SVGTransformable::parseTransformAttribute):
2006-08-23 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- added an assert to make it slightly easier to debug the common case of
calling document() on a node of 0
* dom/Node.h: (WebCore::Node::document): ASSERT(this).
2006-08-23 David Hyatt <hyatt@apple.com>
Refactor Cairo and CoreGraphics to use platform ifdefs. This patch
separates the graphics engines from their respective platforms and replaces
#ifdef PLATFORM(MAC) and PLATFORM(WIN) with PLATFORM(CG) and PLATFORM(CAIRO).
Reviewed by darin
* WebCore.xcodeproj/project.pbxproj:
* platform/AffineTransform.h:
* platform/Color.h:
* platform/Cursor.h:
* platform/FloatPoint.h:
* platform/FloatRect.h:
* platform/FloatSize.h:
* platform/Font.h:
* platform/FontData.h:
* platform/GlyphBuffer.h:
(WebCore::GlyphBuffer::glyphAt):
(WebCore::GlyphBuffer::advanceAt):
(WebCore::GlyphBuffer::add):
* platform/GraphicsContext.h:
* platform/Image.h:
* platform/ImageSource.h:
* platform/IntPoint.h:
* platform/IntRect.h:
* platform/IntSize.h:
* platform/ResourceLoader.h:
* platform/ResourceLoaderClient.h:
* platform/Widget.h:
* platform/cairo/GraphicsContextCairo.cpp:
* platform/cairo/ImageCairo.cpp:
* platform/cairo/ImageSourceCairo.cpp:
* platform/cg/AffineTransformCG.cpp:
* platform/cg/FloatPointCG.cpp: Added.
* platform/cg/FloatRectCG.cpp: Added.
* platform/cg/FloatSizeCG.cpp: Added.
* platform/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::GraphicsContext):
(WebCore::GraphicsContext::~GraphicsContext):
(WebCore::GraphicsContext::setFocusRingClip):
(WebCore::GraphicsContext::clearFocusRingClip):
(WebCore::GraphicsContext::platformContext):
(WebCore::GraphicsContext::drawRect):
(WebCore::GraphicsContext::drawLine):
* platform/cg/GraphicsContextPlatformPrivate.h: Added.
(WebCore::GraphicsContextPlatformPrivate:::m_cgContext):
(WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
* platform/cg/ImageCG.cpp: Added.
(WebCore::Image::drawTiled):
* platform/cg/ImageSourceCG.cpp: Added.
* platform/cg/IntPointCG.cpp: Added.
* platform/cg/IntRectCG.cpp: Added.
* platform/cg/IntSizeCG.cpp: Added.
* platform/cg/PDFDocumentImage.cpp: Added.
(WebCore::PDFDocumentImage::adjustCTM):
* platform/cg/PDFDocumentImage.h: Added.
* platform/cg/PathCG.cpp:
* platform/image-decoders/bmp/BMPImageDecoder.cpp:
* platform/image-decoders/gif/GIFImageDecoder.cpp:
* platform/image-decoders/gif/GIFImageReader.cpp:
* platform/image-decoders/ico/ICOImageDecoder.cpp:
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
* platform/image-decoders/png/PNGImageDecoder.cpp:
* platform/image-decoders/xbm/XBMImageDecoder.cpp:
* platform/mac/FloatPointMac.mm:
* platform/mac/FloatRectMac.mm:
* platform/mac/FloatSizeMac.mm:
* platform/mac/GraphicsContextMac.mm:
* platform/mac/ImageMac.mm:
* platform/mac/ImageSourceMac.cpp: Removed.
* platform/mac/IntPointMac.mm:
* platform/mac/IntRectMac.mm:
* platform/mac/IntSizeMac.mm:
* platform/mac/PDFDocumentImage.h: Removed.
* platform/mac/PDFDocumentImage.mm: Removed.
2006-08-23 David Hyatt <hyatt@apple.com>
Remove the ifdef for platform scrollbars vs. engine scrollbars until
engine scrollbars actually exist.
* platform/ScrollBar.h:
(WebCore::ScrollBar::hasPlatformScrollBars):
2006-08-23 Justin Garcia <justin.garcia@apple.com>
Reviewed by harrison
Removed the poorly named next/previousVisiblePosition
and use next/previousCandidate and next/previousVisuallyDistinctCandidate.
Removed the unused VisiblePosition::maxOffset()
* editing/VisiblePosition.cpp:
(WebCore::VisiblePosition::next):
(WebCore::VisiblePosition::previous):
(WebCore::VisiblePosition::canonicalPosition):
* editing/VisiblePosition.h:
2006-08-23 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Alexey. Landed by rwlbuis.
Fixes parts of: http://bugzilla.opendarwin.org/show_bug.cgi?id=10467
WebKit should have Qt platform support (Part II)
* platform/qt/GraphicsContextQt.cpp: Added.
(WebCore::toQtCompositionMode):
(WebCore::toQtLineCap):
(WebCore::toQtLineJoin):
(WebCore::TransparencyLayer::TransparencyLayer):
(WebCore::TransparencyLayer::cleanup):
(WebCore::TextShadow::TextShadow):
(WebCore::TextShadow::isNull):
(WebCore::GraphicsContextPlatformPrivate::p):
(WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
(WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
(WebCore::GraphicsContext::GraphicsContext):
(WebCore::GraphicsContext::~GraphicsContext):
(WebCore::GraphicsContext::platformContext):
(WebCore::GraphicsContext::savePlatformState):
(WebCore::GraphicsContext::restorePlatformState):
(WebCore::GraphicsContext::drawRect):
(WebCore::adjustLineToPixelBounderies):
(WebCore::GraphicsContext::drawLine):
(WebCore::GraphicsContext::drawEllipse):
(WebCore::GraphicsContext::drawArc):
(WebCore::GraphicsContext::drawConvexPolygon):
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::addClip):
(WebCore::GraphicsContext::drawFocusRing):
(WebCore::GraphicsContext::setFocusRingClip):
(WebCore::GraphicsContext::clearFocusRingClip):
(WebCore::GraphicsContext::drawLineForText):
(WebCore::GraphicsContext::drawLineForMisspelling):
(WebCore::GraphicsContext::roundToDevicePixels):
(WebCore::GraphicsContext::setShadow):
(WebCore::GraphicsContext::clearShadow):
(WebCore::GraphicsContext::beginTransparencyLayer):
(WebCore::GraphicsContext::endTransparencyLayer):
(WebCore::GraphicsContext::clearRect):
(WebCore::GraphicsContext::strokeRect):
(WebCore::GraphicsContext::setLineWidth):
(WebCore::GraphicsContext::setLineCap):
(WebCore::GraphicsContext::setLineJoin):
(WebCore::GraphicsContext::setMiterLimit):
(WebCore::GraphicsContext::setAlpha):
(WebCore::GraphicsContext::setCompositeOperation):
(WebCore::GraphicsContext::clip):
(WebCore::GraphicsContext::translate):
(WebCore::GraphicsContext::rotate):
(WebCore::GraphicsContext::scale):
(WebCore::GraphicsContext::addInnerRoundedRectClip):
(WebCore::GraphicsContext::addRoundedRectClip):
(WebCore::GraphicsContext::createRenderingDeviceContext):
* platform/qt/ImageQt.cpp: Added.
(WebCore::FrameData::clear):
(WebCore::Image::initNativeData):
(WebCore::Image::destroyNativeData):
(WebCore::Image::invalidateNativeData):
(WebCore::Image::loadResource):
(WebCore::Image::supportsType):
(WebCore::Image::draw):
(WebCore::Image::drawTiled):
(WebCore::Image::checkForSolidColor):
* platform/qt/ImageSourceQt.cpp: Added.
(WebCore::createDecoder):
(WebCore::ImageSource::ImageSource):
(WebCore::ImageSource::~ImageSource):
(WebCore::ImageSource::initialized):
(WebCore::ImageSource::setData):
(WebCore::ImageSource::isSizeAvailable):
(WebCore::ImageSource::size):
(WebCore::ImageSource::repetitionCount):
(WebCore::ImageSource::frameCount):
(WebCore::ImageSource::createFrameAtIndex):
(WebCore::ImageSource::frameDurationAtIndex):
(WebCore::ImageSource::frameHasAlphaAtIndex):
2006-08-23 Brady Eidson <beidson@apple.com>
Reviewed by Adele
Moved default URL icon from WebKit to WebCore
* Resources/urlIcon.tiff: Added.
* WebCore.xcodeproj/project.pbxproj:
* loader/icon/IconDataCache.cpp:
(WebCore::IconDataCache::loadImageFromResource):
* loader/icon/IconDataCache.h:
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::IconDatabase):
(WebCore::IconDatabase::defaultIcon):
* loader/icon/IconDatabase.h:
2006-08-23 Adam Roben <aroben@apple.com>
Reviewed by Darin, Adele.
Some popup refactoring/cleanup.
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::defaultEventHandler):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::RenderMenuList):
(WebCore::RenderMenuList::~RenderMenuList):
(WebCore::RenderMenuList::showPopup):
(WebCore::RenderMenuList::hidePopup):
* rendering/RenderMenuList.h:
(WebCore::RenderMenuList::popup):
(WebCore::RenderMenuList::popupIsVisible):
* rendering/RenderPopupMenu.h:
* rendering/RenderPopupMenuMac.h:
(WebCore::RenderPopupMenuMac::hidePopup):
2006-08-23 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Anders. Landed by rwlbuis.
Fixes parts of: http://bugzilla.opendarwin.org/show_bug.cgi?id=10467
WebKit should have Qt platform support
* platform/qt/ResourceLoaderCurl.cpp: Added.
(WebCore::ResourceLoaderInternal::~ResourceLoaderInternal):
(WebCore::ResourceLoader::~ResourceLoader):
(WebCore::ResourceLoader::start):
(WebCore::ResourceLoader::cancel):
(WebCore::ResourceLoader::assembleResponseHeaders):
(WebCore::ResourceLoader::retrieveCharset):
(WebCore::ResourceLoader::receivedResponse):
* platform/qt/ResourceLoaderManager.cpp: Added.
(WebCore::ResourceLoaderManager::ResourceLoaderManager):
(WebCore::ResourceLoaderManager::get):
(WebCore::ResourceLoaderManager::useSimpleTransfer):
(WebCore::writeCallback):
(WebCore::headerCallback):
(WebCore::ResourceLoaderManager::downloadTimerCallback):
(WebCore::ResourceLoaderManager::remove):
(WebCore::ResourceLoaderManager::add):
(WebCore::ResourceLoaderManager::cancel):
* platform/qt/ResourceLoaderManager.h: Added.
* platform/qt/StringQt.cpp: Added.
(WebCore::String::String):
(WebCore::String::operator QString):
(WebCore::DeprecatedString::operator QString):
2006-08-23 Brady Eidson <beidson@apple.com>
Reviewed by Maciej
Added escapeSQLString() - a helper to escape strings to be used in textual SQL queries
* WebCore.xcodeproj/project.pbxproj: Reordered some files
* loader/icon/IconDataCache.cpp: Use the new escapeSQLString()
(WebCore::IconDataCache::writeToDatabase):
* loader/icon/IconDatabase.cpp: Use the new escapeSQLString() throughout
(WebCore::IconDatabase::retainIconURL):
(WebCore::IconDatabase::releaseIconURL):
(WebCore::IconDatabase::forgetIconForIconURLFromDatabase):
(WebCore::IconDatabase::establishIconIDForIconURL):
(WebCore::imageDataForIconURLQuery):
(WebCore::timeStampForIconURLQuery):
(WebCore::iconURLForPageURLQuery):
(WebCore::forgetPageURLQuery):
(WebCore::setIconIDForPageURLQuery):
(WebCore::getIconIDForIconURLQuery):
(WebCore::addIconForIconURLQuery):
(WebCore::hasIconForIconURLQuery):
* loader/icon/SQLDatabase.h:
(WebCore::escapeSQLString): Added
2006-08-22 Maciej Stachowiak <mjs@apple.com>
Reviewed by Brady.
- assorted style cleanup of icon loader code:
- wrapped all implementation files in namespace WebCore {} instead of "using namespace WebCore;" at top
- split headers to be one per class, to match impl files
- made files that are purely local in IconDatabase.cpp static
- make each impl file include config.h as first header (and no config.h includes in other headers)
- avoid multiple copies of Vector<unsigned char> for image data
* WebCore.xcodeproj/project.pbxproj:
* loader/icon/IconDataCache.cpp:
* loader/icon/IconDataCache.h: Added.
(WebCore::):
(WebCore::IconDataCache::getTimestamp):
(WebCore::IconDataCache::setTimestamp):
(WebCore::IconDataCache::getIconURL):
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::imageDataForIconURL):
(WebCore::IconDatabase::iconForPageURL):
(WebCore::pageURLTableIsEmptyQuery):
(WebCore::imageDataForIconURLQuery):
(WebCore::timeStampForIconURLQuery):
(WebCore::iconURLForPageURLQuery):
(WebCore::forgetPageURLQuery):
(WebCore::setIconIDForPageURLQuery):
(WebCore::getIconIDForIconURLQuery):
(WebCore::addIconForIconURLQuery):
(WebCore::hasIconForIconURLQuery):
* loader/icon/IconDatabase.h:
* loader/icon/SQLDatabase.cpp:
* loader/icon/SQLDatabase.h:
* loader/icon/SQLStatement.cpp:
(WebCore::SQLStatement::getColumnBlobAsVector):
* loader/icon/SQLStatement.h: Added.
(WebCore::SQLStatement::isPrepared):
(WebCore::SQLStatement::prepareAndStep):
(WebCore::SQLStatement::lastError):
(WebCore::SQLStatement::lastErrorMsg):
* loader/icon/SQLTransaction.cpp:
* loader/icon/SQLTransaction.h: Added.
2006-08-22 Brady Eidson <beidson@apple.com>
Reviewed by Maciej
The role of the SiteIcon is now the original intention - to be a cache of data relating to an Icon
As such, I'm renaming it to IconDataCache.
Also, the IconDatabase has to manually set the image data on the IconDataCache and also sets the
TimeStamp when an icon is created or the data is changed.
IconDataCache now has a method to write itself *to* a given database, instead of read itself from one.
IconDatabase schema changes to have the timestamp set manually instead of via a trigger.
The overall purpose of this change is to cache the timestamp, killing off a very common SQL query.
* WebCore.xcodeproj/project.pbxproj: Renamed a file
* loader/icon/IconDataCache.cpp: Added.
(IconDataCache::IconDataCache):
(IconDataCache::getImage): Now either returns the stored image, or 0 - no attempt to grab data
(IconDataCache::manuallySetImageData): Delete the old image and create the new one
(IconDataCache::writeToDatabase): Write the current iconURL, data, and timestamp to the given DB
(IconDataCache::imageDataStatus): Determine if an IconDataCache is new without data versus actually having null data
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::createDatabaseTables): Changed DB schema to version 5 (hopefully the final version)
(WebCore::IconDatabase::iconForPageURL):
(WebCore::IconDatabase::isIconExpiredForIconURL): Uses the timestamp in the IconDataCache object instead of always querying
(WebCore::IconDatabase::getOrCreateIconDataCache): Added, to handle creation of new IconDataCache when appropriate
(WebCore::IconDatabase::setIconDataForIconURL): Puts data in SiteIcon then marks it for a future write
(WebCore::IconDatabase::syncDatabase): Now syncs SiteIconsPendingUpdate
* loader/icon/IconDatabase.h:
(WebCore::IconDataCache::getTimestamp):
(WebCore::IconDataCache::setTimestamp):
* loader/icon/SiteIcon.cpp: Removed.
2006-08-22 Justin Garcia <justin.garcia@apple.com>
Reviewed by harrison
<http://bugzilla.opendarwin.org/show_bug.cgi?id=10449>
REGRESSION(r15918): drag-into-marker.html failing
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::doApply): Don't avoid nesting
in a list item.
2006-08-22 Brady Eidson <beidson@apple.com>
Reviewed by Kevin
Added a check in getTIFFRepresentation to not proceed if the frame count is zero
This is an error condition that was handled gracefully before - in certain circumstances
the call to CGImageDestinationCreateWithData will spam the Console if it is passed null/empty data
or invalid data. This small change bails out before that call if that call will definitely fail
* platform/mac/ImageMac.mm:
(WebCore::Image::getTIFFRepresentation):
2006-08-22 David Harrison <harrison@apple.com>
Backed out my last change (r15966) because it broke lots of layout tests.
* editing/TextIterator.cpp:
(WebCore::TextIterator::advance):
2006-08-22 Maciej Stachowiak <mjs@apple.com>
Reviewed by Anders.
- added some SPI indirections to support the following in WebKit/Loader:
- pull more WebDataSource code into WebFrameLoader
- make WebMainResourceLoader not depend on WebKit or on SPI
* WebCore.exp:
* WebCore.xcodeproj/project.pbxproj:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
2006-08-22 Justin Garcia <justin.garcia@apple.com>
Reviewed by harrison
<rdar://problem/4052343&4052343&4426622> Mail hung on paste text
* editing/ReplaceSelectionCommand.cpp:
(WebCore::isInterchangeNewlineNode):
(WebCore::isInterchangeConvertedSpaceSpan):
(WebCore::ReplacementFragment::ReplacementFragment):
(WebCore::ReplaceSelectionCommand::removeRedundantStyles): Compute the redundant inheritable styles and
remove them and remove style nodes and style spans which were only contributing redundant styles.
(WebCore::ReplaceSelectionCommand::doApply):
* editing/ReplaceSelectionCommand.h:
2006-08-22 David Harrison <harrison@apple.com>
Reviewed by Darin.
<rdar://problem/4077676> Inline hole line adheres to the Japanese characters in inline hole
This happens because the underline is always 2 pixels thick, and placed 3 pixels above the bottom of the text box.
Test case added:
* manual-tests/inline-input-marking.html: Added.
Check that underlining of the inline input hole does not obscure the glyphs.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintMarkedTextUnderline):
Position underline at bottom of text box.
Height of underline is reduced to 1 px when font's descent is less than or equal to 2 px.
2006-08-22 Rob Buis <buis@kde.org>
Reviewed by Eric.
http://bugzilla.opendarwin.org/show_bug.cgi?id=10402
REPRO: SVG crashes inside gradient code
Make sure we do not try to update the canvas resource/gradient paintserver when it is not yet built.
* ksvg2/svg/SVGGradientElement.cpp:
(SVGGradientElement::notifyAttributeChange):
(SVGGradientElement::resourceNotification):
2006-08-22 David Harrison <harrison@apple.com>
Reviewed by John.
<rdar://problem/4523606> Represent heading elements in AXAttributedStringForTextMarkerRange
* bridge/mac/WebCoreAXObject.mm:
(headingLevel):
(-[WebCoreAXObject headingLevel]):
(-[WebCoreAXObject isHeading]):
New. Heading level is per the tag (h1 == 1, h2 == 2, etc.)
(-[WebCoreAXObject role]):
(-[WebCoreAXObject roleDescription]):
Add role and roleDescription for headings.
(-[WebCoreAXObject value]):
Value is the headingLevel.
(AXAttributeStringSetHeadingLevel):
(AXAttributedStringAppendText):
Put text's heading level (if applicable) in the attributes.
2006-08-22 David Harrison <harrison@apple.com>
Reviewed by John.
<rdar://problem/4522205> Represent controls in AXAttributedStringForTextMarkerRange
Treat controls as replaced elements, so that AXAttributedStringForTextMarkerRange will, too.
* editing/TextIterator.cpp:
(WebCore::TextIterator::advance):
Include controls.
2006-08-22 David Harrison <harrison@apple.com>
Reviewed by Maciej.
<rdar://problem/4407336> Some non-text elements return AXTextMarkerRangeForUIElement with equal start and end marker
* bridge/mac/WebCoreAXObject.mm:
(-[WebCoreAXObject textMarkerRange]):
Use 0 and maxDeepOffset(), instead of caretMinOffset() and caretMaxRenderedOffset().
Check for VisiblePositions being equal. If so, adjust end one to its next().
That happens with, e.g., buttons.
2006-08-22 Rob Buis <buis@kde.org>
Reviewed by Eric.
http://bugzilla.opendarwin.org/show_bug.cgi?id=10491
KCanvasMatrix removal
Remove KCanvasMatrix from project, using AffineTransform instead.
* WebCore.xcodeproj/project.pbxproj:
* kcanvas/KCanvasMatrix.cpp: Removed.
* kcanvas/KCanvasMatrix.h: Removed.
* kcanvas/KCanvasResources.cpp:
(WebCore::KCanvasMarker::draw):
* kcanvas/KCanvasResources.h:
* kcanvas/RenderForeignObject.cpp:
* kcanvas/RenderPath.h:
* kcanvas/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::viewportTransform):
(WebCore::RenderSVGContainer::getAspectRatio):
* kcanvas/RenderSVGContainer.h:
* kcanvas/RenderSVGText.cpp:
* kcanvas/device/KRenderingDevice.h:
* kcanvas/device/KRenderingPaintServerGradient.cpp:
(WebCore::KRenderingPaintServerGradient::gradientTransform):
(WebCore::KRenderingPaintServerGradient::setGradientTransform):
(WebCore::KRenderingPaintServerGradient::externalRepresentation):
* kcanvas/device/KRenderingPaintServerGradient.h:
* kcanvas/device/KRenderingPaintServerPattern.cpp:
(WebCore::KRenderingPaintServerPattern::patternTransform):
(WebCore::KRenderingPaintServerPattern::setPatternTransform):
(WebCore::KRenderingPaintServerPattern::externalRepresentation):
* kcanvas/device/KRenderingPaintServerPattern.h:
* kcanvas/device/quartz/KCanvasFilterQuartz.mm:
* kcanvas/device/quartz/KCanvasItemQuartz.mm:
* kcanvas/device/quartz/KRenderingDeviceQuartz.h:
* kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
(WebCore::KRenderingDeviceContextQuartz::concatCTM):
(WebCore::KRenderingDeviceContextQuartz::ctm):
* kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
(WebCore::KRenderingPaintServerGradientQuartz::renderPath):
* kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
(WebCore::KRenderingPaintServerPatternQuartz::setup):
* kcanvas/device/quartz/QuartzSupport.mm:
* ksvg2/misc/KCanvasRenderingStyle.h:
* ksvg2/svg/SVGAnimateTransformElement.cpp:
* ksvg2/svg/SVGAnimateTransformElement.h:
* ksvg2/svg/SVGLinearGradientElement.cpp:
(SVGLinearGradientElement::buildGradient):
* ksvg2/svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::fillAttributesFromReferencePattern):
(WebCore::SVGPatternElement::drawPatternContentIntoTile):
(WebCore::SVGPatternElement::notifyAttributeChange):
* ksvg2/svg/SVGPatternElement.h:
* ksvg2/svg/SVGRadialGradientElement.cpp:
(WebCore::SVGRadialGradientElement::buildGradient):
2006-08-22 Rob Buis <buis@kde.org>
Reviewed by Eric.
http://bugzilla.opendarwin.org/show_bug.cgi?id=10405
REPRO: SVG Maze crashes in RenderPath code
Do not render a path when it is empty so maze15.svg does not crash anymore.
Also get rid of a runtime warning issued by CGContextGetPathBoundingBox.
* kcanvas/RenderPath.cpp:
(WebCore::RenderPath::paint):
* kcanvas/device/quartz/KCanvasPathQuartz.mm:
(WebCore::KCanvasPathQuartz::strokeBoundingBox):
2006-08-21 Brady Eidson <beidson@apple.com>
Reviewed by Maciej
<rdar://4690949> - New IconDB: Need to prune unretained icons on startup
Added a flag to track whether or not the initial pruning has taken place on startup
If that flag is not set, IconURL retain counts will be tracked in a temporary db table
in addition to the in-memory hash. Then when the timer fires after initial retains
are complete, we prune those icons not in the retain table, prune dangling PageURL
references, delete the temporary table, and set the flag - and carry on as normal
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::IconDatabase): initialize the flag
(WebCore::IconDatabase::open): changed the schema of the temporary table
(WebCore::IconDatabase::retainIconURL): store the icon retain to the temp table if starting up
(WebCore::IconDatabase::releaseIconURL): ditto
(WebCore::IconDatabase::pruneUnretainedIconsOnStartup): remove all icons *not* in the retain table, then
wipe all the PageURLs who no longer point to a valid IconURL
* loader/icon/IconDatabase.h:
2006-08-21 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Eric.
http://bugzilla.opendarwin.org/show_bug.cgi?id=10419
XSLTProcessor transformToFragment fails because of an XML declaration
Test: fast/xsl/transformToFragment-XML-declaration.html
* xml/XSLTProcessor.cpp:
(WebCore::XSLTProcessor::transformToString): Always inhibit XML declaration printout.
2006-08-21 David Harrison <harrison@apple.com>
Reviewed by Justin.
<rdar://problem/4471481> Represent misspellings in AXAttributedStringForTextMarkerRange
Added support for the NSAccessibilityMisspelledTextAttribute.
Test cases added: None. Manual AX testing is way too awkward, and automated testing
is not possible. See following bug...
<rdar://problem/4256882> Need automated testing support for accessibility APIs
* bridge/mac/WebCoreAXObject.mm:
Lots of trivial formatting in many methods.
(-[WebCoreAXObject accessibilityAttributeValue:]):
Fixed AXStartTextMarker and AXEndTextMarker to use startOfDocument and endOfDocument, instead of
of positionForCoordinates. I had seen erroneous endOfDocument results while testing the spelling
attribute.
(WebCore::AXAttributeStringSetSpelling):
New. Adds the NSAccessibilityMisspelledTextAttribute for misspelled words.
(-[WebCoreAXObject AXAttributedStringAppendText:]):
Added call to AXAttributeStringSetSpelling.
* editing/visible_units.cpp:
(WebCore::startOfDocument):
(WebCore::endOfDocument):
Added for AXStartTextMarker/AXEndTextMarker fix, these forms of the familiar functions take a Node*,
so a previously existing VisiblePosition is not required.
* editing/visible_units.h:
Declare new forms of startOfDocument and endOfDocument.
2006-08-21 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Eric.
Fixes parts of: http://bugzilla.opendarwin.org/show_bug.cgi?id=10467
WebKit should have Qt platform support
* platform/qt/TemporaryLinkStubs.cpp: Added.
(JavaAppletWidget::JavaAppletWidget):
(Font::selectionRectForComplexText):
(Font::offsetForPositionForComplexText):
(WebCore::refreshPlugins):
(WebCore::focusRingColor):
(Image::drawTiled):
(WebCore::TextField::selectAll):
(WebCore::TextField::addSearchResult):
(WebCore::TextField::selectionStart):
(WebCore::TextField::hasSelectedText):
(WebCore::TextField::selectedText):
(WebCore::TextField::setAutoSaveName):
(WebCore::TextField::checksDescendantsForFocus):
(WebCore::TextField::setSelection):
(WebCore::TextField::setMaxResults):
(WebCore::TextField::edited):
(WebCore::TextField::focusPolicy):
(WebCore::TextField::TextField):
(WebCore::TextField::~TextField):
(WebCore::TextField::setFont):
(WebCore::TextField::setAlignment):
(WebCore::TextField::setWritingDirection):
(WebCore::TextField::maxLength):
(WebCore::TextField::setMaxLength):
(WebCore::TextField::text):
(WebCore::TextField::setText):
(WebCore::TextField::cursorPosition):
(WebCore::TextField::setCursorPosition):
(WebCore::TextField::setEdited):
(WebCore::TextField::setReadOnly):
(WebCore::TextField::setPlaceholderString):
(WebCore::TextField::setColors):
(WebCore::TextField::sizeForCharacterWidth):
(WebCore::TextField::baselinePosition):
(WebCore::TextField::setLiveSearch):
(WebCore::Slider::Slider):
(WebCore::Slider::sizeHint):
(WebCore::Slider::~Slider):
(WebCore::Slider::setValue):
(WebCore::Slider::setMaxValue):
(WebCore::Slider::setMinValue):
(WebCore::Slider::setFont):
(WebCore::Slider::value):
(WebCore::Slider::focusPolicy):
(WebCore::ScrollBar::ScrollBar):
(WebCore::ScrollBar::setSteps):
(WebCore::ScrollBar::scroll):
(WebCore::ScrollBar::setValue):
(WebCore::ScrollBar::setKnobProportion):
(WebCore::PlatformScrollBar::PlatformScrollBar):
(WebCore::PlatformScrollBar::~PlatformScrollBar):
(WebCore::PlatformScrollBar::width):
(WebCore::PlatformScrollBar::height):
(WebCore::PlatformScrollBar::setEnabled):
(WebCore::PlatformScrollBar::paint):
(WebCore::PlatformScrollBar::setScrollBarValue):
(WebCore::PlatformScrollBar::setKnobProportion):
(WebCore::PlatformScrollBar::setRect):
(WebCore::PlatformMouseEvent::PlatformMouseEvent):
(WebCore::CheckCacheObjectStatus):
(WebCore::CheckIfReloading):
(WebCore::ServeSynchronousRequest):
(WebCore::historyContains):
(WebCore::submitButtonDefaultLabel):
(WebCore::inputElementAltText):
(WebCore::resetButtonDefaultLabel):
(WebCore::defaultLanguage):
(WebCore::findNextSentenceFromIndex):
(WebCore::findSentenceBoundary):
(WebCore::findNextWordFromIndex):
(WebCore::findWordBoundary):
(Frame::setNeedsReapplyStyles):
(WebCore::screenDepthPerComponent):
(WebCore::screenIsMonochrome):
(WebCore::searchableIndexIntroduction):
(WebCore::setFocusRingColorChangeFunction):
(FrameView::updateBorder):
(loadResourceIntoArray):
(PlugInInfoStore::createPluginInfoForPluginAtIndex):
(PlugInInfoStore::pluginCount):
(WebCore::PlugInInfoStore::supportsMIMEType):
(FileButton::FileButton):
(FileButton::click):
(FileButton::sizeForCharacterWidth):
(FileButton::focusPolicy):
(FileButton::frameGeometry):
(FileButton::setFilename):
(FileButton::baselinePosition):
(FileButton::setFrameGeometry):
(FileButton::setDisabled):
(WebCore::supportedKeySizes):
(WebCore::signedPublicKeyAndChallengeString):
2006-08-21 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Maciej.
Fixes parts of: http://bugzilla.opendarwin.org/show_bug.cgi?id=10467
WebKit should have Qt platform support
* platform/qt/CursorQt.cpp: Added.
(WebCore::Cursor::Cursor):
(WebCore::Cursor::~Cursor):
(WebCore::Cursor::operator=):
(WebCore::Cursors::Cursors::self):
(WebCore::moveCursor):
(WebCore::crossCursor):
(WebCore::handCursor):
(WebCore::iBeamCursor):
(WebCore::waitCursor):
(WebCore::helpCursor):
(WebCore::eastResizeCursor):
(WebCore::northResizeCursor):
(WebCore::northEastResizeCursor):
(WebCore::northWestResizeCursor):
(WebCore::southResizeCursor):
(WebCore::southEastResizeCursor):
(WebCore::southWestResizeCursor):
(WebCore::westResizeCursor):
(WebCore::northSouthResizeCursor):
(WebCore::eastWestResizeCursor):
(WebCore::northEastSouthWestResizeCursor):
(WebCore::northWestSouthEastResizeCursor):
(WebCore::columnResizeCursor):
(WebCore::rowResizeCursor):
* platform/qt/RenderThemeQt.cpp: Added.
(WebCore::RenderThemeQt::RenderThemeQt):
(WebCore::RenderThemeQt::supportsHover):
(WebCore::RenderThemeQt::paintCheckbox):
(WebCore::RenderThemeQt::paintRadio):
(WebCore::theme):
(WebCore::RenderThemeQt::isControlStyled):
(WebCore::RenderThemeQt::controlSupportsTints):
(WebCore::RenderThemeQt::systemFont):
(WebCore::RenderThemeQt::createPopupMenu):
(WebCore::RenderThemeQt::addIntrinsicMargins):
(WebCore::RenderThemeQt::stylePainterAndWidgetForPaintInfo):
(WebCore::RenderThemeQt::setCheckboxSize):
(WebCore::RenderThemeQt::setRadioSize):
(WebCore::RenderThemeQt::supportsFocus):
(WebCore::RenderThemeQt::applyTheme):
(WebCore::RenderThemeQt::adjustButtonStyle):
(WebCore::RenderThemeQt::paintButton):
(WebCore::RenderThemeQt::adjustTextFieldStyle):
(WebCore::RenderThemeQt::paintTextField):
2006-08-21 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Maciej.
Fixes parts of: http://bugzilla.opendarwin.org/show_bug.cgi?id=10467
WebKit should have Qt platform support
* platform/qt/SharedTimerQt.cpp: Added.
(WebCore:setSharedTimerFiredFunction):
(WebCore::setSharedTimerFireTime):
(WebCore::stopSharedTimer):
* platform/qt/SharedTimerQt.h: Added.
(WebCore::SharedTimerQt::SharedTimerQt):
(WebCore::SharedTimerQt::~SharedTimerQt):
(WebCore::SharedTimerQt::inst):
(WebCore::SharedTimerQt::fire):
* platform/qt/SystemTimeQt.cpp: Added.
(WebCore::currentTime):
2006-08-21 Brady Eidson <beidson@apple.com>
Reviewed by John
-Defers writing to the database via a timer and handles starting the timer
intelligently
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::IconDatabase):
(WebCore::IconDatabase::open): Don't start the update timer by default
(WebCore::IconDatabase::close): Call syncDatabase()
(WebCore::IconDatabase::setPrivateBrowsingEnabled): Call syncDatabase()
(WebCore::IconDatabase::setIconURLForPageURL): Setup the cached url, but defer the DB call
(WebCore::IconDatabase::setIconURLForPageURLInDatabase): Actually commit the url to the DB
(WebCore::IconDatabase::pruneUnretainedIconsOnStartup):
(WebCore::IconDatabase::updateDatabase): The updateTimer calls this, which just calls syncDatabase()
(WebCore::IconDatabase::syncDatabase): Add and remove pending pageURLs and iconURLs, and stop the updateTimer
* loader/icon/IconDatabase.h:
2006-08-21 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Eric.
- http://bugzilla.opendarwin.org/show_bug.cgi?id=10429
XSLTProcessor.transformToFragment crashes if the owner document is empty
Test: fast/js/xslt-fragment-in-empty-doc.html
* dom/XMLTokenizer.cpp:
(WebCore::XMLTokenizer::XMLTokenizer): Don't iterate over the element stack if it's empty.
2006-08-21 Brady Eidson <beidson@apple.com>
Reviewed by Anders
-Added timer-based, deferred deletion of database records - PageURLs and Icons handled seperately
In the near future, we'll also have timer-based deferred *addition* of database records
-Keep retain/release counts in a hash instead of a DB table
-Keep only one hash record for the SiteIcons
-Renamed some methods for clarity
* bridge/mac/WebCoreIconDatabaseBridge.h: Renamed method for clarity
* bridge/mac/WebCoreIconDatabaseBridge.mm: Ditto
(-[WebCoreIconDatabaseBridge _hasEntryForIconURL:]): Ditto
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::IconDatabase):
(WebCore::IconDatabase::open): Added new timer setup
(WebCore::IconDatabase::iconForPageURL): Only work with one hash of the SiteIcons
(WebCore::IconDatabase::retainIconForPageURL): Keep count in a hash
(WebCore::IconDatabase::releaseIconForPageURL): Keep count in a hash, use deferred deletion
(WebCore::IconDatabase::retainIconURL): Added
(WebCore::IconDatabase::releaseIconURL): Added
(WebCore::IconDatabase::forgetPageURL): Added
(WebCore::IconDatabase::isIconURLRetained): New and improved simplicity
(WebCore::IconDatabase::setIconDataForIconURL): Cleanup
(WebCore::IconDatabase::setIconURLForPageURL):
(WebCore::IconDatabase::pruneUnretainedIconsOnStartup): Renamed
(WebCore::IconDatabase::pruneIconsPendingDeletion): Added
(WebCore::IconDatabase::hasEntryForIconURL): Renamed for clarity
* loader/icon/IconDatabase.h: Added multiple stuffs
2006-08-21 Brady Eidson <beidson@apple.com>
Reviewed by Maciej's rubberstamp
Removed stale file references from the Xcode.proj
* WebCore.xcodeproj/project.pbxproj:
2006-08-20 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Maciej. Landed by rwlbuis.
Fixes parts of: http://bugzilla.opendarwin.org/show_bug.cgi?id=10463
WebKit should have Qt platform support
Removing HelperQt.h usage by creating appropriate operators
constructor in some of the platform classes, as suggested by Darin.
* CMakeLists.txt:
* platform/DeprecatedString.h:
* platform/Font.h:
* platform/PlatformString.h:
* platform/qt/ComboBoxQt.cpp:
(WebCore::PlatformComboBox::appendItem):
(WebCore::PlatformComboBox::appendGroupLabel):
(WebCore::PlatformComboBox::setFont):
* platform/qt/LineEditQt.cpp:
(WebCore::PlatformLineEdit::setFont):
(WebCore::PlatformLineEdit::setText):
(WebCore::PlatformLineEdit::text):
(WebCore::PlatformLineEdit::selectedText):
* platform/qt/ListBoxQt.cpp:
(WebCore::ListBox::setFont):
(WebCore::ListBox::appendItem):
* platform/qt/PlatformKeyboardEventQt.cpp:
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
* platform/qt/ScrollViewQt.cpp:
* platform/qt/StringQt.cpp: Added.
(WebCore::String::String):
(WebCore::String::operator QString):
(WebCore::DeprecatedString::operator QString):
* platform/qt/TextEditQt.cpp:
* platform/qt/WidgetQt.cpp:
(WebCore::Widget::setFont):
2006-08-18 Steve Falkenburg <sfalken@apple.com>
Rubber stamped by adele.
Fix call to WebFormDelegate's textFieldDidBeginEditing.
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::subtreeHasChanged):
2006-08-19 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Eric. Landed by rwlbuis.
Next chunk of the implementation for:
http://bugzilla.opendarwin.org/show_bug.cgi?id=10467
WebKit should have Qt platform support
* platform/qt/KeyboardCodes.h: Added.
* platform/qt/PlatformKeyboardEventQt.cpp: Added.
(WebCore::keyIdentifierForQtKeyCode):
(WebCore::windowsKeyCodeForKeyEvent):
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
* platform/qt/PlatformMouseEventQt.cpp: Added.
(WebCore::):
(WebCore::PlatformMouseEvent::PlatformMouseEvent):
2006-08-19 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Eric. Landed by rwlbuis.
Next chunk of the implementation for:
http://bugzilla.opendarwin.org/show_bug.cgi?id=10467
WebKit should have Qt platform support
* platform/qt/AffineTransformQt.cpp: Added.
(WebCore::AffineTransform::AffineTransform):
(WebCore::AffineTransform::setMatrix):
(WebCore::AffineTransform::map):
(WebCore::AffineTransform::mapRect):
(WebCore::AffineTransform::isIdentity):
(WebCore::AffineTransform::m11):
(WebCore::AffineTransform::m12):
(WebCore::AffineTransform::m21):
(WebCore::AffineTransform::m22):
(WebCore::AffineTransform::dx):
(WebCore::AffineTransform::dy):
(WebCore::AffineTransform::reset):
(WebCore::AffineTransform::scale):
(WebCore::AffineTransform::rotate):
(WebCore::AffineTransform::translate):
(WebCore::AffineTransform::shear):
(WebCore::AffineTransform::det):
(WebCore::AffineTransform::invert):
(WebCore::AffineTransform::operator QMatrix):
(WebCore::AffineTransform::operator==):
(WebCore::AffineTransform::operator*=):
(WebCore::AffineTransform::operator*):
* platform/qt/BrowserExtensionQt.cpp: Added.
(WebCore::BrowserExtensionQt::BrowserExtensionQt):
(WebCore::BrowserExtensionQt::canRunModal):
(WebCore::BrowserExtensionQt::createNewWindow):
(WebCore::BrowserExtensionQt::canRunModalNow):
(WebCore::BrowserExtensionQt::runModal):
(WebCore::BrowserExtensionQt::goBackOrForward):
(WebCore::BrowserExtensionQt::historyURL):
(WebCore::BrowserExtensionQt::setTypedIconURL):
(WebCore::BrowserExtensionQt::setIconURL):
(WebCore::BrowserExtensionQt::getHistoryLength):
* platform/qt/BrowserExtensionQt.h: Added.
* platform/qt/CookieJarQt.cpp: Added.
(WebCore::setCookies):
(WebCore::cookies):
(WebCore::cookiesEnabled):
* platform/qt/PageQt.cpp: Added.
(WebCore::rootWindowForFrame):
(WebCore::Page::windowRect):
(WebCore::Page::setWindowRect):
* platform/qt/PathQt.cpp: Added.
(WebCore::Path::Path):
(WebCore::Path::~Path):
(WebCore::Path::operator=):
(WebCore::Path::contains):
(WebCore::Path::translate):
(WebCore::Path::boundingRect):
(WebCore::Path::moveTo):
(WebCore::Path::addLineTo):
(WebCore::Path::addQuadCurveTo):
(WebCore::Path::addBezierCurveTo):
(WebCore::Path::addArcTo):
(WebCore::Path::closeSubpath):
(WebCore::Path::addArc):
(WebCore::Path::addRect):
(WebCore::Path::addEllipse):
(WebCore::Path::clear):
* platform/qt/ScreenQt.cpp: Added.
(WebCore::screenRect):
(WebCore::screenDepth):
(WebCore::usableScreenRect):
2006-08-19 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Eric. Landed by rwlbuis.
First chunk of the implementation for:
http://bugzilla.opendarwin.org/show_bug.cgi?id=10467
WebKit should have Qt platform support
* platform/qt/ComboBoxQt.cpp: Added.
(WebCore::PlatformComboBox::PlatformComboBox):
(WebCore::PlatformComboBox::~PlatformComboBox):
(WebCore::PlatformComboBox::setParentWidget):
(WebCore::PlatformComboBox::clear):
(WebCore::PlatformComboBox::appendItem):
(WebCore::PlatformComboBox::appendGroupLabel):
(WebCore::PlatformComboBox::appendSeparator):
(WebCore::PlatformComboBox::setCurrentItem):
(WebCore::PlatformComboBox::sizeHint):
(WebCore::PlatformComboBox::frameGeometry):
(WebCore::PlatformComboBox::setFrameGeometry):
(WebCore::PlatformComboBox::baselinePosition):
(WebCore::PlatformComboBox::setFont):
(WebCore::PlatformComboBox::focusPolicy):
(WebCore::PlatformComboBox::itemSelected):
(WebCore::PlatformComboBox::setWritingDirection):
(WebCore::PlatformComboBox::populate):
(WebCore::PlatformComboBox::populateMenu):
* platform/qt/LineEditQt.cpp: Added.
(WebCore::PlatformLineEdit::PlatformLineEdit):
(WebCore::PlatformLineEdit::~PlatformLineEdit):
(WebCore::PlatformLineEdit::setParentWidget):
(WebCore::PlatformLineEdit::setColors):
(WebCore::PlatformLineEdit::setAlignment):
(WebCore::PlatformLineEdit::setCursorPosition):
(WebCore::PlatformLineEdit::cursorPosition):
(WebCore::PlatformLineEdit::setEdited):
(WebCore::PlatformLineEdit::edited):
(WebCore::PlatformLineEdit::setFont):
(WebCore::PlatformLineEdit::setMaxLength):
(WebCore::PlatformLineEdit::maxLength):
(WebCore::PlatformLineEdit::setReadOnly):
(WebCore::PlatformLineEdit::isReadOnly):
(WebCore::PlatformLineEdit::setText):
(WebCore::PlatformLineEdit::text):
(WebCore::PlatformLineEdit::setWritingDirection):
(WebCore::PlatformLineEdit::selectAll):
(WebCore::PlatformLineEdit::hasSelectedText):
(WebCore::PlatformLineEdit::selectionStart):
(WebCore::PlatformLineEdit::selectedText):
(WebCore::PlatformLineEdit::setSelection):
(WebCore::PlatformLineEdit::sizeForCharacterWidth):
(WebCore::PlatformLineEdit::baselinePosition):
(WebCore::PlatformLineEdit::focusPolicy):
(WebCore::PlatformLineEdit::checksDescendantsForFocus):
(WebCore::PlatformLineEdit::setLiveSearch):
(WebCore::PlatformLineEdit::setAutoSaveName):
(WebCore::PlatformLineEdit::setMaxResults):
(WebCore::PlatformLineEdit::setPlaceholderString):
(WebCore::PlatformLineEdit::addSearchResult):
* platform/qt/ListBoxQt.cpp: Added.
(WebCore::ListBox::ListBox):
(WebCore::ListBox::~ListBox):
(WebCore::ListBox::setParentWidget):
(WebCore::ListBox::sizeForNumberOfLines):
(WebCore::ListBox::setSelectionMode):
(WebCore::ListBox::clear):
(WebCore::ListBox::doneAppendingItems):
(WebCore::ListBox::setSelected):
(WebCore::ListBox::isSelected):
(WebCore::ListBox::setEnabled):
(WebCore::ListBox::isEnabled):
(WebCore::ListBox::setWritingDirection):
(WebCore::ListBox::focusPolicy):
(WebCore::ListBox::checksDescendantsForFocus):
(WebCore::ListBox::clearCachedTextRenderers):
(WebCore::ListBox::setFont):
(WebCore::ListBox::appendItem):
* platform/qt/ScrollViewQt.cpp: Added.
(WebCore::ScrollView::ScrollView):
(WebCore::ScrollView::~ScrollView):
(WebCore::ScrollView::setParentWidget):
(WebCore::ScrollView::updateContents):
(WebCore::ScrollView::visibleWidth):
(WebCore::ScrollView::visibleHeight):
(WebCore::ScrollView::visibleContentRect):
(WebCore::ScrollView::setContentsPos):
(WebCore::ScrollView::resizeContents):
(WebCore::ScrollView::contentsX):
(WebCore::ScrollView::contentsY):
(WebCore::ScrollView::contentsWidth):
(WebCore::ScrollView::contentsHeight):
(WebCore::ScrollView::viewportToContents):
(WebCore::ScrollView::contentsToViewport):
(WebCore::ScrollView::scrollOffset):
(WebCore::ScrollView::scrollBy):
(WebCore::ScrollView::hScrollBarMode):
(WebCore::ScrollView::vScrollBarMode):
(WebCore::ScrollView::suppressScrollBars):
(WebCore::ScrollView::setHScrollBarMode):
(WebCore::ScrollView::setVScrollBarMode):
(WebCore::ScrollView::setScrollBarsMode):
(WebCore::ScrollView::setStaticBackground):
(WebCore::ScrollView::addChild):
(WebCore::ScrollView::removeChild):
(WebCore::ScrollView::scrollPointRecursively):
(WebCore::ScrollView::inWindow):
* platform/qt/TextEditQt.cpp: Added.
(WebCore::PlatformTextEdit::PlatformTextEdit):
(WebCore::PlatformTextEdit::~PlatformTextEdit):
(WebCore::PlatformTextEdit::setParentWidget):
(WebCore::PlatformTextEdit::setColors):
(WebCore::PlatformTextEdit::setAlignment):
(WebCore::PlatformTextEdit::setLineHeight):
(WebCore::PlatformTextEdit::setCursorPosition):
(WebCore::PlatformTextEdit::getCursorPosition):
(WebCore::PlatformTextEdit::setFont):
(WebCore::PlatformTextEdit::setReadOnly):
(WebCore::PlatformTextEdit::isReadOnly):
(WebCore::PlatformTextEdit::setDisabled):
(WebCore::PlatformTextEdit::isDisabled):
(WebCore::PlatformTextEdit::hasSelectedText):
(WebCore::PlatformTextEdit::setText):
(WebCore::PlatformTextEdit::text):
(WebCore::PlatformTextEdit::textWithHardLineBreaks):
(WebCore::PlatformTextEdit::focusPolicy):
(WebCore::PlatformTextEdit::setWordWrap):
(WebCore::PlatformTextEdit::wordWrap):
(WebCore::PlatformTextEdit::setScrollBarModes):
(WebCore::PlatformTextEdit::setWritingDirection):
(WebCore::PlatformTextEdit::selectionStart):
(WebCore::PlatformTextEdit::selectionEnd):
(WebCore::PlatformTextEdit::setSelectionStart):
(WebCore::PlatformTextEdit::setSelectionEnd):
(WebCore::PlatformTextEdit::selectAll):
(WebCore::PlatformTextEdit::setSelectionRange):
(WebCore::PlatformTextEdit::sizeWithColumnsAndRows):
(WebCore::PlatformTextEdit::checksDescendantsForFocus):
* platform/qt/WidgetQt.cpp: Added.
(WebCore::WidgetPrivate::WidgetPrivate):
(WebCore::WidgetPrivate::~WidgetPrivate):
(WebCore::Widget::Widget):
(WebCore::Widget::~Widget):
(WebCore::Widget::setClient):
(WebCore::Widget::client):
(WebCore::Widget::frameGeometry):
(WebCore::Widget::hasFocus):
(WebCore::Widget::setFocus):
(WebCore::Widget::clearFocus):
(WebCore::Widget::font):
(WebCore::Widget::setFont):
(WebCore::Widget::setCursor):
(WebCore::Widget::show):
(WebCore::Widget::hide):
(WebCore::Widget::setQWidget):
(WebCore::Widget::qwidget):
(WebCore::Widget::setParentWidget):
(WebCore::Widget::parentWidget):
(WebCore::Widget::setFrameGeometry):
(WebCore::Widget::mapFromGlobal):
(WebCore::Widget::scaleFactor):
(WebCore::Widget::lockDrawingFocus):
(WebCore::Widget::unlockDrawingFocus):
(WebCore::Widget::paint):
(WebCore::Widget::enableFlushDrawing):
(WebCore::Widget::isEnabled):
(WebCore::Widget::setIsSelected):
(WebCore::Widget::disableFlushDrawing):
(WebCore::Widget::setEnabled):
(WebCore::Widget::focusPolicy):
2006-08-19 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Eric. Landed by rwlbuis.
First chunk of the implementation for:
http://bugzilla.opendarwin.org/show_bug.cgi?id=10467
WebKit should have Qt platform support
* platform/qt/ColorQt.cpp: Added.
(WebCore::Color::Color):
(WebCore::Color::operator QColor):
* platform/qt/FloatPointQt.cpp: Added.
(WebCore::FloatPoint::FloatPoint):
(WebCore::FloatPoint::operator QPointF):
* platform/qt/FloatRectQt.cpp: Added.
(WebCore::FloatRect::FloatRect):
(WebCore::FloatRect::operator QRectF):
* platform/qt/IntPointQt.cpp: Added.
(WebCore::IntPoint::IntPoint):
(WebCore::IntPoint::operator QPoint):
* platform/qt/IntRectQt.cpp: Added.
(WebCore::IntRect::IntRect):
(WebCore::IntRect::operator QRect):
* platform/qt/IntSizeQt.cpp: Added.
(WebCore::IntSize::IntSize):
(WebCore::IntSize::operator QSize):
2006-08-18 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Eric. Landed by rwlbuis.
Fixes: http://bugzilla.opendarwin.org/show_bug.cgi?id=10470
The Qt platform needs a KCanvas device.
* kcanvas/device/qt/KCanvasClipperQt.cpp: Added.
(WebCore::KCanvasClipperQt::applyClip):
* kcanvas/device/qt/KCanvasClipperQt.h: Added.
(WebCore::KCanvasClipperQt::KCanvasClipperQt):
* kcanvas/device/qt/KCanvasPathQt.cpp: Added.
(WebCore::KCanvasPathQt::KCanvasPathQt):
(WebCore::KCanvasPathQt::~KCanvasPathQt):
(WebCore::KCanvasPathQt::isEmpty):
(WebCore::KCanvasPathQt::moveTo):
(WebCore::KCanvasPathQt::lineTo):
(WebCore::KCanvasPathQt::curveTo):
(WebCore::KCanvasPathQt::closeSubpath):
(WebCore::KCanvasPathQt::boundingBox):
(WebCore::KCanvasPathQt::strokeBoundingBox):
(WebCore::KCanvasPathQt::strokeContainsPoint):
(WebCore::KCanvasPathQt::containsPoint):
* kcanvas/device/qt/KCanvasPathQt.h: Added.
(WebCore::KCanvasPathQt::qtPath):
* kcanvas/device/qt/KRenderingDeviceQt.cpp: Added.
(WebCore::KRenderingDeviceContextQt::KRenderingDeviceContextQt):
(WebCore::KRenderingDeviceContextQt::~KRenderingDeviceContextQt):
(WebCore::KRenderingDeviceContextQt::concatCTM):
(WebCore::KRenderingDeviceContextQt::ctm):
(WebCore::KRenderingDeviceContextQt::mapFromVisual):
(WebCore::KRenderingDeviceContextQt::mapToVisual):
(WebCore::KRenderingDeviceContextQt::clearPath):
(WebCore::KRenderingDeviceContextQt::addPath):
(WebCore::KRenderingDeviceContextQt::createGraphicsContext):
(WebCore::KRenderingDeviceContextQt::painter):
(WebCore::KRenderingDeviceContextQt::pathBBox):
(WebCore::KRenderingDeviceContextQt::setFillRule):
(WebCore::KRenderingDeviceContextQt::fillPath):
(WebCore::KRenderingDeviceContextQt::strokePath):
(WebCore::KRenderingDeviceQt::KRenderingDeviceQt):
(WebCore::KRenderingDeviceQt::~KRenderingDeviceQt):
(WebCore::KRenderingDeviceQt::popContext):
(WebCore::KRenderingDeviceQt::pushContext):
(WebCore::KRenderingDeviceQt::qtContext):
(WebCore::KRenderingDeviceQt::contextForImage):
(WebCore::KRenderingDeviceQt::stringForPath):
(WebCore::KRenderingDeviceQt::createResource):
(WebCore::KRenderingDeviceQt::createPaintServer):
(WebCore::KRenderingDeviceQt::createFilterEffect):
2006-08-17 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Eric. Landed by rwlbuis.
Fixes: http://bugzilla.opendarwin.org/show_bug.cgi?id=10466
WebKit should have Qt platform support.
* platform/Color.h:
* platform/Cursor.h:
(WebCore::Cursor::Cursor):
* platform/FloatPoint.h:
* platform/FloatRect.h:
* platform/GlyphBuffer.h:
(WebCore::GlyphBuffer::glyphAt):
(WebCore::GlyphBuffer::advanceAt):
(WebCore::GlyphBuffer::add):
* platform/GraphicsContext.h:
* platform/ImageSource.h:
* platform/IntPoint.h:
* platform/IntRect.h:
* platform/IntSize.h:
* platform/ListBox.h:
* platform/Path.h:
* platform/PlatformKeyboardEvent.h:
* platform/PlatformMouseEvent.h:
* platform/ResourceLoader.h:
* platform/ResourceLoaderClient.h:
* platform/ResourceLoaderInternal.h:
(WebCore::ResourceLoaderInternal::ResourceLoaderInternal):
* platform/ScrollView.h:
* platform/Widget.h:
2006-08-17 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Eric. Landed by rwlbuis.
Fixes: http://bugzilla.opendarwin.org/show_bug.cgi?id=10465
General WebKit Linux build fixes.
* kcanvas/KCanvasFilters.cpp:
(WebCore::operator<<):
* kcanvas/RenderSVGImage.cpp:
* ksvg2/css/SVGCSSStyleSelector.cpp:
* ksvg2/svg/SVGAnimateColorElement.cpp:
* ksvg2/svg/SVGMaskElement.cpp:
* ksvg2/svg/SVGPatternElement.cpp:
* page/Frame.h:
* rendering/RenderStyle.h:
(WebCore::RenderStyle::deleteBindingURIs):
* xml/DOMParser.cpp:
2006-08-17 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Eric. Landed by rwlbuis.
Fixes: http://bugzilla.opendarwin.org/show_bug.cgi?id=10464
Offer a cmake build system for Qt platform.
* CMakeLists.txt: Added.
2006-08-17 David Harrison <harrison@apple.com>
Reviewed by John Sullivan.
<rdar://problem/4671069> REGRESSION: Popup buttons in web pages aren't exposed as AXPopupButtons
Accessorized RenderMenuList objects.
* bridge/mac/WebCoreAXObject.mm:
(-[WebCoreAXObject mouseButtonListener]):
Trivial formatting.
(-[WebCoreAXObject actionElement]):
Return the HTMLSelectElement.
(-[WebCoreAXObject firstChild]):
(-[WebCoreAXObject lastChild]):
(-[WebCoreAXObject previousSibling]):
(-[WebCoreAXObject nextSibling]):
(-[WebCoreAXObject parentObject]):
(-[WebCoreAXObject parentObjectUnignored]):
(-[WebCoreAXObject isAttachment]):
(-[WebCoreAXObject attachmentView]):
Trivial formatting.
(-[WebCoreAXObject role]):
Return NSAccessibilityPopUpButtonRole.
(-[WebCoreAXObject subrole]):
Trivial formatting.
(-[WebCoreAXObject roleDescription]):
Return NSAccessibilityPopUpButtonRole.
(-[WebCoreAXObject textUnderElement]):
Trivial formatting.
(-[WebCoreAXObject value]):
Return the RenderMenuList::text().
(-[WebCoreAXObject position]):
Trivial formatting.
(-[WebCoreAXObject accessibilityIsIgnored]):
- Ignore popup menu items because AppKit does.
- Remove redundant check for buttonTag (earlier isControl() check suffices).
(-[WebCoreAXObject accessibilityAttributeNames]):
(-[WebCoreAXObject accessibilityActionNames]):
(-[WebCoreAXObject accessibilityAttributeValue:]):
Trivial formatting.
(-[WebCoreAXObject doAXTextMarkerRangeForUnorderedTextMarkers:]):
Removed old debugging code that is no longer needed.
Trivial formatting.
(-[WebCoreAXObject doAXSentenceTextMarkerRangeForTextMarker:]):
(-[WebCoreAXObject doAXParagraphTextMarkerRangeForTextMarker:]):
(-[WebCoreAXObject removeAXObjectID]):
Trivial formatting.
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::accessKeyAction):
Call click() instead of focus().
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::text):
Added for easy access to popup's current text.
* rendering/RenderMenuList.h:
(WebCore::RenderMenuList::isMenuList):
* rendering/RenderObject.h:
(WebCore::RenderObject::isMenuList):
Added so popups can be identified.
2006-08-17 David Harrison <harrison@apple.com>
Reviewed by Maciej.
<rdar://problem/4527201> REGRESSION: AXTextMarkerRangeForUnorderedTextMarkers returns out of order range
Test cases added: None. Manual AX testing is way too awkward, and automated testing
is not possible. See following bug...
<rdar://problem/4256882> Need automated testing support for accessibility APIs
* bridge/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::visiblePositionForTextMarker):
Validate the marker by comparing the node and offset to those of the resulting VisiblePosition.
2006-08-17 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Anders.
Fixes: http://bugzilla.opendarwin.org/show_bug.cgi?id=10447
AffineTransform should be multi-platform compatible
* platform/AffineTransform.h:
* platform/cg/AffineTransformCG.cpp:
(WebCore::AffineTransform::m11):
(WebCore::AffineTransform::m12):
(WebCore::AffineTransform::m21):
(WebCore::AffineTransform::m22):
(WebCore::AffineTransform::dx):
(WebCore::AffineTransform::dy):
2006-08-16 David Hyatt <hyatt@apple.com>
Fix an issue with CSS2 system fonts where they did not respect text
zoom. This was most visible with the new control fonts used for form
controls (they stopped swapping between small/mini/regular as you zoomed).
Reviewed by beth
* css/cssstyleselector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
2006-08-15 Justin Garcia <justin.garcia@apple.com>
Reviewed by thatcher
First part of fix for:
<rdar://problem/4384589>
Mail hung on paste text
Fixes:
<http://bugzilla.opendarwin.org/show_bug.cgi?id=8592>
Extra line left after deleting whitespace:pre text
<rdar://problem/4128080> Paste as HTML does not yield equivalent style
<rdar://problem/4046469> Box styles on first element aren't copied/pasted
Copy/paste of arstechnica.com
Here's how we avoid adding redundant style information on paste: insert
the fragment and do a test rendering, save away style information for
every node in the fragment, remove all style information from the fragment,
remove the fragment, insert it into the appropriate place in the document,
then restore only those styles gathered during the test insertion that aren't
redundant. Restoring the styles in this way results in an ApplyStyleCommand
and a layout for nearly every inserted node.
Instead we want to insert the fragment into the document without removing the
style information, then mark style nodes and inline style declarations for
removal if they are redundant, and sweep to remove them. This means that we
can't rely on ReplacementFragment::wasBlock anymore, because blocks will now
have style spans around them. This patch removes the use of wasBlock in
ReplaceSelectionCommand.
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::moveParagraphs): Added code
to remove the line placeholder left after a move from preserveNewline text.
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::doApply): Don't add a placeholder if
we're deleting a paragraph in preserveNewline text.
* editing/JSEditor.cpp: Pass true to prevent nesting.
* editing/ReplaceSelectionCommand.cpp: Removed wasBlock and friends.
(WebCore::ReplacementFragment::ReplacementFragment): Ditto.
(WebCore::ReplacementFragment::saveRenderingInfo): Ditto.
(WebCore::RenderingInfo::RenderingInfo): Ditto.
(WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand):
(WebCore::ReplaceSelectionCommand::shouldMergeStart): Combined the to/from
merging rules into one method.
(WebCore::ReplaceSelectionCommand::shouldMergeEnd):
(WebCore::ReplaceSelectionCommand::shouldMerge):
(WebCore::ReplaceSelectionCommand::doApply):
Don't do nesting prevention when pasting into an empty paragraph, this
fixes 4046469, the common cause of paste fidelity bugs, but needs
to be tweaked a little because this can lead to margin/border build-up
on repeated copy/pastes.
Don't track startPos in addition to insertionPos. It was never used.
Fixed a bug where a fragment starting with an interchange newline would
cause content to be put outside of an editable region when pasting at the
very end of it.
Adjust insertionPos before insertion (not during) and do not consult wasBlock
to decide whether or not to do so.
Changed the way we do the start merge: insert the fragment, then stich
paragraphs together, in the same way that we do the end merge. This
doesn't require wasBlock and fixes bugs.
Replaced some uses of insertionPos with endOfInsertedContent.
Fixed a bug in the expansion of the last incoming br (a "collapsed" br
is one where !isStartOfParagraph([br,0])).
Removed the special case code that did the end merge for the preserveNewline
case, since this patch fixes the moveParagraph bug in the preserveNewline case.
Removed some unused variables.
(WebCore::ReplaceSelectionCommand::shouldRemoveEndBR): An endBR that was
holding a line open should always be displaced by inserted content, unless
the inserted content ends with a br.
(WebCore::ReplaceSelectionCommand::updateNodesInserted):
* editing/ReplaceSelectionCommand.h:
(WebCore::RenderingInfo::style):
* editing/markup.cpp:
(WebCore::createMarkup): Only add mail blockquotes and list/table/pre when
annotate is true (when we're creating markup for the pasteboard).
2006-08-16 John Sullivan <sullivan@apple.com>
Reviewed by Brady Eidson
- fixed <rdar://problem/4637156> underlines appearing in white selection text
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::paintDecorations):
bail out if phase is PaintPhaseSelection and forceWhiteText is true
2006-08-16 Brady Eidson <beidson@apple.com>
Reviewed by John
Updated the DB version number and added a helpful comment explaining its meaning
* loader/icon/IconDatabase.cpp:
2006-08-16 Brady Eidson <beidson@apple.com>
Reviewed by Maciej
Major refactoring of new iconDB:
-Instead of private browsing being handled by in-memory tables, it's now handled
by a separate in-memory database with the same table names. This allows us to
re-use the same SQL on either the main or private-browsing database
-So it follows, I broke out much of the SQL queries into seperate methods suffixed with
"Query" that take a database as the method's argument so the same language can run on
both private and main tables
-Now that we have two DBs, moved the retain/release count to the m_mainDB
-While I was at it, updated the schema to combine the Icon and IconResource table - cuts
down on some high-usage, low value queries which were too expensive
-Ditched the _url -> url convention for escaping urls for SQL. Now its url and escapedURL
-Pruned tons of unused methods from previous revisions
* bridge/mac/WebCoreIconDatabaseBridge.h: Removed isIconExpiredForPageURL as it was never used
* bridge/mac/WebCoreIconDatabaseBridge.mm: Ditto
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::IconDatabase): Updated initializer list
(WebCore::IconDatabase::open): Sets up both databases
(WebCore::IconDatabase::close): Closes both databases
(WebCore::IconDatabase::isEmpty): Queries both databases for at least 1 record
(WebCore::IconDatabase::isValidDatabase): Reflect the updated schema
(WebCore::IconDatabase::clearDatabaseTables): Ditto - and takes DB as a parameter
(WebCore::IconDatabase::createDatabaseTables): Ditto
(WebCore::IconDatabase::imageDataForIconURL): style cleanup, and using a query-function
(WebCore::IconDatabase::setPrivateBrowsingEnabled): Resets private DB instead of private tables
(WebCore::IconDatabase::isIconExpiredForIconURL): Uses a query-function on each DB
(WebCore::IconDatabase::iconURLForPageURL): Uses a query-function on each DB
(WebCore::IconDatabase::retainIconForPageURL): Retain count DB changes
(WebCore::IconDatabase::releaseIconForPageURL): Ditto
(WebCore::IconDatabase::isIconURLRetained): Determine if it's time to prune a released icon yet
(WebCore::IconDatabase::forgetIconForIconURLFromDatabase): Alot simpler
(WebCore::IconDatabase::setIconDataForIconURL): Style cleanup
(WebCore::IconDatabase::setHaveNoIconForIconURL): Ditto
(WebCore::IconDatabase::setIconURLForPageURL): Ditto - and using a query-function
(WebCore::IconDatabase::establishIconIDForIconURL): Style cleanup
(WebCore::IconDatabase::pruneUnreferencedIcons): DB name change
(WebCore::IconDatabase::pruneUnretainedIcons): Ditto
(WebCore::IconDatabase::hasIconForIconURL): Simpler, using a query-function
(WebCore::IconDatabase::~IconDatabase):
(WebCore::pageURLTableIsEmptyQuery): Self-explanatory SQL query
(WebCore::imageDataForIconURLQuery): Self-explanatory SQL query
(WebCore::timeStampForIconURLQuery): Self-explanatory SQL query
(WebCore::iconURLForPageURLQuery): Self-explanatory SQL query
(WebCore::forgetPageURLQuery): Self-explanatory SQL query
(WebCore::setIconIDForPageURLQuery): Self-explanatory SQL query
(WebCore::getIconIDForIconURLQuery): Self-explanatory SQL query
(WebCore::addIconForIconURLQuery): Self-explanatory SQL query
(WebCore::hasIconForIconURLQuery): Self-explanatory SQL query
* loader/icon/IconDatabase.h: Some new/changed methods, pruned methods, and new comments
(WebCore::IconDatabase::isOpen): Changed our meaning of "isOpen" to reflect the 2 databases
2006-08-15 Jonas Witt <jonas.witt@gmail.com>
Reviewed by Darin.
- added ObjC wrappers for the KeyboardEvent and WheelEvent initializers
http://bugzilla.opendarwin.org/show_bug.cgi?id=9736
* bindings/objc/DOMEvents.mm:
(-[DOMKeyboardEvent initKeyboardEvent::::::::::]):
* bindings/objc/DOMEventsNonstandard.mm:
(-[DOMWheelEvent initWheelEvent:::::::::::]):
* bindings/objc/DOMPrivate.h:
- added an initializer for the WheelEvent
* dom/WheelEvent.cpp:
(WebCore::WheelEvent::initWheelEvent):
* dom/WheelEvent.h:
2006-08-15 Mark Rowe <opendarwin.org@bdash.net.nz>
Reviewed by Tim H.
Build fix: DWARF and -gfull are incompatible with symbol separation.
* WebCore.xcodeproj/project.pbxproj:
2006-08-15 Mark Rowe <opendarwin.org@bdash.net.nz>
Reviewed by Tim H.
http://bugzilla.opendarwin.org/show_bug.cgi?id=10394
Bug 10394: WebKit Release and Production configurations should enable dead code stripping
* WebCore.xcodeproj/project.pbxproj:
2006-08-15 Geoffrey Garen <ggaren@apple.com>
Reviewed by Darin.
- This patch reworks a previous fix for <rdar://problem/3524912> repro
crash in KHTMLParser::parseToken, due to parser's current element being
destroyed (www.gnnetcom.dk), along with subsequent adjustments to fix
leaks.
The previous solutions caused a ~2% performance regression on iBench HTML,
due to RefPtr churn. The optimizations here gain back that ~2% plus ~1% more,
for a total win of ~3% vs current TOT.
We can merge this fix to the branch to fix <rdar://problem/4661982>
(crash in KHTMLParser::popBlock).
The solution here is:
(1) Don't let the parser ref document nodes -- that causes leaks.
(2) Handle ref/deref manually, to avoid RefPtr churn. Specifically, when
moving a node between stacks or to/from 'current', rather than deref'ing
and then ref'ing again, simply move the node, along with its refcount, to
its new location, and overwrite its old location.
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLParser.cpp:
(WebCore::HTMLStackElem::HTMLStackElem):
(WebCore::HTMLStackElem::derefNode):
(WebCore::HTMLParser::HTMLParser):
(WebCore::HTMLParser::setCurrent):
(WebCore::HTMLParser::insertNode):
(WebCore::HTMLParser::popNestedHeaderTag):
(WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks):
(WebCore::HTMLParser::reopenResidualStyleTags):
(WebCore::HTMLParser::pushBlock):
(WebCore::HTMLParser::popBlock):
(WebCore::HTMLParser::popOneBlockCommon):
(WebCore::HTMLParser::popOneBlock):
(WebCore::HTMLParser::moveOneBlockToStack):
* html/HTMLParser.h:
2006-08-15 Mark Rowe <opendarwin.org@bdash.net.nz>
Reviewed by Tim H.
http://bugzilla.opendarwin.org/show_bug.cgi?id=10384
Bug 10384: Switch to DWARF for Release configuration
* WebCore.xcodeproj/project.pbxproj:
2006-08-15 Mark Rowe <opendarwin.org@bdash.net.nz>
Reviewed by Hyatt.
Tweaked and landed by Darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=10399
Bug 10399: RenderTextArea is unused
* WebCore.vcproj/WebCore/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* WebCoreSources.bkl:
Removed RenderTextArea source files.
* html/HTMLTextAreaElement.cpp: Removed include of RenderTextArea.h.
* html/HTMLTextAreaElement.h: Removed forward declaration of RenderTextArea.
* platform/mac/WidgetMac.mm: (WebCore::Widget::paint): Updated a comment.
* platform/TextBox.h: Removed.
* platform/mac/TextBoxMac.mm: Removed.
* platform/mac/WebCoreTextArea.h: Removed.
* platform/mac/WebCoreTextArea.mm: Removed.
* rendering/RenderTextArea.cpp: Removed.
* rendering/RenderTextArea.h: Removed.
2006-08-15 Brady Eidson <beidson@apple.com>
Reviewed by THE OTHER Maciej...
Two small fixes -
1) Renamed retain/release methods to add PageUrl in - we're being consistent and clear in the WebCore API
2) Fixed a bug where a null SiteIcon reference would be added into the pageURLToSiteIcon map causing a
null dereference later
* bridge/mac/WebCoreIconDatabaseBridge.mm:
(-[WebCoreIconDatabaseBridge retainIconForURL:]): Changed IconDatabase method name
(-[WebCoreIconDatabaseBridge releaseIconForURL:]): ditto
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::retainIconForPageURL): Name change
(WebCore::IconDatabase::releaseIconForPageURL): ditto
(WebCore::IconDatabase::setIconURLForPageURL): Added the null site-icon check when changing a PageURL's iconURL
* loader/icon/IconDatabase.h: Some renames
2006-08-14 Eric Seidel <eric@eseidel.com>
Reviewed by mjs.
<mask>, <marker>, <pattern> inside <defs> do not work
http://bugzilla.opendarwin.org/show_bug.cgi?id=6548
* ksvg2/svg/SVGDefsElement.cpp:
(WebCore::SVGDefsElement::SVGDefsElement): moved to .cpp file
(WebCore::SVGDefsElement::isValid): moved to .cpp file
(WebCore::SVGDefsElement::rendererIsNeeded): Added.
(WebCore::SVGDefsElement::createRenderer): Added.
* ksvg2/svg/SVGDefsElement.h:
* ksvg2/svg/SVGGElement.cpp:
(WebCore::SVGGElement::SVGGElement): adjusted spacing
(WebCore::SVGGElement::parseMappedAttribute): adjusted spacing
(WebCore::SVGDummyElement::SVGDummyElement): adjusted spacing
2006-08-14 Eric Seidel <eric@eseidel.com>
Reviewed by darin and mjs.
Add better SVGLoad event support.
http://bugzilla.opendarwin.org/show_bug.cgi?id=6010
There will still need to be additional support added for <link> and <script> elements.
Not all of the error -> loaded -> error transition cases work yet.
* dom/EventTargetNode.cpp:
(WebCore::EventTargetNode::dispatchGenericEvent):
* html/HTMLImageLoader.cpp:
(WebCore::HTMLImageLoader::dispatchLoadEvent):
* html/HTMLImageLoader.h:
(WebCore::HTMLImageLoader::haveFiredLoadEvent):
(WebCore::HTMLImageLoader::setHaveFiredLoadEvent):
* ksvg2/misc/SVGImageLoader.cpp:
(WebCore::SVGImageLoader::SVGImageLoader):
(WebCore::SVGImageLoader::dispatchLoadEvent):
* ksvg2/misc/SVGImageLoader.h:
* ksvg2/svg/SVGAElement.cpp:
(WebCore::SVGAElement::parseMappedAttribute):
* ksvg2/svg/SVGAnimatedBoolean.h:
* ksvg2/svg/SVGElement.cpp:
(WebCore::SVGElement::SVGElement):
(WebCore::SVGElement::parseMappedAttribute):
(WebCore::SVGElement::haveLoadedRequiredResources):
(WebCore::SVGElement::sendSVGLoadEventIfPossible):
(WebCore::SVGElement::closeRenderer):
* ksvg2/svg/SVGElement.h:
(WebCore::SVGElement::rendererIsNeeded):
(WebCore::svg_dynamic_cast):
* ksvg2/svg/SVGExternalResourcesRequired.h:
* ksvg2/svg/SVGImageElement.cpp:
(SVGImageElement::SVGImageElement):
(SVGImageElement::haveLoadedRequiredResources):
* ksvg2/svg/SVGImageElement.h:
* ksvg2/svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::parseMappedAttribute):
* ksvg2/svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::SVGScriptElement):
(WebCore::SVGScriptElement::parseMappedAttribute):
(WebCore::SVGScriptElement::executeScript):
* xml/xmlhttprequest.cpp:
(WebCore::XMLHttpRequest::callReadyStateChangeListener): use new Event() instead of createEvent
2006-08-14 Anders Carlsson <acarlsson@apple.com>
Reviewed by Maciej.
http://bugzilla.opendarwin.org/show_bug.cgi?id=10393
Autogenerate NodeIterator and TreeWalker.
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
Add new files.
* bindings/js/JSNodeIteratorCustom.cpp: Added.
(WebCore::JSNodeIterator::mark):
* bindings/js/JSTreeWalkerCustom.cpp: Added.
(WebCore::JSTreeWalker::mark):
* bindings/js/kjs_traversal.cpp:
* bindings/js/kjs_traversal.h:
Remove implementations of DOMNodeIterator and DOMTreeWalker.
* bindings/scripts/CodeGeneratorJS.pm:
Add "CustomMarkFunction" attribute for classes where mark() needs to be overridden.
* bindings/objc/DOM.mm:
(-[DOMNodeIterator detach]):
* dom/NodeIterator.cpp:
(WebCore::NodeIterator::detach):
* dom/NodeIterator.h:
Get rid of exception in detach, it isn't used at all and this function can't throw an exception according to the spec.
* dom/NodeIterator.idl: Added.
* dom/TreeWalker.idl: Added.
2006-08-14 Brady Eidson <beidson@apple.com>
Reviewed by John
The changes are plentiful, but small, mostly to improve performance
1) Add a bool flag to SiteIcon to stop it from querying the database over and over
2) Added a pageURL->iconURL hashmap to cache database results, as an optimization
3) Fix a bug in setIconURLForPageURL code where the pageURL would still point to an old icon
4) Added isIconURLRetained() to optimize the retain count check
5) Prune old, unused code
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::imageDataForIconID): Removed unused code
(WebCore::IconDatabase::imageDataForIconURL): Removed unused code
(WebCore::IconDatabase::imageDataForPageURL): Removed unused code
(WebCore::IconDatabase::isIconExpiredForIconURL): Removed LOG msg
(WebCore::IconDatabase::isIconExpiredForPageURL): Removed LOG msg
(WebCore::IconDatabase::iconURLForPageURL): Added a hashmap cache to avoid common queries
(WebCore::IconDatabase::releaseIconForURL): Changed to is isRetained() instead of retainCount()
(WebCore::IconDatabase::isIconURLRetained): Added - we don't care about the actual retain count
for an icon so much as whether or not it is retained
(WebCore::IconDatabase::setIconURLForPageURL): If the new and old iconURLs are the same, skip the
SQLite code
* loader/icon/IconDatabase.h: Added new methods/variables
* loader/icon/SiteIcon.cpp:
(SiteIcon::SiteIcon): Added a flag so it only queries the database for icon data once
(SiteIcon::getImage): Ditto
2006-08-14 David Hyatt <hyatt@apple.com>
Fix for bug 10385, add more support for crappy pseudo-XML-in-HTML.
Reviewed by ggaren
Added fast/parser/bad-xml-slash.html
* html/HTMLTokenizer.cpp:
(WebCore::HTMLTokenizer::parseTag):
2006-08-14 Darin Adler <darin@apple.com>
Reviewed by John Sullivan.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10204
REGRESSION: title tag parsing problem breaks Travelocity and Google Analytics pages
Test: fast/parser/title-error-test.html
* html/HTMLParser.cpp: (WebCore::HTMLParser::handleError): Fixed an error
handling case that was skipping until a </style> tag in code that was shared
between both <title> and <style>. Also rearranged the code a tiny bit.
2006-08-14 Darin Adler <darin@apple.com>
Reviewed by Hyatt.
- fixed some storage leaks
(part of http://bugzilla.opendarwin.org/show_bug.cgi?id=10259)
* platform/mac/ResourceLoaderMac.mm: (WebCore::ResourceLoader::start):
Rearrange code so that "delete this" is called any time the function returns
false -- ownership was inconsistent before.
* rendering/RenderContainer.cpp: (WebCore::RenderContainer::removeChildNode):
Call deleteLineBoxWrapper even when documentBeingDestroyed() is true, because
some of what it does has to be done during destruction. A little awkward since
I preserved the order of operations. Perhaps we could structure this better later.
2006-08-14 David Harrison <harrison@apple.com>
Reviewed by John Sullivan and Geoff Garen.
<rdar://problem/3854950> AX Seed: Blackboard Learning Systems - frame names need to be put in AXDescription AXAttribute
Test cases added: None. Manual AX testing is way too awkward, and automated testing
is not possible. See following bug...
<rdar://problem/4256882> Need automated testing support for accessibility APIs
* bridge/mac/WebCoreAXObject.mm:
(-[WebCoreAXObject accessibilityDescription]):
For a web area, return the name of the owning frame or iframe.
(-[WebCoreAXObject accessibilityAttributeNames]):
Advertize NSAccessibilityDescriptionAttribute.
(-[WebCoreAXObject rendererForView:]):
Clean up some old naming.
2006-08-11 Anders Carlsson <acarlsson@apple.com>
Reviewed by Darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=10353
XMLSerializer and DOMParser should have real implementations
Make real implementation files for DOMParser and XMLSerializer and wrap them
using our bindings generation.
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMParser.cpp: Removed.
* bindings/js/JSDOMParser.h: Removed.
* bindings/js/JSXMLSerializer.cpp: Removed.
* bindings/js/JSXMLSerializer.h: Removed.
* bindings/js/kjs_window.cpp:
(KJS::Window::getValueProperty):
* bindings/js/kjs_window.h:
(KJS::Window::):
* page/DOMWindow.idl:
* xml/DOMParser.cpp: Added.
(WebCore::DOMParser::parseFromString):
* xml/DOMParser.h: Added.
* xml/DOMParser.idl: Added.
* xml/XMLSerializer.cpp: Added.
(WebCore::XMLSerializer::serializeToString):
* xml/XMLSerializer.h: Added.
* xml/XMLSerializer.idl: Added.
2006-08-14 Maciej Stachowiak <mjs@apple.com>
Reviewed by Brady.
- removed WebKit-level dependencies from WebFormDataStream. Use WebCore version of system interface
* WebCore.exp: export new functions
* platform/mac/WebCoreSystemInterface.h: Added CFReadStream related functions
* platform/mac/WebCoreSystemInterface.mm: ditto
2006-08-13 Maks Orlovich <maksim@kde.org>
Reviewed (and tweaked a little) by Maciej.
- shrank the size of JSObject by 8 bytes and made the corresponding reduction to the cell size, resulting
in a 1.2% speed improvement on JS iBench (and probably overall memory savings).
The WebCore part of this is to expect only FunctionImp to have a scope, not all JSObjects.
* bindings/js/kjs_events.cpp:
(KJS::JSLazyEventListener::parseCode):
2006-08-12 Eric Seidel <eric@eseidel.com>
Reviewed by hyatt and mjs.
Fix two missing null checks causing layout test crashes.
* css/cssstyleselector.cpp:
(WebCore::CSSStyleSelector::adjustRenderStyle): check e for null (null for pseudo styles)
* kcanvas/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::requiresLayer): check parent()->element() for null
2006-08-11 Eric Seidel <eric@eseidel.com>
Reviewed by andersca.
The outermost <svg> element needs to clip itself
http://bugzilla.opendarwin.org/show_bug.cgi?id=5358
* css/cssstyleselector.cpp:
(WebCore::CSSStyleSelector::adjustRenderStyle): adjust for SVG overflow rules
* kcanvas/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::requiresLayer): only require layers for absolute/relative positioning of outermost SVG
(WebCore::RenderSVGContainer::paint):
* kcanvas/device/KRenderingDevice.h:
* kcanvas/device/quartz/KRenderingDeviceQuartz.h: remove dead methods
* kcanvas/device/quartz/KRenderingDeviceQuartz.mm: remove dead methods
(WebCore::KRenderingDeviceContextQuartz::KRenderingDeviceContextQuartz):
* ksvg2/svg/SVGPaint.cpp: spacing changes
(WebCore::SVGPaint::SVGPaint): spacing cleanup
* ksvg2/svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::parseMappedAttribute): spacing cleanup
* platform/GraphicsContext.h: Added concatCTM
* platform/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::concatCTM): Added.
2006-08-11 Brady Eidson <beidson@apple.com>
Reviewed by Maciej
Renamed a method/parameter for clarity and consistency, as well as some style
cleanups and removing some ridiculously verbose log messages.
Also added an _isEmpty method to the database and bridge for WebKit's use.
Finally, added a central way for both WebKit and WebCore to get the icon database filename
* bridge/mac/WebCoreIconDatabaseBridge.h: Added _isEmpty and defaultDatabaseFilename
* bridge/mac/WebCoreIconDatabaseBridge.mm: Removed an unnecessary semicolon off most of these methods
(-[WebCoreIconDatabaseBridge openSharedDatabaseWithPath:]):
(-[WebCoreIconDatabaseBridge closeSharedDatabase]):
(-[WebCoreIconDatabaseBridge isOpen]):
(-[WebCoreIconDatabaseBridge _isEmpty]): Added
(-[WebCoreIconDatabaseBridge setPrivateBrowsingEnabled:]):
(-[WebCoreIconDatabaseBridge privateBrowsingEnabled]):
(-[WebCoreIconDatabaseBridge iconForPageURL:withSize:]):
(-[WebCoreIconDatabaseBridge iconURLForPageURL:]):
(-[WebCoreIconDatabaseBridge defaultIconWithSize:]):
(-[WebCoreIconDatabaseBridge retainIconForURL:]):
(-[WebCoreIconDatabaseBridge releaseIconForURL:]):
(-[WebCoreIconDatabaseBridge _setIconData:forIconURL:]):
(-[WebCoreIconDatabaseBridge _setHaveNoIconForIconURL:]):
(-[WebCoreIconDatabaseBridge _setIconURL:forPageURL:]):
(-[WebCoreIconDatabaseBridge _hasIconForIconURL:]):
(-[WebCoreIconDatabaseBridge defaultDatabaseFilename]): Added
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::defaultDatabaseFilename): Added
(WebCore::IconDatabase::open):
(WebCore::IconDatabase::isEmpty): Added
(WebCore::IconDatabase::retainIconForURL): Removed log message
(WebCore::IconDatabase::releaseIconForURL): Removed log message
* loader/icon/IconDatabase.h:
2006-08-11 David Hyatt <hyatt@apple.com>
Eliminate RenderImageButton.
Reviewed by darin
* WebCore.xcodeproj/project.pbxproj:
* bridge/mac/WebCoreAXObject.mm:
(-[WebCoreAXObject isImageButton]):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::createRenderer):
* rendering/RenderImage.h:
(WebCore::RenderImage::isImage):
2006-08-11 Adele Peterson <adele@apple.com>
Reviewed by Brady.
- Fix for <rdar://problem/4656274>
REGRESSION: option elements are selected when added regardless of "selected" property
Test: fast/forms/option-constructor-selected.html
* html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::setOption):
When adding an option element, check that the option element is selected before calling setSelectedIndex.
2006-08-11 David Hyatt <hyatt@apple.com>
Fix for bug 10349, make sure to call setChanged when an anchor changes
from not being a link to being a link (and vice versa).
Test is in fast/dynamic/link-href-change.html
Reviewed by darin
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::HTMLAnchorElement):
(WebCore::HTMLAnchorElement::parseMappedAttribute):
* html/HTMLAnchorElement.h:
* html/HTMLAreaElement.cpp:
(WebCore::HTMLAreaElement::parseMappedAttribute):
2006-08-09 Rob Buis <buis@kde.org>
Reviewed by Darin.
Revert an over-optimization step that messed up the HashSet lookup.
* dom/DOMImplementation.cpp:
2006-08-12 Oliver <ojh16@student.canterbury.ac.nz>
Rubber stamped by tim
Removed commented out code
* kcanvas/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::paint):
2006-08-12 Oliver <ojh16@student.canterbury.ac.nz>
Reviewed by geoff
Fixed regression in SVG image layout
(see bug #10346)
* kcanvas/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::paint):
2006-08-10 Anders Carlsson <acarlsson@apple.com>
Rubber-stamped by Maciej.
Move xpath to xml.
* DerivedSources.make:
* WebCore.vcproj/WebCore/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* xpath/XPathEvaluator.cpp: Removed.
* xpath/XPathEvaluator.h: Removed.
* xpath/XPathEvaluator.idl: Removed.
* xpath/XPathExpression.cpp: Removed.
* xpath/XPathExpression.h: Removed.
* xpath/XPathExpression.idl: Removed.
* xpath/XPathNSResolver.cpp: Removed.
* xpath/XPathNSResolver.h: Removed.
* xpath/XPathNSResolver.idl: Removed.
* xpath/XPathNamespace.cpp: Removed.
* xpath/XPathNamespace.h: Removed.
* xpath/XPathResult.cpp: Removed.
* xpath/XPathResult.h: Removed.
* xpath/XPathResult.idl: Removed.
* xpath/impl/XPathExpressionNode.cpp: Removed.
* xpath/impl/XPathExpressionNode.h: Removed.
* xpath/impl/XPathFunctions.cpp: Removed.
* xpath/impl/XPathFunctions.h: Removed.
* xpath/impl/XPathGrammar.y: Removed.
* xpath/impl/XPathParser.cpp: Removed.
* xpath/impl/XPathParser.h: Removed.
* xpath/impl/XPathPath.cpp: Removed.
* xpath/impl/XPathPath.h: Removed.
* xpath/impl/XPathPredicate.cpp: Removed.
* xpath/impl/XPathPredicate.h: Removed.
* xpath/impl/XPathStep.cpp: Removed.
* xpath/impl/XPathStep.h: Removed.
* xpath/impl/XPathUtil.cpp: Removed.
* xpath/impl/XPathUtil.h: Removed.
* xpath/impl/XPathValue.cpp: Removed.
* xpath/impl/XPathValue.h: Removed.
* xpath/impl/XPathVariableReference.cpp: Removed.
* xpath/impl/XPathVariableReference.h: Removed.
2006-08-10 David Harrison <harrison@apple.com>
Reviewed by John Sullivan.
<rdar://problem/4600112> REGRESSION: VO no longer able to review text within an edit field on web pages
Test cases added: None. Manual AX testing is way too awkward, and automated testing
is not possible. See following bug...
<rdar://problem/4256882> Need automated testing support for accessibility APIs
* bridge/mac/WebCoreAXObject.mm:
(-[WebCoreAXObject value]):
Add handling for text input fields.
2006-08-09 Graham Dennis <graham.dennis@gmail.com>
Reviewed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10247
REGRESSION: Unable to build webkit without SVG/XPATH
* bindings/js/kjs_binding.cpp:
(KJS::setDOMException):
* bindings/js/kjs_dom.cpp:
(KJS::toJS):
* bindings/js/kjs_html.cpp:
(KJS::HTMLElementFunction::callAsFunction):
* bindings/js/kjs_proxy.cpp:
* bindings/js/kjs_proxy.h:
* bindings/objc/DOMInternal.h:
* bindings/objc/DOMInternal.mm:
(raiseDOMException):
* bindings/objc/DOMXPath.mm:
* bindings/objc/DOMXPathInternal.h:
* bindings/scripts/CodeGeneratorJS.pm:
* bridge/mac/WebCoreFrameBridge.mm:
(+[WebCoreFrameBridge supportedNonImageMIMETypes]):
* css/CSSGrammar.y:
* css/CSSStyleDeclaration.cpp:
(WebCore::propertyID):
* css/cssparser.cpp:
(WebCore::CSSParser::parseValue):
* css/cssparser.h:
* css/cssstyleselector.cpp:
(WebCore::CSSStyleSelector::loadDefaultStyle):
(WebCore::CSSStyleSelector::applyProperty):
* css/cssstyleselector.h:
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::~Document):
(WebCore::Document::createElementNS):
(WebCore::Document::implicitClose):
(WebCore::Document::recalcStyleSelector):
(WebCore::Document::createEvent):
* dom/Document.h:
* dom/Document.idl:
* dom/Node.cpp:
(WebCore::Node::createRendererIfNeeded):
* dom/Node.h:
* dom/XMLTokenizer.cpp:
(WebCore::XMLTokenizer::endElementNs):
(WebCore::XMLTokenizer::insertErrorMessageBlock):
* html/HTMLEmbedElement.cpp:
* html/HTMLEmbedElement.h:
* html/HTMLObjectElement.cpp:
* html/HTMLObjectElement.h:
* kcanvas/KCanvasCreator.cpp:
* kcanvas/KCanvasCreator.h:
* kcanvas/KCanvasFilters.cpp:
* kcanvas/KCanvasFilters.h:
* kcanvas/KCanvasImage.h:
* kcanvas/KCanvasMatrix.cpp:
* kcanvas/KCanvasMatrix.h:
* kcanvas/KCanvasPath.cpp:
* kcanvas/KCanvasPath.h:
* kcanvas/KCanvasResourceListener.h:
* kcanvas/KCanvasResources.cpp:
* kcanvas/KCanvasResources.h:
* kcanvas/KCanvasTreeDebug.cpp:
* kcanvas/RenderForeignObject.cpp:
* kcanvas/RenderForeignObject.h:
* kcanvas/RenderPath.cpp:
* kcanvas/RenderPath.h:
* kcanvas/RenderSVGContainer.cpp:
* kcanvas/RenderSVGContainer.h:
* kcanvas/RenderSVGImage.cpp:
* kcanvas/RenderSVGImage.h:
* kcanvas/RenderSVGText.cpp:
* kcanvas/RenderSVGText.h:
* kcanvas/device/KRenderingDevice.cpp:
* kcanvas/device/KRenderingDevice.h:
* kcanvas/device/KRenderingFillPainter.cpp:
* kcanvas/device/KRenderingFillPainter.h:
* kcanvas/device/KRenderingPaintServer.h:
* kcanvas/device/KRenderingPaintServerGradient.cpp:
* kcanvas/device/KRenderingPaintServerGradient.h:
* kcanvas/device/KRenderingPaintServerPattern.cpp:
* kcanvas/device/KRenderingPaintServerPattern.h:
* kcanvas/device/KRenderingPaintServerSolid.cpp:
* kcanvas/device/KRenderingPaintServerSolid.h:
* kcanvas/device/KRenderingStrokePainter.cpp:
* kcanvas/device/KRenderingStrokePainter.h:
* kcanvas/device/quartz/KCanvasFilterQuartz.h:
* kcanvas/device/quartz/KCanvasFilterQuartz.mm:
* kcanvas/device/quartz/KCanvasItemQuartz.mm:
* kcanvas/device/quartz/KCanvasMaskerQuartz.mm:
* kcanvas/device/quartz/KCanvasPathQuartz.mm:
* kcanvas/device/quartz/KCanvasResourcesQuartz.mm:
* kcanvas/device/quartz/KRenderingDeviceQuartz.h:
* kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
* kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
* kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
* kcanvas/device/quartz/QuartzSupport.h:
* kcanvas/device/quartz/QuartzSupport.mm:
* ksvg2/bindings/js/JSSVGElementWrapperFactory.cpp:
* ksvg2/bindings/js/JSSVGElementWrapperFactory.h:
* ksvg2/css/SVGCSSParser.cpp:
* ksvg2/css/SVGCSSStyleSelector.cpp:
* ksvg2/css/SVGRenderStyle.cpp:
* ksvg2/css/SVGRenderStyle.h:
* ksvg2/css/SVGRenderStyleDefs.cpp:
* ksvg2/css/SVGRenderStyleDefs.h:
* ksvg2/ecma/GlobalObject.cpp:
* ksvg2/ecma/GlobalObject.h:
* ksvg2/events/JSSVGLazyEventListener.cpp:
* ksvg2/events/JSSVGLazyEventListener.h:
* ksvg2/events/SVGZoomEvent.cpp:
* ksvg2/events/SVGZoomEvent.h:
* ksvg2/ksvg.h:
* ksvg2/misc/KCanvasRenderingStyle.cpp:
* ksvg2/misc/KCanvasRenderingStyle.h:
* ksvg2/misc/KSVGTimeScheduler.cpp:
* ksvg2/misc/KSVGTimeScheduler.h:
* ksvg2/misc/SVGDocumentExtensions.cpp:
* ksvg2/misc/SVGDocumentExtensions.h:
* ksvg2/misc/SVGImageLoader.cpp:
* ksvg2/misc/SVGImageLoader.h:
* ksvg2/svg/DOMList.h:
* ksvg2/svg/SVGAElement.cpp:
* ksvg2/svg/SVGAElement.h:
* ksvg2/svg/SVGAngle.cpp:
* ksvg2/svg/SVGAngle.h:
* ksvg2/svg/SVGAnimateColorElement.cpp:
* ksvg2/svg/SVGAnimateColorElement.h:
* ksvg2/svg/SVGAnimateElement.cpp:
* ksvg2/svg/SVGAnimateElement.h:
* ksvg2/svg/SVGAnimateTransformElement.cpp:
* ksvg2/svg/SVGAnimateTransformElement.h:
* ksvg2/svg/SVGAnimatedAngle.cpp:
* ksvg2/svg/SVGAnimatedAngle.h:
* ksvg2/svg/SVGAnimatedBoolean.cpp:
* ksvg2/svg/SVGAnimatedBoolean.h:
* ksvg2/svg/SVGAnimatedColor.cpp:
* ksvg2/svg/SVGAnimatedColor.h:
* ksvg2/svg/SVGAnimatedEnumeration.cpp:
* ksvg2/svg/SVGAnimatedEnumeration.h:
* ksvg2/svg/SVGAnimatedInteger.cpp:
* ksvg2/svg/SVGAnimatedInteger.h:
* ksvg2/svg/SVGAnimatedLength.cpp:
* ksvg2/svg/SVGAnimatedLength.h:
* ksvg2/svg/SVGAnimatedLengthList.cpp:
* ksvg2/svg/SVGAnimatedLengthList.h:
* ksvg2/svg/SVGAnimatedNumber.cpp:
* ksvg2/svg/SVGAnimatedNumber.h:
* ksvg2/svg/SVGAnimatedNumberList.cpp:
* ksvg2/svg/SVGAnimatedNumberList.h:
* ksvg2/svg/SVGAnimatedPathData.cpp:
* ksvg2/svg/SVGAnimatedPathData.h:
* ksvg2/svg/SVGAnimatedPoints.cpp:
* ksvg2/svg/SVGAnimatedPoints.h:
* ksvg2/svg/SVGAnimatedPreserveAspectRatio.cpp:
* ksvg2/svg/SVGAnimatedPreserveAspectRatio.h:
* ksvg2/svg/SVGAnimatedRect.cpp:
* ksvg2/svg/SVGAnimatedRect.h:
* ksvg2/svg/SVGAnimatedString.cpp:
* ksvg2/svg/SVGAnimatedString.h:
* ksvg2/svg/SVGAnimatedTemplate.h:
* ksvg2/svg/SVGAnimatedTransformList.cpp:
* ksvg2/svg/SVGAnimatedTransformList.h:
* ksvg2/svg/SVGAnimationElement.cpp:
* ksvg2/svg/SVGAnimationElement.h:
* ksvg2/svg/SVGCircleElement.cpp:
* ksvg2/svg/SVGCircleElement.h:
* ksvg2/svg/SVGClipPathElement.cpp:
* ksvg2/svg/SVGClipPathElement.h:
* ksvg2/svg/SVGColor.cpp:
* ksvg2/svg/SVGColor.h:
* ksvg2/svg/SVGComponentTransferFunctionElement.cpp:
* ksvg2/svg/SVGComponentTransferFunctionElement.h:
* ksvg2/svg/SVGCursorElement.cpp:
* ksvg2/svg/SVGCursorElement.h:
* ksvg2/svg/SVGDOMImplementation.cpp:
* ksvg2/svg/SVGDOMImplementation.h:
* ksvg2/svg/SVGDefsElement.cpp:
* ksvg2/svg/SVGDefsElement.h:
* ksvg2/svg/SVGDescElement.cpp:
* ksvg2/svg/SVGDescElement.h:
* ksvg2/svg/SVGDocument.cpp:
* ksvg2/svg/SVGDocument.h:
* ksvg2/svg/SVGElement.cpp:
* ksvg2/svg/SVGElement.h:
* ksvg2/svg/SVGElementInstance.cpp:
* ksvg2/svg/SVGElementInstance.h:
* ksvg2/svg/SVGElementInstanceList.cpp:
* ksvg2/svg/SVGElementInstanceList.h:
* ksvg2/svg/SVGEllipseElement.cpp:
* ksvg2/svg/SVGEllipseElement.h:
* ksvg2/svg/SVGExternalResourcesRequired.cpp:
* ksvg2/svg/SVGExternalResourcesRequired.h:
* ksvg2/svg/SVGFEBlendElement.cpp:
* ksvg2/svg/SVGFEBlendElement.h:
* ksvg2/svg/SVGFEColorMatrixElement.cpp:
* ksvg2/svg/SVGFEColorMatrixElement.h:
* ksvg2/svg/SVGFEComponentTransferElement.cpp:
* ksvg2/svg/SVGFEComponentTransferElement.h:
* ksvg2/svg/SVGFECompositeElement.cpp:
* ksvg2/svg/SVGFECompositeElement.h:
* ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
* ksvg2/svg/SVGFEDiffuseLightingElement.h:
* ksvg2/svg/SVGFEDisplacementMapElement.cpp:
* ksvg2/svg/SVGFEDisplacementMapElement.h:
* ksvg2/svg/SVGFEDistantLightElement.cpp:
* ksvg2/svg/SVGFEDistantLightElement.h:
* ksvg2/svg/SVGFEFloodElement.cpp:
* ksvg2/svg/SVGFEFloodElement.h:
* ksvg2/svg/SVGFEFuncAElement.cpp:
* ksvg2/svg/SVGFEFuncAElement.h:
* ksvg2/svg/SVGFEFuncBElement.cpp:
* ksvg2/svg/SVGFEFuncBElement.h:
* ksvg2/svg/SVGFEFuncGElement.cpp:
* ksvg2/svg/SVGFEFuncGElement.h:
* ksvg2/svg/SVGFEFuncRElement.cpp:
* ksvg2/svg/SVGFEFuncRElement.h:
* ksvg2/svg/SVGFEGaussianBlurElement.cpp:
* ksvg2/svg/SVGFEGaussianBlurElement.h:
* ksvg2/svg/SVGFEImageElement.cpp:
* ksvg2/svg/SVGFEImageElement.h:
* ksvg2/svg/SVGFELightElement.cpp:
* ksvg2/svg/SVGFELightElement.h:
* ksvg2/svg/SVGFEMergeElement.cpp:
* ksvg2/svg/SVGFEMergeElement.h:
* ksvg2/svg/SVGFEMergeNodeElement.cpp:
* ksvg2/svg/SVGFEMergeNodeElement.h:
* ksvg2/svg/SVGFEOffsetElement.cpp:
* ksvg2/svg/SVGFEOffsetElement.h:
* ksvg2/svg/SVGFEPointLightElement.cpp:
* ksvg2/svg/SVGFEPointLightElement.h:
* ksvg2/svg/SVGFESpecularLightingElement.cpp:
* ksvg2/svg/SVGFESpecularLightingElement.h:
* ksvg2/svg/SVGFESpotLightElement.cpp:
* ksvg2/svg/SVGFESpotLightElement.h:
* ksvg2/svg/SVGFETileElement.cpp:
* ksvg2/svg/SVGFETileElement.h:
* ksvg2/svg/SVGFETurbulenceElement.cpp:
* ksvg2/svg/SVGFETurbulenceElement.h:
* ksvg2/svg/SVGFilterElement.cpp:
* ksvg2/svg/SVGFilterElement.h:
* ksvg2/svg/SVGFilterPrimitiveStandardAttributes.cpp:
* ksvg2/svg/SVGFilterPrimitiveStandardAttributes.h:
* ksvg2/svg/SVGFitToViewBox.cpp:
* ksvg2/svg/SVGFitToViewBox.h:
* ksvg2/svg/SVGForeignObjectElement.cpp:
* ksvg2/svg/SVGForeignObjectElement.h:
* ksvg2/svg/SVGGElement.cpp:
* ksvg2/svg/SVGGElement.h:
* ksvg2/svg/SVGGradientElement.cpp:
* ksvg2/svg/SVGGradientElement.h:
* ksvg2/svg/SVGHelper.cpp:
* ksvg2/svg/SVGHelper.h:
* ksvg2/svg/SVGImageElement.cpp:
* ksvg2/svg/SVGImageElement.h:
* ksvg2/svg/SVGLangSpace.cpp:
* ksvg2/svg/SVGLangSpace.h:
* ksvg2/svg/SVGLength.cpp:
* ksvg2/svg/SVGLength.h:
* ksvg2/svg/SVGLengthList.cpp:
* ksvg2/svg/SVGLengthList.h:
* ksvg2/svg/SVGLineElement.cpp:
* ksvg2/svg/SVGLineElement.h:
* ksvg2/svg/SVGLinearGradientElement.cpp:
* ksvg2/svg/SVGLinearGradientElement.h:
* ksvg2/svg/SVGList.h:
* ksvg2/svg/SVGLocatable.cpp:
* ksvg2/svg/SVGLocatable.h:
* ksvg2/svg/SVGMarkerElement.cpp:
* ksvg2/svg/SVGMarkerElement.h:
* ksvg2/svg/SVGMaskElement.cpp:
* ksvg2/svg/SVGMaskElement.h:
* ksvg2/svg/SVGMatrix.cpp:
* ksvg2/svg/SVGMatrix.h:
* ksvg2/svg/SVGNumber.cpp:
* ksvg2/svg/SVGNumber.h:
* ksvg2/svg/SVGNumberList.cpp:
* ksvg2/svg/SVGNumberList.h:
* ksvg2/svg/SVGPaint.cpp:
* ksvg2/svg/SVGPaint.h:
* ksvg2/svg/SVGPathElement.cpp:
* ksvg2/svg/SVGPathElement.h:
* ksvg2/svg/SVGPathSeg.cpp:
* ksvg2/svg/SVGPathSeg.h:
* ksvg2/svg/SVGPathSegArc.cpp:
* ksvg2/svg/SVGPathSegArc.h:
* ksvg2/svg/SVGPathSegClosePath.cpp:
* ksvg2/svg/SVGPathSegClosePath.h:
* ksvg2/svg/SVGPathSegCurvetoCubic.cpp:
* ksvg2/svg/SVGPathSegCurvetoCubic.h:
* ksvg2/svg/SVGPathSegCurvetoCubicSmooth.cpp:
* ksvg2/svg/SVGPathSegCurvetoCubicSmooth.h:
* ksvg2/svg/SVGPathSegCurvetoQuadratic.cpp:
* ksvg2/svg/SVGPathSegCurvetoQuadratic.h:
* ksvg2/svg/SVGPathSegCurvetoQuadraticSmooth.cpp:
* ksvg2/svg/SVGPathSegCurvetoQuadraticSmooth.h:
* ksvg2/svg/SVGPathSegLineto.cpp:
* ksvg2/svg/SVGPathSegLineto.h:
* ksvg2/svg/SVGPathSegLinetoHorizontal.cpp:
* ksvg2/svg/SVGPathSegLinetoHorizontal.h:
* ksvg2/svg/SVGPathSegLinetoVertical.cpp:
* ksvg2/svg/SVGPathSegLinetoVertical.h:
* ksvg2/svg/SVGPathSegList.cpp:
* ksvg2/svg/SVGPathSegList.h:
* ksvg2/svg/SVGPathSegMoveto.cpp:
* ksvg2/svg/SVGPathSegMoveto.h:
* ksvg2/svg/SVGPatternElement.cpp:
* ksvg2/svg/SVGPatternElement.h:
* ksvg2/svg/SVGPoint.cpp:
* ksvg2/svg/SVGPoint.h:
* ksvg2/svg/SVGPointList.cpp:
* ksvg2/svg/SVGPointList.h:
* ksvg2/svg/SVGPolyElement.cpp:
* ksvg2/svg/SVGPolyElement.h:
* ksvg2/svg/SVGPolygonElement.cpp:
* ksvg2/svg/SVGPolygonElement.h:
* ksvg2/svg/SVGPolylineElement.cpp:
* ksvg2/svg/SVGPolylineElement.h:
* ksvg2/svg/SVGPreserveAspectRatio.cpp:
* ksvg2/svg/SVGPreserveAspectRatio.h:
* ksvg2/svg/SVGRadialGradientElement.cpp:
* ksvg2/svg/SVGRadialGradientElement.h:
* ksvg2/svg/SVGRect.cpp:
* ksvg2/svg/SVGRect.h:
* ksvg2/svg/SVGRectElement.cpp:
* ksvg2/svg/SVGRectElement.h:
* ksvg2/svg/SVGSVGElement.cpp:
* ksvg2/svg/SVGSVGElement.h:
* ksvg2/svg/SVGScriptElement.cpp:
* ksvg2/svg/SVGScriptElement.h:
* ksvg2/svg/SVGSetElement.cpp:
* ksvg2/svg/SVGSetElement.h:
* ksvg2/svg/SVGStopElement.cpp:
* ksvg2/svg/SVGStopElement.h:
* ksvg2/svg/SVGStringList.cpp:
* ksvg2/svg/SVGStringList.h:
* ksvg2/svg/SVGStylable.cpp:
* ksvg2/svg/SVGStylable.h:
* ksvg2/svg/SVGStyleElement.cpp:
* ksvg2/svg/SVGStyleElement.h:
* ksvg2/svg/SVGStyledElement.cpp:
* ksvg2/svg/SVGStyledElement.h:
* ksvg2/svg/SVGStyledLocatableElement.cpp:
* ksvg2/svg/SVGStyledLocatableElement.h:
* ksvg2/svg/SVGStyledTransformableElement.cpp:
* ksvg2/svg/SVGStyledTransformableElement.h:
* ksvg2/svg/SVGSwitchElement.cpp:
* ksvg2/svg/SVGSwitchElement.h:
* ksvg2/svg/SVGSymbolElement.cpp:
* ksvg2/svg/SVGSymbolElement.h:
* ksvg2/svg/SVGTRefElement.cpp:
* ksvg2/svg/SVGTRefElement.h:
* ksvg2/svg/SVGTSpanElement.cpp:
* ksvg2/svg/SVGTSpanElement.h:
* ksvg2/svg/SVGTests.cpp:
* ksvg2/svg/SVGTests.h:
* ksvg2/svg/SVGTextContentElement.cpp:
* ksvg2/svg/SVGTextContentElement.h:
* ksvg2/svg/SVGTextElement.cpp:
* ksvg2/svg/SVGTextElement.h:
* ksvg2/svg/SVGTextPositioningElement.cpp:
* ksvg2/svg/SVGTextPositioningElement.h:
* ksvg2/svg/SVGTitleElement.cpp:
* ksvg2/svg/SVGTitleElement.h:
* ksvg2/svg/SVGTransform.cpp:
* ksvg2/svg/SVGTransform.h:
* ksvg2/svg/SVGTransformList.cpp:
* ksvg2/svg/SVGTransformList.h:
* ksvg2/svg/SVGTransformable.cpp:
* ksvg2/svg/SVGTransformable.h:
* ksvg2/svg/SVGURIReference.cpp:
* ksvg2/svg/SVGURIReference.h:
* ksvg2/svg/SVGUseElement.cpp:
* ksvg2/svg/SVGUseElement.h:
* ksvg2/svg/SVGViewElement.cpp:
* ksvg2/svg/SVGViewElement.h:
* ksvg2/svg/SVGZoomAndPan.cpp:
* ksvg2/svg/SVGZoomAndPan.h:
* ksvg2/svg/svgpathparser.cpp:
* ksvg2/svg/svgpathparser.h:
* page/DOMWindow.idl:
* page/Frame.cpp:
(WebCore::Frame::Frame):
(WebCore::Frame::begin):
(WebCore::Frame::pauseTimeouts):
(WebCore::Frame::resumeTimeouts):
* platform/GraphicsContext.h:
* platform/cg/GraphicsContextCG.cpp:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::isTransparent):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::containingBlock):
* rendering/RenderObject.h:
* rendering/RenderStyle.cpp:
(WebCore::RenderStyle::RenderStyle):
(WebCore::RenderStyle::inheritFrom):
(WebCore::RenderStyle::operator==):
(WebCore::RenderStyle::inheritedNotEqual):
(WebCore::RenderStyle::diff):
* rendering/RenderStyle.h:
* rendering/RenderTreeAsText.cpp:
(WebCore::write):
(WebCore::externalRepresentation):
* xpath/XPathEvaluator.cpp:
* xpath/XPathEvaluator.h:
* xpath/XPathExpression.cpp:
* xpath/XPathExpression.h:
* xpath/XPathNSResolver.cpp:
* xpath/XPathNSResolver.h:
* xpath/XPathNamespace.cpp:
* xpath/XPathNamespace.h:
* xpath/XPathResult.cpp:
* xpath/XPathResult.h:
* xpath/impl/XPathExpressionNode.cpp:
* xpath/impl/XPathExpressionNode.h:
* xpath/impl/XPathFunctions.cpp:
* xpath/impl/XPathFunctions.h:
* xpath/impl/XPathGrammar.y:
* xpath/impl/XPathParser.cpp:
* xpath/impl/XPathParser.h:
* xpath/impl/XPathPath.cpp:
* xpath/impl/XPathPath.h:
* xpath/impl/XPathPredicate.cpp:
* xpath/impl/XPathPredicate.h:
* xpath/impl/XPathStep.cpp:
* xpath/impl/XPathStep.h:
* xpath/impl/XPathUtil.cpp:
* xpath/impl/XPathUtil.h:
* xpath/impl/XPathValue.cpp:
* xpath/impl/XPathValue.h:
* xpath/impl/XPathVariableReference.cpp:
* xpath/impl/XPathVariableReference.h:
Change all #if SVG_SUPPORT to #ifdef SVG_SUPPORT and
#if XPATH_SUPPORT to #ifdef XPATH_SUPPORT
(except for one #if !SVG_SUPPORT to a #ifndef SVG_SUPPORT
in RenderTreeAsText.cpp)
2006-08-08 Rob Buis <buis@kde.org>
Reviewed by Darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=10230
SVGDOMImplementation should die (and be rolled into DOMImplementation)
Delete SVGDOMImplementation and references to it. The
svg specific functionality is now in DOMImplementation.
* WebCore.xcodeproj/project.pbxproj:
* dom/DOMImplementation.cpp:
(WebCore::svgFeatureSet):
(WebCore::DOMImplementation::hasFeature):
(WebCore::DOMImplementation::createDocument):
(WebCore::DOMImplementation::createSVGDocument):
* dom/DOMImplementation.h:
* ksvg2/bindings/idl/svg/SVGDOMImplementation.idl: Removed.
* ksvg2/misc/KSVGTimeScheduler.cpp:
* ksvg2/svg/SVGColor.cpp:
* ksvg2/svg/SVGComponentTransferFunctionElement.cpp:
* ksvg2/svg/SVGDocument.cpp:
(WebCore::SVGDocument::SVGDocument):
* ksvg2/svg/SVGDocument.h:
* ksvg2/svg/SVGElement.cpp:
(WebCore::SVGElement::isSupported):
* ksvg2/svg/SVGFEBlendElement.cpp:
* ksvg2/svg/SVGFEColorMatrixElement.cpp:
* ksvg2/svg/SVGFEComponentTransferElement.cpp:
* ksvg2/svg/SVGFECompositeElement.cpp:
* ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
* ksvg2/svg/SVGFEDisplacementMapElement.cpp:
* ksvg2/svg/SVGFEFloodElement.cpp:
* ksvg2/svg/SVGFEGaussianBlurElement.cpp:
* ksvg2/svg/SVGFELightElement.cpp:
* ksvg2/svg/SVGFEMergeElement.cpp:
* ksvg2/svg/SVGFEOffsetElement.cpp:
* ksvg2/svg/SVGFESpecularLightingElement.cpp:
* ksvg2/svg/SVGFETileElement.cpp:
* ksvg2/svg/SVGFETurbulenceElement.cpp:
* ksvg2/svg/SVGGradientElement.cpp:
* ksvg2/svg/SVGPatternElement.cpp:
* ksvg2/svg/SVGPolyElement.cpp:
* ksvg2/svg/SVGStopElement.cpp:
* ksvg2/svg/SVGStyledElement.cpp:
* ksvg2/svg/SVGStyledTransformableElement.cpp:
* ksvg2/svg/SVGTests.cpp:
(WebCore::SVGTests::isValid):
* ksvg2/svg/SVGTransformable.cpp:
* page/Frame.cpp:
(WebCore::Frame::begin):
2006-08-07 Brady Eidson <beidson@apple.com>
Reviewed by Anders and John
Icons can now refresh when new data is sent from WebKit, both on disk and in memory
* bridge/mac/WebCoreIconDatabaseBridge.h:
* bridge/mac/WebCoreIconDatabaseBridge.mm:
(WebCore::IconDatabase::loadIconFromURL): Allows WebCore/Kit to kick off a load
outside of any greater context
(-[WebCoreIconDatabaseBridge isIconExpiredForIconURL:]):
(-[WebCoreIconDatabaseBridge isIconExpiredForPageURL:]): Allows WebKit
to get whether or not an icon has expired
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::recreateDatabase): Changed database schema slightly
(WebCore::IconDatabase::createPrivateTables): Changed database schema slightly
(WebCore::IconDatabase::iconForPageURL):
(WebCore::IconDatabase::isIconExpiredForIconURL): Get if an icon has expired
(WebCore::IconDatabase::isIconExpiredForPageURL): Get if an icon has expired
(WebCore::IconDatabase::setIconDataForIconURL): Force a refresh of the in memory
image when new icon data is loaded
(WebCore::IconDatabase::setIconURLForPageURL): added a check for null iconID
* loader/icon/IconDatabase.h: added/changed some methods
* loader/icon/SiteIcon.cpp:
(SiteIcon::getImage): simplified/removed debugging code
(SiteIcon::manuallySetImageData): allow the image data to be changed when new icon
data is loaded
2006-08-05 Darin Adler <darin@apple.com>
Reviewed by Eric Seidel.
- fix a storage leak
* rendering/RenderView.cpp: (WebCore::RenderView::setSelection):
Delete the values if we are going to exit without using the maps.
Otherwise all the values leak.
2006-08-05 Darin Adler <darin@apple.com>
Reviewed by Hyatt.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10213
REGRESSION: Crash in WebCore::RenderLayer::isTransparent involving <iframe> and <select>
Test: fast/frames/iframe-option-crash.xhtml
* rendering/RenderView.cpp: (WebCore::RenderView::paintBoxDecorations):
Check for a nil renderer.
2006-08-04 David Hyatt <hyatt@apple.com>
Fix for Radar bug #4644045, regression where dragging selection no longer
works for floats contained inside layers. I added an optimization to
refine dirty rect checking for layers, and it incorrectly excluded floats
from the paint bounds since PaintPhaseSelection was not considered when
analyzing the floatRect().
Reviewed by beth
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paint):
2006-08-04 David Hyatt <hyatt@apple.com>
Fix remove() so that it is equivalent to calling removeChild on the
parent. This involved moving three operations that remove did.
(1) Move the accessibility object cache removal into the destroy methods,
since this really should just happen when a render object is going away.
(2) removeFromObjectLists shifted into removeChild, which means it will
now be called more often (this is a correct change). Note that there is
also now a new guard on removeFromObjectLists so that it won't do any
work unless the document is not being destroyed.
(3) The big one. deleteLineBoxWrapper was not getting called to clean up
the line box tree. This moved right into RenderContainer's removeChildNode so
that it is now done even in the lowest level RenderContainer removal primitive.
Reviewed by beth
* rendering/RenderContainer.cpp:
(WebCore::RenderContainer::removeChildNode):
(WebCore::RenderContainer::removeChild):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::removeFromObjectLists):
(WebCore::RenderObject::destroy):
* rendering/RenderObject.h:
(WebCore::RenderObject::remove):
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::destroy):
2006-08-04 David Hyatt <hyatt@apple.com>
Back out the fix for list marker crashes. The actual bug here is that
there is a confusing mismatch between remove() and removeChild() in the
render tree. remove() does a little bit of extra work that removeChild
should be doing instead (so that remove() can just be a shorthand for
removeChild).
This conservative fix does not solve the remove/removeChild mismatch
but instead just changes the list marker updating code to use remove
instead.
Reviewed by beth
Test Case: fast/lists/dynamic-marker-crash.html
* rendering/ListMarkerBox.cpp:
* rendering/ListMarkerBox.h:
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::updateMarkerLocation):
2006-08-04 Sam Weinig <sam.weinig@gmail.com>
Reviewed by Darin.
- patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10192
Make WebCore (and friends) compile with -Wshorten-64-to-32
* Adds -Wshorten-64-to-32 flag to Xcode project.
* Adds 'f' to float literals where expecting a float.
* Use cosf() instead of cos() when assigning to a float.
* WebCore.xcodeproj/project.pbxproj:
* kcanvas/device/quartz/filters/WKDiffuseLightingFilter.m:
(+[WKDiffuseLightingFilter initialize]):
* kcanvas/device/quartz/filters/WKDiscreteTransferFilter.m:
(-[WKDiscreteTransferFilter outputImage]):
* kcanvas/device/quartz/filters/WKDisplacementMapFilter.m:
(+[WKDisplacementMapFilter initialize]):
* kcanvas/device/quartz/filters/WKSpecularLightingFilter.m:
(+[WKSpecularLightingFilter initialize]):
* kcanvas/device/quartz/filters/WKSpotLightFilter.m:
(-[WKSpotLightFilter outputImage]):
* kcanvas/device/quartz/filters/WKTableTransferFilter.m:
(-[WKTableTransferFilter outputImage]):
2006-08-03 David Hyatt <hyatt@apple.com>
Fix for bug 10229, don't bother trying to clear when no floats are
present. I suspect there's still a bug in the math that follows, but
this fix is safer in that it just does the obvious thing (and doesn't
compute any clearance if no floats are even around).
Reviewed by maciej
* ChangeLog:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::getClearDelta):
2006-08-03 Justin Garcia <justin.garcia@apple.com>
Reviewed by harrison
<rdar://problem/4641033/4515463/4052426/4046570/4053718/4053724/4060115/4062858>
Copy/Paste fidelity was bad.
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyInlineStyle):
* editing/markup.cpp:
(WebCore::startMarkup): We were not adding non-inheritable styles
to the markup for an element unless they were in the elements inline
style declaration.
2006-08-03 Sam Weinig <sam.weinig@gmail.com>
Reviewed by Darin.
- patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10176
Make WebCore compile with -Wundef
* Adds -Wundef flag to Xcode project
* Converts #ifs to #ifdef and #ifndefs where needed.
* Replaces #ifdef WIN32 with #if PLATFORM(WIN_OS) or PLATFORM(WIN)
(and in one instance in config.h with #if !COMPILER(MSVC))
* Added #define YYMAXDEPTH 10000 in XPathGrammar.y and CSSGrammar.y
to fix a warning from within Bison.
* Cleaned up style a little in surrounding code.
* WebCore.xcodeproj/project.pbxproj:
* bridge/mac/WebCoreAXObject.mm:
(-[WebCoreAXObject doAXTextMarkerRangeForUnorderedTextMarkers:]):
* config.h:
* css/CSSGrammar.y:
* css/MediaFeatureNames.cpp:
* css/MediaFeatureNames.h:
* css/cssparser.cpp:
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::setActive):
* dom/Element.cpp:
(WebCore::Element::attach):
* dom/Element.h:
* dom/EventNames.cpp:
* dom/EventNames.h:
* dom/NamedAttrMap.h:
* dom/Position.cpp:
* dom/QualifiedName.cpp:
* dom/QualifiedName.h:
* dom/Range.h:
* dom/XMLTokenizer.cpp:
(WebCore::XMLTokenizer::error):
* html/HTMLTokenizer.cpp:
(WebCore::HTMLTokenizer::scriptHandler):
(WebCore::HTMLTokenizer::scriptExecution):
(WebCore::HTMLTokenizer::parseTag):
(WebCore::HTMLTokenizer::continueProcessing):
(WebCore::HTMLTokenizer::write):
(WebCore::HTMLTokenizer::timerFired):
(WebCore::HTMLTokenizer::notifyFinished):
* kcanvas/device/quartz/KCanvasFilterQuartz.h:
* kcanvas/device/quartz/KRenderingDeviceQuartz.h:
* ksvg2/css/SVGRenderStyle.h:
* ksvg2/css/SVGRenderStyleDefs.h:
* ksvg2/scripts/make_names.pl:
* loader/CachedResource.h:
* loader/LoaderFunctions.h:
* loader/loader.h:
* page/Frame.cpp:
* page/FrameTree.cpp:
* page/FrameView.cpp:
(WebCore::FrameView::clear):
(WebCore::FrameView::layout):
(WebCore::FrameView::layoutTimerFired):
(WebCore::FrameView::scheduleRelayout):
(WebCore::FrameView::unscheduleRelayout):
* platform/AtomicString.cpp:
* platform/AtomicString.h:
* platform/Cursor.h:
* platform/DeprecatedArray.h:
* platform/DeprecatedString.cpp:
(WebCore::allocateHandle):
(WebCore::initializeHandleNodeBlock):
(WebCore::freeHandle):
* platform/FloatPoint.h:
* platform/FloatRect.h:
* platform/FloatSize.h:
* platform/GraphicsContext.h:
* platform/Image.h:
* platform/IntPoint.h:
* platform/IntRect.h:
(WebCore::IntRect::inflateX):
(WebCore::IntRect::inflateY):
* platform/IntSize.h:
* platform/PlatformKeyboardEvent.h:
* platform/PlatformMouseEvent.h:
* platform/PlatformString.h:
* platform/ResourceLoader.h:
* platform/ResourceLoaderInternal.h:
(WebCore::ResourceLoaderInternal::ResourceLoaderInternal):
* platform/ScrollView.h:
* platform/StaticConstructors.h:
* platform/StreamingTextDecoderICU.cpp:
(WebCore::StreamingTextDecoderICU::convert):
* platform/StringImpl.h:
* platform/Widget.h:
* platform/mac/BlockExceptions.mm:
* platform/mac/ColorMac.mm:
(+[WebCoreControlTintObserver WebCore]):
* platform/mac/FloatPointMac.mm:
* platform/mac/FloatRectMac.mm:
* platform/mac/FloatSizeMac.mm:
* platform/mac/FontMac.mm:
* platform/mac/GraphicsContextMac.mm:
(WebCore::GraphicsContext::drawFocusRing):
* platform/mac/IntPointMac.mm:
* platform/mac/IntRectMac.mm:
* platform/mac/IntSizeMac.mm:
* platform/mac/WebCoreSystemInterface.h:
* rendering/RenderBlock.h:
* rendering/RenderTableCell.h:
* rendering/bidi.cpp:
(WebCore::appendRun):
(WebCore::RenderBlock::layoutInlineChildren):
* xml/XSLTProcessor.cpp:
(WebCore::parseErrorFunc):
* xpath/impl/XPathGrammar.y:
2006-08-03 Adam Roben <aroben@apple.com>
Reviewed by Maciej and Beth.
Fix use-after-dispose heap corruption bug.
* rendering/ListMarkerBox.cpp:
(WebCore::ListMarkerBox::destroy): Only call removeChild if we're not
destroying the document
2006-08-03 Adam Roben <aroben@apple.com>
Reviewed by Anders.
- Fixed Windows build.
* platform/Color.cpp:
(WebCore::makeRGBAFromHSLA): Whitespace change
* platform/win/TemporaryLinkStubs.cpp: Add new method stubs
(PlatformScrollBar::PlatformScrollBar):
(PlatformScrollBar::~PlatformScrollBar):
(PlatformScrollBar::width):
(PlatformScrollBar::height):
(PlatformScrollBar::setEnabled):
(PlatformScrollBar::paint):
(PlatformScrollBar::setScrollBarValue):
(PlatformScrollBar::setKnobProportion):
(PlatformScrollBar::setRect):
(ScrollBar::ScrollBar):
(ScrollBar::scroll):
(ScrollBar::setValue):
2006-08-02 Justin Garcia <justin.garcia@apple.com>
Reviewed by mjs
<http://bugzilla.opendarwin.org/show_bug.cgi?id=10225>
GMail Editor: Change Hilite Color doesn't work
* editing/JSEditor.cpp: Added support for execCommand("HiliteColor", ...).
It's what GMail uses to implement text hiliting. It's just a synonym for BackColor.
* editing/SelectionController.cpp:
(WebCore::SelectionController::nodeWillBeRemoved): Moved a comment
a more appropriate place.
2006-08-03 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Adele and Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10177
REGRESSION: Successfully dragging text into a disabled field
Test: fast/forms/textfield-drag-into-disabled.html
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::createDivStyle): Changed to set -webkit-user-modify
to read-only on the inner div if the control is disabled.
(WebCore::RenderTextControl::updateFromElement): Ditto.
2006-08-03 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10198
REGRESSION: WebKit r15750 crashes while loading anthem.com
Test: fast/overflow/generated-content-crash.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateScrollInfoAfterLayout): Added a null check for
the renderer's element. Generated content does not have an element and
therefore does not need to maintain overflow status.
2006-08-03 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Anders.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10202
REGRESSION: Repro crash when loading an empty image document
Test: fast/tokenizer/image-empty-crash.html
* loader/ImageDocument.cpp:
(WebCore::ImageTokenizer::stopParsing): Added null check for m_imageElement.
(WebCore::ImageTokenizer::finish): Ditto.
2006-08-03 Darin Adler <darin@apple.com>
Reviewed by Anders.
- clean up "flip"-related code a tiny bit
* platform/Screen.h: Removed redundant parameter names.
* platform/mac/ScreenMac.mm:
(WebCore::flipScreenRect): Changed to call flipScreenPoint so we only have one
copy of the flipping code.
(WebCore::flipScreenPoint): Fixed indentation.
* bridge/mac/WebCoreFrameBridge.mm: (globalPoint): Removed type casts and
simplified a bit.
* platform/mac/PlatformMouseEventMac.mm: (WebCore::globalPositionForEvent):
* platform/mac/WheelEventMac.mm: (WebCore::globalPositionForEvent):
Removed unneeded local variable.
2006-08-02 David Hyatt <hyatt@apple.com>
Abstract RenderLayer scrollbar creation and destruction so that there
is a clean spot in which to drop in engine scrollbar stuff.
Reviewed by timo
* platform/ScrollBar.h:
(WebCore::ScrollBar::hasPlatformScrollBars):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::createScrollbar):
(WebCore::RenderLayer::destroyScrollbar):
(WebCore::RenderLayer::setHasHorizontalScrollbar):
(WebCore::RenderLayer::setHasVerticalScrollbar):
* rendering/RenderLayer.h:
2006-08-02 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=3438
incorrect display of transparent 1x1 PNGs
Test: fast/replaced/image-solid-color-with-alpha.html
* platform/mac/ImageMac.mm:
(WebCore::Image::checkForSolidColor): Changed to divide each color component
by the alpha component. You need to do that since the bitmap context has
premultiplied alpha but m_solidColor should be non-premultiplied.
2006-08-02 Adam Roben <aroben@apple.com>
Reviewed by Brady.
- Remove redundant #include
* loader/loader.cpp:
2006-07-31 Sam Weinig <sam.weinig@gmail.com>
Reviewed by Darin.
- patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=9955
Colors scaled from [0, 1] range to [0, 255] incorrectly
Fixes scaling issue and fixes Color to follow style guidelines.
* css/cssstyleselector.cpp:
(WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
* platform/Color.cpp:
(WebCore::calcHue):
(WebCore::makeRGBAFromHSLA):
(WebCore::Color::Color):
(WebCore::Color::name):
(WebCore::Color::setNamedColor):
(WebCore::Color::light):
(WebCore::Color::dark):
(WebCore::blend):
* platform/Color.h:
(WebCore::Color::Color):
(WebCore::Color::isValid):
(WebCore::Color::red):
(WebCore::Color::green):
(WebCore::Color::blue):
(WebCore::Color::alpha):
(WebCore::Color::rgb):
(WebCore::Color::setRGB):
(WebCore::operator==):
(WebCore::operator!=):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::drawBorder):
2006-07-31 Mitz Pettel <opendarwin.org@mitzpettel.com>
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10158
REGRESSION: Selection highlight is dark and opaque when solid-color images are used
Reviewed by Darin.
Pixel test: fast/backgrounds/solid-color-context-restore.html
* platform/mac/ImageMac.mm:
(WebCore::Image::draw): Added calls to preserve the graphics context
around the painting of a solid color image.
(WebCore::Image::drawTiled): Ditto.
2006-07-31 Maciej Stachowiak <mjs@apple.com>
Rubber-stamped by Tim Hatcher.
- renamed TransferJob to ResourceLoader
* Projects/gdk/webcore-gdk.bkl:
* WebCore.vcproj/WebCore/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* WebCoreSources.bkl:
* bridge/mac/FrameMac.mm:
* bridge/mac/WebCoreResourceLoaderImp.h:
* bridge/mac/WebCoreResourceLoaderImp.mm:
(-[WebCoreResourceLoaderImp redirectedToURL:]):
(-[WebCoreResourceLoaderImp addData:]):
(-[WebCoreResourceLoaderImp finishJobAndHandle:]):
* bridge/win/FrameWin.cpp:
* dom/XMLTokenizer.cpp:
(WebCore::openFunc):
* loader/Cache.cpp:
* loader/LoaderFunctions.h:
* loader/loader.cpp:
(WebCore::Loader::servePendingRequests):
(WebCore::Loader::receivedAllData):
(WebCore::Loader::receivedResponse):
(WebCore::Loader::receivedData):
(WebCore::Loader::cancelRequests):
(WebCore::Loader::jobForRequest):
* loader/loader.h:
* loader/mac/LoaderFunctionsMac.mm:
(WebCore::ServeSynchronousRequest):
* platform/ResourceLoader.cpp: Added.
(WebCore::ResourceLoader::ResourceLoader):
(WebCore::ResourceLoader::isErrorPage):
(WebCore::ResourceLoader::error):
(WebCore::ResourceLoader::setError):
(WebCore::ResourceLoader::queryMetaData):
(WebCore::ResourceLoader::addMetaData):
(WebCore::ResourceLoader::kill):
(WebCore::ResourceLoader::url):
(WebCore::ResourceLoader::postData):
(WebCore::ResourceLoader::method):
(WebCore::ResourceLoader::client):
* platform/ResourceLoader.h: Added.
(WebCore::ResourceLoader::getInternal):
* platform/ResourceLoaderClient.h: Added.
(WebCore::ResourceLoaderClient::~ResourceLoaderClient):
(WebCore::ResourceLoaderClient::receivedRedirect):
(WebCore::ResourceLoaderClient::receivedResponse):
(WebCore::ResourceLoaderClient::receivedData):
(WebCore::ResourceLoaderClient::receivedAllData):
* platform/ResourceLoaderInternal.h: Added.
(WebCore::ResourceLoaderInternal::ResourceLoaderInternal):
* platform/TransferJob.cpp: Removed.
* platform/TransferJob.h: Removed.
* platform/TransferJobClient.h: Removed.
* platform/TransferJobInternal.h: Removed.
* platform/gdk/FrameGdk.cpp:
(WebCore::FrameGdk::openURL):
(WebCore::FrameGdk::urlSelected):
(WebCore::FrameGdk::receivedData):
(WebCore::FrameGdk::receivedAllData):
* platform/gdk/FrameGdk.h:
* platform/gdk/ResourceLoaderCurl.cpp: Added.
(WebCore::ResourceLoaderInternal::~ResourceLoaderInternal):
(WebCore::ResourceLoader::~ResourceLoader):
(WebCore::ResourceLoader::start):
(WebCore::ResourceLoader::cancel):
* platform/gdk/ResourceLoaderManager.cpp: Added.
(WebCore::ResourceLoaderManager::ResourceLoaderManager):
(WebCore::ResourceLoaderManager::get):
(WebCore::ResourceLoaderManager::useSimpleTransfer):
(WebCore::writeCallback):
(WebCore::ResourceLoaderManager::downloadTimerCallback):
(WebCore::ResourceLoaderManager::remove):
(WebCore::ResourceLoaderManager::add):
(WebCore::ResourceLoaderManager::cancel):
* platform/gdk/ResourceLoaderManager.h: Added.
* platform/gdk/TemporaryLinkStubs.cpp:
(WebCore::ServeSynchronousRequest):
(WebCore::ResourceLoader::assembleResponseHeaders):
(WebCore::ResourceLoader::retrieveCharset):
* platform/gdk/TransferJobCurl.cpp: Removed.
* platform/gdk/TransferJobManager.cpp: Removed.
* platform/gdk/TransferJobManager.h: Removed.
* platform/mac/ResourceLoaderMac.mm: Added.
(WebCore::ResourceLoaderInternal::~ResourceLoaderInternal):
(WebCore::ResourceLoader::~ResourceLoader):
(WebCore::ResourceLoader::start):
(WebCore::ResourceLoader::assembleResponseHeaders):
(WebCore::ResourceLoader::retrieveCharset):
(WebCore::ResourceLoader::setLoader):
(WebCore::ResourceLoader::receivedResponse):
(WebCore::ResourceLoader::cancel):
* platform/mac/TransferJobMac.mm: Removed.
* platform/win/ResourceLoaderWin.cpp: Added.
(WebCore::addToOutstandingJobs):
(WebCore::lookupResourceLoader):
(WebCore::ResourceLoaderWndProc):
(WebCore::initializeOffScreenResourceLoaderWindow):
(WebCore::ResourceLoaderInternal::~ResourceLoaderInternal):
(WebCore::ResourceLoader::~ResourceLoader):
(WebCore::ResourceLoader::start):
(WebCore::ResourceLoader::fileLoadTimer):
(WebCore::ResourceLoader::cancel):
* platform/win/ResourceLoaderWin.h: Added.
* platform/win/TemporaryLinkStubs.cpp:
(WebCore::ServeSynchronousRequest):
(WebCore::ResourceLoader::assembleResponseHeaders):
(WebCore::ResourceLoader::retrieveCharset):
* platform/win/TransferJobWin.cpp: Removed.
* platform/win/TransferJobWin.h: Removed.
* xml/XSLTProcessor.cpp:
(WebCore::docLoaderFunc):
* xml/xmlhttprequest.cpp:
(WebCore::XMLHttpRequest::send):
(WebCore::XMLHttpRequest::receivedAllData):
(WebCore::XMLHttpRequest::receivedRedirect):
(WebCore::XMLHttpRequest::receivedData):
* xml/xmlhttprequest.h:
2006-07-31 Darin Adler <darin@apple.com>
Reviewed by Hyatt.
- removed obsolete cell margin hack
* rendering/RenderBox.cpp: (WebCore::RenderBox::calcVerticalMargins):
Set top and bottom margins to 0 for table cells instead of -16384.
No effect on layout (including layout tests).
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
Added a few comments about differences between this class and the
what the CSS specification says about computed style.
2006-07-31 Mark Rowe <opendarwin.org@bdash.net.nz>
Reviewed by Maciej.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9738
Bug 9738: Unqualified :hover selector ignored in strict parsing mode
* css/cssstyleselector.cpp:
(WebCore::CSSStyleSelector::checkSelector): Restrict the :hover and :active
exclusion based on onlyHoverActive to quirks mode.
2006-07-31 David Hyatt <hyatt@apple.com>
Fix for bug 10179, digg.com scrolls slowly. Improve fixed positioning
and fixed backgrounds so that a count of them is kept on the FrameView.
This allows us to switch slow scrolling on and off as these objects come
and go.
* css/cssstyleselector.cpp:
(WebCore::CSSStyleSelector::adjustRenderStyle):
(WebCore::CSSStyleSelector::applyProperty):
* page/FrameView.cpp:
(WebCore::FrameViewPrivate::reset):
(WebCore::FrameView::layout):
(WebCore::FrameView::useSlowRepaints):
(WebCore::FrameView::setUseSlowRepaints):
(WebCore::FrameView::addSlowRepaintObject):
(WebCore::FrameView::removeSlowRepaintObject):
* page/FrameView.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintBackgroundExtended):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::setStyle):
* rendering/RenderView.cpp:
(WebCore::RenderView::paintBoxDecorations):
2006-07-31 David Hyatt <hyatt@apple.com>
Begin disentangling of scrollbar logic in preparation for engine-implemented
scrollbars. Split ScrollBar into two classes, an abstract base (still named
ScrollBar) and a new PlatformScrollBar subclass. This subclass is used only
by platforms that want to continue to use a platform scrollbar (rather than
the engine one).
Reviewed by darin
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLCanvasElement.h:
* page/Frame.cpp:
* platform/PlatformScrollBar.h: Added.
(WebCore::PlatformScrollBar::isWidget):
* platform/ScrollBar.h:
(WebCore::ScrollBarClient::~ScrollBarClient):
(WebCore::ScrollBar::~ScrollBar):
(WebCore::ScrollBar::orientation):
(WebCore::ScrollBar::value):
(WebCore::ScrollBar::client):
* platform/mac/PlatformScrollBarMac.mm: Added.
(-[WebCoreScrollBar initWithPlatformScrollBar:]):
(-[WebCoreScrollBar detachPlatformScrollBar]):
(-[WebCoreScrollBar scroll:]):
(-[WebCoreScrollBar widget]):
(-[WebCoreScrollBar mouseDown:]):
(WebCore::PlatformScrollBar::PlatformScrollBar):
(WebCore::PlatformScrollBar::~PlatformScrollBar):
(WebCore::PlatformScrollBar::setScrollBarValue):
(WebCore::PlatformScrollBar::setKnobProportion):
(WebCore::PlatformScrollBar::scrollbarHit):
(WebCore::PlatformScrollBar::width):
(WebCore::PlatformScrollBar::height):
(WebCore::PlatformScrollBar::setRect):
(WebCore::PlatformScrollBar::setEnabled):
(WebCore::PlatformScrollBar::paint):
* platform/mac/ScrollBarMac.mm: Removed.
* platform/mac/WebCoreTextArea.mm:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::isPointInScrollbar):
* rendering/RenderFormElement.cpp:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::horizontalScrollbarWidget):
(WebCore::RenderLayer::verticalScrollbarWidget):
(WebCore::RenderLayer::valueChanged):
(WebCore::RenderLayer::setHasHorizontalScrollbar):
(WebCore::RenderLayer::setHasVerticalScrollbar):
(WebCore::RenderLayer::positionScrollbars):
* rendering/RenderLayer.h:
* rendering/RenderWidget.h:
2006-07-31 Adele Peterson <adele@apple.com>
Reviewed by John and Anders.
- Fix for <rdar://problem/4380576> onChange does not get called when field changed by return key
Test: fast/forms/onchange-enter-submit.html
Blur (which will fire onChange appropriately) before submitting a form when pressing Enter.
This matches the sequence of events fired in WinIE.
* html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler):
* html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::defaultEventHandler):
2006-07-31 Geoffrey Garen <ggaren@apple.com>
Reviewed by Kevin.
Moved string debug function outside of the WebCore namespace so that it's
easier to call in the debugger. I will never doubt Darin again (x100).
* platform/String.cpp:
(string):
2006-07-31 David Hyatt <hyatt@apple.com>
Partial fix for 5453. Improve overflow so that when it changes
dynamically from scroll/auto to hidden that we properly hide the
scrollbars. Also refine the dirty dashboard region updating so that
it only happens if the scrollbars genuinely come and go.
Also eliminate the extra repaint of the entire block. This should not be
necessary, since the scrollbars repaint themselves already and children
will repaint already if they move.
Reviewed by darin
Adding test case from bug into fast/overflow/dynamic-hidden.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setHasHorizontalScrollbar):
(WebCore::RenderLayer::setHasVerticalScrollbar):
(WebCore::RenderLayer::updateScrollInfoAfterLayout):
2006-07-31 Graham Dennis <graham.dennis@gmail.com>
Reviewed by justin
<http://bugzilla.opendarwin.org/show_bug.cgi?id=9507>
Empty style spans created in applyInlineStyle
Improves paste fidelity because some of these empty font/style spans had a non-zero
size and were messing up the layout of pasted content:
<rdar://problem/4515463>
REGRESSION: Blot and Mail both do a very poor job of pasting the main www.apple.com page
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyInlineStyle): Use the adjusted start node instead
of start.node(). Don't do any application if the endpoints are swapped. Adjust
endNode if the start node is a descendant of it, so that the pre-order traversal will
terminate properly.
2006-07-31 Geoffrey Garen <ggaren@apple.com>
Reviewed by Darin.
* platform/String.cpp:
(WebCore::string): Added a debugging function to create a String from a
const char*.
2006-07-31 Anders Carlsson <acarlsson@apple.com>
* css/CSSPrimitiveValue.cpp:
Fix windows build.
2006-07-31 Geoffrey Garen <ggaren@apple.com>
Reinstating my last change. Everything builds now.
2006-07-31 Geoffrey Garen <ggaren@apple.com>
Backing out my last change because it causes a build failure in some
configurations. This seems to be the cleanest way to get svn to cooperate.
2006-07-31 Geoffrey Garen <ggaren@apple.com>
Reviewed by Maciej.
Moved files around to make WebCore's structure clearer
and easier to explain.
DerivedSources/JS* -> bindings/js/DerivedSources/ (so JS* files
show up when you search inside bindings/js/, but are marked, at
the same time, as files that you should not edit manually)
WebCore+SVG/DOMList.h -> ksvg2/svg/ (only files inside ksvg2/svg/
use DOMList.h)
icon -> loader/icon
I tested that everything still builds.
2006-07-30 Darin Adler <darin@apple.com>
Reviewed by Tim Hatcher.
- some improvements for the benefit of the style pane of the inspector
* css/CSSComputedStyleDeclaration.cpp: Removed background-position
and border-spacing from the list of properties that show up in
computed style, because of background-position-x, background-position-y,
-webkit-border-horizontal-spacing and -webkit-border-vertical-spacing.
(WebCore::valueForLength): Added handling for undefinedLength, intrinsic,
and min-intrinsic.
(WebCore::primitiveValueFromLength): Removed code that would add a
space to the string for no good reason.
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Added a
special case for a line clamp of -1, which should come back as "none"
rather than an actual "-1".
(WebCore::CSSComputedStyleDeclaration::length): Return 0 if the
declaration has no corresponding node or no renderer.
(WebCore::CSSComputedStyleDeclaration::item): Check against length()
so that the two stay consistent rather than using a constant.
* css/CSSPrimitiveValue.cpp:
(WebCore::isCSSTokenizerIdentifier): Added.
(WebCore::isCSSTokenizerURL): Added.
(WebCore::quoteString): Added.
(WebCore::quoteStringIfNeeded): Changed to quote strings in many more
cases -- any cases where they would not parse in the CSS parser otherwise.
The main case this affects is font names with spaces in them.
(WebCore::quoteURLIfNeeded): Added.
(WebCore::CSSPrimitiveValue::cssText): Use quoteURLIfNeeded in the case
where we're making the text form of a URI.
* css/tokenizer.flex: Whitespace tweaks to line things up better.
2006-07-30 Eric Seidel <eric@eseidel.com>
Reviewed by gramps!
Remove some unused SVG code.
* ksvg2/ecma/Ecma.cpp: Removed.
* ksvg2/ecma/Ecma.h: Removed.
* ksvg2/ecma/GlobalObject.cpp: remove a couple dead functions.
* ksvg2/ecma/GlobalObject.h: add a comment about this dead code.
* ksvg2/ecma/SVGLookup.h: Removed.
2006-07-29 Darin Adler <darin@apple.com>
- Removed tabs from these source files that still had them.
We don't use them; that way source files look fine in editors
that have tabs set to 8 spaces or to 4 spaces.
- Removed allow-tabs Subversion property from the files too.
* bindings/objc/WebScriptObject.h:
* bindings/objc/WebScriptObject.mm:
* platform/FontData.cpp:
2006-07-29 Sam Weinig <sam.weinig@gmail.com>
Reviewed by Darin.
- patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10080
Adopt pedantic changes from the Unity project to improve
cross-compiler compatibility
Changes include:
* Removing trailing semicolon from namespace braces.
* Removing trailing comma from last enum declaration.
* Updating to match style guidelines.
* Adding missing newline to the end of the file.
* Turning on gcc warning for missing newline at the end of a source file
(GCC_WARN_ABOUT_MISSING_NEWLINE in Xcode, -Wnewline in gcc).
* Alphabetical sorting of Xcode source list files.
* Use abs() function from <math.h> instead of ABS() macro.
* Use C-style comments instead of C++ comments in files that might
be included by either C or C++ files.
* Use -numeric_limits<double>::infinity() instead of -HUGE_VAL.
* WebCore+SVG/DOMList.h:
* WebCore.xcodeproj/project.pbxproj:
* WebCorePrefix.h:
* bindings/js/JSCanvasRenderingContext2DCustom.cpp:
* bindings/js/JSXSLTProcessor.h:
* bindings/js/kjs_domnode.h:
(KJS::DOMNode::):
* bindings/objc/DOMCSS.h:
(-[DOMCSSValue enum]):
* bindings/objc/DOMCore.h:
(-[DOMImplementation createDocument:::]):
* bindings/objc/DOMEvents.h:
(-[DOMOverflowEvent enum]):
* bindings/objc/DOMRange.h:
* bindings/objc/DOMTraversal.h:
* bindings/objc/DOMXPath.h:
(-[DOMXPathNSResolver lookupNamespaceURI:]):
* bridge/mac/WebCoreFrameBridge.h:
* bridge/mac/WebCoreKeyboardAccess.h:
* css/makeprop:
* css/makevalues:
* dom/ChildNodeList.h:
* dom/DocPtr.h:
* dom/Document.h:
(WebCore::Document::):
* dom/DocumentMarker.h:
(WebCore::DocumentMarker::):
(WebCore::DocumentMarker::operator==):
(WebCore::DocumentMarker::operator!=):
* dom/EventTargetNode.h:
* dom/KeyboardEvent.h:
(WebCore::KeyboardEvent::):
* dom/NameNodeList.h:
(WebCore::NameNodeList::rootNodeChildrenChanged):
* dom/QualifiedName.cpp:
* editing/TypingCommand.h:
(WebCore::TypingCommand::):
* editing/UnlinkCommand.h:
(WebCore::UnlinkCommand::editingAction):
* html/FormDataList.h:
(WebCore::FormDataListItem::FormDataListItem):
(WebCore::FormDataList::appendData):
* html/HTMLBlockquoteElement.h:
* html/HTMLDivElement.h:
* html/HTMLFormElement.h:
* html/HTMLHRElement.h:
* html/HTMLHeadingElement.h:
* html/HTMLMarqueeElement.h:
* html/HTMLParagraphElement.h:
* html/HTMLPlugInElement.h:
* html/HTMLPreElement.h:
* html/HTMLTokenizer.h:
(WebCore::HTMLTokenizer::State::):
* icon/IconDatabase.cpp:
* icon/SQLStatement.cpp:
* kcanvas/KCanvasFilters.h:
(WebCore::):
(WebCore::KCanvasPoint3F::KCanvasPoint3F):
(WebCore::KCanvasFilter::KCanvasFilter):
(WebCore::KCanvasFilter::~KCanvasFilter):
(WebCore::KCanvasFilterEffect::~KCanvasFilterEffect):
(WebCore::KCComponentTransferFunction::KCComponentTransferFunction):
(WebCore::KCanvasFEConvolveMatrix::KCanvasFEConvolveMatrix):
(WebCore::KCLightSource::KCLightSource):
(WebCore::KCDistantLightSource::KCDistantLightSource):
(WebCore::KCPointLightSource::KCPointLightSource):
(WebCore::KCSpotLightSource::KCSpotLightSource):
(WebCore::KCanvasFEDiffuseLighting::KCanvasFEDiffuseLighting):
(WebCore::KCanvasFEDisplacementMap::KCanvasFEDisplacementMap):
(WebCore::KCanvasFEImage::KCanvasFEImage):
(WebCore::KCanvasFESpecularLighting::KCanvasFESpecularLighting):
* kcanvas/RenderSVGImage.h:
* kcanvas/device/quartz/KRenderingDeviceQuartz.h:
* ksvg2/css/SVGRenderStyle.h:
(WebCore::SVGRenderStyle::InheritedFlags::):
(WebCore::SVGRenderStyle::NonInheritedFlags::):
* ksvg2/css/SVGRenderStyleDefs.h:
(WebCore::):
* ksvg2/events/SVGZoomEvent.h:
* ksvg2/ksvg.h:
(WebCore::):
* ksvg2/misc/KCanvasRenderingStyle.h:
* ksvg2/misc/SVGImageLoader.h:
* ksvg2/scripts/make_names.pl:
* ksvg2/svg/SVGAElement.h:
* ksvg2/svg/SVGAngle.h:
* ksvg2/svg/SVGAnimateColorElement.h:
* ksvg2/svg/SVGAnimateElement.h:
* ksvg2/svg/SVGAnimateTransformElement.h:
* ksvg2/svg/SVGAnimatedAngle.h:
* ksvg2/svg/SVGAnimatedBoolean.h:
* ksvg2/svg/SVGAnimatedColor.h:
* ksvg2/svg/SVGAnimatedEnumeration.h:
* ksvg2/svg/SVGAnimatedInteger.h:
* ksvg2/svg/SVGAnimatedLength.h:
* ksvg2/svg/SVGAnimatedLengthList.h:
* ksvg2/svg/SVGAnimatedNumber.h:
* ksvg2/svg/SVGAnimatedNumberList.h:
* ksvg2/svg/SVGAnimatedPathData.h:
* ksvg2/svg/SVGAnimatedPoints.h:
* ksvg2/svg/SVGAnimatedPreserveAspectRatio.h:
* ksvg2/svg/SVGAnimatedRect.h:
* ksvg2/svg/SVGAnimatedString.h:
* ksvg2/svg/SVGAnimatedTemplate.h:
* ksvg2/svg/SVGAnimatedTransformList.h:
* ksvg2/svg/SVGAnimationElement.cpp:
(SVGAnimationElement::calculateCurrentValueItem):
(SVGAnimationElement::calculateRelativeTimePercentage):
* ksvg2/svg/SVGAnimationElement.h:
(WebCore::):
* ksvg2/svg/SVGCircleElement.h:
* ksvg2/svg/SVGClipPathElement.h:
* ksvg2/svg/SVGColor.h:
* ksvg2/svg/SVGComponentTransferFunctionElement.h:
* ksvg2/svg/SVGCursorElement.h:
* ksvg2/svg/SVGDOMImplementation.h:
* ksvg2/svg/SVGDefsElement.h:
* ksvg2/svg/SVGDescElement.h:
* ksvg2/svg/SVGDocument.h:
* ksvg2/svg/SVGElement.h:
(WebCore::SVGElement::rendererIsNeeded):
(WebCore::svg_dynamic_cast):
* ksvg2/svg/SVGElementInstance.h:
* ksvg2/svg/SVGElementInstanceList.h:
* ksvg2/svg/SVGEllipseElement.h:
* ksvg2/svg/SVGExternalResourcesRequired.h:
* ksvg2/svg/SVGFEBlendElement.h:
* ksvg2/svg/SVGFEColorMatrixElement.h:
* ksvg2/svg/SVGFEComponentTransferElement.h:
* ksvg2/svg/SVGFECompositeElement.h:
* ksvg2/svg/SVGFEDiffuseLightingElement.h:
* ksvg2/svg/SVGFEDisplacementMapElement.h:
* ksvg2/svg/SVGFEDistantLightElement.h:
* ksvg2/svg/SVGFEFloodElement.h:
* ksvg2/svg/SVGFEFuncAElement.h:
* ksvg2/svg/SVGFEFuncBElement.h:
* ksvg2/svg/SVGFEFuncGElement.h:
* ksvg2/svg/SVGFEFuncRElement.h:
* ksvg2/svg/SVGFEGaussianBlurElement.h:
* ksvg2/svg/SVGFEImageElement.h:
* ksvg2/svg/SVGFELightElement.h:
* ksvg2/svg/SVGFEMergeElement.h:
* ksvg2/svg/SVGFEMergeNodeElement.h:
* ksvg2/svg/SVGFEOffsetElement.h:
* ksvg2/svg/SVGFEPointLightElement.h:
* ksvg2/svg/SVGFESpecularLightingElement.h:
* ksvg2/svg/SVGFESpotLightElement.h:
* ksvg2/svg/SVGFETileElement.h:
* ksvg2/svg/SVGFETurbulenceElement.h:
* ksvg2/svg/SVGFilterElement.h:
* ksvg2/svg/SVGFilterPrimitiveStandardAttributes.h:
* ksvg2/svg/SVGFitToViewBox.h:
* ksvg2/svg/SVGForeignObjectElement.cpp:
* ksvg2/svg/SVGForeignObjectElement.h:
* ksvg2/svg/SVGGElement.h:
* ksvg2/svg/SVGGradientElement.h:
* ksvg2/svg/SVGHelper.h:
(WebCore::):
* ksvg2/svg/SVGImageElement.h:
* ksvg2/svg/SVGLangSpace.h:
* ksvg2/svg/SVGLength.h:
* ksvg2/svg/SVGLengthList.h:
* ksvg2/svg/SVGLineElement.h:
* ksvg2/svg/SVGLinearGradientElement.h:
* ksvg2/svg/SVGList.h:
* ksvg2/svg/SVGLocatable.h:
* ksvg2/svg/SVGMarkerElement.h:
* ksvg2/svg/SVGMaskElement.h:
* ksvg2/svg/SVGMatrix.h:
* ksvg2/svg/SVGNumber.h:
* ksvg2/svg/SVGNumberList.h:
* ksvg2/svg/SVGPaint.h:
* ksvg2/svg/SVGPathElement.h:
* ksvg2/svg/SVGPathSeg.h:
* ksvg2/svg/SVGPathSegArc.h:
* ksvg2/svg/SVGPathSegClosePath.h:
* ksvg2/svg/SVGPathSegCurvetoCubic.h:
* ksvg2/svg/SVGPathSegCurvetoCubicSmooth.h:
* ksvg2/svg/SVGPathSegCurvetoQuadratic.h:
* ksvg2/svg/SVGPathSegCurvetoQuadraticSmooth.h:
* ksvg2/svg/SVGPathSegLineto.h:
* ksvg2/svg/SVGPathSegLinetoHorizontal.h:
* ksvg2/svg/SVGPathSegLinetoVertical.h:
* ksvg2/svg/SVGPathSegList.h:
* ksvg2/svg/SVGPathSegMoveto.h:
* ksvg2/svg/SVGPatternElement.h:
* ksvg2/svg/SVGPoint.h:
* ksvg2/svg/SVGPointList.h:
* ksvg2/svg/SVGPolyElement.h:
* ksvg2/svg/SVGPolygonElement.h:
* ksvg2/svg/SVGPolylineElement.h:
* ksvg2/svg/SVGPreserveAspectRatio.h:
* ksvg2/svg/SVGRadialGradientElement.h:
* ksvg2/svg/SVGRect.h:
* ksvg2/svg/SVGRectElement.h:
* ksvg2/svg/SVGSVGElement.h:
* ksvg2/svg/SVGScriptElement.h:
* ksvg2/svg/SVGSetElement.h:
* ksvg2/svg/SVGStopElement.h:
* ksvg2/svg/SVGStringList.h:
* ksvg2/svg/SVGStylable.h:
* ksvg2/svg/SVGStyleElement.h:
* ksvg2/svg/SVGStyledElement.h:
(WebCore::SVGStyledElement::rendererIsNeeded):
(WebCore::SVGStyledElement::canvasResource):
* ksvg2/svg/SVGStyledLocatableElement.h:
* ksvg2/svg/SVGStyledTransformableElement.h:
* ksvg2/svg/SVGSwitchElement.h:
* ksvg2/svg/SVGSymbolElement.h:
* ksvg2/svg/SVGTRefElement.h:
* ksvg2/svg/SVGTSpanElement.h:
* ksvg2/svg/SVGTests.h:
* ksvg2/svg/SVGTextContentElement.h:
* ksvg2/svg/SVGTextElement.h:
* ksvg2/svg/SVGTextPositioningElement.h:
* ksvg2/svg/SVGTitleElement.h:
* ksvg2/svg/SVGTransform.h:
* ksvg2/svg/SVGTransformList.h:
* ksvg2/svg/SVGTransformable.h:
* ksvg2/svg/SVGURIReference.h:
* ksvg2/svg/SVGUseElement.h:
* ksvg2/svg/SVGViewElement.h:
* ksvg2/svg/SVGZoomAndPan.h:
* ksvg2/svg/svgpathparser.h:
* page/Frame.h:
(WebCore::):
* platform/AffineTransform.h:
* platform/FontCache.cpp:
(WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
* platform/FontData.cpp:
(WebCore::FontData::FontData):
* platform/FontData.h:
* platform/TextBox.h:
(WebCore::TextBox::):
* platform/Timer.cpp:
(WebCore::TimerBase::heapPop):
* platform/mac/FontCacheMac.mm:
* platform/mac/GlyphMapMac.cpp:
* platform/mac/WebFontCache.mm:
(betterChoice):
* rendering/DeprecatedRenderSelect.cpp:
(WebCore::DeprecatedRenderSelect::setWidgetWritingDirection):
* rendering/EllipsisBox.h:
* rendering/RenderBR.h:
(WebCore::RenderBR::renderName):
(WebCore::RenderBR::width):
* rendering/RenderBlock.h:
(WebCore::):
* rendering/RenderFlexibleBox.h:
* rendering/RenderFlow.h:
(WebCore::RenderFlow::RenderFlow):
* rendering/RenderFrame.cpp:
* rendering/bidi.h:
* rendering/break_lines.cpp:
2006-07-29 Rob Buis <buis@kde.org>
Reviewed by Geoff.
http://bugzilla.opendarwin.org/show_bug.cgi?id=10151
ghostmap XHTML + SVG fails due to javascript undefined exception
Make sure document.URL works when called from a non-HTML document.
* bindings/js/kjs_html.cpp:
(KJS::JSHTMLDocument::getValueProperty):
* bindings/js/kjs_html.h:
(KJS::JSHTMLDocument::):
* dom/Document.idl:
2006-07-29 Mike Emmel <mike.emmel@gmail.com>
Reviewed and tweaked by Darin.
- fixes for Linux build
(still might not compile, since Darin tweaked but was unable to test).
* WebCoreSources.bkl: Added some new sources, removed some obsolete ones.
* Projects/gdk/webcore-gdk.bkl: Added RenderPopupMenuGdk.cpp
* html/HTMLPlugInElement.h: Removed incorrect syntax with class name
before ::.
* platform/gdk/FrameGdk.h:
* platform/gdk/FrameGdk.cpp: Updated parameters of constructor. Moved a couple stubs
out of this file.
* platform/gdk/RenderPopupMenuGdk.h: Added.
* platform/gdk/RenderPopupMenuGdk.cpp: Added. Just a file full of empty stubs.
* platform/gdk/RenderThemeGdk.h:
* platform/gdk/RenderThemeGdk.cpp: (WebCore::RenderThemeGdk::createPopupMenu): Added.
* platform/gdk/TemporaryLinkStubs.cpp: Add some new stubs.
2006-07-29 Mark Rowe <opendarwin.org@bdash.net.nz>
Reviewed by Darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=10022
Bug 10022: REGRESSION: Crash in WebCore::XMLTokenizer::characters
* dom/XMLTokenizer.cpp:
(WebCore::XMLTokenizer::resumeParsing): If the write() call resulted in new callbacks being
added, don't call through to end() just yet.
2006-07-29 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by John Sullivan.
- manual test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9984
ASSERTION FAILURE: _private->mouseDownEvent != nil
(WebKit/WebView/WebHTMLView.m:4863 -[WebHTMLView(WebInternal) _delegateDragSourceActionMask])
* manual-tests/subview-click-assertion.html: Added.
2006-07-29 Andrew Wellington <proton@wiretapped.net>
Reviewed by Darin.
Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8587 / <rdar://problem/4631844>
REGRESSION: {display:list-item} items outside an ol or ul element don't number correctly
* rendering/RenderListItem.cpp:
(WebCore::enclosingList): If no real list element is found, use parent instead.
(WebCore::previousListItem): Check list elements to see if they are list items -- the
old code assumed that a list would never be a list item but this is entirely possible
with CSS and especially with the new rule that means any DOM element could act as a list.
2006-07-29 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Darin.
Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10147
REGRESSION: custom attribute values set via javascript are not persistent
Test: fast/dom/Element/setAttribute-case-insensitivity.html
* dom/Element.cpp:
(WebCore::Element::setAttribute): Use the lowercased localName for retrieving the old value, too.
2006-07-28 Timothy Hatcher <timothy@apple.com>
Suggested by Darin.
Moving the implementation of isContentEditable to the
the WebPrivate category.
* bindings/objc/DOM.mm:
(-[DOMNode isContentEditable]):
2006-07-28 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
First part of:
<rdar://problem/4515463>
REGRESSION: Blot and Mail both do a very poor job of pasting the main www.apple.com page
Migrate to isBlock and enclosingBlock.
Changed RendereringInfo::isBlock and ReplacementFragment::isBlock
to wasBlock so that they don't conflict with isBlock and because
it's more descriptive.
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplacementFragment::mergeStartNode):
(WebCore::ReplacementFragment::wasBlock):
(WebCore::ReplacementFragment::saveRenderingInfo):
(WebCore::ReplacementFragment::renderedBlocks):
(WebCore::RenderingInfo::RenderingInfo):
(WebCore::ReplaceSelectionCommand::shouldMergeStart):
(WebCore::ReplaceSelectionCommand::doApply):
* editing/ReplaceSelectionCommand.h:
(WebCore::RenderingInfo::wasBlock):
2006-07-27 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
More changes for:
<rdar://problem/4242293>
Poor paste fidelity of http://www.google.com/
* editing/markup.cpp:
(WebCore::needInterchangeNewlineAfter): Added.
(WebCore::createMarkup):
Only add an interchangeNewline if we're annotating for interchange. Can't test
this until we expose createMarkup in non-annotate mode (I'd expose Range::toHTML).
Remove the FIXME about prepending the interchangeNewline before creating the rest
of the markup. Its correct to surround the interchangeNewline in ancestors of the
adjusted startNode.
Fixed the check to see if an interchangeNewline is needed (!inSameBlock). This would
add an interchangeNewline for a selection that started before a table.
Removed the workaround for the bug where markup for a table was not included when
selecting the contents of a table, since this change fixes the general problem of
markup for ancestors of the startNode being left out.
Don't leave out ancestors of the startNode as we leave their subtrees. Execute the
code to include them even if we closed ancestors in the ancestorsToClose list.
2006-07-28 Timothy Hatcher <timothy@apple.com>
Reviewed by John.
Adding isContentEditable to DOMNode's private category.
* bindings/objc/DOMPrivate.h:
2006-07-28 Alexey Proskuryakov <ap@nypop.com>
Rolling out http://bugzilla.opendarwin.org/show_bug.cgi?id=6010 because of failing layout tests.
Add better SVGLoad event support.
* dom/EventTargetNode.cpp:
(WebCore::EventTargetNode::dispatchGenericEvent):
* html/HTMLImageLoader.cpp:
(WebCore::HTMLImageLoader::dispatchLoadEvent):
* html/HTMLImageLoader.h:
* ksvg2/misc/SVGImageLoader.cpp:
(WebCore::SVGImageLoader::SVGImageLoader):
* ksvg2/misc/SVGImageLoader.h:
* ksvg2/svg/SVGAElement.cpp:
(WebCore::SVGAElement::parseMappedAttribute):
* ksvg2/svg/SVGAnimatedBoolean.h:
* ksvg2/svg/SVGElement.cpp:
(WebCore::SVGElement::SVGElement):
(WebCore::SVGElement::parseMappedAttribute):
* ksvg2/svg/SVGElement.h:
(WebCore::SVGElement::adjustViewportClipping):
(WebCore::SVGElement::closeRenderer):
(WebCore::SVGElement::rendererIsNeeded):
(WebCore::SVGElement::isClosed):
(WebCore::svg_dynamic_cast):
* ksvg2/svg/SVGExternalResourcesRequired.h:
* ksvg2/svg/SVGImageElement.cpp:
(SVGImageElement::SVGImageElement):
* ksvg2/svg/SVGImageElement.h:
* ksvg2/svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::parseMappedAttribute):
* ksvg2/svg/SVGScriptElement.cpp:
(SVGScriptElement::SVGScriptElement):
(SVGScriptElement::parseMappedAttribute):
(SVGScriptElement::executeScript):
* xml/xmlhttprequest.cpp:
(WebCore::XMLHttpRequest::callReadyStateChangeListener):
2006-07-28 Adele Peterson <adele@apple.com>
Rolling out http://bugzilla.opendarwin.org/show_bug.cgi?id=9753 because of failing layout tests.
SVG with width and height 100% leaves room for scrollbar on the right.
* kcanvas/RenderPath.cpp:
* kcanvas/RenderPath.h:
* kcanvas/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::layout):
* ksvg2/svg/SVGCircleElement.cpp:
* ksvg2/svg/SVGCircleElement.h:
* ksvg2/svg/SVGEllipseElement.cpp:
* ksvg2/svg/SVGEllipseElement.h:
* ksvg2/svg/SVGLineElement.cpp:
* ksvg2/svg/SVGLineElement.h:
* ksvg2/svg/SVGRectElement.cpp:
* ksvg2/svg/SVGRectElement.h:
* ksvg2/svg/SVGStyledElement.h:
2006-07-27 Eric Seidel <eric@eseidel.com>
Reviewed by darin.
Add better SVGLoad event support.
http://bugzilla.opendarwin.org/show_bug.cgi?id=6010
There will still need to be additional support added for <link> and <script> elements.
Not all of the error -> loaded -> error transition cases work yet.
* dom/EventTargetNode.cpp:
(WebCore::EventTargetNode::dispatchGenericEvent):
* html/HTMLImageLoader.cpp:
(WebCore::HTMLImageLoader::dispatchLoadEvent):
* html/HTMLImageLoader.h:
(WebCore::HTMLImageLoader::haveFiredLoadEvent):
(WebCore::HTMLImageLoader::setHaveFiredLoadEvent):
* ksvg2/misc/SVGImageLoader.cpp:
(WebCore::SVGImageLoader::SVGImageLoader):
(WebCore::SVGImageLoader::dispatchLoadEvent):
* ksvg2/misc/SVGImageLoader.h:
* ksvg2/svg/SVGAElement.cpp:
(WebCore::SVGAElement::parseMappedAttribute):
* ksvg2/svg/SVGAnimatedBoolean.h:
* ksvg2/svg/SVGElement.cpp:
(WebCore::SVGElement::SVGElement):
(WebCore::SVGElement::parseMappedAttribute):
(WebCore::SVGElement::haveLoadedRequiredResources):
(WebCore::SVGElement::sendSVGLoadEventIfPossible):
(WebCore::SVGElement::closeRenderer):
* ksvg2/svg/SVGElement.h:
(WebCore::SVGElement::rendererIsNeeded):
(WebCore::svg_dynamic_cast):
* ksvg2/svg/SVGExternalResourcesRequired.h:
* ksvg2/svg/SVGImageElement.cpp:
(SVGImageElement::SVGImageElement):
(SVGImageElement::haveLoadedRequiredResources):
* ksvg2/svg/SVGImageElement.h:
* ksvg2/svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::parseMappedAttribute):
* ksvg2/svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::SVGScriptElement):
(WebCore::SVGScriptElement::parseMappedAttribute):
(WebCore::SVGScriptElement::executeScript):
* xml/xmlhttprequest.cpp:
(WebCore::XMLHttpRequest::callReadyStateChangeListener): use new Event() instead of createEvent
2006-07-27 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Anders.
- http://bugzilla.opendarwin.org/show_bug.cgi?id=10135
Cleanup: remove useless parameters from RenderObject::position()
No test possible (no functionality change)
* rendering/RenderBox.cpp:
(WebCore::RenderBox::position):
* rendering/RenderBox.h:
* rendering/RenderObject.h:
(WebCore::RenderObject::position):
* rendering/RenderTableRow.h:
(WebCore::RenderTableRow::position):
* rendering/RenderTableSection.h:
(WebCore::RenderTableSection::position):
* rendering/RenderText.cpp:
(WebCore::RenderText::position):
* rendering/RenderText.h:
* rendering/bidi.cpp:
(WebCore::RenderBlock::constructLine):
(WebCore::RenderBlock::computeVerticalPositionsForLine):
2006-07-27 Rob Buis <buis@kde.org>
Reviewed by Maciej.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9753
SVG with width and height 100% leaves room for scrollbar on the right.
Relayout children of svg containers, except svg shapes that do not depend on percentages.
* kcanvas/RenderPath.cpp: (WebCore::RenderPath::hasPercentageValues):
* kcanvas/RenderPath.h:
* kcanvas/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::layout):
* ksvg2/svg/SVGCircleElement.cpp: (SVGCircleElement::hasPercentageValues):
* ksvg2/svg/SVGCircleElement.h:
* ksvg2/svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::hasPercentageValues):
* ksvg2/svg/SVGEllipseElement.h:
* ksvg2/svg/SVGLineElement.cpp: (SVGLineElement::hasPercentageValues):
* ksvg2/svg/SVGLineElement.h:
* ksvg2/svg/SVGRectElement.cpp: (WebCore::SVGRectElement::hasPercentageValues):
* ksvg2/svg/SVGRectElement.h:
* ksvg2/svg/SVGStyledElement.h: (WebCore::SVGStyledElement::hasPercentageValues):
2006-07-27 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
<rdar://problem/4242293>
Poor paste fidelity of http://www.google.com/
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyInlineStyle): Fixed crasher with nil-check.
* editing/markup.cpp:
(WebCore::startMarkup): Style information wasn't added to an element if it had
attributes but no style attribute.
2006-07-27 Alexander Kellett <lypanov@kde.org>
Reviewed by Darin.
- fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9867
REGRESSION: code that modifies form element in Firefox modifies form attribute in WebKit
* bindings/scripts/CodeGeneratorJS.pm: add new attribute - HasOverridingNameGetter
* html/HTMLFormElement.idl:
2006-07-27 Rob Buis <buis@kde.org>
Reviewed by Anders.
http://bugzilla.opendarwin.org/show_bug.cgi?id=8992
Some HTML DOM attributes have incorrect types
Adjust idl and dom source code for HTMLImageElement and
HTMLBaseFontElement to choose correct type for
HTMLImageElement::border and HTMLBaseFontElement::size
attributes.
* html/HTMLBaseFontElement.cpp:
(WebCore::HTMLBaseFontElement::size):
(WebCore::HTMLBaseFontElement::setSize):
* html/HTMLBaseFontElement.h:
* html/HTMLBaseFontElement.idl:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::border):
(WebCore::HTMLImageElement::setBorder):
* html/HTMLImageElement.h:
* html/HTMLImageElement.idl:
2006-07-27 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
<rdar://problem/4628409>
Safari crashes in CompositeEditCommand::removeBlockPlaceholder entering text in a web page form
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::removeBlockPlaceholder):
A script on the page shrinks the textarea down to zero rows just
before insertion. That gives the shadow div a zero height, removing
[div, 0] as a candidate for a VisiblePosition. Then
InsertTextCommand::input() tries to create a VisiblePosition from
[div, 0] and fails. A nil check is a quick fix. Another might
be to make positions where there is a caret selection candidates.
Another might be to make any [div, 0] where div is a shadow div inside
a form element a candidate.
2006-07-27 Graham Dennis <graham.dennis@gmail.com>
Reviewed by Darin.
- fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=10094
Japanese characters improperly rendering in TOT
Test: fast/encoding/denormalised-voiced-japanese-chars.html
* platform/Font.cpp:
(WebCore::WidthIterator::advance): pass currentCharacter to normalizeVoicingMarks
(WebCore::WidthIterator::normalizeVoicingMarks): turn the currentCharacter variable
into an argument as WidthIterator::advance doesn't update m_currentCharacter while
looping
2006-07-27 Eric Seidel <eric@eseidel.com>
Reviewed by ap.
Complex entities seem to fail on TOT
http://bugzilla.opendarwin.org/show_bug.cgi?id=6390
Use an alternative work-around to an XML Entity parsing bug.
* dom/XMLTokenizer.cpp:
(WebCore::XMLTokenizer::write):
(WebCore::hackAroundLibXMLEntityBug): added.
(WebCore::startElementNsHandler):
(WebCore::endElementNsHandler):
(WebCore::charactersHandler):
(WebCore::processingInstructionHandler):
(WebCore::cdataBlockHandler):
(WebCore::commentHandler):
(WebCore::getEntityHandler):
2006-07-27 Rob Buis <buis@kde.org>
Reviewed by Darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9938
Fix viewBox issues in Hixie's test
Do a more accurate and quicker job of parsing the viewBox
attribute. Handle properly on negative width/height and
invalid syntax in general.
* ksvg2/svg/SVGFitToViewBox.cpp:
(SVGFitToViewBox::parseViewBox):
2006-07-27 Eric Seidel <eric@eseidel.com>
Reviewed by ap.
Enables getSVGDocument() support for HTMLObjectElement and HTMLEmbedElement
http://bugzilla.opendarwin.org/show_bug.cgi?id=9237
This patch does not try to autogenerate anything, but enables the SVG functionality.
Also fix HTMLObjectElement vspace and hspace to be numbers instead of strings to match IE & Firefox.
* bindings/js/kjs_dom.cpp:
(KJS::toJS):
* bindings/js/kjs_html.cpp:
(KJS::JSHTMLElement::objectGetter):
(KJS::HTMLElementFunction::callAsFunction):
(KJS::JSHTMLElement::objectSetter):
* bindings/js/kjs_html.h:
(KJS::JSHTMLElement::):
* dom/Document.h:
(WebCore::Document::isSVGDocument):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::contentDocument):
(WebCore::HTMLEmbedElement::getSVGDocument):
* html/HTMLEmbedElement.h:
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::HTMLObjectElement):
(WebCore::HTMLObjectElement::getInstance):
(WebCore::HTMLObjectElement::parseMappedAttribute):
(WebCore::HTMLObjectElement::contentDocument):
(WebCore::HTMLObjectElement::rendererIsNeeded):
(WebCore::HTMLObjectElement::createRenderer):
(WebCore::HTMLObjectElement::setCode):
(WebCore::HTMLObjectElement::setArchive):
(WebCore::HTMLObjectElement::setBorder):
(WebCore::HTMLObjectElement::setCodeBase):
(WebCore::HTMLObjectElement::setCodeType):
(WebCore::HTMLObjectElement::setData):
(WebCore::HTMLObjectElement::hspace):
(WebCore::HTMLObjectElement::setHspace):
(WebCore::HTMLObjectElement::setStandby):
(WebCore::HTMLObjectElement::setType):
(WebCore::HTMLObjectElement::setUseMap):
(WebCore::HTMLObjectElement::vspace):
(WebCore::HTMLObjectElement::setVspace):
(WebCore::HTMLObjectElement::getSVGDocument):
* html/HTMLObjectElement.h:
* ksvg2/svg/SVGDocument.h:
(WebCore::SVGDocument::isSVGDocument):
* rendering/RenderWidget.h:
(WebCore::RenderWidget::frameView):
2006-07-26 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Darin.
Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9901
XSLTProcessor cannot parse text nodes for INPUT ELEMENTS in an XSLT stylesheet
Test: fast/js/xhtml-serialize.html
* editing/markup.cpp:
(WebCore::endMarkup): If the element has child nodes, write a closing tag even if it
is not permitted in HTML, to make it valid XML.
2006-07-26 Alice Liu <alice.liu@apple.com>
Reviewed by John Sullivan (and Kevin and Timo).
landing this patch for John et al.
Fixed <rdar://problem/4651380> REGRESSION (9A232->9A234): existing web clips don't render if you restart Dashboard
* page/FrameView.cpp:
(WebCore::FrameView::layout):
moved the call to didFirstLayout to above the check for needsLayout
because we need to call didFirstLayout for every webview, not just
ones we think need layout.
2006-07-26 Justin Garcia <justin.garcia@apple.com>
Reviewed by darin
<rdar://problem/4652788>
REGRESSION: Can't change size or style of any text in message body
* dom/Node.cpp:
(WebCore::Node::isContentRichlyEditable): Mimic Node::isContentEditable.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::isContentRichlyEditable): First check
the frame for editability, then userModify, like what
HTMLElement::isContentEditable() does.
* html/HTMLElement.h:
2006-07-26 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by ap.
- fix debug-only information() string for table cells
* rendering/RenderObject.cpp:
(WebCore::RenderObject::information):
2006-07-25 David Harrison <harrison@apple.com>
Reviewed by timo and Darin.
<rdar://problem/4618584> "Paste and Match Style" is not working in Mail (add SPI)
* WebCore.xcodeproj/project.pbxproj:
* bridge/mac/WebCoreFrameBridge.h:
* bridge/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]):
Add matchStyle parameter for use by WebKit.
2006-07-25 Justin Garcia <justin.garcia@apple.com>
Reviewed by adele
<rdar://problem/4649560>
REGRESSION: Can't Select All when the body is contentEditable="true"
* editing/VisiblePosition.cpp:
(WebCore::VisiblePosition::canonicalPosition): Allow descent from a non-editable html
element into an editable body as a convenience.
2006-07-25 Justin Garcia <justin.garcia@apple.com>
Reviewed by darin
<rdar://problem/4468458> Incoming HTML message is editable <body contenteditable="true">
* dom/Document.cpp:
(WebCore::Document::inDesignMode): Removed some spaces.
* page/Frame.cpp:
(WebCore::Frame::applyEditingStyleToElement): Just add CSS properties needed for editing.
(WebCore::Frame::removeEditingStyleFromElement): Made this a no-op, we'll remove
it eventually.
2006-07-25 David Kilzer <ddkilzer@kilzer.net>
Reviewed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9717
Replace IDL ConvertUndefinedToTrue parameter attribute with Optional attribute
No test added because there is no change in functionality.
* bindings/js/kjs_binding.cpp: Removed valueToBooleanTreatUndefinedAsTrue() method.
* bindings/js/kjs_binding.h: Ditto.
* bindings/scripts/CodeGeneratorJS.pm: Removed support for ConvertUndefinedToTrue parameter attribute.
* dom/Element.h: Set default value to true for scrollIntoView() and scrollIntoViewIfNeeded() arguments.
* dom/Element.idl: Replaced ConvertUndefinedToTrue attribute with Optional attribute.
Fixed name of scrollIntoViewIfNeeded() argument to match implementation.
* page/DOMWindow.idl: Replaced ConvertUndefinedToTrue attribute with Optional attribute.
2006-07-24 Dan Waylonis <waylonis@google.com>
Reviewed and tweaked a bunch by Darin.
Test: plugins/bindings-test.html
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9902
jsNull and NSNull not properly converted between JS and ObjC
* bindings/objc/WebScriptObject.mm:
(+[WebScriptObject _convertValueToObjcValue:originExecutionContext:executionContext:]):
Added case that converts jsNull to NSNull.
2006-07-24 Darin Adler <darin@apple.com>
Reviewed by Adele and Justin.
- fix <rdar://problem/4613616> REGRESSION: some spaces typed in <textarea> are posted as non-breaking spaces (9630)
http://bugzilla.opendarwin.org/show_bug.cgi?id=9630
- also fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=9939
REGRESSION: Pasting text into native text area with newline at end does not preserve newline
- removed some uses of DeprecatedPtrList in the markup code
Test: fast/forms/textarea-type-spaces.html
Test: fast/forms/textarea-paste-newline.html
* bindings/objc/DOMHTML.mm: (-[DOMHTMLDocument createDocumentFragmentWithText:]):
Updated call to pass a range -- in this case it is the range of the entire document,
so this will not handle the whitespace properly.
* bridge/mac/WebCoreFrameBridge.h: Added range context parameter to the
documentFragmentWithText: method, so we can handle whitespace properly.
* bridge/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge nodesFromList:]): Changed from DeprecatedPtrList to Vector.
(-[WebCoreFrameBridge markupStringFromNode:nodes:]): Ditto.
(-[WebCoreFrameBridge markupStringFromRange:nodes:]): Ditto.
(-[WebCoreFrameBridge documentFragmentWithText:inContext:]): Added range context
parameter -- pass it on to createFragmentFromText.
(-[WebCoreFrameBridge documentFragmentWithNodesAsParagraphs:]): Changed from
DeprecatedPtrList to Vector.
(-[WebCoreFrameBridge replaceSelectionWithText:selectReplacement:smartReplace:]):
Pass the range of the current selection as context when creating the fragment.
* dom/Position.cpp: (WebCore::Position::inRenderedText): Replace range check with
a call to the new containsCaretOffset function -- helps make the caret work right when
it is past the end of the last line in a textarea.
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::rebalanceWhitespaceAt): Don't do anything if the
style does not call for collapsing whitespace.
(WebCore::CompositeEditCommand::rebalanceWhitespace): Call replaceWhitespaceAt
to share code, including the new logic mentioned above.
* editing/InsertLineBreakCommand.cpp: (WebCore::InsertLineBreakCommand::doApply):
Use a text node instead of a break element when inserting and the style is preserveNewline.
* editing/JSEditor.cpp: (WebCore::execRemoveFormat): Pass the selection range
to createFragmentFromText.
* editing/RebalanceWhitespaceCommand.cpp: (WebCore::RebalanceWhitespaceCommand::doApply):
Assert that we're in a style that collapses whitespace. It's the caller's responsibility
not to call otherwise.
* editing/ReplaceSelectionCommand.h: Removed unused destructor, type, isSingleTextNode,
isTreeFragment, m_type, and added a context parameter to inertFragmentForTestRendering.
Also changed the constructor to take a selection rather than a pointer to the root
editable element, replaced removeEndBRIfNeeded with shouldRemoveEndBR and removed an
unused parameter from shouldMergeEnd.
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplacementFragment::ReplacementFragment): Removed code to set up m_type.
Compute root editable element from passed-in selection. Used the start of the selection
as a base node for style purposes for the test rendering. Removed the special case
"single text node" alternative to createFragmentFromText in the plain text case, since
createFragmentFromText now handles that correctly.
(WebCore::ReplacementFragment::insertFragmentForTestRendering): Copy the whitespace
property from the source location when creating a temporary element for test rendering.
(WebCore::ReplacementFragment::shouldMergeEnd): Removed unneeded boolean
parameter fragmentHadInterchangeNewlineAtEnd, which is always false.
(WebCore::ReplaceSelectionCommand::doApply): Update for ReplacementFragment changes,
change code to not remove end BR when it can be re-used instead, don't call the
paragraph separator insertion when the position is at the start of a paragraph already,
removed redundant computation of identical "next" value, removed unneeded boolean
parameter to shouldMergeEnd, add case for merging when all we need to do is to delete
a newline character, removed unneeded code to set insertionPos after all code that uses
it, and use spaces instead of non-breaking spaces when doing smart paste if the
context is one where we do not collapse white space.
(WebCore::ReplaceSelectionCommand::shouldRemoveEndBR): Renamed and changed to return
a boolean instead of doing the removal.
* editing/markup.h: Use Vector instead of DeprecatedPtrList. Change the
createFragmentFromText function to take a range for context instead of a document.
* editing/markup.cpp:
(WebCore::markup): Use Vector instead of DeprecatedPtrList.
(WebCore::createMarkup): Ditto.
(WebCore::createParagraphContentsFromString): Remove unneeded document parameter
and changed a couple places to use isEmpty instead of comparing with "".
(WebCore::createFragmentFromText): Given the new context parameter, if the context
is one that preserves newlines, then use "\n" instead of <br> elements.
(WebCore::createFragmentFromNodes): Use Vector instead of DeprecatedPtrList.
* html/HTMLElement.cpp: (WebCore::HTMLElement::setInnerText): Do not use <br>
elements if the context of this node is one where we preserve newlines.
* rendering/InlineTextBox.h:
* rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::containsCaretOffset):
Added. Implements the appropriate rule for determining if a caret position is
in this line or not. Returns true for both one line and the next in cases where
affinity must be considered to determine which line the caret is on.
* rendering/RenderText.h: Make atLineWrap no longer be a member function.
* rendering/RenderText.cpp:
(WebCore::atLineWrap): Remove special rule about preserveNewline and isLineBreak,
which will no longer apply due to the new containsCaretOffset function logic.
(WebCore::RenderText::caretRect): Use containsCaretOffset.
(WebCore::RenderText::inlineBox): Ditto.
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::updateFromElement): Make a placeholder <br> element
after calling setInnerText so that the last newline in the string has the effect
we expect outside the HTML world (an additional line).
(WebCore::RenderTextControl::setSelectionRange): Set granularity of the selection
too. The layout tests caught this problem, which needs a better solution long term.
(WebCore::RenderTextControl::text): Call textContent with the parameter false
so it will not include newlines for <br> elements. Now the only <br> element
that will ever be in the shadow DOM tree is the one to prevent collapsing, and
that one should not show up in the text value.
* rendering/bidi.cpp: (WebCore::RenderBlock::findNextLineBreak): Took a rule
that specifically called out the pre whitespace mode and made it work for all
the modes that preserve newlines. This makes sure we get a last line box for
text after the last "\n" even in cases where there is no <br> afterward.
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::fixupWhitespace):
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::doApply):
Added assertions to make sure we don't do anything when we're not collapsing
whitespace.
* html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::setDefaultValue):
Changed to use Vector instead of DeprecatedPtrList.
* editing/HTMLInterchange.cpp: Removed obsolete comment.
* loader/Cache.h: Removed a stray include.
2006-07-24 Adele Peterson <adele@apple.com>
Reviewed by Justin.
- Fix for <rdar://problem/4632132> Changing style of content with mixed editability fails
Test: * editing/style/apple-style-editable-mix.html
* dom/Node.cpp: (WebCore::Node::isContentRichlyEditable): Doesn't need to check the editable root. It now just
checks the user modify property of its own renderer, since that is inherited.
* editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyInlineStyle): If the end position is in a table,
Adjust the end node to the last descendant of the table, so we don't skip over any runs.
2006-07-24 Darin Adler <darin@apple.com>
Reviewed by Hyatt.
- implement String::createCFString
* WebCore.xcodeproj/project.pbxproj: Added StringImplMac.mm and StringMac.mm.
* bindings/objc/DOMInternal.mm: Moved NSString conversion functions out of here.
* platform/mac/StringImplMac.mm: Added. Moved NSString conversion members here
and added the CFStringRef ones.
* platform/mac/StringMac.mm: Added. Ditto.
2006-07-24 David Hyatt <hyatt@apple.com>
Two bug fixes.
(1) Make sure to mark positioned objects that depend on line position to
mark themselves as needing layout when their line box placeholder gets
repositioned.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::position):
(2) Improve highlighting to factor the inflation into overflow so that
invalidation and repainting will work properly.
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::addHighlightOverflow):
* rendering/RootInlineBox.h:
* rendering/bidi.cpp:
(WebCore::RenderBlock::layoutInlineChildren):
2006-07-24 Anders Carlsson <acarlsson@apple.com>
Reviewed by Adele.
<rdar://problem/4641824> REGRESSION: Wikipedia widget fails to complete a search after pressing return key
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::defaultEventHandler):
Don't eat enter events for search fields that have no enclosing form; they need to be passed to AppKit so
that onsearch can be invoked.
* manual-tests/onsearch-enter.html: Added.
2006-07-24 Dave MacLachlan <dmaclach@mac.com>
Reviewed by Darin and Alexey.
Fix for: <http://bugzilla.opendarwin.org/show_bug.cgi?id=8425>
and <http://bugzilla.opendarwin.org/show_bug.cgi?id=6947>
Test: svg/custom/non-opaque-filters.svg
* kcanvas/device/quartz/KCanvasFilterQuartz.mm:
(WebCore::KCanvasFilterQuartz::prepareFilter):
We create an autorelease pool so we can control the deallocation of the
CIContext that we're creating. The CIContext retains the CGContext that
you pass it internally so when the CIContext is released, the
CGContext is released as well.
This is all fine and dandy unless you wrap the creation of the CIFilter
with a pair of CGBegin/EndTransparencyLayer calls which swap the context
out from underneath you. So if you start with context A,
CGBeginTransparencyLayer swaps it out and gives you B. You create a CIFilter
with it and add a reference to B. CGEndTransparencyLayer swaps out B and
gives you back A. Autorelease pool comes and cleans up the Filter, and calls
release on A, but A never got the refcount in the first place. B did. BOOM!
So we create a pool, then do a retain, then release the pool so that we
don't have to worry about the pool releasing it at a later time.
See <rdar://problem/4647735> for reduction of CGEndTransparencyLayer case
2006-07-24 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Hyatt.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9669
Incomplete repaint when changing an inline's border
Test: fast/repaint/line-overflow.html
* rendering/RenderBlock.h:
* rendering/bidi.cpp:
(WebCore::RenderBlock::layoutInlineChildren): Added repaintTop and repaintBottom
variables to track the vertical edges of the area that changed, accounting for
lines that were deleted, inserted or moved. Removed unnecessary updating of
m_overflowHeight.
(WebCore::RenderBlock::determineStartPosition): Removed unnecessary updating of
m_overflowHeight.
(WebCore::RenderBlock::determineEndPosition):
(WebCore::RenderBlock::matchedEndLine): Added repaintTop and repaintBottom
arguments, which this method updates to account for deleted lines.
(WebCore::RenderBlock::checkLinesForOverflow): Removed outdated FIXME.
2006-07-24 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10075
REGRESSION: Reversed pop-up text in visually-ordered Hebrew pages
Test: fast/forms/select-visual-hebrew.html
* css/html4.css: Set "-webkit-rtl-ordering: logical" on select elements.
2006-07-24 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Darin.
Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10009
REGRESSION: Schubert-IT PDF Plug-in not working for full page (works in frames)
* page/Frame.cpp:
(WebCore::Frame::begin): Give PDF plugins a chance to handle frame content, before ImageDocument
claims it.
2006-07-24 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10083
REGRESSION (r15584): editing/selection/select-from-textfield-outwards failing
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::positionForCoordinates): Added back change from the fix
for bug 9312: For coordinates outside a replaced object, return the position
just before (after) the element if the coordinates are above or to the left (below
or to the right).
2006-07-23 Mark Rowe <opendarwin.org@bdash.net.nz>
Reviewed by maciej.
Bug 9686: [Drosera] Need the ability to break into Drosera on Javascript exceptions
http://bugzilla.opendarwin.org/show_bug.cgi?id=9686
WebCore portion of the fix.
* bridge/mac/WebCoreScriptDebugger.h:
(-[WebScriptDebugger exceptionRaised:sourceId:line::]): Add delegate method.
* bridge/mac/WebCoreScriptDebugger.mm:
(WebCoreScriptDebuggerImp::exception): Call delegate method when an exception is raised.
2006-07-23 Alice Liu <alice.liu@apple.com>
Reviewed by Adele.
Actually Adele figured out how to fix the layout test failures. Landing this patch for her. Layout test failures exposed but not caused by r15584 (my patch earlier today).
* editing/visible_units.cpp:
(WebCore::previousLinePosition):
When setting selection endpoints, don't traverse down into nodes where editing would ignore its contents. Use the parent node instead.
(WebCore::nextLinePosition):
same as above
2006-07-23 David Harrison <harrison@apple.com>
Reviewed by timo.
<rdar://problem/4646759> Mail crash editing To Do - WebCore::InsertTextCommand::prepareForTextInsertion
* Test: editing/deleting/delete-mixed-editable-content-001.html
* editing/visible_units.cpp:
(WebCore::startOfParagraph):
Respect editable boundary the same way endOfParagraph does.
2006-07-23 Beth Dakin <bdakin@apple.com>
Reviewed by Maciej. (Patch by me, Maciej, and Harrison.)
Fix for <rdar://problem/4529398> WebCore crashes when pasting rich
text - WebCore::InlineBox::root()
The initial rendering crash was due to a render object having a
stale reference to an inline box that had already been deleted and
then recreated in the exact same location in memory. (Crazy, I
know.) The situation seemed pretty specific to list markers
according to Hyatt according to Maciej, so that is what I patched
specifically. Fixing this crash unearthed a separate editing crash
where we were trying to insert a block into itself. I worked on
that with Maciej and Harrison, and Harrison came up with a fix.
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): This is the fix for the editing crash. If paragraphStart is an atomic
node, insert the new block into the parent instead.
* rendering/InlineBox.cpp:
(WebCore::InlineBox::isChildOfParent): This function is for
posterity. It will help keep the linebox tree in check.
* rendering/InlineBox.h:
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::addToLine): Added assert.
(WebCore::InlineFlowBox::deleteLine): Added assert.
* rendering/ListMarkerBox.cpp:
(WebCore::ListMarkerBox::destroy): If this has a parent, call
removeChild on this.
(WebCore::ListMarkerBox::operator delete):
* rendering/ListMarkerBox.h:
2006-07-23 Alice Liu <alice.liu@apple.com>
Reviewed by Darin.
fixed <rdar://problem/4617841> REGRESSION (NativeTextField): You can move keyboard focus to a field without getting insertion point
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::positionForCoordinates):
removed some unnecessary vertical position checks and added a fudge factor to be more forgiving for clicks near lines.
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::nodeAtPoint):
added implementation
* rendering/RenderTextControl.h:
added function protocol
2006-07-23 Adele Peterson <adele@apple.com>
Reviewed by Darin.
Updating fix from last checkin.
* rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutVerticalBox):
Only tell the view about this flexbox if there isn't another flexbox already cached.
2006-07-23 Adele Peterson <adele@apple.com>
Reviewed by Maciej.
- Fix for <rdar://problem/4644614> REGRESSION: Typing, pasting or dragging in new text areas causes unnecessary scrolling
* rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): Don't updateScrollInfoAfterLayout if an ancestor flexible box is just on
its first layout.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock): ditto.
(WebCore::RenderFlexibleBox::layoutVerticalBox): Let the view know if this flex box is doing its first pass at layout.
* rendering/RenderView.cpp: (WebCore::RenderView::RenderView): Caches a flexible box that's doing its first layout.
* rendering/RenderView.h:
(WebCore::RenderView::setFlexBoxInFirstLayout):
(WebCore::RenderView::flexBoxInFirstLayout):
2006-07-22 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Darin.
Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10038
REGRESSION: Length of navigator.mimeTypes collection returns number of installed plugins, not number
of registered mime types
* bindings/js/kjs_navigator.cpp:
(KJS::MimeTypes::getValueProperty): Return the length of the mime types vector, not the plugins one.
(KJS::MimeTypes::getOwnPropertySlot): Fixed another typo, which prevented MimeTypes::getValueProperty()
from even being called.
2006-07-21 Maciej Stachowiak <mjs@apple.com>
Reviewed by Adele and Tim Omernick.
<rdar://problem/4641004> 9A224: Safari crashes in WebCore::RenderMenuList::showPopup when changing a input select field to input text field
Couldn't figure out how to make layout test, here's a manual test:
* manual-tests/remove-select-onchange.html: Added.
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::showPopup): Don't add the RenderPopupMenu to the render
tree so it doesn't get destroyed if we do.
The remaining changes are to let the RenderPopupMenu know its menu list w/o having
to be in the render tree:
* rendering/RenderPopupMenu.cpp:
(WebCore::RenderPopupMenu::RenderPopupMenu):
* rendering/RenderPopupMenu.h:
(WebCore::RenderPopupMenu::menuList):
* rendering/RenderPopupMenuMac.h:
* rendering/RenderPopupMenuMac.mm:
(WebCore::RenderPopupMenuMac::RenderPopupMenuMac):
* rendering/RenderPopupMenuWin.h:
(WebCore::RenderPopupMenuWin::RenderPopupMenuWin):
* rendering/RenderTheme.h:
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::createPopupMenu):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::createPopupMenu):
* rendering/RenderThemeWin.h:
2006-07-21 Adele Peterson <adele@apple.com>
Reviewed by Darin.
Fix for: <rdar://problem/4643238> REGRESSION: Can't set insertion point at the end of a line of text
Test: fast/forms/textarea-scrolled-endline-caret.html
* rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionForCoordinates):
When looking for the closest line box, take the scroll offset into account.
2006-07-21 Tim Omernick <timo@apple.com>
Reviewed by Geoff & Maciej.
<rdar://problem/4632505> REGRESSION: Crash at WebCore::Widget::getView() const + 6
Geoff is working on a layout test for this.
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::focusWindow):
(WebCore::FrameMac::unfocusWindow):
Check for a NULL view. The view can be NULL if the frame has not yet loaded any data. This fixes the crash, but the behavior is still
wrong -- we should focus the frame once it gets a view. I've filed <rdar://problem/4645685> to track that. It's not as urgent as this
crasher.
2006-07-21 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
<rdar://problem/4523976> REGRESSION (NativeTextField): Crash occurs when choosing "Undo Typing" after typing and setting the value
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::updateFromElement): Clear the undo
chain when the text control contents have been set
programmatically.
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::clearUndoRedoOperations): Before clearing undo
stack, close all open undo groups and then open an equal number,
since otherwise NSUndoManager ends up in an inconsistent state
leading to uncaught ObjC exceptions.
2006-07-21 Beth Dakin <bdakin@apple.com>
Reviewed by Darin.
Just moving this assertion down a couple of lines. It was hitting
every time you try to print a page because we put it too early in
the function.
* bridge/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge drawRect:]):
2006-07-21 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
<rdar://problem/4548238>
REGRESSION: Can't remove the first OL/UL list item in a Mail's compose window
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
Moved from InsertParagraphSeparator. Does its own typing style restoration.
* editing/CompositeEditCommand.h:
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::doApply): Call breakOutOfEmptyListItem.
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::deleteKeyPressed): Call breakOutOfEmptyListItem if
the endingSelection is at the start of an editable region.
* editing/htmlediting.cpp:
(WebCore::embeddedSublist): Moved from InsertParagraphSeparator.
(WebCore::appendedSublist): Ditto.
(WebCore::enclosingEmptyListItem): Ditto.
* editing/htmlediting.h:
=== Safari-521.20 ===
2006-07-21 Tim Omernick <timo@apple.com>
Reviewed by Beth Dakin & John Sullivan.
<rdar://problem/4633717> 9A218: Reproducible crash in -[NSScroller mouseDown:]
Beth is in the middle of making a layout test for this; she will land it soon.
* platform/mac/ScrollBarMac.mm:
(ScrollBar::~ScrollBar):
Call Widget::removeFromSuperview() rather than -removeFromSuperview directly on the scroll bar view.
Widget::removeFromSuperview() obeys the "mustStayInWindow" flag, which is set while tracking the mouse
in view-based widgets to prevent their destruction while the tracking is in progress.
I searched around WebCore and this is the only Widget subclass that directly removes its view rather
than using removeFromSuperview().
2006-07-21 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9312
REGRESSION: Selection bug in new text fields when selecting past the first letter
Test: editing/selection/select-from-textfield-outwards.html
* editing/Selection.cpp:
(WebCore::Selection::adjustForEditableContent): Added code to handle the case
where the selection starts (resp. ends) in the last (resp. first) visual position
inside an editable root.
* editing/htmlediting.cpp:
(WebCore::comparePositions): Fixed the case of comparing a position inside a shadow
tree with a position in the shadow ancestor.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::positionForCoordinates): For coordinates outside a replaced
object, return the position just before (after) the element if the coordinates are above or
to the left (below or to the right).
* rendering/RenderObject.cpp:
(WebCore::RenderObject::caretMaxOffset): Changed to return 1 for replaced objects.
* rendering/RenderText.cpp:
(WebCore::RenderText::positionForCoordinates): Changed to return the last position
in the lowest text box if the y coordinate is below all text boxes.
2006-07-21 Geoffrey Garen <ggaren@apple.com>
Reviewed by Darin.
- Fixed <rdar://problem/4507265> REGRESSION: overlays don't work on
HousingMaps.com (Google Maps-based site)
- Made style.filter undetectable, like document.all.
Unfortunately, the SVG spec-makers invented a CSS attribute named 'filter',
which conflicts with IE's custom CSS attribute by the same name. Web programs
like the Google maps API test for style.filter, and assume it's the IE
style.filter if they find it, so we need to make style.filter undetectable
to avoid breaking them.
An alternative solution would be to hotwire a delorean, go back in time,
and beg the web standards makers to make standards that work on the web.
* bindings/js/kjs_css.cpp:
(KJS::DOMCSSStyleDeclaration::cssPropertyGetter):
2006-07-20 Justin Garcia <justin.garcia@apple.com>
Reviewed by john
<rdar://problem/4641033>
REGRESSION: Pasting from web pages into Mail (or Blot) often loses most of the content
* editing/markup.cpp:
(WebCore::createMarkup): We surround the currently accumulated markup with markup
for ancestors of the startNode when the pre-order traversal leaves the trees rooted
at those ancestors. We assumed that any ancestors of the current node not in the
ancestorsToClose list were those kind of ancestors. But we don't add renderer-less
containers to the ancestorsToClose list. So, we were incorrectly surrounding the
currently accumulated markup with markup for render-less containers. Most of the
content at apple.com was being put inside an <optgroup> inside a <select> element.
Then on Paste createContextualFragment would drop it.
2006-07-21 Anders Carlsson <acarlsson@apple.com>
Reviewed by Geoff.
* dom/Document.h:
(WebCore::Document::):
* dom/EventTargetNode.cpp:
(WebCore::EventTargetNode::addEventListener):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateScrollInfoAfterLayout):
Only dispatch overflowchanged events if overflowchanged event listeners have been registered on the document.
2006-07-20 Anders Carlsson <acarlsson@apple.com>
Reviewed by Geoff.
<rdar://problem/4637807> REGRESSION: "Features & Options" page at volvocars.us fails
* xml/XSLTProcessor.cpp:
(WebCore::xsltParamArrayFromParameterMap):
Turns out parameters never worked. String parameters need to be escaped so we create a transform context,
add the parameters to it quoted and then use xsltApplyStylesheetUser which lets us pass the transform context to it.
This also works around a bug in libxslt where a hash table isn't allocated.
2006-07-20 Alice Liu <alice.liu@apple.com>
Reviewed by Tim Omernick.
Fixed <rdar://problem/4621649> repro crash: Upload link causes crash on pages.google.com in Frame::nodeForWidget
added manual test because there is no way to change the value of an <input type=file> via the DOM. It's not supported because it's a security risk.
* manual-tests/remove-input-file-onchange.html: Added.
* platform/mac/FileButtonMac.mm:
(-[WebFileChooserButton chooseFilename:]):
swapped the calls to changeFilename and bridgeForWidget because changeFilename will destroy the widget that is accessed in bridgeForWidget
2006-07-20 Alice Liu <alice.liu@apple.com>
Reviewed by Adele.
Fixed <rdar://problem/4532113> REGRESSION (NativeTextField): Crash occurs after modifying field then reloading page -[FormDelegate frameLayoutHasChanged:]
added a manual test because of the need to use AutoFill.
* dom/Node.h:
(WebCore::Node::aboutToUnload):
added virtual function prototype
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::aboutToUnload):
added implementation that sends textFieldDidEndEditing notification
* html/HTMLInputElement.h:
added virtual function prototype
* manual-tests/input-type-file-autocomplete-frame-1.html: Added.
* manual-tests/input-type-file-autocomplete-frame-2.html: Added.
* manual-tests/input-type-file-autocomplete-refresh.html: Added.
* page/Frame.cpp:
(WebCore::Frame::stopLoading):
before unloading, call aboutToUnload on the current focused node
2006-07-20 Brady Eidson <beidson@apple.com>
Reviewed by Maciej
fixed <rdar://problem/4611303> REGRESSION: repro crash in WebCore::EventTargetNode::dispatchWindowEvent at aeropostale.com
There was an attempt to deref an EventListener that got cleaned up in GC. Changing Document's EventListener list from
vanilla ptrs to refptrs to prevent GC, following EventTargetNode's proven example.
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::clear):
(WebCore::Document::handleWindowEvent):
(WebCore::Document::getHTMLWindowEventListener):
(WebCore::Document::removeHTMLWindowEventListener):
(WebCore::Document::removeWindowEventListener):
(WebCore::Document::hasWindowEventListener):
Changed all of the list iterators to work with RefPtrs instead of vanilla ptrs
* dom/Document.h:
Changed the EventListener list to be a vanilla pointer list to a refptr list
2006-07-20 John Sullivan <sullivan@apple.com>
Reviewed by Maciej
- WebCore part of fix for:
<rdar://problem/4557386> REGRESSION (419.3-521.19): repro Safari world leak involving
closing tabs after clicking in a web page
* bridge/mac/WebCoreFrameBridge.h:
(-[WebCoreFrameBridge textViewWasFirstResponderAtMouseDownTime:])
renamed to be more specific (formerly wasFirstResponderAtMouseDownTime:)
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::passMouseDownEventToWidget):
updated for name change
2006-07-19 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Darin.
Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8272
Use of window.open & window.close can cause crash
* platform/PlatformMouseEvent.h:
(WebCore::PlatformMouseEvent::PlatformMouseEvent):
* platform/mac/PlatformMouseEventMac.mm:
(WebCore::PlatformMouseEvent::PlatformMouseEvent):
The default constructor now creates a "zero" event, and a new one was added to create the "current" one.
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::handleMouseMoveEvent):
* rendering/RenderFormElement.cpp:
(WebCore::RenderFormElement::clicked):
Updated for the above changes.
* platform/gdk/MouseEventGdk.cpp:
* platform/gdk/TemporaryLinkStubs.cpp:
(PlatformMouseEvent::PlatformMouseEvent):
* platform/win/MouseEventWin.cpp:
* platform/win/TemporaryLinkStubs.cpp:
(PlatformMouseEvent::PlatformMouseEvent):
Trying not to break other platforms.
* manual-tests/invalid-mouse-event.html: Added.
2006-07-20 Maciej Stachowiak <mjs@apple.com>
Reviewed by Anders.
- delete line that I only commented in the last patch - meant to do this before landing
* html/HTMLFrameElement.cpp:
(WebCore::HTMLFrameElement::close):
2006-07-19 Maciej Stachowiak <mjs@apple.com>
Reviewed by Geoff.
- fixed <rdar://problem/4634484> REGRESSION: Project Change Request form should have vertical scroll bar, but doesn't
I couldn't figure out how to make an automated test case for this,
or even a manual one. It seems to be timing-related in some way.
* html/HTMLFrameElement.cpp:
(WebCore::HTMLFrameElement::close): detach the child frame from
its element, not the frame containing this element.
2006-07-20 Anders Carlsson <acarlsson@apple.com>
Reviewed by Darin.
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::nextKeyViewInFrame):
Hold a ref to the node in case it gets destroyed by an event handler.
2006-07-19 Mark Rowe <opendarwin.org@bdash.net.nz>
Reviewed by Darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=10021
Bug 10021: REGRESSION: Stack overflow due to infinite recursion in
Image::checkForSolidColor
* platform/Image.cpp:
(WebCore::Image::cacheFrame): Don't call checkForSolidColor unless
the frame was decoded successfully.
2006-07-19 Adele Peterson <adele@apple.com>
Reviewed by Maciej.
- Fix for:
<rdar://problem/4422657> REGRESSION: member name field or password field should have focus after loading webmail.mac.com (7405)
http://bugzilla.opendarwin.org/show_bug.cgi?id=7405
<rdar://problem/4614181> REGRESSION: Crash in WebCore::RenderTextField::text() when quoting post at the Ars Technica forum (9707)
http://bugzilla.opendarwin.org/show_bug.cgi?id=9707
Needs an http test. (http://bugzilla.opendarwin.org/show_bug.cgi?id=10020)
These bugs were both cases where focus() was called on an element which didn't have a renderer yet because stylesheets hadn't finished loading yet.
Now, we detect this case and let setFocusNode be called. And when the stylesheet finishes loading, and the element attaches, a timer will fire,
which will cause the correct selection & scrolling behavior to occur.
This fix removes selection and scrolling behavior from the focus method. This code is now in a new method, updateFocusAppearance.
updateFocusAppearance can now be called directly from focus(), but it can also be called when a timer fires. This timer gets set
up when an element attaches, and its already been focused by the focus method. We have to use a timer, because updateFocusAppearance can cause
a layout to happen, and we don't want that to happen in the middle of attach().
* bindings/objc/DOM.mm: (-[DOMElement isFocused]): Added SPI for autofill.
* bindings/objc/DOMPrivate.h:
* dom/Element.cpp:
(WebCore::Element::Element): Initializes timer and needFocusAppearanceUpdate bool.
(WebCore::Element::attach): Checks needsFocusAppearanceUpdate, and if the node is focused, then starts the timer.
(WebCore::Element::focus): Updated to check supportsFocus before calling setFocusNode,
and only requiring the element to be focusable now before updating focus appearance.
(WebCore::Element::updateFocusAppearance): Added. Separates the selection, and the scrolling from focusing the node.
(WebCore::Element::updateFocusAppearanceTimerFired): Stops the timer, and if the element is focusable, calls updateFocusAppearance.
(WebCore::Element::stopUpdateFocusAppearanceTimer): Cancels timer, and setsNeedsFocusAppearanceUpdate(false).
(WebCore::Element::detach): Calls stopUpdateFocusAppearanceTimer.
(WebCore::Element::blur): ditto.
* dom/Element.h:
(WebCore::Element::needsFocusAppearanceUpdate): Added so the timer only fires when focus() methods have caused an element to be focused.
(WebCore::Element::setNeedsFocusAppearanceUpdate): Added so focus methods can set this flag.
* dom/Node.h: (WebCore::Node::supportsFocus): Added. Base class just calls isFocusable.
* html/HTMLAnchorElement.h: Added supportsFocus.
* html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::supportsFocus): Added. Checks for the case where stylesheets haven't loaded yet,
so we can still focus the node without a renderer, and when it gets a renderer, we'll update the focus appearance.
* html/HTMLGenericFormElement.h: (WebCore::HTMLGenericFormElement::supportsFocus): ditto.
* html/HTMLGenericFormElement.cpp: Removed include of Document.h since this is now in the header.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::focus): Updated to check supportsFocus before calling setFocusNode,
and only requiring the element to be focusable now before updating focus appearance.
(WebCore::HTMLInputElement::updateFocusAppearance): Added. Separates the selection, and the scrolling from focusing the node.
* html/HTMLInputElement.h:
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::focus): Updated to check supportsFocus before calling setFocusNode,
and only requiring the element to be focusable now before updating focus appearance.
(WebCore::HTMLTextAreaElement::updateFocusAppearance): Added. Separates the selection, and the scrolling from focusing the node.
* html/HTMLTextAreaElement.h:
2006-07-19 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
<rdar://problem/4631972>
REGRESSION: Mail crashes when pasting entire contents of http://www.apple.com/support/ into a new mail message
* dom/Position.cpp:
(WebCore::Position::upstream): Deployed isBlock and enclosingBlock.
(WebCore::Position::downstream): Ditto.
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): Ditto.
* editing/htmlediting.cpp:
(WebCore::canHaveChildrenForEditing): Added !iframe.
(WebCore::isBlock): Added, returns !node->renderer()->isInline()
(WebCore::enclosingBlock): Added.
* editing/htmlediting.h:
2006-07-19 Anders Carlsson <acarlsson@apple.com>
Reviewed by Adele.
<rdar://problem/4631272> REGRESSION: Crash tabbing out of hostname field at autorestore.apple.com
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::nextKeyViewInFrame):
Take into account that focus handlers can cause a node's renderer to be destroyed.
2006-07-19 David Hyatt <hyatt@apple.com>
Fix for 4638376. The 1x1 solid color image optimization was broken when
I re-architected image. This patch restores the optimization for CG. Cairo
will still need the optimization.
Reviewed by darin
WARNING: NO TEST CASES ADDED OR CHANGED (need test cases still)
* platform/Image.cpp:
(WebCore::Image::Image):
(WebCore::Image::invalidateData):
(WebCore::Image::cacheFrame):
* platform/Image.h:
(WebCore::Image::setIsPDF):
* platform/cairo/ImageCairo.cpp:
(WebCore::Image::checkForSolidColor):
* platform/mac/ImageMac.mm:
(WebCore::Image::initNativeData):
(WebCore::Image::invalidateNativeData):
(WebCore::Image::checkForSolidColor):
(WebCore::Image::draw):
(WebCore::Image::drawTiled):
2006-07-19 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
<rdar://problem/4613519>
REGRESSION: Pasting text in native text area inserts text one character before it should (9527)
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::doApply): Turn into an InsertLineBreakCommand instead of bailing
if the enclosingBlockFlowElement doesn't have a parent.
2006-07-19 David Harrison <harrison@apple.com>
Reviewed by Tim Hatcher.
<rdar://problem/4629307> -[DOMRange markupString] does not include the initial table element if it is at the beginning of the range
<rdar://problem/4062218> pasting in contents of web.apple.com strips off the <table> element from the first table
Better patch than previous checkin.
* test: editing/pasteboard/paste-table-003.html
* editing/markup.cpp:
(WebCore::createMarkup):
Make sure to include the table when including a tbody.
=== Safari-521.19 ===
2006-07-19 David Harrison <harrison@apple.com>
Reviewed by Tim Hatcher.
<rdar://problem/4629307> -[DOMRange markupString] does not include the initial table element if it is at the beginning of the range
No test case as this can only be reproduced through ObjC APIs.
* editing/markup.cpp:
(WebCore::createMarkup):
Adjust the range for ancestor markup handling when main loop skips first node.
2006-07-18 David Hyatt <hyatt@apple.com>
Fix for radar 4611287, make resizable text fields opt-in rather than
opt-out. Open source users will need to write the pref into their defaults
to see the resizers on textareas now.
Reviewed by mjs and adele
* WebCore.xcodeproj/project.pbxproj:
* bridge/mac/WebCoreSettings.mm:
(-[WebCoreSettings setTextAreasAreResizable:]):
* css/cssparser.cpp:
(WebCore::CSSParser::parseValue):
* css/cssstyleselector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* css/html4.css:
2006-07-18 Anders Carlsson <acarlsson@apple.com>
Reviewed by Darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9959
REGRESSION: iframes stop rendering after 200th one on successive reloads
* html/HTMLFrameElement.cpp:
(WebCore::HTMLFrameElement::attach):
(WebCore::HTMLFrameElement::close):
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::insertedIntoDocument):
(WebCore::HTMLIFrameElement::willRemove):
Remove calls to incrementFrameCount and decrementFrameCount.
* page/Frame.cpp:
(WebCore::Frame::Frame):
Call incrementFrameCount here.
(WebCore::Frame::~Frame):
Call disconnectOwnerElement.
(WebCore::Frame::disconnectOwnerElement):
Call decrementFrameCount here.
2006-07-18 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Darin.
Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9013
Let correct CSS custom cursor declarations parse
* css/cssparser.cpp:
(WebCore::CSSParser::parseValue): Ignore any values following a custom CSS cursor URI, instead of
requiring that it is the only one in the list (which is actually illegal, according to the spec).
This is only a temporary hack, with a real implementation to follow in bug 6001/6002.
* manual-tests/custom-cursors.html: Added a test for this issue.
* manual-tests/resources/helpCursor.tiff: A cursor image used in the test.
2006-07-18 Timothy Hatcher <timothy@apple.com>
Reviewed by Anders.
<rdar://problem/4636216> NetNewsWire fails to launch on 9A224 - missing symbols
WebCore needs to add -sub_library libobjc to maintain
backwards compatibility with binaries linked with WebKit
before JavaScriptCore moved out of WebKit.
* WebCore.xcodeproj/project.pbxproj:
2006-07-18 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Justin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9978
REGRESSION (r12949-r12988): Clicking the first letter on a line places the caret at the end of the previous line
Test: editing/selection/click-start-of-line.html
* rendering/RenderText.cpp:
(WebCore::RenderText::positionForCoordinates): Changed to return downstream
affinity if the x coordinate is to the left of the middle of the first character
in the text box.
2006-07-18 Anders Carlsson <acarlsson@apple.com>
Reviewed by Darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9695
<rdar://problem/4614085>
TOT REGRESSION: NativeTextArea: Text area does not respond to Cmd-UpArrow/Cmd-DownArrow (9695)
* editing/SelectionController.cpp:
(WebCore::SelectionController::modifyExtendingRightForward):
(WebCore::SelectionController::modifyMovingRightForward):
(WebCore::SelectionController::modifyExtendingLeftBackward):
(WebCore::SelectionController::modifyMovingLeftBackward):
If the caret is inside an editable region, the beginning/end of the document should actually be the
beginning/end of the editable region.
2006-07-17 Tim Omernick <timo@apple.com>
Reviewed by Maciej.
<rdar://problem/4612079> need a way to prevent pages from scrolling to reveal elements that are focused
by script
* bridge/mac/WebCoreFrameBridge.h:
* bridge/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge setProhibitsScrolling:]):
* page/Frame.cpp:
(WebCore::Frame::prohibitsScrolling):
(WebCore::Frame::setProhibitsScrolling):
* page/Frame.h:
* page/FramePrivate.h:
(WebCore::FramePrivate::FramePrivate):
* page/FrameView.cpp:
(WebCore::FrameView::scrollPointRecursively):
(WebCore::FrameView::setContentsPos):
* page/FrameView.h:
* platform/ScrollView.h:
2006-07-17 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dave Harrison.
- fixed <rdar://problem/4618089> Blot crashes when I paste in all the contents of http://www.apple.com/startpage/
* editing/htmlediting.cpp:
(WebCore::editingIgnoresContent):
2006-07-17 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
<rdar://problem/4621728>
REGRESSION: Selecting by dragging down creates selection in wrong direction, with certain steps
<rdar://problem/4604932>
REGRESSION: Dragging too far left on a line will select all lines above it.
No layout test because of 9980.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::positionForCoordinates): Don't return positions inside editable roots
for coordinates outside those roots, except for coordinates outside a document that is entirely
editable.
2006-07-17 Timothy Hatcher <timothy@apple.com>
Reviewed by Darin.
<rdar://problem/4635281> JSCanvasRenderingContext2D::drawImage needs to initialize the exception code to zero
* bindings/js/JSCanvasRenderingContext2DCustom.cpp:
(WebCore::JSCanvasRenderingContext2D::drawImage): initialize ec to zero
* html/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawImage): initialize ec before earlier return
2006-07-17 Timothy Hatcher <timothy@apple.com>
Reviewed by Maciej.
<rdar://problem/4634874> WebScriptObject and WebUndefined are no longer defined by WebKit
Moves WebScriptObject and WebUndefined to WebCore.
* WebCore.exp:
* WebCore.xcodeproj/project.pbxproj:
* bindings/objc/DOM.mm:
* bindings/objc/DOMCore.h:
* bindings/objc/DOMInternal.mm:
* bindings/objc/DOMUtility.mm:
* bindings/objc/WebScriptObject.mm: Added.
(+[WebUndefined allocWithZone:]):
(-[WebUndefined initWithCoder:]):
(-[WebUndefined encodeWithCoder:]):
(-[WebUndefined copyWithZone:]):
* bindings/objc/WebScriptObjectPrivate.h: Added.
* bridge/mac/FrameMac.mm:
* bridge/mac/WebCoreScriptDebugger.mm:
2006-07-17 David Hyatt <hyatt@apple.com>
Back out the fix for 5564, since it turns out font:x-small; is a pretty
prominent IE-specific CSS hack. Because Web sites rely on IE's incorrect
font parsing as a means of also correcting IE's incorrect font size rules.
This fixes Yahoo.com.
Reviewed by darin
* css/cssparser.cpp:
(WebCore::CSSParser::parseFont):
2006-07-17 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
<rdar://problem/4618389> REGRESSION: After applying a link to the last word of a sentence, a new selection is created at the start of the sentence
* dom/Document.cpp:
(WebCore::Document::updateSelection):
2006-07-17 Maciej Stachowiak <mjs@apple.com>
Reviewed by Beth.
<rdar://problem/4604946> REGRESSION: 'checkboxRef.checked = true' fires onchange event in Leopard
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setChecked):
(WebCore::HTMLInputElement::preDispatchEventHandler):
* html/HTMLInputElement.h:
2006-07-16 David Kilzer <ddkilzer@kilzer.net>
Reviewed by Darin.
- fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9954
REGRESSION: document.dir should return empty string in <head>
Test: fast/dom/document-dir-property.html
* bindings/js/kjs_html.cpp:
(KJS::JSHTMLDocument::getValueProperty): Return an empty string instead of an
undefined value for an unset document.dir property.
2006-07-16 David Kilzer <ddkilzer@kilzer.net>
Reviewed by Darin.
* dom/NodeFilter.idl:
Removed "No newline at end of file" that snuck in as part of the "apply patch" process.
* manual-tests/input-empty-on-focus.html:
Removed "Property changes" that snuck in as part of the "apply patch" process.
2006-07-16 Darin Adler <darin@apple.com>
Reviewed by John Sullivan.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9943
<rdar://problem/4590613>
REGRESSION (Tiger-TOT): menus are offset to the right at http://movies.aol.com/movie-photo-bts/superman-returns
The problem turns out to be the fact that body.offsetLeft is returning a non-zero value.
I have no idea why the menus worked in Tiger Safari, because body.offsetLeft behavior has not changed.
Presumably some other bug that we fixed had been compensating.
Test: fast/html/body-offset-properties.html
* rendering/RenderObject.cpp:
(WebCore::RenderObject::offsetLeft): Always return 0 for any object without an offsetParent.
(WebCore::RenderObject::offsetTop): Ditto.
(WebCore::RenderObject::offsetParent): Return 0 for the body (treat as a special case).
2006-07-16 Beth Dakin <bdakin@apple.com>
Reviewed by Maciej.
Fix for <rdar://problem/4616595> REGRESSION: Problems with world
clock widget clock hand motion on 9A211 + 4604574
The second hand on the widget was jiggling because the rotation was
messing up the use of the affine transformation matrix while
rounding to pixel boundaries in device space. We are mainly
concerned with rounding to pixel boundaries with the scale in mind,
so this patch extracts the scale to device space from the matrix,
and rounds to pixel boundaries using only the scale. This doesn't
seem like it is a perfect solution, but it definitely solves the
immediate problem. We will probably need to re-address what should
happen to avoid pixel cracks with rotations at non-integral scale
factors.
* platform/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::roundToDevicePixels):
2006-07-15 Darin Adler <darin@apple.com>
- fix mistake from fix for 8952 that was breaking layout tests
* editing/SelectionController.cpp: (WebCore::SelectionController::nodeWillBeRemoved):
Justin was right! I changed the behavior of the function by accident. Changed it
back so that it doesn't blow away the selection on the DOM side in the case where
it didn't before.
I will write 100 times on the blackboard: "When Justin says something about editing,
assume he is right."
2006-07-15 Darin Adler <darin@apple.com>
- try to fix Windows build
* WebCore.vcproj/WebCore/WebCore.vcproj: Added StreamingTextDecoderICU.cpp/h.
2006-07-15 Darin Adler <darin@apple.com>
Reviewed by John Sullivan.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8952
<rdar://problem/4575185>
REGRESSION: crash on drag of highlighted Google custom home page modules
Test: fast/dynamic/move-node-with-selection.html
* editing/SelectionController.cpp: (WebCore::SelectionController::nodeWillBeRemoved):
Call updateRendering before calling clearSelection(), since it's important to do any
work beforehand, and there are calls inside clearSelection that will indirectly do an
updateRendering. Also change code to make fewer assumptions about object lifetime.
2006-07-15 Darin Adler <darin@apple.com>
Reviewed by John Sullivan.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8587
<rdar://problem/4631844>
REGRESSION: {display:list-item} on items outside an ol or ul element no longer causes incremental numbering
Test: fast/lists/numeric-markers-outside-list.html
* rendering/RenderListItem.cpp: (WebCore::previousListItem):
Look for list items, even when we're outside any list.
2006-07-15 Adele Peterson <adele@apple.com>
Reviewed by John.
- Fix for <rdar://problem/4593970> REGRESSION (NativeTextField): autofill menu disappears after typing a 2nd character
This was caused by composite editing commands, (like typing or pasting) that include a DeleteCommand, being
interpreted by the form delegate as an actual delete. This fix doesn't notify the form delegate if the deletion is
part of an editing command to replace the selected text.
* editing/DeleteSelectionCommand.h: Added m_replace to keep track of whether this deletion is
part of a composite command to replace the text being deleted.
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::DeleteSelectionCommand): Initialize m_replace.
(WebCore::DeleteSelectionCommand::doApply): Only notify the form delegate of the deletion if the text is not being replaced.
* editing/CompositeEditCommand.h:
* editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::deleteSelection):
Added replace argument to construct DeleteSelectionCommand.
* editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::input): Call deleteSelection with replace argument.
* editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply): ditto.
2006-07-15 Geoffrey Garen <ggaren@apple.com>
Reviewed by Maciej, tweaked to match Darin's patch.
- Fixed <rdar://problem/4631837> REGRESSION: Reproducible crash on
FCKeditor demo (9911)
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/kjs_html.cpp:
(KJS::JSHTMLDocument::putValueProperty): Check for a null body element before
forwarding the put request to it. I confirmed that no other parts of the
file use 'body' or 'bodyElement' without checking for null.
Also, use 'body' rather than 'bodyElement' because dir can bet set on
any element, not just HTMLBodyElement.
2006-07-15 Darin Adler <darin@apple.com>
Reviewed by Adele.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8871
<rdar://problem/4575417>
REGRESSION: Pressing Enter/Return in a text input removes the selected text
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9743
<rdar://problem/4614228>
REGRESSION: crash dispatching JavaScript-created keyboard event to input element
* bridge/mac/FrameMac.mm: (WebCore::FrameMac::doTextFieldCommandFromEvent):
Add a null check to fix the crash, and a FIXME explaining why this is not necessarily
enough for the future.
* html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler):
Consume Enter key keypress events even if the element is not in a form.
* platform/mac/KeyEventMac.mm: (WebCore::keyIdentifierForKeyEvent): Added \n to the
characters that turn into "Enter". Actual keyboard events always are \r or \003 on
the Macintosh, but in layout tests we can use \n, and everything other than the
code path here works, so worth fixing.
2006-07-15 Darin Adler <darin@apple.com>
Reviewed by John Sullivan.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9883
<rdar://problem/4631821>
REGRESSION: NativePopups don't work correctly in some forum software
Test: fast/forms/select-selected.html
* rendering/RenderMenuList.h:
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::updateFromElement): Added code to map the selected option
index to a list index before using it to index into the list.
(WebCore::RenderMenuList::showPopup): Added code to map the selection option index
to a list index before passing it to the menu renderer.
(WebCore::RenderMenuList::valueChanged): Added code to map the list index back to a
option index before calling setSelectedIndex (that function takes an option index).
2006-07-15 Darin Adler <darin@apple.com>
Reviewed by John Sullivan.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9928
REGRESSION: Text Encoding menu inoperative (after gcc protocol build fix)
* bindings/objc/DOM.mm:
(-[DOMNode addEventListener:::]): Moved into DOMEventTarget category.
(-[DOMNode removeEventListener:::]): Ditto.
(-[DOMNode dispatchEvent:]): Ditto.
* WebCore.xcodeproj/project.pbxproj: Allow Xcode to do its thing.
2006-07-15 Maciej Stachowiak <mjs@apple.com>
Reviewed by Anders.
<rdar://problem/4632144> REGRESSION: table column tests failing as a result of very recent fix
* rendering/RenderTable.cpp:
(WebCore::RenderTable::addChild): columns and colgroups are valid children of a table too, not
just table sections!
2006-07-15 Anders Carlsson <acarlsson@apple.com>
Reviewed by Darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9866
<rdar://problem/4631561>
REGRESSION: Repro crash from mangleme using iframe, only from server.
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::attach):
Add null check for contentFrame() since content frames won't be created for invalid URLs.
2006-07-14 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Darin.
Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=4195
REGRESSION: KOI8-U encoding no longer supported.
Tests:
* http/tests/misc/BOM-override.pl
* http/tests/misc/BOM-override-script.html
* fast/encoding/charset-koi8-u.html
* fast/encoding/charset-x-nextstep.html
Restored a TEC code path for encodings that are not supported by ICU (but which currently
passes all layout tests even by itself with ICU disabled). A lot of refactoring is
still needed - most importantly, round-tripping encoding names via CFStringEncoding
makes little sense now.
* WebCore.exp:
* bridge/mac/WebCoreTextDecoder.h: Removed.
* bridge/mac/WebCoreTextDecoder.mm: Removed.
WebCoreTextDecoder was not used anywhere since WebTextView was moved into WebCore.
* loader/Decoder.cpp:
(Decoder::Decoder):
(Decoder::setEncodingName):
(Decoder::decode):
Use StreamingTextDecoder::create().
* platform/StreamingTextDecoder.cpp:
(WebCore::StreamingTextDecoder::create):
(WebCore::StreamingTextDecoder::~StreamingTextDecoder):
* platform/StreamingTextDecoder.h:
StreamingTextDecoder is just an abstract interface to implementations now.
* platform/StreamingTextDecoderICU.cpp: Added.
(WebCore::StreamingTextDecoderICU::StreamingTextDecoderICU):
(WebCore::StreamingTextDecoderICU::~StreamingTextDecoderICU):
(WebCore::StreamingTextDecoderICU::releaseICUConverter):
(WebCore::StreamingTextDecoderICU::textEncodingSupported):
(WebCore::StreamingTextDecoderICU::convertUTF16):
(WebCore::StreamingTextDecoderICU::convertIfASCII):
(WebCore::StreamingTextDecoderICU::createICUConverter):
(WebCore::StreamingTextDecoderICU::appendOmittingBOM):
(WebCore::StreamingTextDecoderICU::convertUsingICU):
(WebCore::StreamingTextDecoderICU::convert):
(WebCore::StreamingTextDecoderICU::toUnicode):
(WebCore::StreamingTextDecoderICU::fromUnicode):
* platform/StreamingTextDecoderICU.h: Added.
Renamed from StreamingTextDecoder; added a way to tell whether the encoding is actually
supported by the decoder; minor cleanup.
* platform/TextEncoding.cpp:
(WebCore::TextEncoding::effectiveEncoding): Moved from StreamingTextDecoder.
(WebCore::TextEncoding::toUnicode): Use StreamingTextDecoder::create().
(WebCore::TextEncoding::fromUnicode): Moved to StreamingTextDecoderICU.
* platform/TextEncoding.h: Changed __APPLE__ to PLATFORM(MAC); added effectiveEncoding().
* platform/mac/StreamingTextDecoderMac.cpp: Added.
(WebCore::StreamingTextDecoderMac::StreamingTextDecoderMac):
(WebCore::StreamingTextDecoderMac::~StreamingTextDecoderMac):
(WebCore::StreamingTextDecoderMac::releaseTECConverter):
(WebCore::StreamingTextDecoderMac::textEncodingSupported):
(WebCore::StreamingTextDecoderMac::convertUTF16):
(WebCore::StreamingTextDecoderMac::convertIfASCII):
(WebCore::StreamingTextDecoderMac::createTECConverter):
(WebCore::StreamingTextDecoderMac::appendOmittingBOM):
(WebCore::StreamingTextDecoderMac::convertOneChunkUsingTEC):
(WebCore::StreamingTextDecoderMac::convertUsingTEC):
(WebCore::StreamingTextDecoderMac::convert):
(WebCore::StreamingTextDecoderMac::toUnicode):
(WebCore::StreamingTextDecoderMac::fromUnicode):
* platform/mac/StreamingTextDecoderMac.h: Added.
(WebCore::StreamingTextDecoderMac::convert):
This is a TEC+CFString code path for decoding, basically restored from a year-old revision.
* platform/mac/TextEncodingMac.cpp: Removed. Code moved to StreamingTextDecoderMac.
* WebCore.xcodeproj/project.pbxproj:
=== Safari-521.17 ===
2006-07-14 Timothy Hatcher <timothy@apple.com>
<rdar://problem/4623957> SWB: gcc-5412 (new?) objc warning causes WebCore project failure
Made a DOMNode category in DOMEvents.h that lets DOMNode conform to the
DOMEventTarget protocol that works with GCC 5412.
Removed forward declarations of WebCoreWidgetHolder and imported WebCoreWidgetHolder.h.
Removed all <Cocoa/Cocoa.h> and <Foundation/Foundation.h> imports in other headers,
we import <Cocoa/Cocoa.h> in the prefix header for ObjC.
* WebCore.xcodeproj/project.pbxproj:
* bindings/objc/DOMCore.h:
* bindings/objc/DOMEvents.h:
* bridge/mac/FormDataMac.h:
* bridge/mac/WebCoreAXObject.h:
* bridge/mac/WebCoreCache.h:
* bridge/mac/WebCoreEncodings.h:
* bridge/mac/WebCoreFrameBridge.h:
* bridge/mac/WebCoreFrameNamespaces.h:
* bridge/mac/WebCoreJavaScript.h:
* bridge/mac/WebCorePageBridge.h:
* bridge/mac/WebCorePageState.h:
* bridge/mac/WebCoreResourceLoader.h:
* bridge/mac/WebCoreScriptDebugger.h:
* bridge/mac/WebCoreSettings.h:
* bridge/mac/WebCoreStringTruncator.h:
* bridge/mac/WebCoreStringTruncator.mm:
* bridge/mac/WebCoreTextDecoder.h:
* bridge/mac/WebDashboardRegion.h:
* kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
* platform/mac/CookieJar.mm:
* platform/mac/DeprecatedStringMac.mm:
* platform/mac/FontDataMac.mm:
* platform/mac/FoundationExtras.h:
* platform/mac/TextBoundaries.mm:
* platform/mac/WebCoreHistory.h:
* platform/mac/WebCoreHistory.m:
* platform/mac/WebCoreKeyGenerator.h:
* platform/mac/WebCoreTextArea.h:
* platform/mac/WebCoreTextField.h:
* platform/mac/WebCoreTextRenderer.h:
* platform/mac/WebCoreView.h:
* platform/mac/WebCoreWidgetHolder.h:
2006-07-14 Geoffrey Garen <ggaren@apple.com>
Reviewed by Maciej.
- Updated ScriptInterpreter to work with Interpreter ref-counting in
JavaScriptCore.
(KJS::ScriptInterpreter::~ScriptInterpreter): Now protected to catch
manual delete.
2006-07-14 Anders Carlsson <acarlsson@apple.com>
Reviewed by Adele and Justin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9658
<rdar://problem/4613948>
REGRESSION: Check Spelling does not work in textarea elements
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::advanceToNextMisspelling):
Don't use setStartBefore or setEndAfter on the search range because for shadow trees, there
is no notion of before and after. Instead, use setStart and setEnd and pass in the start and end
indices respectively.
* dom/Range.cpp:
(WebCore::Range::checkNodeBA):
Allow range operations on shadow trees.
* manual-tests/form-element-spelling.html: Added.
2006-07-14 Beth Dakin <bdakin@apple.com>
Reviewed by Hyatt.
Fix for <rdar://problem/4621660> REGRESSION: Safari crashing in
WebCore::FrameView::updateOverflowStatus
m_viewportRenderer is never initialized for framesets, and it
shouldn't be. So we just need to nil-check for it in
updateOverflowStatus() and return early.
* page/FrameView.cpp:
(WebCore::FrameView::updateOverflowStatus): Nil check.
2006-07-14 Adele Peterson <adele@apple.com>
RS by Darin.
Backing out fix for <rdar://problem/4604703>
REGRESSION (NativeTextField): Focus is not removed from password field after I ctrl-click into a different field
Darin had a better fix in WebKit for this.
* bridge/mac/FrameMac.mm: (WebCore::FrameMac::sendContextMenuEvent):
2006-07-14 Adele Peterson <adele@apple.com>
Reviewed by Darin.
- Fix for <rdar://problem/4614054> REGRESSION: Safari submits forms when the Return key is hit to complete inline inputs
* page/Frame.h: (WebCore::Frame::inputManagerHasMarkedText): Added.
* bridge/mac/FrameMac.h: ditto.
* bridge/mac/FrameMac.mm: (WebCore::FrameMac::inputManagerHasMarkedText): Added. Asks the input manager if there's marked text.
* html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler): For text fields, don't submit the form on Enter
if the input manager says there's marked text. I added this code for all text field paths. For widgets, WebCoreTextField.mm
has code to deal with this case. But as we convert search, password, and isindex, they will need to do this check too.
2006-07-14 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9907
REGRESSION (r15418): editing/pasteboard/paste-table-001 fails in pixel mode
* rendering/RenderText.cpp:
(WebCore::RenderText::caretRect): Fixed the calculation of the max/min allowed caret
position.
2006-07-14 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9905
REGRESSION (r15404-r15415): Repro crash when pressing delete in an empty editable div
Test: editing/deleting/delete-at-start-or-end.html
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::deleteKeyPressed): Added null check.
(WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto.
2006-07-14 David Kilzer <ddkilzer@kilzer.net>
Reviewed by Geoffrey.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9903
Simplify logic in JSHTMLOptionsCollection::setLength() by using no-arg getNumber()
No test cases since there is no change in functionality.
* bindings/js/JSHTMLOptionsCollectionCustom.cpp:
(WebCore::JSHTMLOptionsCollection::setLength): Simplified logic by using the
no-argument getNumber() method.
2006-07-14 Geoffrey Garen <ggaren@apple.com>
Reviewed by Adele.
- Build fix: don't need BLOCK_OBJC_EXCEPTIONS because we already have
one surrounding this function, and the nested one makes the compiler
think our local variable is volatile (seems like a compiler bug to me).
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::sendContextMenuEvent):
2006-07-14 Timothy Hatcher <timothy@apple.com>
Reviewed by Maciej.
Make JavaScriptCore a public framework. Adjusted the paths.
* WebCore.xcodeproj/project.pbxproj:
2006-07-14 Maciej Stachowiak <mjs@apple.com>
Reviewed by Hyatt.
- fixed <rdar://problem/4567031> REGRESSION: Crash at WebCore::RenderBlock::createLineBoxes (seems to be a security hole?)
I also fixed all the similar crash / assertion failure cases I could think of.
* dom/Node.cpp:
(WebCore::Node::nextRendererWithSameParent): Helper function for some of the above.
* dom/Node.h:
* rendering/RenderTable.cpp:
(WebCore::RenderTable::addChild): Don't allow inserting forms when not in
an HTML document, since we don't need that quirk and because parsing won't
do certain render tree fixups. Also watch out for case when inserting before
the renderer of a misnested child.
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::addChild): ditto
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::addChild): ditto
2006-07-13 Adele Peterson <adele@apple.com>
Reviewed by Maciej.
- Fix for <rdar://problem/4604703>
REGRESSION (NativeTextField): Focus is not removed from password field after I ctrl-click into a different field
Test:
* manual-tests/password-ctrl-click-lose-focus.html: Added.
* bridge/mac/FrameMac.mm: (WebCore::FrameMac::sendContextMenuEvent):
If we're about to set a selection in the current view, make sure its the first responder.
In this case, this will cause the password field to resign first responder at the right time.
2006-07-13 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Hyatt.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9670
REGRESSION: RTL white-space:pre-wrap text is offset to the right
Test: fast/text/international/rtl-white-space-pre-wrap.html
* rendering/RenderText.cpp:
(WebCore::RenderText::caretRect): Fixed LTR case and added the RTL case
of clipping the caret position to the text box when the caret is after
the trailing space of an autowrapped line.
* rendering/bidi.cpp:
(WebCore::RenderBlock::computeHorizontalPositionsForLine): Changed to truncate-
to-fit the logically last text box if it contains the trailing spaces of an
autowrapped line.
(WebCore::RenderBlock::bidiReorderLine): Remember the logically last text run.
In the case of autowrapped text with white space that overflows beyond the line,
the last text run is the one containing the overflowing white space.
(WebCore::RenderBlock::findNextLineBreak): Split overflowing white space on a
line that autowraps only after white space into a separate text run.
2006-07-13 David Harrison <harrison@apple.com>
Reviewed by Dave Hyatt.
<rdar://problem/4624203> -webkit-highlight should be behind images
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paint):
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::paint):
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::paint):
Call custom highlighter before painting the image, marker, or widget.
2006-07-13 David Harrison <harrison@apple.com>
Reviewed by Justin and Levi.
<rdar://problem/4620743> REGRESSION: Option-Delete doesn't delete words during typing
* Tests:
editing/deleting/delete-by-word-001.html
editing/deleting/delete-by-word-002.html
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::deleteKeyPressed):
(WebCore::TypingCommand::forwardDeleteKeyPressed):
(WebCore::TypingCommand::doApply):
* editing/TypingCommand.h:
Delete and forward delete to use specified granularity.
Undo of delete and forward delete to select what had been deleted (non-char granularity only).
* page/Frame.cpp:
(WebCore::Frame::setSelection):
Close typing and end style even if selection is not changing.
* page/Frame.h:
Remove unused setSelection parameter keepTypingStyle.
2006-07-12 Levi Weintraub <lweintraub@apple.com>
Reviewed by justin
<rdar://problem/4622763> Deleting from beginning of paragraph following a table deletes rather than selects the table
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::initializeStartEnd): Added selection expansion for HRs.
(WebCore::DeleteSelectionCommand::initializePositionData): Now uses enclosingBlockFlowOrTableElement
instead of enclosingBlockFlowElement.
(WebCore::DeleteSelectionCommand::removeNode): Use to identify that we need a placeholder
when the start or end block is removed.
(WebCore::DeleteSelectionCommand::handleGeneralDelete): Added check for canHaveChildrenForEditing
to keep things like HRs from being given children.
(WebCore::DeleteSelectionCommand::doApply): Switched to use member variable for needPlaceholder.
* editing/DeleteSelectionCommand.h: Made needPlaceholder a member variable.
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::deleteKeyPressed): Fixed selection bug for tables and open typing commands.
(WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto.
* editing/htmlediting.cpp:
(WebCore::editingIgnoresContent): Added check for HRs, since it's not considered a widget.
* editing/visible_units.cpp:
(WebCore::startOfParagraph): Fix for HRs and tables.
(WebCore::endOfParagraph): Ditto.
2006-07-13 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9880
Memory leaks running DOM-Hanoi
No change in behavior, thus no test included.
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::setStatusBarText): Use a local autorelease pool to release the temporaries -
the test runs non-stop, and the enclosing pool doesn't get a chance to be drained.
2006-07-12 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Adele.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9862
REGRESSION: GMail: Crash in RenderView::repaintViewRectangle when spoofing as FF
- see also <rdar://problem/4622407>
Test: fast/frames/repaint-display-none-crash.html
* rendering/RenderView.cpp:
(WebCore::RenderView::repaintViewRectangle): Added null checking of the owner element's
renderer, which can be null if the iframe is set to display:none.
2006-07-12 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
<rdar://problem/4509393>
selected DOM range starts with <object>, 0 offset but selection should include the <object>
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::shouldMergeStart):
Don't pull content out of a table cell.
* editing/htmlediting.cpp:
(WebCore::editingIgnoresContent): Added <select> nodes.
(WebCore::rangeCompliantEquivalent): Convert [node, 0] positions to positionBeforeNode(node)
for more types of nodes.
* rendering/RenderContainer.cpp:
(WebCore::RenderContainer::positionForCoordinates):
Fix a crasher when right clicking on an anonymous table.
2006-07-12 John Sullivan <sullivan@apple.com>
Reviewed by Brady Eidson
- fixed <rdar://problem/4611164> REGRESSION: Crash occurs when undoing a series of
misspelled words (WebCore::RenderObject::repaint(bool)
* dom/Document.cpp:
(WebCore::Document::removeMarkers):
put (it - markers.begin()) in a local variable before altering markers, in every case where this was
happening. One of the cases like this was fixed a while back, but other cases were
either missed at that time or crept in since.
2006-07-13 Anders Carlsson <acarlsson@apple.com>
Reviewed by Justin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9663
REGRESSION (r14948-r14956): Selection in text field remains highlighted when the text field loses focus
* dom/Document.cpp:
(WebCore::Document::updateSelection):
Don't return early if the selection is empty.
2006-07-12 Anders Carlsson <acarlsson@apple.com>
Reviewed by Adele.
<rdar://problem/4614656> REGRESSION: onpaste() handlers don't run for textarea elements
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::dispatchCPPEvent):
If the element is a shadow node, dispatch the event to its real parent.
* manual-tests/textarea-onpaste.html: Added.
2006-07-12 Beth Dakin <bdakin@apple.com>
Reviewed by Anders.
Fix for layout test regressions after my check-in last night. Just
a silly mistake where I should have asked if we were NOT printing
instead of if we were in the listbox code.
* WebCore.xcodeproj/project.pbxproj: Project file wars. Back to
XCode 2.3
* platform/mac/ListBoxMac.mm:
(itemTextRenderer): Inverted check.
(groupLabelTextRenderer): Inverted check.
2006-07-12 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9806
<rdar://problem/4622622>
REGRESSION: Large rowspan causes WebKit to call abort()
Test: fast/table/large-rowspan-crash.html
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::ensureRows):
Use sizeof(RowStruct) instead of sizeof(int).
Clearly we'll need something better to solve this completely.
I expect another smaller, but still huge, value will still cause a problem.
2006-07-12 Anders Carlsson <acarlsson@apple.com>
Reviewed by Maciej.
<rdar://problem/4586665> REGRESSION: autorestore.apple.com: Crashes Safari in WebCore::Widget::client() const
* bridge/mac/FrameMac.h:
Add focusCallResultedInViewBeingCreated argument.
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::nextKeyViewInFrame):
If the call to focus() caused the node to get a native widget, set focusCallResultedInViewBeingCreated to true.
(WebCore::FrameMac::nextKeyViewInFrameHierarchy):
Don't reset the focus node if focusCallResultedInViewBeingCreated is true. Also, add magic to prevent setting
a text field as the first responder if its field editor already is the current first responder.
* page/FrameView.cpp:
(WebCore::FrameView::handleMousePressEvent):
In some cases, get the event target node again after dispatching the mouse event.
2006-07-12 Beth Dakin <bdakin@apple.com>
Reviewed by Adele.
Fix for <rdar://problem/4615765> Input[type='search' fields
initially render too large in Widgets
Fundamentally, the problem here is that we were miscalculating
things because [NSGraphicsContext currentContextDrawingToScreen]
was evaluating to false when widgets first load. We only ever used
this check, however, to determine if we were printing or not, so it
should not have evaluated to false for loading in Dashbaord.
Instead, if we query the RenderView about whether or not we are
printing, we will get the right answer.
No test case added since this appears only to affect Dashboard.
* bridge/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge drawRect:]): Ask the RenderView if we are
printing instead. This is not part of the actual bug fix, but it
seems wise to get rid of all calls to [NSGraphicsContext
currentContextDrawingToScreen] when we are just trying to determine
if we are printing or not.
* platform/mac/ListBoxMac.mm:
(itemTextRenderer):This function now takes a boolean, isPrinting.
(groupLabelTextRenderer): Same as above.
(ListBox::sizeForNumberOfLines): Ask the RenderView if we are
printing.
(-[WebCoreTableView drawRow:clipRect:]): Same as above.
* platform/mac/PopUpButtonMac.mm:
(PopUpButton::sizeHint): Same as above.
* platform/mac/TextFieldMac.mm:
(-[NSSearchFieldCell _addStringToRecentSearches:]):
* rendering/RenderLineEdit.cpp: Same as above.
2006-07-12 Adele Peterson <adele@apple.com>
Reviewed by Maciej.
Fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=9813
OPTION text can paint over select element's scrollbar
Test: fast/forms/option-text-clip.html
* rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::paintObject):
When calculating the clip to apply to the button text, also consider padding.
In the future, we may have separate renderers for the text part, and the arrow part
of the control, and then the separation should be natural. For now, we use padding.
2006-07-11 David Kilzer <ddkilzer@kilzer.net>
Windows build fix. Reviewed by NOBODY.
* WebCore.vcproj/WebCore/WebCore.vcproj: Added JSHTMLOptionsCollection.cpp/h
and JSHTMLOptionsCollectionCuston.cpp. VC++ Express realphabetized the file list.
2006-07-11 Darin Adler <darin@apple.com>
Reviewed by Adele.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9809
<rdar://problem/4619515>
focus ring fails to appear on select element after choosing item from popup
- includes http://bugzilla.opendarwin.org/show_bug.cgi?id=9853
improvements to select element, including some storage leak fixes
* html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::index): Use a const
reference for the list items, so we don't have to copy a vector.
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::selectedIndex): Ditto.
(WebCore::HTMLSelectElement::setSelectedIndex): Ditto.
(WebCore::HTMLSelectElement::length): Ditto.
(WebCore::HTMLSelectElement::remove): Ditto.
(WebCore::HTMLSelectElement::value): Ditto.
(WebCore::HTMLSelectElement::setValue): Ditto.
(WebCore::HTMLSelectElement::stateValue): Ditto.
(WebCore::HTMLSelectElement::restoreState): Ditto.
(WebCore::HTMLSelectElement::appendFormData): Ditto.
(WebCore::HTMLSelectElement::optionToListIndex): Ditto.
(WebCore::HTMLSelectElement::listToOptionIndex): Ditto.
(WebCore::HTMLSelectElement::recalcListItems): Made const, with the appropriate
fields mutable.
(WebCore::HTMLSelectElement::reset): Use a const reference for
the list items, so we don't have to copy the vector. Remove the call to
setSelectionChanged for the RenderMenuList case.
(WebCore::HTMLSelectElement::notifyOptionSelected): Ditto, on both counts.
(WebCore::HTMLSelectElement::defaultEventHandler): Call focus() before showing
the pop-up.
* html/HTMLSelectElement.h: The RenderMenuList class is no longer a friend.
Changed the listItems function to return a const reference to the vector so
it no longer copies the vector. Removed the const_cast to the call to
recalcListItems and changed it to a const member function. Made m_recalcListItems
mutable.
* rendering/DeprecatedRenderSelect.cpp:
(WebCore::DeprecatedRenderSelect::updateFromElement): Removed an unnecessary call
to recalcListItems, which is called automatically. Use a const reference for the
list items so we don't have to copy a vector.
(WebCore::DeprecatedRenderSelect::layout): Ditto.
(WebCore::DeprecatedRenderSelect::selectionChanged): Ditto.
(WebCore::DeprecatedRenderSelect::updateSelection): Ditto.
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::RenderMenuList): Updated for renamed data members.
(WebCore::RenderMenuList::createInnerBlock): Ditto.
(WebCore::RenderMenuList::addChild): Ditto.
(WebCore::RenderMenuList::removeChild): Ditto.
(WebCore::RenderMenuList::setStyle): Ditto. Also removed code to set the style
on the pop-up menu, because it's created with the correct style and destroyed
before it a style change could occur.
(WebCore::RenderMenuList::updateFromElement): Rearranged code to compute the
maximum width in a simpler fashion, and to not bother trying to maintain
the "selected" flags on the elements, since the HTMLSelectElement class
takes care of that. Store the width as an int. Call setText to set the text
based on the selected element's option text.
(WebCore::RenderMenuList::paintObject): Don't check m_inner when setting
up the clip -- always set up the clip.
(WebCore::RenderMenuList::calcMinMaxWidth): Use m_optionsWidth directly
instead of calling ceilf on m_longestWidth.
(WebCore::RenderMenuList::showPopup): Don't use m_popupMenu to store the
menu -- instead keep the pointer in a local variable. Get the selected
index from the HTMLSelectElement.
(WebCore::RenderMenuList::valueChanged): Call HTMLSelectElement::setSelectedIndex
to do most of the work.
* rendering/RenderMenuList.h: Renamed m_inner to m_innerBlock. Removed
m_popupMenu, m_size, m_selectionChanged, and m_selectedIndex. Renamed
m_longestWidth to m_optionsWidth and changed it to be an int. Removed
unneeded override of removeLeftoverAnonymousBoxes function. Removed
unneeded selectionChanged, setSelectionChanged, updateSelection, and
hasPopupMenu functions. Removed extra includes.
* rendering/RenderPopupMenu.cpp: (WebCore::RenderPopupMenu::populate):
Change to iterate the list items instead of iterating all children
of the select node.
* rendering/RenderPopupMenu.h: Renamed getRenderMenuList to menuList.
* rendering/RenderPopupMenuMac.mm:
(WebCore::RenderPopupMenuMac::populate): Moved code to clear and create
the pop-up here from the caller. Removed an extra retain that would cause
the NSPopUpButtonCell to leak.
(WebCore::RenderPopupMenuMac::showPopup): Removed unnecessary code to
create the pop-up, which is now in populate, and also the call to the
clear function, for the same reason. Reorganized code to make it a bit
more readable. Removed an unnecessary if to check if frame is nil.
Used a RefPtr to make sure we don't make a call on a frame after it's
deleted. As part of the reorganization fixed a problem where we'd retain
the event and then return early without releasing it in one case.
(WebCore::RenderPopupMenuMac::addSeparator): Tweaked a little.
(WebCore::RenderPopupMenuMac::addGroupLabel): Grouped all the code to
manage the NSMenu at the bottom of the function.
(WebCore::RenderPopupMenuMac::addOption): Ditto.
2006-07-11 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
<rdar://problem/4620686>
REGRESSION: Mispelling markers are still displayed when using the delete key to place caret into a misspelled word
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::respondToChangedSelection): Remove markers from newAdjacentWords
even if oldAdjacentWords is equal to newAdjacentWords. This happens during a deletion.
2006-07-11 Tim Omernick <timo@apple.com>
Reviewed by NOBODY (build fix)
* bindings/objc/DOMPrivate.h:
Don't @class NPObject; that breaks files that actually #import <JavaScriptCore/npruntime.h>, since the NPObject
there is of a different type.
Also clarified a highly misleading comment from my last commit. I meant to clarify the comment
before landing.
2006-07-12 Anders Carlsson <acarlsson@apple.com>
Reviewed by Geoff.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9635
REGRESSION: Crash when adding to cart at <http://www.yemeksepeti.com/>
* html/HTMLTokenizer.cpp:
(WebCore::HTMLTokenizer::scriptHandler):
Don't load external scripts if the parser is stopped.
* manual-tests/open-close-tokenizer-crash.html: Added.
* manual-tests/resources/empty-file.js: Added.
* manual-tests/resources/open-close-tokenizer-crash.html: Added.
Add manual test.
2006-07-11 John Sullivan <sullivan@apple.com>
Reviewed by Kevin, Timo O, Brady, Darin, and Hyatt (whee!)
- added support for creating a selection image with white text
* rendering/RenderObject.h:
(WebCore::):
add PaintRestriction enum
(WebCore::RenderObject::PaintInfo::PaintInfo):
add forceWhiteText boolean to PaintInfo struct
* page/FramePrivate.h:
(WebCore::FramePrivate::FramePrivate):
replaced m_selectionOnly bool with m_paintRestriction, which also handles forcing the
text to white
* page/Frame.cpp:
(WebCore::Frame::paint):
updated to use & pass m_paintRestriction where it used to use & pass just m_selectionOnly
* bridge/mac/FrameMac.h:
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::selectionImage):
now takes forceWhiteText parameter, stored in FramePrivate as part of PaintRestriction
* bridge/mac/WebCoreFrameBridge.h:
* bridge/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge selectionImageForcingWhiteText:]):
renamed from selectionImage, now takes forceWhiteText parameter, which is passed
down into Frame
* rendering/RenderLayer.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paint):
use a PaintRestriction value where we used to use a selectionOnly bool
(WebCore::RenderLayer::paintLayer):
ditto; also stores forceWhiteText in PaintInfo struct
* kcanvas/KCanvasResources.cpp:
(WebCore::KCanvasMarker::draw):
updated for changed signature of PaintInfo constructor
* ksvg2/svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::drawMaskerContent):
ditto
* ksvg2/svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::drawPatternContentIntoTile):
ditto
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
paint with white text color if forceWhiteText is set in PaintInfo struct
2006-07-11 Tim Omernick <timo@apple.com>
Reviewed by Anders.
<http://bugzilla.opendarwin.org/show_bug.cgi?id=9843>:
Give Netscape plug-ins access to their own DOM element
* html/HTMLPlugInElement.h:
Just import JSC headers on Mac. The NPObject and Bindings::Instance stuff is only used on Mac anyway.
Changed __APPLE__ to PLATFORM(MAC).
Added m_NPObject ivar.
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::HTMLPlugInElement):
Initialize the NPObject.
(WebCore::HTMLPlugInElement::~HTMLPlugInElement):
Release the NPObject when the element is destroyed.
(WebCore::HTMLPlugInElement::createNPObject):
Creates an NPObject for the element.
(WebCore::HTMLPlugInElement::getNPObject):
Returns the NPObject for the element, creating and caching it if necessary.
* html/HTMLAppletElement.h:
Changed __APPLE__ to PLATFORM(MAC).
* html/HTMLAppletElement.cpp:
ditto
* html/HTMLEmbedElement.h:
ditto
* html/HTMLEmbedElement.cpp:
ditto
* html/HTMLObjectElement.h:
ditto
* html/HTMLObjectElement.cpp:
ditto
* bindings/objc/DOMPrivate.h:
Added -[DOMElement _NPObject].
* bindings/objc/DOM.mm:
(-[DOMElement _NPObject]):
Returns the NPObject for the element. Since this is only needed by the Netscape plug-in API, you can only get
the NPObject for applet, embed, and object elements.
2006-07-11 Adele Peterson <adele@apple.com>
Reviewed by Hyatt.
- Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9861
REGRESSION: Can't dynamically change list box to popup
and updated fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9859
REGRESSION: Can't dynamically change popup to list box
The original fix for 9859 was in the renderer, and I think we can catch the change
earlier in the element to detach and reattach.
I also did some cleanup to remove the PopupButton code path from DeprecatedRenderSelect
Test: fast/forms/select-change-listbox-to-popup.html
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::parseMappedAttribute): If the new attribute value is going to require us to change from listbox to popup or vice versa,
and we're already attached, then detach and reattach to create the correct renderer. If we're not attached, then we'll create the correct renderer
when we attach.
(WebCore::HTMLSelectElement::recalcStyle): Updated shouldUseMenuList since it no longer takes a RenderStyle.
(WebCore::HTMLSelectElement::isKeyboardFocusable): ditto.
(WebCore::HTMLSelectElement::isMouseFocusable): ditto.
(WebCore::HTMLSelectElement::createRenderer): ditto.
(WebCore::HTMLSelectElement::setRecalcListItems): ditto.
(WebCore::HTMLSelectElement::reset): ditto.
(WebCore::HTMLSelectElement::notifyOptionSelected): ditto.
(WebCore::HTMLSelectElement::defaultEventHandler): ditto.
* html/HTMLSelectElement.h: (WebCore::HTMLSelectElement::shouldUseMenuList):
This method no longer takes a RenderStyle. That was leftover from when we used to use the appearance
to determine whether or not to use the new menu list implementation.
* rendering/DeprecatedRenderSelect.h: Removed PopupButton code path.
* rendering/DeprecatedRenderSelect.cpp:
(WebCore::DeprecatedRenderSelect::DeprecatedRenderSelect):
(WebCore::DeprecatedRenderSelect::setWidgetWritingDirection):
(WebCore::DeprecatedRenderSelect::updateFromElement):
(WebCore::DeprecatedRenderSelect::baselinePosition):
(WebCore::DeprecatedRenderSelect::layout):
(WebCore::DeprecatedRenderSelect::updateSelection):
* rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::updateFromElement):
Backed out previous fix since this is now done in HTMLSelectElement.
2006-07-11 Adele Peterson <adele@apple.com>
Reviewed by Hyatt.
Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9859
REGRESSION: Can't dynamically change popup to list box
Test: fast/forms/select-change-popup-to-listbox.html
* rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::updateFromElement):
If the select element has the multiple property set, or has a size > 1, then it
really should be a list box, so we detach and attach the element so it creates the
correct type of renderer.
2006-07-11 John Sullivan <sullivan@apple.com>
Reviewed by Beth Dakin and Tim Omernick
- fixed <rdar://problem/4622794> HiDPI: dragging the selection in Safari can show pixel cracks
at non-integral scale factors
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::imageFromRect):
round image rect in window coordinate space
2006-07-10 Darin Adler <darin@apple.com>
Reviewed by Geoff.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9811
rdar://problem/4619572
OPTION text contained in OPTGROUP appears at the wrong size
* dom/Node.h:
* dom/Node.cpp: (WebCore::Node::renderStyle): Made a const member function.
The derived classes were overriding with const member functions, and I could
change either this or the derived -- decided to do this.
2006-07-10 Darin Adler <darin@apple.com>
Reviewed by Geoff.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9810
rdar://problem/4619534
OPTGROUP label text is using the default font instead of Lucida Grande
* rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::setFontFromControlSize):
Code wants the family name, but was calling fontName, which is not the same thing.
Also removed the unneeded conversion to DeprecatedString.
=== Safari-521.16 ===
2006-07-10 David Kilzer <ddkilzer@kilzer.net>
Reviewed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9179
Implement select.options.add() method
Tests:
- fast/dom/select-selectedIndex-multiple.html
- fast/dom/select-selectedIndex.html
- fast/js/select-options-add.html
* DerivedSources.make: Added JSHTMLOptionsCollection.h.
* ForwardingHeaders/kjs/operations.h: Added.
* WebCore.xcodeproj/project.pbxproj: Added new source files.
* bindings/js/JSHTMLOptionsCollectionCustom.cpp: Added.
(WebCore::JSHTMLOptionsCollection::length):
(WebCore::JSHTMLOptionsCollection::setLength):
(WebCore::JSHTMLOptionsCollection::indexSetter):
* bindings/js/kjs_html.cpp: Removed JSHTMLOptionsCollection implementation.
Renamed classes and methods for consistency.
(KJS::JSHTMLElement::selectGetter):
(KJS::JSHTMLElement::put):
(KJS::JSHTMLElement::selectSetter):
(KJS::JSHTMLCollection::JSHTMLCollection):
(KJS::JSHTMLCollectionProtoFunc::callAsFunction):
(KJS::getHTMLOptionsCollection):
* bindings/js/kjs_html.h: Ditto.
* bindings/scripts/CodeGeneratorJS.pm: Added support for HasCustomIndexSetter class attribute.
Added support for Optional parameter attribute, which makes generated code assume overloaded
implementation methods are available for a JavaScript function with optional arguments. Changed
local 'impl' variables to 'imp' so that impl() methods could be called without class designation.
* html/HTMLOptionElement.idl: Added GenerateNativeConverter attribute.
* html/HTMLOptionsCollection.cpp: Added methods used by generated JSHTMLOptionsCollection class.
(WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
(WebCore::HTMLOptionsCollection::add):
(WebCore::HTMLOptionsCollection::selectedIndex):
(WebCore::HTMLOptionsCollection::setSelectedIndex):
(WebCore::HTMLOptionsCollection::setLength):
* html/HTMLOptionsCollection.h: Ditto.
* html/HTMLOptionsCollection.idl: Added.
2006-07-10 David Harrison <harrison@apple.com>
Reviewed by Dave Hyatt.
<rdar://problem/4602408> -webkit-highlight needs to support images and elements other than text
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintCustomHighlight):
* rendering/RenderBox.h:
Utility for subclasses.
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paint):
Custom highlight in front of images.
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::paint):
Custom highlight in front of list markers.
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::paint):
Custom highlight in front of objects.
2006-07-10 David Hyatt <hyatt@apple.com>
<rdar://problem/4620557> REGRESSION: In a mail message, text isn't painted
correctly after choosing Redo Typing
Better fix for repainting issue with positioned objects when height
changes. Optimize when only a positioned child changes so that we don't
incorrectly do normal flow layout.
Reviewed by darin
* WebCore.xcodeproj/project.pbxproj:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlock):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::layout):
* rendering/RenderView.cpp:
(WebCore::RenderView::layout):
* rendering/bidi.cpp:
(WebCore::RenderBlock::layoutInlineChildren):
2006-07-10 Adele Peterson <adele@apple.com>
Reviewed by Beth.
- Fix for <rdar://problem/4621442> REGRESSION (NativePopup) : Popup menus aren't drawn correctly on page at orbitz.com; cheaptickets.com
Test: fast/forms/select-style.html
* rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::isControlStyled):
Don't let popups be style-able for now. We'll allow it later, when we
have a good way to handle border & backgrounds and still having it look like a control.
2006-07-10 Justin Garcia <justin.garcia@apple.com>
Reviewed by harrison
<rdar://problem/4619260>
9A213 + Safari 521.15.1 Crash with To Do's alarm icon (WebCore::maxDeepOffset(WebCore::Node const*) )
<rdar://problem/4619841>
REGRESSION: Dragging selection over input field results in a crash (WebCore::maxDeepOffset(WebCore::Node const*)
* WebCore.xcodeproj/project.pbxproj:
* editing/Selection.cpp:
(WebCore::Selection::adjustForEditableContent): Iterate using next/previousVisuallyDistinctCandidate
instead of traverseNext/Previous node because we were skipping positions. Jump out of shadow trees.
Migrate to isEditablePosition instead of isContentEditable.
2006-07-10 Beth Dakin <bdakin@apple.com>
Reviewed by Adele.
Shuffling comments around from my last check-in to make things read
more clearly.
* page/DOMWindow.h:
* page/DOMWindow.idl:
2006-07-10 Beth Dakin <bdakin@apple.com>
Reviewed by Darin.
Fix for <rdar://problem/4621095> The should be a way to
access the user interface scale factor through the DOM
window.devicePixelRatio returns the user interface scale factor.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::devicePixelRatio):
* page/DOMWindow.h:
* page/DOMWindow.idl:
2006-07-10 Brady Eidson <beidson@apple.com>
Reviewed by Alexey
Resolved the console error messages people got from the new DB even if they didn't have it enabled
* icon/IconDatabase.cpp:
(WebCore::IconDatabase::pruneUnreferencedIcons):
(WebCore::IconDatabase::pruneUnretainedIcons):
Added quick check to bail if the DB isn't open
2006-07-10 David Harrison <harrison@apple.com>
Reviewed by Tim Hatcher
Partial fix for...
<rdar://problem/4619260> 9A213 + Safari 521.15.1 Crash with To Do's alarm icon (WebCore::maxDeepOffset(WebCore::Node const*) )
* editing/Selection.cpp:
(WebCore::Selection::adjustForEditableContent):
Allow for node being 0. This is a bandaid fix to prevent the crash. It will still assert in a debug build. See bug for more info.
2006-07-10 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9808
REGRESSION: Incorrect layout (and ERROR) when forcing ATSU For All Text
* manual-tests/ATSU-bad-layout.html: Added.
* platform/mac/FontMac.mm:
(WebCore::Font::floatWidthForComplexText): Return 0 immediately for empty runs.
2006-07-10 Darin Adler <darin@apple.com>
- try to fix the no-SVG build
* ksvg2/misc/SVGImageLoader.cpp: Move namespace brace inside the #if.
2006-07-10 Darin Adler <darin@apple.com>
Reviewed by Anders.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9833
REGRESSION: Reproducible crash: RenderMenuList.cpp:58: failed assertion `!m_first'
* manual-tests/empty-title-popup.html: Added.
* rendering/RenderMenuList.h: Add createInnerBlock.
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::createInnerBlock): Factored out of addChild.
(WebCore::RenderMenuList::addChild): Call createInnerBlock.
(WebCore::RenderMenuList::setText): Changed parameter type.
(WebCore::RenderMenuList::showPopup): Call createInnerBlock before calling
the parent class's addChild.
2006-07-10 Rob Buis <buis@kde.org>
Reviewed by Maciej via IRC.
Make sure the attributes are calculated against viewport width value,
as defined in the spec. http://paste.lisp.org/display/22342
* ksvg2/svg/SVGEllipseElement.cpp:
(WebCore::SVGEllipseElement::rx): Changed LM_HEIGHT to LM_WIDTH.
* ksvg2/svg/SVGLineElement.cpp:
(SVGLineElement::x2): Ditto.
2006-07-10 Beth Dakin <bdakin@apple.com>
Reviewed by Maciej.
Fix for <rdar://problem/4610314> Support the CSS3 content property
for images
This patch provides initial support for the CSS3 content property.
It lacks support for any content other than images, and only allows
content for elements that seemed safe for now.
* css/cssstyleselector.cpp:
(WebCore::CSSStyleSelector::applyProperty): Remove restrictions for
just :before and :after
* html/HTMLBRElement.cpp:
(WebCore::HTMLBRElement::createRenderer):
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::createRenderer):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::createRenderer):
* html/HTMLLegendElement.cpp:
(WebCore::HTMLLegendElement::createRenderer):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::RenderImage):
(WebCore::RenderImage::setCachedImage): Don't allow the image to be
set this way if it was already set with the content property.
* rendering/RenderImage.h:
(WebCore::RenderImage::setIsAnonymousImage): Anonymous images are
those set through the content property.
(WebCore::RenderImage::isAnonymousImage):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::createObject): If there is content
specified, create a RenderImage with the content and initialize the
cached image to whatever was specified in the CSS.
2006-07-10 Brady Eidson <beidson@apple.com>
Reviewed by NOBODY (Build Fix!)
* icon/SiteIcon.cpp:
(SiteIcon::getImage):
Release build made an "unused variable" warning, which is, of course, an error. fixed that.
2006-07-10 Brady Eidson <beidson@apple.com>
Reviewed by Maciej
SQLite Icon DB now fully replicates functionality of the old DB, including pruning to keep unused
information out to keep down disk usage. For now, it is still off by default, as the critical
feature of importing old icons into the new DB is still unrealized.
If you'd like to test, add #define ICONDEBUG to your WebKitPrefix.h
* icon/IconDatabase.cpp:
(WebCore::IconDatabase::IconDatabase):
(WebCore::IconDatabase::open):
-Sets up a timer for initial pruning
(WebCore::IconDatabase::iconForPageURL):
-Switched away from "dirty blob hack" as the problem is provisionally solved
(WebCore::IconDatabase::retainIconForURL):
(WebCore::IconDatabase::releaseIconForURL):
-Same as found in WebKit
(WebCore::IconDatabase::totalRetainCountForIconURL):
-Adds up all retainers of icon
(WebCore::IconDatabase::forgetIconForIconURLFromDatabase):
-Wipes an Icon table entry out
(WebCore::IconDatabase::establishTemporaryIconIDForIconURL):
(WebCore::IconDatabase::establishTemporaryIconIDForEscapedIconURL):
(WebCore::IconDatabase::establishIconIDForIconURL):
(WebCore::IconDatabase::establishIconIDForEscapedIconURL):
-Added ability to get an iconID without creating a new one if a lookup is all
that is genuinely wanted
(WebCore::IconDatabase::pruneUnreferencedIcons):
(WebCore::IconDatabase::pruneUnretainedIcons):
-Called on a timer on DB startup to clean it out
* icon/IconDatabase.h:
* icon/SiteIcon.cpp:
(SiteIcon::SiteIcon):
(SiteIcon::~SiteIcon):
-Deletes the image on deletion
(SiteIcon::getImage):
-Cut down on no-longer-necessary debug info
2006-07-10 Anders Carlsson <acarlsson@apple.com>
Reviewed by Adele.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9245
Quirksmode: Incorrect handling of disabled BUTTON elements
* html/HTMLButtonElement.cpp:
(WebCore::HTMLButtonElement::defaultEventHandler):
Don't call prepareSubmit if the element is disabled.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::defaultEventHandler):
Don't call prepareSubmit if the element is disabled.
2006-07-10 Darin Adler <darin@apple.com>
- try to fix Windows build
* platform/win/TemporaryLinkStubs.cpp: Put a few functions in the WebCore namespace.
* platform/gdk/TemporaryLinkStubs.cpp: Ditto.
2006-07-10 Darin Adler <darin@apple.com>
Reviewed by Geoff.
- fix failures seen in layout tests
* bindings/js/kjs_dom.cpp: (KJS::toJS): Restore one of the few WebCore:: prefixes
that really needed to be there -- because we have two classes named JSHTMLDocument
at the moment! (One in KJS and one in WebCore namespace.)
2006-07-10 Darin Adler <darin@apple.com>
- try to fix Windows build
* rendering/RenderLayer.h: Correct a forward declaration of ScrollBar.
2006-07-09 Adele Peterson <adele@apple.com>
Reviewed by Maciej.
Fix for <rdar://problem/4463835> Switch to use new popup menu implementation for <select>
* css/html4.css: Added style for new selects, and for list boxes.
* html/HTMLSelectElement.h: (WebCore::HTMLSelectElement::shouldUseMenuList): Removed check for appearance so new popups can be styled.
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::setStyle): Removed padding. This is now set by the theme.
(WebCore::RenderMenuList::calcMinMaxWidth): Now takes minimum text size into account.
* rendering/RenderMenuList.h: Removed baselinePosition since we're letting the theme calculate that.
* rendering/RenderTheme.cpp: (WebCore::RenderTheme::isControlContainer): Added menuList as a ControlContainer,
so RenderThemeMac will compute its baseline.
* rendering/RenderTheme.h: (WebCore::RenderTheme::minimumTextSize): Added.
* rendering/RenderThemeMac.h: Added minimumTextSize, setPopupPaddingFromControlSize, popupButtonSizes, popupButtonMargins, popupButtonPadding.
Removed sizeOfArrowControl.
* rendering/RenderThemeMac.mm:
(WebCore::): Added enum for padding.
(WebCore::RenderThemeMac::adjustRepaintRect): Now inflates rect to account for control shadow.
(WebCore::RenderThemeMac::baselinePosition): Now calculates baseline for menulist.
(WebCore::RenderThemeMac::popupButtonMargins): Tweaked values.
(WebCore::RenderThemeMac::popupButtonSizes): Added.
(WebCore::RenderThemeMac::popupButtonPadding): Added, so different padding can be set for different control sizes.
(WebCore::RenderThemeMac::setPopupPaddingFromControlSize): Added.
(WebCore::RenderThemeMac::paintMenuList): Now inflates rect to account for control shadow.
(WebCore::RenderThemeMac::adjustMenuListStyle): Resets border, sets padding, sets control size.
(WebCore::RenderThemeMac::setPopupButtonCellState): Removed unnecessary class name.
(WebCore::RenderThemeMac::minimumTextSize): Added.
2006-07-09 Darin Adler <darin@apple.com>
- add back "unused code" for plain text fields, still used by <isindex>!
* platform/TextField.h:
* platform/mac/TextFieldMac.mm:
* platform/mac/WebCoreTextField.h:
* platform/mac/WebCoreTextField.mm:
* rendering/RenderLineEdit.cpp:
2006-07-09 Darin Adler <darin@apple.com>
Reviewed by Tim Hatcher.
- put more into the WebCore namespace
- removed unused code for plain text fields
Put more classes, class templates, enums, functions, and constants into
the WebCore namespace, including all the headers in the platform directory.
Removed lots of unneeded "WebCore::" qualifiers and "using" directives.
Added some "WebCore::" qualifiers in a few places.
Removed "uses WebCore::" in headers that we said we'd remove "when
everything is in the WebCore namespace".
* bindings/js/JSDOMParser.cpp:
* bindings/js/JSHTMLElementWrapperFactory.cpp:
* bindings/js/JSXSLTProcessor.cpp:
* bindings/js/kjs_binding.cpp:
* bindings/js/kjs_css.cpp:
* bindings/js/kjs_dom.cpp:
* bindings/js/kjs_dom.h:
* bindings/js/kjs_events.cpp:
* bindings/js/kjs_proxy.h:
* bindings/js/kjs_window.h:
* bindings/objc/DOM.mm:
* bridge/History.h:
* bridge/JavaAppletWidget.h:
* bridge/mac/FormDataMac.h:
* bridge/mac/FormDataMac.mm:
* bridge/mac/WebCoreAXObject.mm:
* bridge/mac/WebCoreEncodings.mm:
* bridge/mac/WebCoreFrameBridge.h:
* bridge/mac/WebCoreIconDatabaseBridge.mm:
* bridge/mac/WebCorePageState.h:
* bridge/mac/WebCoreScriptDebugger.mm:
* bridge/mac/WebCoreSettings.h:
* css/CSSGrammar.y:
* css/CSSPageRule.cpp:
* css/CSSPageRule.h:
* css/MediaList.cpp:
* css/cssstyleselector.h:
* dom/Clipboard.h:
* dom/Document.cpp:
* dom/Document.h:
* dom/EventTargetNode.h:
* dom/Node.cpp:
* dom/Node.h:
* dom/Position.h:
* dom/Range.cpp:
* dom/XMLTokenizer.cpp:
* editing/AppendNodeCommand.h:
* editing/ApplyStyleCommand.cpp:
* editing/BreakBlockquoteCommand.cpp:
* editing/BreakBlockquoteCommand.h:
* editing/CompositeEditCommand.cpp:
* editing/CompositeEditCommand.h:
* editing/CreateLinkCommand.h:
* editing/DeleteFromTextNodeCommand.h:
* editing/DeleteSelectionCommand.h:
* editing/FormatBlockCommand.h:
* editing/HTMLInterchange.cpp:
* editing/HTMLInterchange.h:
* editing/IndentOutdentCommand.h:
* editing/InsertIntoTextNodeCommand.h:
* editing/InsertLineBreakCommand.h:
* editing/InsertListCommand.h:
* editing/InsertNodeBeforeCommand.h:
* editing/InsertTextCommand.cpp:
* editing/InsertTextCommand.h:
* editing/JSEditor.cpp:
* editing/JSEditor.h:
* editing/JoinTextNodesCommand.h:
* editing/MergeIdenticalElementsCommand.cpp:
* editing/MergeIdenticalElementsCommand.h:
* editing/ModifySelectionListLevel.h:
* editing/MoveSelectionCommand.h:
* editing/RebalanceWhitespaceCommand.h:
* editing/RemoveNodeAttributeCommand.h:
* editing/RemoveNodeCommand.h:
* editing/RemoveNodePreservingChildrenCommand.h:
* editing/ReplaceSelectionCommand.h:
* editing/SetNodeAttributeCommand.h:
* editing/SplitElementCommand.cpp:
* editing/SplitElementCommand.h:
* editing/SplitTextNodeCommand.cpp:
* editing/SplitTextNodeCommand.h:
* editing/SplitTextNodeContainingElementCommand.h:
* editing/TypingCommand.cpp:
* editing/TypingCommand.h:
* editing/UnlinkCommand.h:
* editing/VisiblePosition.cpp:
* editing/WrapContentsInDummySpanCommand.cpp:
* editing/WrapContentsInDummySpanCommand.h:
* editing/markup.cpp:
* editing/markup.h:
* html/HTMLAnchorElement.cpp:
* html/HTMLBodyElement.cpp:
* html/HTMLButtonElement.h:
* html/HTMLCollection.h:
* html/HTMLDocument.h:
* html/HTMLEmbedElement.cpp:
* html/HTMLFormElement.cpp:
* html/HTMLFormElement.h:
* html/HTMLFrameElement.cpp:
* html/HTMLFrameSetElement.cpp:
* html/HTMLKeygenElement.cpp:
* html/HTMLLabelElement.cpp:
* html/HTMLObjectElement.cpp:
* html/HTMLObjectElement.h:
* html/HTMLTableElement.cpp:
* html/HTMLTablePartElement.cpp:
* icon/IconDatabase.h:
* kcanvas/KCanvasPath.h:
* kcanvas/KCanvasResources.cpp:
* kcanvas/KCanvasResources.h:
* kcanvas/KCanvasTreeDebug.cpp:
* kcanvas/KCanvasTreeDebug.h:
* kcanvas/RenderSVGContainer.cpp:
* kcanvas/RenderSVGText.h:
* kcanvas/device/KRenderingPaintServer.h:
* kcanvas/device/KRenderingPaintServerGradient.h:
* kcanvas/device/KRenderingPaintServerSolid.cpp:
* ksvg2/misc/SVGImageLoader.cpp:
* ksvg2/svg/SVGElement.cpp:
* ksvg2/svg/SVGElement.h:
* ksvg2/svg/SVGForeignObjectElement.cpp:
* ksvg2/svg/SVGForeignObjectElement.h:
* ksvg2/svg/SVGImageElement.cpp:
* ksvg2/svg/SVGPoint.h:
* ksvg2/svg/SVGStylable.h:
* ksvg2/svg/SVGTRefElement.cpp:
* ksvg2/svg/SVGTRefElement.h:
* ksvg2/svg/SVGTSpanElement.cpp:
* ksvg2/svg/SVGTSpanElement.h:
* ksvg2/svg/SVGTextElement.h:
* ksvg2/svg/svgpathparser.cpp:
* ksvg2/svg/svgpathparser.h:
* loader/Cache.h:
* loader/DocLoader.h:
* loader/LoaderFunctions.h:
* loader/mac/LoaderFunctionsMac.mm:
* page/Frame.h:
* page/FrameView.h:
* page/Page.h:
* page/Settings.h:
* platform/AffineTransform.cpp:
* platform/AffineTransform.h:
* platform/Arena.cpp:
* platform/Arena.h:
* platform/CookieJar.h:
* platform/DeprecatedCString.cpp:
* platform/DeprecatedCString.h:
* platform/DeprecatedPtrList.h:
* platform/DeprecatedPtrListImpl.cpp:
* platform/DeprecatedPtrListImpl.h:
* platform/DeprecatedPtrQueue.h:
* platform/DeprecatedString.cpp:
* platform/DeprecatedString.h:
* platform/DeprecatedStringList.cpp:
* platform/DeprecatedStringList.h:
* platform/DeprecatedValueList.h:
* platform/DeprecatedValueListImpl.cpp:
* platform/DeprecatedValueListImpl.h:
* platform/FileButton.h:
* platform/FloatPoint.h:
* platform/FloatRect.h:
* platform/FloatSize.h:
* platform/FontData.h:
* platform/FontFallbackList.h:
* platform/GraphicsContext.h:
* platform/IntPoint.h:
* platform/IntRect.h:
* platform/IntSize.h:
* platform/KURL.cpp:
* platform/KURL.h:
* platform/ListBox.h:
* platform/Logging.cpp:
* platform/Logging.h:
* platform/Pen.h:
* platform/PopUpButton.h:
* platform/RegularExpression.cpp:
* platform/RegularExpression.h:
* platform/SSLKeyGenerator.h:
* platform/ScrollBar.h:
* platform/SegmentedString.h:
* platform/Shared.h:
* platform/Slider.h:
* platform/StringImpl.h:
* platform/TextBox.h:
* platform/TextField.h:
* platform/TextStream.cpp:
* platform/TextStream.h:
* platform/TransferJob.h:
* platform/TransferJobClient.h:
* platform/Widget.h:
* platform/cg/AffineTransformCG.cpp:
* platform/mac/ClipboardMac.h:
* platform/mac/ClipboardMac.mm:
* platform/mac/DeprecatedStringListMac.mm:
* platform/mac/FontCacheMac.mm:
* platform/mac/KURLMac.mm:
* platform/mac/ListBoxMac.mm:
* platform/mac/PopUpButtonMac.mm:
* platform/mac/SSLKeyGeneratorMac.mm:
* platform/mac/TextBoxMac.mm:
* platform/mac/TextFieldMac.mm:
* platform/mac/WebCoreTextArea.h:
* platform/mac/WebCoreTextArea.mm:
* platform/mac/WebCoreTextField.h:
* platform/mac/WebCoreTextField.mm:
* rendering/DeprecatedRenderSelect.h:
* rendering/RenderArena.cpp:
* rendering/RenderArena.h:
* rendering/RenderBlock.cpp:
* rendering/RenderBox.cpp:
* rendering/RenderContainer.cpp:
* rendering/RenderFlexibleBox.cpp:
* rendering/RenderFlow.cpp:
* rendering/RenderLayer.cpp:
* rendering/RenderLineEdit.cpp:
* rendering/RenderObject.h:
* rendering/RenderStyle.cpp:
* rendering/RenderStyle.h:
* rendering/RenderText.cpp:
* rendering/RenderTextFragment.cpp:
* rendering/RenderTheme.h:
* rendering/RenderTreeAsText.cpp:
* rendering/RenderTreeAsText.h:
* rendering/RenderView.h:
* rendering/bidi.h:
* xml/XSLStyleSheet.cpp:
* xml/XSLTProcessor.cpp:
2006-07-09 Geoffrey Garen <ggaren@apple.com>
Reviewed by Beth.
* bindings/js/kjs_window.cpp:
(KJS::Window::clear): Garbage collect after reinitalizing the global
object, not before, since the reinitialization tends to create garbage.
2006-07-09 Timothy Hatcher <timothy@apple.com>
Reviewed by Darin.
Bug 9820: Move new DOM API that has been through API review to public headers
http://bugzilla.opendarwin.org/show_bug.cgi?id=9820
* bindings/objc/DOM.mm:
(-[DOMElement focus]):
(-[DOMElement blur]):
(-[DOMRange text]):
(-[DOMRange _text]):
* bindings/objc/DOMCSS.mm:
(-[DOMRGBColor color]):
(-[DOMRGBColor _color]):
* bindings/objc/DOMCore.h:
* bindings/objc/DOMEvents.h:
* bindings/objc/DOMExtensions.h:
* bindings/objc/DOMHTML.mm:
(-[DOMHTMLElement titleDisplayString]):
(-[DOMHTMLDocument createDocumentFragmentWithMarkupString:baseURL:]):
(-[DOMHTMLDocument createDocumentFragmentWithText:]):
(-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:]):
(-[DOMHTMLDocument _createDocumentFragmentWithText:]):
* bindings/objc/DOMPrivate.h:
* bindings/objc/DOMXPath.h:
* bindings/objc/DOMXPath.mm:
2006-07-09 Beth Dakin <bdakin@apple.com>
Reviewed by Maciej.
Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9749 A
nested content editable div causes unnecessary screen redraws.
We were repainting too much because we were deciding that we needed
a full layout because we didn't have a first line box. Our code
used to hold a lot of assumptions that positioned elements would
always have line boxes, but I fixed a few bugs a while back that
appeared because this assumption isn't true. This assumption was
also causing the extra redraws because the check meant that we
would decide to do a full layout for any positioned element that
did not have any line boxes in the first place. Maciej and I talked
about this, and we couldn't figure out why the check for line boxes
was part of determining if we need a full layout in the first
place. After hunting around the code, we decided to assume that
this check is antiquated. Removing it fixes the bug and doesn't
seem to break any layout tests. So, fingers crossed!
Will add layout test so soon.
* rendering/bidi.cpp:
(WebCore::RenderBlock::layoutInlineChildren): Remove firstLineBox
check.
2006-07-09 David Harrison <harrison@apple.com>
Reviewed by John Sullivan.
<rdar://problem/4598149> Deleting the contents of a DOMRange and then inserting a node into it crashes in WebCore::Font::canUseGlyphCache
Test: fast/dom/delete-contents.html
* dom/Range.cpp:
(WebCore::Range::processContents):
2006-07-09 Darin Adler <darin@apple.com>
- another round of renaming; and KWQ is dead
* WebCore.vcproj/WebCore/WebCore.vcproj: Remove paths for kwq and khtml directories.
Move files to their new locations. Did rename.
* WebCore.xcodeproj/project.pbxproj: Move files to their new locations. Did rename.
* WebCoreSources.bkl: Did rename.
* webcore-base.bkl: Removed kwq.
* kwq/AccessibilityObjectCache.h: Removed.
* kwq/AccessibilityObjectCache.mm: Removed.
* kwq/FormDataMac.h: Removed.
* kwq/FormDataMac.mm: Removed.
* kwq/WebCoreAXObject.h: Removed.
* kwq/WebCoreAXObject.mm: Removed.
* kwq/WebCoreEditCommand.h: Removed.
* kwq/WebCoreEditCommand.mm: Removed.
* kwq/WebCorePageState.h: Removed.
* kwq/WebCorePageState.mm: Removed.
* kwq/WebCoreResourceLoaderImp.h: Removed.
* kwq/WebCoreResourceLoaderImp.mm: Removed.
* bridge/AXObjectCache.h: Added.
* bridge/mac/AXObjectCacheMac.mm: Added.
* bridge/mac/WebCoreAXObject.h: Added.
* bridge/mac/WebCoreAXObject.mm: Added.
* loader/CachedObject.cpp: Removed.
* loader/CachedObject.h: Removed.
* loader/CachedObjectClient.h: Removed.
* loader/CachedObjectClientWalker.cpp: Removed.
* loader/CachedObjectClientWalker.h: Removed.
* loader/CachedResource.cpp: Added.
* loader/CachedResource.h: Added.
* loader/CachedResourceClient.h: Added.
* loader/CachedResourceClientWalker.cpp: Added.
* loader/CachedResourceClientWalker.h: Added.
* bridge/mac/FrameMac.mm:
* bridge/mac/WebCoreFrameBridge.mm:
* css/CSSImageValue.h:
* css/CSSImportRule.h:
* dom/Document.cpp:
* dom/Document.h:
* dom/Notation.h:
* dom/ProcessingInstruction.h:
* dom/XMLTokenizer.cpp:
* html/CanvasPattern.h:
* html/HTMLDocument.h:
* html/HTMLImageLoader.cpp:
* html/HTMLImageLoader.h:
* html/HTMLLinkElement.h:
* html/HTMLScriptElement.cpp:
* html/HTMLScriptElement.h:
* html/HTMLTokenizer.cpp:
* html/HTMLTokenizer.h:
* kcanvas/KCanvasFilters.h:
* ksvg2/svg/SVGCursorElement.cpp:
* ksvg2/svg/SVGCursorElement.h:
* ksvg2/svg/SVGFEImageElement.cpp:
* ksvg2/svg/SVGFEImageElement.h:
* loader/Cache.cpp:
* loader/Cache.h:
* loader/CachedCSSStyleSheet.cpp:
* loader/CachedCSSStyleSheet.h:
* loader/CachedImage.cpp:
* loader/CachedImage.h:
* loader/CachedScript.cpp:
* loader/CachedScript.h:
* loader/CachedXBLDocument.cpp:
* loader/CachedXBLDocument.h:
* loader/CachedXSLStyleSheet.cpp:
* loader/CachedXSLStyleSheet.h:
* loader/DocLoader.cpp:
* loader/DocLoader.h:
* loader/LoaderFunctions.h:
* loader/Request.cpp:
* loader/Request.h:
* loader/loader.cpp:
* loader/loader.h:
* loader/mac/LoaderFunctionsMac.mm:
* page/Frame.cpp:
* page/FrameView.cpp:
* platform/gdk/TemporaryLinkStubs.cpp:
* platform/mac/ClipboardMac.h:
* platform/win/TemporaryLinkStubs.cpp:
* rendering/RenderBox.h:
* rendering/RenderContainer.cpp:
* rendering/RenderImage.cpp:
* rendering/RenderImage.h:
* rendering/RenderLayer.h:
* rendering/RenderObject.cpp:
* rendering/RenderObject.h:
* rendering/RenderStyle.cpp:
* rendering/RenderStyle.h:
* xml/XSLImportRule.h:
Did renaming.
* platform/mac/can-convert.mm: Removed.
2006-07-09 Anders Carlsson <acarlsson@apple.com>
Reviewed by Tim O.
* WebCore.exp:
Add wkPathFromFont.
* platform/mac/FontDataMac.mm:
(-[NSFont WebCore]):
Use wkPathFromFont.
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
Declare wkPathFromFont.
2006-07-09 Brady Eidson <beidson@apple.com>
Reviewed by Maciej
Set the stage to remove the workaround for the SQLite BLOB corruption. A few other small cleanups, and
preparation for pruning unreferenced and unretained icons.
* icon/IconDatabase.cpp:
(WebCore::IconDatabase::recreateDatabase): Added another trigger to assist in icon removal
(WebCore::IconDatabase::deletePrivateTables): Cleaned up logging messages
(WebCore::IconDatabase::imageDataForIconID): #ifdefed the blobbing hack for impending removal, use the real blob by default
(WebCore::IconDatabase::imageDataForIconURL): same
(WebCore::IconDatabase::imageDataForPageURL): same
(WebCore::IconDatabase::pruneUnreferencedIcons): Will delete any icons and their data that are not referenced
by any PageURL
* icon/IconDatabase.h:
* icon/SQLDatabase.h: Changed BlobAsVector to be unsigned char as thats the most reasonable type for
a byte-buffer, and is what CFData expects
* icon/SQLStatement.cpp:
(WebCore::SQLStatement::getColumnBlobAsVector):
2006-07-09 Darin Adler <darin@apple.com>
- move all but the last 12 files out of kwq directory
- removed a few unused source files I discovered
* WebCore.vcproj/WebCore/WebCore.vcproj: Update for new file locations.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bridge/mac/FrameMac.mm:
* dom/Element.h:
* html/HTMLImageLoader.cpp:
* loader/Cache.cpp:
* loader/Cache.h:
* loader/CachedCSSStyleSheet.cpp:
* loader/CachedCSSStyleSheet.h:
* loader/CachedImage.cpp:
* loader/CachedImage.h:
* loader/CachedObject.h:
* loader/CachedScript.cpp:
* loader/CachedScript.h:
* loader/CachedXBLDocument.cpp:
* loader/CachedXBLDocument.h:
* loader/CachedXSLStyleSheet.cpp:
* loader/CachedXSLStyleSheet.h:
* loader/DocLoader.cpp:
* loader/DocLoader.h:
* page/Frame.cpp:
* page/Frame.h:
* page/FramePrivate.h:
* platform/gdk/TemporaryLinkStubs.cpp:
* platform/win/TemporaryLinkStubs.cpp:
* rendering/DeprecatedSlider.cpp:
* rendering/RenderObject.h:
* xml/xmlhttprequest.cpp:
Updated includes as needed for file location changes. Changed
CachePolicy uses to match new filename and enum names.
* loader/CachedResource.cpp: Removed.
* loader/CachedResource.h: Removed.
* loader/CachedResourceClient.h: Removed.
* loader/CachedResourceClientWalker.cpp: Removed.
* loader/CachedResourceClientWalker.h: Removed.
The above files were checked in by accident a while back. The rename of
CachedObject to CachedResource is now reflected in do-webcore-rename,
and will be done soon.
* kwq/AffineTransform.cpp: Removed.
* kwq/AffineTransform.h: Removed.
* kwq/CacheControl.h: Removed.
* kwq/DeprecatedPtrQueue.h: Removed.
* kwq/FileButton.h: Removed.
* kwq/FileButton.mm: Removed.
* kwq/ListBox.h: Removed.
* kwq/ListBox.mm: Removed.
* kwq/LoaderFunctions.h: Removed.
* kwq/LoaderFunctions.mm: Removed.
* kwq/PopUpButton.h: Removed.
* kwq/PopUpButton.mm: Removed.
* kwq/SSLKeyGenerator.h: Removed.
* kwq/SSLKeyGenerator.mm: Removed.
* kwq/Settings.h: Removed.
* kwq/TextBox.h: Removed.
* kwq/TextBox.mm: Removed.
* kwq/TextField.h: Removed.
* kwq/TextField.mm: Removed.
* kwq/WebCoreScrollBar.h: Removed.
* kwq/WebCoreScrollBar.mm: Removed.
* kwq/WebCoreSlider.h: Removed.
* kwq/WebCoreSlider.mm: Removed.
* loader/CachePolicy.h: Added.
* loader/LoaderFunctions.h: Added.
* loader/mac/LoaderFunctionsMac.mm: Added.
* page/Settings.h: Added.
* platform/AffineTransform.cpp: Added.
* platform/AffineTransform.h: Added.
* platform/DeprecatedPtrQueue.h: Added.
* platform/FileButton.h: Added.
* platform/ListBox.h: Added.
* platform/PopUpButton.h: Added.
* platform/SSLKeyGenerator.h: Added.
* platform/ScrollBar.h: Added.
* platform/Slider.h: Added.
* platform/TextBox.h: Added.
* platform/TextField.h: Added.
* platform/cg/AffineTransformCG.cpp: Added.
* platform/mac/FileButtonMac.mm: Added.
* platform/mac/ListBoxMac.mm: Added.
* platform/mac/PopUpButtonMac.mm: Added.
* platform/mac/SSLKeyGeneratorMac.mm: Added.
* platform/mac/ScrollBarMac.mm: Added.
* platform/mac/ScrollBarMac.mm: Added.
* platform/mac/SliderMac.mm: Added.
* platform/mac/SliderMac.mm: Added.
* platform/mac/TextBoxMac.mm: Added.
* platform/mac/TextFieldMac.mm: Added.
2006-07-09 Darin Adler <darin@apple.com>
- move 4 files out of kwq directory
- make some minor project adjustments for the WebCore project
* WebCore.xcodeproj/project.pbxproj: Link libsqlite3 the same way we do other
libraries, rather than using a custom linker option. Moved the files from their
old locations to the new ones. Removed "khtml" from the list of header search
paths since that directory doesn't exist any more. Eliminated STYLE_LDFLAGS
and just put -umbrella WebKit in OTHER_LDFLAGS in the Production configuration
(was a leftover from "build styles" in Xcode 1). Changed to use EXPORTED_SYMBOLS_FILE
instead of using -exported_symbols_list directly again now that Xcode has fixed the
"strip twice" bug. Removed unneeded explicit SECTORDER_FLAGS = "" settings.
Removed the explicit -Y,3 option now that Xcode does that by default.
* WebCore.vcproj/WebCore/WebCore.vcproj: Removed some obsolete uneeded files,
many of which didn't exist any more. Moved the files from their old locations
to the new ones.
* WebCoreSources.bkl: Moved the files from their old locations to the new ones.
* kwq/DeprecatedCString.cpp: Removed.
* kwq/DeprecatedCString.h: Removed.
* kwq/TextStream.cpp: Removed.
* kwq/TextStream.h: Removed.
* platform/DeprecatedCString.cpp: Added.
* platform/DeprecatedCString.h: Added.
* platform/TextStream.cpp: Added.
* platform/TextStream.h: Added.
2006-07-09 Darin Adler <darin@apple.com>
Rubber stamped by Maciej (kinda).
- did the next pass of renaming (used do-webcore-rename script)
this takes care of most of the remaining KWQ names (almost all)
* WebCore+SVG/DOMList.h:
* WebCore.vcproj/WebCore/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* WebCoreSources.bkl:
* bindings/js/kjs_dom.cpp:
* bindings/js/kjs_window.cpp:
* bindings/objc/DOMHTML.mm:
* bridge/mac/FrameMac.h:
* bridge/mac/FrameMac.mm:
* bridge/mac/WebCoreFrameBridge.mm:
* bridge/mac/WebCoreSettings.h:
* bridge/mac/WebCoreSettings.mm:
* bridge/win/FrameWin.cpp:
* css/CSSPrimitiveValue.cpp:
* css/CSSValueKeywords.in:
* css/MediaQueryEvaluator.cpp:
* css/cssparser.cpp:
* css/cssstyleselector.cpp:
* css/cssstyleselector.h:
* dom/CharacterData.cpp:
* dom/CharacterData.h:
* dom/Document.cpp:
* dom/Element.cpp:
* dom/Element.h:
* dom/EventTargetNode.cpp:
* dom/EventTargetNode.h:
* dom/Node.cpp:
* dom/Node.h:
* dom/Position.cpp:
* dom/ProcessingInstruction.cpp:
* dom/QualifiedName.cpp:
* dom/QualifiedName.h:
* dom/XMLTokenizer.cpp: Added.
* dom/xml_tokenizer.cpp: Removed.
* dom/xml_tokenizer.h: Removed.
* editing/EditAction.h:
* editing/HTMLInterchange.cpp:
* editing/HTMLInterchange.h:
* editing/Selection.h:
* editing/SelectionController.h:
* editing/TextAffinity.h:
* editing/TextIterator.cpp:
* editing/TextIterator.h:
* editing/VisiblePosition.h:
* editing/htmlediting.cpp:
* editing/markup.cpp:
* editing/markup.h:
* editing/visible_units.cpp:
* editing/visible_units.h:
* html/HTMLDocument.cpp:
* html/HTMLFontElement.cpp:
* html/HTMLInputElement.cpp:
* html/HTMLKeygenElement.cpp:
* html/HTMLSelectElement.h:
* html/HTMLTextAreaElement.cpp:
* html/HTMLTextFieldInnerElement.cpp:
* html/HTMLTokenizer.cpp:
* html/HTMLTokenizer.h:
* kcanvas/KCanvasContainer.cpp: Removed.
* kcanvas/KCanvasContainer.h: Removed.
* kcanvas/KCanvasCreator.cpp:
* kcanvas/KCanvasFilters.cpp:
* kcanvas/KCanvasFilters.h:
* kcanvas/KCanvasMatrix.cpp:
* kcanvas/KCanvasMatrix.h:
* kcanvas/KCanvasPath.cpp:
* kcanvas/KCanvasPath.h:
* kcanvas/KCanvasResources.cpp:
* kcanvas/KCanvasResources.h:
* kcanvas/KCanvasTreeDebug.cpp:
* kcanvas/KCanvasTreeDebug.h:
* kcanvas/RenderForeignObject.cpp:
* kcanvas/RenderForeignObject.h:
* kcanvas/RenderPath.cpp:
* kcanvas/RenderPath.h:
* kcanvas/RenderSVGContainer.cpp: Added.
* kcanvas/RenderSVGContainer.h: Added.
* kcanvas/RenderSVGImage.cpp:
* kcanvas/RenderSVGImage.h:
* kcanvas/RenderSVGText.cpp:
* kcanvas/RenderSVGText.h:
* kcanvas/device/KRenderingPaintServer.h:
* kcanvas/device/KRenderingPaintServerGradient.cpp:
* kcanvas/device/KRenderingPaintServerGradient.h:
* kcanvas/device/KRenderingPaintServerPattern.cpp:
* kcanvas/device/KRenderingPaintServerPattern.h:
* kcanvas/device/KRenderingPaintServerSolid.cpp:
* kcanvas/device/KRenderingPaintServerSolid.h:
* kcanvas/device/quartz/KCanvasFilterQuartz.mm:
* kcanvas/device/quartz/KCanvasItemQuartz.h:
* kcanvas/device/quartz/KCanvasResourcesQuartz.h:
* kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
* kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
* kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
* ksvg2/css/CSSValueKeywords.in:
* ksvg2/css/SVGRenderStyleDefs.cpp:
* ksvg2/misc/KCanvasRenderingStyle.cpp:
* ksvg2/misc/KSVGTimeScheduler.cpp:
* ksvg2/svg/SVGAElement.cpp:
* ksvg2/svg/SVGAnimateTransformElement.cpp:
* ksvg2/svg/SVGAnimateTransformElement.h:
* ksvg2/svg/SVGGElement.cpp:
* ksvg2/svg/SVGHelper.cpp:
* ksvg2/svg/SVGHelper.h:
* ksvg2/svg/SVGImageElement.cpp:
* ksvg2/svg/SVGLinearGradientElement.cpp:
* ksvg2/svg/SVGMarkerElement.cpp:
* ksvg2/svg/SVGMaskElement.cpp:
* ksvg2/svg/SVGMatrix.cpp:
* ksvg2/svg/SVGMatrix.h:
* ksvg2/svg/SVGPatternElement.cpp:
* ksvg2/svg/SVGRadialGradientElement.cpp:
* ksvg2/svg/SVGSVGElement.cpp:
* ksvg2/svg/SVGStyledElement.h:
* ksvg2/svg/SVGStyledTransformableElement.cpp:
* ksvg2/svg/SVGStyledTransformableElement.h:
* ksvg2/svg/SVGSwitchElement.cpp:
* ksvg2/svg/SVGTextElement.cpp:
* ksvg2/svg/SVGTransformable.h:
* ksvg2/svg/SVGUseElement.cpp:
* kwq/AffineTransform.cpp: Added.
* kwq/AffineTransform.h: Added.
* kwq/DeprecatedCString.cpp: Added.
* kwq/DeprecatedCString.h: Added.
* kwq/DeprecatedPtrQueue.h: Added.
* kwq/FileButton.h: Added.
* kwq/FileButton.mm: Added.
* kwq/FormDataMac.mm: Added.
* kwq/KWQCString.cpp: Removed.
* kwq/KWQCString.h: Removed.
* kwq/KWQComboBox.h: Removed.
* kwq/KWQComboBox.mm: Removed.
* kwq/KWQEditCommand.h: Removed.
* kwq/KWQEditCommand.mm: Removed.
* kwq/KWQFileButton.h: Removed.
* kwq/KWQFileButton.mm: Removed.
* kwq/KWQFormData.h: Removed.
* kwq/KWQFormData.mm: Removed.
* kwq/KWQKHTMLSettings.h: Removed.
* kwq/KWQKIOGlobal.h: Removed.
* kwq/KWQKSSLKeyGen.h: Removed.
* kwq/KWQKSSLKeyGen.mm: Removed.
* kwq/KWQLineEdit.h: Removed.
* kwq/KWQLineEdit.mm: Removed.
* kwq/KWQListBox.h: Removed.
* kwq/KWQListBox.mm: Removed.
* kwq/KWQLoader.h: Removed.
* kwq/KWQLoader.mm: Removed.
* kwq/KWQPageState.h: Removed.
* kwq/KWQPageState.mm: Removed.
* kwq/KWQPtrQueue.h: Removed.
* kwq/KWQResourceLoader.h: Removed.
* kwq/KWQResourceLoader.mm: Removed.
* kwq/KWQScrollBar.h: Removed.
* kwq/KWQScrollBar.mm: Removed.
* kwq/KWQSlider.h: Removed.
* kwq/KWQSlider.mm: Removed.
* kwq/KWQTextEdit.h: Removed.
* kwq/KWQTextEdit.mm: Removed.
* kwq/KWQTextStream.cpp: Removed.
* kwq/KWQTextStream.h: Removed.
* kwq/KWQWMatrix.cpp: Removed.
* kwq/KWQWMatrix.h: Removed.
* kwq/ListBox.h: Added.
* kwq/ListBox.mm: Added.
* kwq/LoaderFunctions.h: Added.
* kwq/LoaderFunctions.mm: Added.
* kwq/PopUpButton.h: Added.
* kwq/PopUpButton.mm: Added.
* kwq/SSLKeyGenerator.h: Added.
* kwq/SSLKeyGenerator.mm: Added.
* kwq/Settings.h: Added.
* kwq/TextBox.h: Added.
* kwq/TextBox.mm: Added.
* kwq/TextField.h: Added.
* kwq/TextField.mm: Added.
* kwq/TextStream.cpp: Added.
* kwq/TextStream.h: Added.
* kwq/WebCoreEditCommand.h: Added.
* kwq/WebCoreEditCommand.mm: Added.
* kwq/WebCorePageState.h: Added.
* kwq/WebCorePageState.mm: Added.
* kwq/WebCoreResourceLoaderImp.h: Added.
* kwq/WebCoreResourceLoaderImp.mm: Added.
* kwq/WebCoreScrollBar.h: Added.
* kwq/WebCoreScrollBar.mm: Added.
* kwq/WebCoreSlider.h: Added.
* kwq/WebCoreSlider.mm: Added.
* loader/Cache.h:
* loader/CachedCSSStyleSheet.cpp:
* loader/CachedImage.cpp:
* loader/CachedObject.h:
* loader/CachedObjectClientWalker.h:
* loader/CachedResource.h:
* loader/CachedResourceClientWalker.h:
* loader/CachedScript.h:
* loader/CachedXBLDocument.h:
* loader/Decoder.h:
* loader/DocLoader.cpp:
* loader/DocLoader.h:
* loader/FormData.h:
* loader/ImageDocument.cpp:
* loader/PluginDocument.cpp:
* loader/TextDocument.cpp:
* loader/loader.cpp:
* loader/loader.h:
* page/Frame.cpp:
* page/Frame.h:
* page/FramePrivate.h:
* page/Page.cpp:
* page/Page.h:
* platform/DeprecatedPtrList.h:
* platform/DeprecatedPtrListImpl.cpp:
* platform/DeprecatedPtrListImpl.h:
* platform/DeprecatedString.cpp:
* platform/DeprecatedString.h:
* platform/DeprecatedStringList.cpp:
* platform/DeprecatedStringList.h:
* platform/DeprecatedValueList.h:
* platform/DeprecatedValueListImpl.cpp:
* platform/DeprecatedValueListImpl.h:
* platform/FloatSize.h:
* platform/Font.cpp:
* platform/KURL.cpp:
* platform/RegularExpression.cpp:
* platform/RegularExpression.h:
* platform/SegmentedString.h:
* platform/StreamingTextDecoder.cpp:
* platform/String.cpp:
* platform/StringImpl.cpp:
* platform/TextEncoding.cpp:
* platform/TransferJob.cpp:
* platform/TransferJob.h:
* platform/TransferJobInternal.h:
* platform/gdk/FrameGdk.cpp:
* platform/gdk/TemporaryLinkStubs.cpp:
* platform/mac/ClipboardMac.h:
* platform/mac/ClipboardMac.mm:
* platform/mac/CursorMac.mm:
* platform/mac/DeprecatedStringMac.mm: Added.
* platform/mac/FontCacheMac.mm:
* platform/mac/FontMac.mm:
* platform/mac/FoundationExtras.h:
* platform/mac/ImageMac.mm:
* platform/mac/KURLMac.mm:
* platform/mac/MouseEventMac.mm: Removed.
* platform/mac/QStringListMac.mm: Removed.
* platform/mac/QStringMac.mm: Removed.
* platform/mac/TransferJobMac.mm:
* platform/mac/WebCoreTextArea.h:
* platform/mac/WebCoreTextArea.mm:
* platform/mac/WebCoreTextField.h:
* platform/mac/WebCoreTextField.mm:
* platform/mac/WidgetMac.mm:
* platform/win/TemporaryLinkStubs.cpp:
* rendering/DataRef.h:
* rendering/DeprecatedRenderSelect.cpp:
* rendering/DeprecatedRenderSelect.h:
* rendering/DeprecatedSlider.cpp:
* rendering/InlineFlowBox.cpp:
* rendering/RenderApplet.cpp:
* rendering/RenderBlock.cpp:
* rendering/RenderBlock.h:
* rendering/RenderContainer.cpp:
* rendering/RenderFileButton.cpp:
* rendering/RenderFlexibleBox.cpp:
* rendering/RenderFlow.cpp:
* rendering/RenderFormElement.cpp:
* rendering/RenderFrameSet.cpp:
* rendering/RenderFrameSet.h:
* rendering/RenderImage.cpp:
* rendering/RenderInline.cpp:
* rendering/RenderLayer.cpp:
* rendering/RenderLayer.h:
* rendering/RenderLineEdit.cpp:
* rendering/RenderListItem.cpp:
* rendering/RenderListMarker.cpp:
* rendering/RenderObject.cpp:
* rendering/RenderObject.h:
* rendering/RenderPartObject.cpp:
* rendering/RenderReplaced.cpp:
* rendering/RenderStyle.cpp: Added.
* rendering/RenderStyle.h: Added.
* rendering/RenderTable.cpp:
* rendering/RenderTable.h:
* rendering/RenderTableCell.cpp:
* rendering/RenderTableCell.h:
* rendering/RenderTableCol.cpp:
* rendering/RenderTableCol.h:
* rendering/RenderTableRow.cpp:
* rendering/RenderTableSection.cpp:
* rendering/RenderTableSection.h:
* rendering/RenderText.cpp:
* rendering/RenderText.h:
* rendering/RenderTextArea.cpp:
* rendering/RenderTextControl.cpp: Added.
* rendering/RenderTextControl.h: Added.
* rendering/RenderTextField.cpp: Removed.
* rendering/RenderTextField.h: Removed.
* rendering/RenderTheme.cpp:
* rendering/RenderThemeMac.mm:
* rendering/RenderTreeAsText.cpp:
* rendering/RenderTreeAsText.h:
* rendering/RenderView.cpp:
* rendering/RenderWidget.cpp:
* rendering/bidi.cpp:
* rendering/render_style.cpp: Removed.
* rendering/render_style.h: Removed.
* xml/XSLStyleSheet.cpp:
* xml/XSLTProcessor.cpp:
* xml/xmlhttprequest.cpp:
* xpath/impl/XPathParser.cpp:
2006-07-09 Rob Buis <buis@kde.org>
Reviewed by Darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=8251
navigator.platform incorrect in WebKit.app on Intel Macs
For navigator.platform return "MacIntel" for Intel processors, "MacPPC"
otherwise.
* bindings/js/kjs_navigator.cpp:
(KJS::Navigator::getValueProperty):
2006-07-08 Timothy Hatcher <timothy@apple.com>
Reviewed by Maciej.
Bug 5312: comments aren't available via DOM
http://bugzilla.opendarwin.org/show_bug.cgi?id=5312
<rdar://problem/4564414> getting comments via DOM isn't working (5312)
<rdar://problem/4545691> DOM_COMMENT node masking out real DOM elements
* dom/Document.cpp:
(WebCore::Document::removedLastRef): set m_documentElement to 0
(WebCore::Document::childrenChanged): invalidate the document element we have cached in case it was replaced
(WebCore::Document::documentElement): cache the first element as the document node if m_documentElement is 0
* dom/Document.h: added m_documentElement
* html/HTMLDocument.cpp: removed documentElement(), HTML documents just use Document's documentElement()
* html/HTMLDocument.h: ditto
* html/HTMLParser.cpp:
(WebCore::HTMLParser::handleError): make a new HTML node is the document's firstChild is NULL or
the firstChild is not a HTML element (like a comment)
* html/HTMLTokenizer.cpp:
(WebCore::HTMLTokenizer::parseComment): removed the #ifdef to include comment nodes
2006-07-08 Anders Carlsson <acarlsson@apple.com>
Reviewed by Darin, tweaked slightly and landed by Maciej.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9787
fast/frames tests failing (bad pointer to owner element) under MallocScribble
* html/HTMLFrameElement.cpp:
(WebCore::HTMLFrameElement::close):
Disconnect the owner element of our frame.
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::attach):
Don't call setFrame here.
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::detach):
Disconnect the owner element of our frame.
* html/HTMLPlugInElement.h:
(WebCore::HTMLPlugInElement::setFrameName):
New function.
* page/Frame.cpp:
(WebCore::Frame::Frame):
Don't call setFrame.
(WebCore::Frame::~Frame):
Null out the owner element.
(WebCore::Frame::requestObject):
When an object creates a child frame, assign it a name so it can be
accessed from HTMLPlugInElement.
* rendering/RenderPart.cpp:
(WebCore::RenderPart::RenderPart):
(WebCore::RenderPart::~RenderPart):
* rendering/RenderPart.h:
Get rid of setFrame.
2006-07-08 Darin Adler <darin@apple.com>
Reviewed by Geoff.
- better fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9622
REGRESSION: showModalDialog returnValue ignored, function result is always "undefined"
* bindings/js/kjs_window.cpp:
(KJS::showModalDialog): Set the return value after returning from the function if the
window is not cleared; this is a better way to handle the case where the window does
not get cleared before returning, and handles some new cases created by slight changes
in the latest Safari properly too.
(KJS::Window::clear): Changed logic slightly so we always store the result of getDirect
into the return value slot -- the old code left the storage untouched if it was 0.
Also made it only overwrite the return value slot if it's 0.
* bindings/js/kjs_proxy.h:
* bindings/js/kjs_proxy.cpp:
* bindings/js/kjs_window.h:
* bindings/js/kjs_window.cpp:
* page/Frame.cpp:
Roll the previous fix out.
2006-07-08 Darin Adler <darin@apple.com>
- try to fix Windows build
* WebCore.vcproj/WebCore/WebCore.vcproj: Add missing source files.
=== Safari-521.15 ===
2006-07-07 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
Fix Mail ToDo crashers.
* dom/Range.cpp:
(WebCore::Range::compareBoundaryPoints): Added an ASSERT that both
containers are non-null and an early return.
* editing/Selection.cpp:
(WebCore::Selection::validate): Fix a dangling start/end.
(WebCore::Selection::adjustForEditableContent): Added an early return if
m_start or m_end are null.
(WebCore::Selection::isContentEditable): Use isRichlyEditablePosition.
(WebCore::Selection::isContentRichlyEditable): Ditto.
* editing/Selection.h:
* editing/VisiblePosition.cpp:
(WebCore::VisiblePosition::next): Use the new highestEditableRoot.
(WebCore::VisiblePosition::previous): Ditto.
* editing/htmlediting.cpp:
(WebCore::highestEditableRoot): Takes in a position.
(WebCore::isEditablePosition): Added.
(WebCore::isRichlyEditablePosition): Added.
(WebCore::rootEditableElement): Added.
(WebCore::nextCandidate): Moved and split out from nextVisiblePosition.
(WebCore::nextVisuallyDistinctCandidate): Ditto.
(WebCore::previousCandidate): Moved and split out from previousVisiblePosition.
(WebCore::previousVisuallyDistinctCandidate): Ditto.
(WebCore::firstEditablePositionAfterPositionInRoot): Iterate over positions,
using nextVisuallyDistinctCandidate, skipping atomic nodes that are non-editable.
(WebCore::lastEditablePositionBeforePositionInRoot): Ditto.
* editing/htmlediting.h:
* editing/visible_units.cpp:
(WebCore::startOfWord): Added a FIXME.
2006-07-07 Levi Weintraub <lweintraub@apple.com>
Reviewed by justin
Allowed deletion typing commands to take in a granularity
* bridge/mac/WebCoreFrameBridge.h: Pass granularity across the bridge
* bridge/mac/WebCoreFrameBridge.mm: Ditto
(-[WebCoreFrameBridge deleteKeyPressedWithSmartDelete:granularity:]):
(-[WebCoreFrameBridge forwardDeleteKeyPressedWithSmartDelete:granularity:]):
* editing/TypingCommand.cpp: Constructors take in a granularity
(WebCore::TypingCommand::TypingCommand):
(WebCore::TypingCommand::deleteKeyPressed):
(WebCore::TypingCommand::forwardDeleteKeyPressed):
* editing/TypingCommand.h: ditto
* page/Frame.h: Fixed bug that shouldDeleteSelection wasn't virtual
2006-07-07 Brady Eidson <beidson@apple.com>
Reviewed by Anders and Tim Hatcher
Added an accessor to a SQLite config option to change its disk-syncing behavior.
Used this accessor to significantly speed up writes to the Icon DB.
* icon/IconDatabase.cpp:
(WebCore::IconDatabase::open): Disable full syncing to the SQLite db to speed up writes to the icondb
* icon/SQLDatabase.cpp:
(SQLDatabase::setFullsync):
(SQLDatabase::setSynchronous):
* icon/SQLDatabase.h:
(WebCore::SQLDatabase::): Added accessor to the SQLite config pragma "synchronous"
2006-07-07 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed a storage leak noticed by the buildbot
* dom/Document.cpp: (WebCore::Document::removedLastRef):
Call delete on the markers before clearing the map containing them.
2006-07-08 Anders Carlsson <acarlsson@apple.com>
Reviewed by Brady.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9777
Reproducible crash in Loading/Frames in ToT.
The problem was that the renderpart destructor resets the frame's
owner element. For iframes, this should only be done when the element is
going to be removed from the document.
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::~HTMLIFrameElement):
(WebCore::HTMLIFrameElement::willRemove):
(WebCore::HTMLIFrameElement::removedFromDocument):
(WebCore::HTMLIFrameElement::detach):
* html/HTMLIFrameElement.h:
Remove the frame in willRemove instead.
* rendering/RenderPart.cpp:
(WebCore::RenderPart::RenderPart):
(WebCore::RenderPart::~RenderPart):
* rendering/RenderPart.h:
Don't call setFrame(0) in the destructor when the element is an iframe element.
2006-07-07 Darin Adler <darin@apple.com>
Reviewed by Anders.
- fixed a storage leak noticed by the buildbot
* page/FrameView.cpp: (WebCore::FrameViewPrivate::~FrameViewPrivate):
Delete m_scheduledEvents.
2006-07-07 Darin Adler <darin@apple.com>
Reviewed by Adele.
- fixed a couple of storage leaks noticed by the buildbot
* html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::attach):
Call deref on the style after calling setRenderStyle, since styleForRenderer
returns us a "ref'd" RenderStyle object.
* html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::attach): Ditto.
2006-07-07 Darin Adler <darin@apple.com>
Reviewed by Adele.
- fix some license mistakes
* LICENSE-APPLE: Added more years of publication to the copyright here.
* html/CanvasGradient.idl: Corrected license on this file. It had the wrong one.
* html/CanvasPattern.idl: Ditto.
* html/CanvasRenderingContext2D.idl: Ditto.
* html/HTMLCanvasElement.idl: Ditto.
2006-07-06 Levi Weintraub <lweintraub@apple.com>
Reviewed by justin
Improved table editing: pressing delete directly before or after a table will now select
the table first, then delete it, instead of just deleting it. Useful for when the table's
existence is non-obvious.
* bridge/mac/FrameMac.h: Added shouldDeleteSelection, which allows WebCore to trigger
deletion editing deligates
* bridge/mac/FrameMac.mm: ditto
(WebCore::FrameMac::shouldDeleteSelection):
* bridge/mac/WebCoreFrameBridge.h: ditto
* editing/TypingCommand.cpp: Implemented check for a caret position next to a table, and
subsequent selection (as opposed to removal)
(WebCore::TypingCommand::deleteKeyPressed):
(WebCore::TypingCommand::forwardDeleteKeyPressed):
* page/Frame.cpp: shouldDeleteSelection added
(WebCore::Frame::shouldDeleteSelection):
* page/Frame.h: ditto
2006-07-07 Sam Weinig <sam.weinig@gmail.com>
Reviewed by Eric.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9768
Split XSLImportRule out of XSLStyleSheet.* into separate
files (one class per file).
* WebCore.xcodeproj/project.pbxproj:
* xml/XSLImportRule.cpp: Added.
(WebCore::XSLImportRule::XSLImportRule):
(WebCore::XSLImportRule::parentStyleSheet):
(WebCore::XSLImportRule::loadSheet):
* xml/XSLImportRule.h: Added.
* xml/XSLStyleSheet.cpp:
* xml/XSLStyleSheet.h:
2006-07-07 Anders Carlsson <acarlsson@apple.com>
Reviewed by Darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=8300
REGRESSION: First mouse click is randomly ignored when clicking on checkbox and radio buttons
* css/html4.css:
Set "-webkit-user-select: ignore" on radio buttons and check boxes .
2006-07-07 Maciej Stachowiak <mjs@apple.com>
Reviewed by Tim Hatcher.
- fix 20 Node leaks on fast/events tests - these should be the last ones
* bindings/objc/DOMEvents.mm:
(-[DOMEvent dealloc]): implement - deref the event!
(-[DOMEvent finalize]): ditto
2006-07-06 Maciej Stachowiak <mjs@apple.com>
Reviewed by Tim Hatcher.
- fix 26 Node leaks on fast/dom tests
* dom/Document.cpp:
(WebCore::Document::removedLastRef): delete tokenizer - if we are still parsing at this point, we don't
want nodes held by the parser to keep the document alive.
* html/HTMLParser.cpp:
(WebCore::RefNonDocNodePtr::RefNonDocNodePtr): Smart pointer that acts like RefPtr for Node,
but avoids refing document nodes to avoid cycles.
(WebCore::RefNonDocNodePtr::~RefNonDocNodePtr):
(WebCore::RefNonDocNodePtr::get):
(WebCore::RefNonDocNodePtr::operator*):
(WebCore::RefNonDocNodePtr::operator->):
(WebCore::RefNonDocNodePtr::operator!):
(WebCore::RefNonDocNodePtr::operator UnspecifiedBoolType):
(WebCore::RefNonDocNodePtr::operator=):
(WebCore::operator==):
(WebCore::operator!=):
(WebCore::HTMLStackElem): Use a RefNonDocNodePtr instead of RefPtr<Node>
(WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks): Use a RefPtr here to avoid crashing
2006-07-06 Adele Peterson <adele@apple.com>
Reviewed by Maciej.
Fixed new popup control to open up when the spacebar and the up and down arrows are pressed.
- Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=9762
[Native pop up] Highlighted item text is black instead of white
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::isKeyboardFocusable): Added.
(WebCore::HTMLSelectElement::isMouseFocusable): Added.
(WebCore::HTMLSelectElement::defaultEventHandler): Updated to showPopup for up and down arrow keys and spacebar.
* html/HTMLSelectElement.h: (WebCore::HTMLSelectElement::shouldUseMenuList): Made this const.
* rendering/RenderPopupMenu.cpp: (WebCore::RenderPopupMenu::populate): Added FIXME.
* rendering/RenderPopupMenuMac.mm:
(WebCore::RenderPopupMenuMac::showPopup): Updated to save the NSEvent that triggers the popup, so we can send
fake mouseUp and keyUp events when the NSMenu returns.
(WebCore::RenderPopupMenuMac::addGroupLabel): Only set the NSForegroundColorAttributeName attribute if the text isn't black.
Follow-up bug about other colors: http://bugzilla.opendarwin.org/show_bug.cgi?id=9769
(WebCore::RenderPopupMenuMac::addOption): ditto.
* bridge/mac/FrameMac.h: (WebCore::FrameMac::currentEvent): Returns the current NSEvent.
2006-07-06 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
<rdar://problem/4609184>
Mail crashes at WebCore::Selection::adjustForEditableContent
<rdar://problem/4609140>
Crash at WebCore::Range::compareBoundaryPoints
* editing/Selection.cpp:
(WebCore::Selection::adjustForEditableContent):
* editing/VisiblePosition.cpp:
(WebCore::VisiblePosition::next): Moved code into a helper function.
(WebCore::VisiblePosition::previous): Ditto.
* editing/htmlediting.cpp:
(WebCore::comparePositions): Moved from Selection.cpp.
(WebCore::lowestEditableAncestor): Added. Returns rootEditableElement
for a node in editable content and the rootEditableElement for the first
ancestor that's editable for a node in non-editable content.
(WebCore::firstEditablePositionAfterPositionInRoot):
(WebCore::lastEditablePositionBeforePositionInRoot):
* editing/htmlediting.h:
2006-07-06 Anders Carlsson <acarlsson@apple.com>
Reviewed by Adele.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9528
REGRESSION: arrow key skips '>' in Bugzilla replies due to '\n' in text nodes
Patch by Darin, tweaked by Anders.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::setInnerText):
Convert newline characters to <br> elements. I've verified that what's done here is what WinIE does when setting innerText.
(WebCore::HTMLElement::setOuterText):
Fix comment.
* rendering/RenderTextField.cpp:
(WebCore::RenderTextField::textWithHardLineBreaks):
Remove assert. m_div->firstChild() can be null now because setInnerText doesn't create
text nodes for empty strings anymore.
2006-07-06 Adele Peterson <adele@apple.com>
Reviewed by Tim Hatcher.
- Speculative fix for <rdar://problem/4605532> unrepro crash at cnn.com after upgrading to 10.4.7 (but happening with 10.4.6 too)
* page/FrameView.cpp: (WebCore::FrameView::layout): Ref's the view during layout, since a recalcStyle could cause the view to be deleted.
If we get back from recalcStyle, and there's only one ref, return early since the the view will be deleted when we exit layout.
* page/FrameView.h: (WebCore::FrameView::hasOneRef): Added.
2006-07-06 Anders Carlsson <acarlsson@apple.com>
Reviewed by Maciej.
<rdar://problem/4610891> Support overflow events
* DerivedSources.make:
Add generated sources.
* WebCore.xcodeproj/project.pbxproj:
Add new files.
* bindings/js/kjs_events.cpp:
(KJS::toJS):
Support creating wrappers for overflow events..
* bindings/objc/DOMEvents.h:
* bindings/objc/DOMEvents.mm:
(+[DOMEvent _eventWith:]):
(-[DOMOverflowEvent _overflowEvent]):
(-[DOMOverflowEvent orient]):
(-[DOMOverflowEvent horizontalOverflow]):
(-[DOMOverflowEvent verticalOverflow]):
Add Objective-C wrapper for overflow events.
* dom/Event.cpp:
(WebCore::Event::isOverflowEvent):
* dom/Event.h:
* dom/EventNames.h:
* dom/OverflowEvent.cpp: Added.
(WebCore::OverflowEvent::OverflowEvent):
(WebCore::OverflowEvent::isOverflowEvent):
* dom/OverflowEvent.h: Added.
(WebCore::OverflowEvent::):
(WebCore::OverflowEvent::orient):
(WebCore::OverflowEvent::horizontalOverflow):
(WebCore::OverflowEvent::verticalOverflow):
* dom/OverflowEvent.idl: Added.
Add overflow events.
* page/FrameView.cpp:
(WebCore::FrameViewPrivate::FrameViewPrivate):
(WebCore::FrameView::applyOverflowToViewport):
(WebCore::FrameView::layout):
Dispatch any scheduled events when layout is done.
(WebCore::FrameView::scheduleEvent):
New function which schedules an event.
(WebCore::FrameView::updateOverflowStatus):
Update overflow status for the viewport.
(WebCore::FrameView::dispatchScheduledEvents):
New function which dispatches all scheduled events.
* page/FrameView.h:
Add declarations.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::updateOverflowStatus):
(WebCore::RenderLayer::updateScrollInfoAfterLayout):
* rendering/RenderLayer.h:
Schedule overflow events when overflow status changes.
2006-07-06 Timothy Hatcher <timothy@apple.com>
Reviewed by Geoff.
<rdar://problem/4610881> Expose scroll-related JS properties to ObjC DOM interface
<rdar://problem/4519675> offsetLeft, offsetTop, offsetHeight, and offsetWidth
properties are not exposed to ObjC
* bindings/objc/DOMPrivate.h:
* bindings/objc/DOMHTML.mm:
(-[DOMHTMLElement offsetLeft]):
(-[DOMHTMLElement offsetTop]):
(-[DOMHTMLElement offsetWidth]):
(-[DOMHTMLElement offsetHeight]):
(-[DOMHTMLElement offsetParent]):
(-[DOMHTMLElement clientWidth]):
(-[DOMHTMLElement clientHeight]):
(-[DOMHTMLElement scrollLeft]):
(-[DOMHTMLElement setScrollLeft:]):
(-[DOMHTMLElement scrollTop]):
(-[DOMHTMLElement setScrollTop:]):
(-[DOMHTMLElement scrollWidth]):
(-[DOMHTMLElement scrollHeight]):
2006-07-06 Maciej Stachowiak <mjs@apple.com>
Reviewed by Adele.
- fix 435 more layout tests Node leaks
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::moveParagraphs): fix more instances of leaked DOM ranges
2006-07-06 David Harrison <harrison@apple.com>
Reviewed by Geoff
<rdar://problem/4565031> innerHTML of XMP tag returns special characters like '&gt;' instead of '>'
Test: fast/innerHTML/006.html
* editing/markup.cpp:
(WebCore::startMarkup):
(WebCore::createMarkup):
Do not special quote content of XMP nodes.
2006-07-06 Maciej Stachowiak <mjs@apple.com>
Not reviewed - build fix.
- back out earlier leak fix, as it caused a crash on one of the fast/invalid layout tests
* dom/Document.cpp:
(WebCore::Document::removedLastRef):
* html/HTMLParser.cpp:
(WebCore::HTMLStackElem::HTMLStackElem):
(WebCore::HTMLParser::popNestedHeaderTag):
(WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks):
(WebCore::HTMLParser::reopenResidualStyleTags):
(WebCore::HTMLParser::popBlock):
(WebCore::HTMLParser::popOneBlock):
2006-07-06 Maciej Stachowiak <mjs@apple.com>
Reviewed by Anders.
- fix ~3000 Node leaks on the editing tests
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::moveParagraphs): put a newly created Range in a RefPtr
to avoid leaking it, as this leaks the whole document.
2006-07-06 Maciej Stachowiak <mjs@apple.com>
Reviewed by Anders.
- fix 26 Node leaks on various fast/dom tests
* dom/Document.cpp:
(WebCore::Document::removedLastRef): Delete the tokenizer here, since if we are in mid-parse,
the parser might hold refs on some of our children that have self-only refs.
* html/HTMLParser.cpp:
(WebCore::HTMLStackElem::HTMLStackElem): don't ref the node if it is a document to avoid ref cycles
(WebCore::HTMLStackElem::~HTMLStackElem): ditto
(WebCore::HTMLStackElem::node): changed interface a bit to support the above
(WebCore::HTMLStackElem::setNode): ditto
(WebCore::HTMLParser::popNestedHeaderTag): use new interface to HTMLStackElem
(WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks): ditto
(WebCore::HTMLParser::reopenResidualStyleTags): ditto
(WebCore::HTMLParser::popBlock): ditto
(WebCore::HTMLParser::popOneBlock): ditto
2006-07-06 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Adele.
* rendering/RenderMenuList.h:
(WebCore::RenderMenuList::createsAnonymousWrapper): This method replaces
allowsReusingAnonymousChild() and has the opposite meaning.
2006-07-05 Adele Peterson <adele@apple.com>
Build fixes.
* WebCore.vcproj/WebCore/WebCore.vcproj:
* platform/win/TemporaryLinkStubs.cpp:
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::calcMinMaxWidth):
* rendering/RenderPopupMenuWin.h:
(WebCore::RenderPopupMenuWin::RenderPopupMenuWin):
* rendering/RenderThemeWin.cpp:
2006-07-05 Maciej Stachowiak <mjs@apple.com>
Reviewed by Adele.
- fix 308 Node leaks on the editing layout tests
* dom/Document.cpp: (WebCore::Document::removedLastRef): Clear the markers once there
are no real refs on the document, otherwise a self-only reference cycle w/ the document
can occur.
2006-07-05 Adele Peterson <adele@apple.com>
Reviewed by Maciej and Hyatt.
Initial implementation of popup menu control. This can be turned on by setting -webkit-appearance: menulist on a select element.
* WebCore.xcodeproj/project.pbxproj: Added RenderMenuList.h, RenderMenuList.cpp, RenderPopupMenu.h, RenderPopupMenu.cpp,
RenderPopupMenuWin.h, RenderPopupMenuMac.h, RenderPopupMenuMac.mm,
* dom/Node.cpp:
(WebCore::Node::renderStyle): Added. Returns the renderer's style. If there's no renderer, returns's a RenderStyle that's kept by the node.
This is important for HTMLOptGroupElement and HTMLOptionElement, which don't have renderers.
(WebCore::Node::setRenderStyle): Added.
* dom/Node.h:
* dom/Element.cpp: (WebCore::Element::recalcStyle): Updated to use renderStyle so recalcStyle will work for HTMLOptionElements and HTMLOptGroupElements.
* css/cssstyleselector.cpp: Updated to call renderStyle method on the node, so resolving style works on elements w/o renderers that cache style.
(WebCore::CSSStyleSelector::initForStyleResolve):
(WebCore::CSSStyleSelector::locateCousinList):
(WebCore::CSSStyleSelector::canShareStyleWithElement):
(WebCore::CSSStyleSelector::locateSharedStyle):
(WebCore::CSSStyleSelector::checkOneSelector):
* css/html4.css: Removed display:none from options and optgroups, since we're now caching style for these elements.
Added font-weight styles for option and optgroup.
* html/HTMLOptGroupElement.h: Added m_style to keep track of a RenderStyle for the element, even though we aren't creating a renderer.
This will allow us to honor style for optgroups and options for popup menus (and eventually list boxes too).
(WebCore::HTMLOptGroupElement::rendererIsNeeded): Added.
(WebCore::HTMLOptGroupElement::renderStyle): Added.
* html/HTMLOptionElement.h: ditto.
(WebCore::HTMLOptionElement::rendererIsNeeded): Added.
(WebCore::HTMLOptionElement::renderStyle): Added.
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::HTMLOptGroupElement): Initialize m_style.
(WebCore::HTMLOptGroupElement::attach): Set the renderStyle.
(WebCore::HTMLOptGroupElement::detach): Clear m_style.
(WebCore::HTMLOptGroupElement::setRenderStyle): Added.
(WebCore::HTMLOptGroupElement::groupLabelText): Added.
* html/HTMLOptionElement.cpp: ditto.
(WebCore::HTMLOptionElement::HTMLOptionElement):
(WebCore::HTMLOptionElement::attach):
(WebCore::HTMLOptionElement::detach):
(WebCore::HTMLOptionElement::setRenderStyle):
(WebCore::HTMLOptionElement::optionText):
* html/HTMLSelectElement.cpp: Added code to use the new RenderMenuList if the appearance is set to MenuListAppearance,
and if we're not creating a list box renderer.
(WebCore::HTMLSelectElement::recalcStyle):
(WebCore::HTMLSelectElement::createRenderer):
(WebCore::HTMLSelectElement::setRecalcListItems):
(WebCore::HTMLSelectElement::reset):
(WebCore::HTMLSelectElement::notifyOptionSelected):
(WebCore::HTMLSelectElement::defaultEventHandler):
* html/HTMLSelectElement.h:
* WebCore.exp: Added _wkPopupMenu.
* platform/mac/WebCoreSystemInterface.h: Added wkPopupMenu to get the NSMenu to pop up.
* platform/mac/WebCoreSystemInterface.mm:
* platform/win/TemporaryLinkStubs.cpp: Added stubs for RenderPopupMenuWin.
(RenderPopupMenuWin::RenderPopupMenuWin):
(RenderPopupMenuWin::~RenderPopupMenuWin):
(RenderPopupMenuWin::clear):
(RenderPopupMenuWin::populate):
(RenderPopupMenuWin::showPopup):
(RenderPopupMenuWin::addSeparator):
(RenderPopupMenuWin::addGroupLabel):
(RenderPopupMenuWin::addOption):
* rendering/RenderPopupMenuWin.h: Added.
* rendering/RenderPopupMenu.cpp: Added.
(WebCore::RenderPopupMenu::RenderPopupMenu):
(WebCore::RenderPopupMenu::~RenderPopupMenu):
(WebCore::RenderPopupMenu::clear):
(WebCore::RenderPopupMenu::populate): Walks the DOM tree, and adds separators, options, and group labels to the RenderPopupMenu.
(WebCore::RenderPopupMenu::showPopup):
(WebCore::RenderPopupMenu::addSeparator):
(WebCore::RenderPopupMenu::addGroupLabel):
(WebCore::RenderPopupMenu::addOption):
* rendering/RenderPopupMenu.h: Added.
(WebCore::RenderPopupMenu::renderName):
(WebCore::RenderPopupMenu::getRenderMenuList):
* rendering/RenderPopupMenuMac.h: Added.
* rendering/RenderPopupMenuMac.mm: Added.
(WebCore::RenderPopupMenuMac::RenderPopupMenuMac):
(WebCore::RenderPopupMenuMac::~RenderPopupMenuMac):
(WebCore::RenderPopupMenuMac::clear): Removes all items from the menu.
(WebCore::RenderPopupMenuMac::populate): Disables menuChangedMessages before populating the menu.
(WebCore::RenderPopupMenuMac::showPopup): Calculates the right position, and calls wkPopupMenu.
(WebCore::RenderPopupMenuMac::addSeparator):
(WebCore::RenderPopupMenuMac::addGroupLabel):
(WebCore::RenderPopupMenuMac::addOption):
* rendering/RenderMenuList.cpp: Added.
(WebCore::RenderMenuList::RenderMenuList):
(WebCore::RenderMenuList::addChild):
(WebCore::RenderMenuList::removeChild):
(WebCore::RenderMenuList::setStyle):
(WebCore::RenderMenuList::updateFromElement): If the options have changed, iterate through the children to find the menu item with the widest text.
Set the button text to the selected item's text.
(WebCore::RenderMenuList::setText):
(WebCore::RenderMenuList::paintObject):
(WebCore::RenderMenuList::baselinePosition):
(WebCore::RenderMenuList::calcMinMaxWidth):
(WebCore::RenderMenuList::showPopup):
(WebCore::RenderMenuList::layout):
(WebCore::RenderMenuList::updateSelection):
(WebCore::RenderMenuList::valueChanged):
* rendering/RenderMenuList.h: Added.
(WebCore::RenderMenuList::removeLeftoverAnonymousBoxes):
(WebCore::RenderMenuList::allowsReusingAnonymousChild):
(WebCore::RenderMenuList::canHaveChildren):
(WebCore::RenderMenuList::renderName):
(WebCore::RenderMenuList::setOptionsChanged):
(WebCore::RenderMenuList::selectionChanged):
(WebCore::RenderMenuList::setSelectionChanged):
(WebCore::RenderMenuList::hasPopupMenu):
* rendering/RenderTheme.cpp: Added cases for MenuListAppearance.
(WebCore::RenderTheme::adjustStyle):
(WebCore::RenderTheme::paint):
(WebCore::RenderTheme::paintBorderOnly):
(WebCore::RenderTheme::isControlStyled):
(WebCore::RenderTheme::adjustMenuListStyle):
(WebCore::RenderTheme::createPopupMenu): creates platform-specific RenderPopupMenu.
* rendering/RenderTheme.h:
(WebCore::RenderTheme::sizeOfArrowControl): Added.
(WebCore::RenderTheme::paintMenuList): Added.
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::adjustRepaintRect):
(WebCore::RenderThemeMac::paintMenuList):
(WebCore::RenderThemeMac::adjustMenuListStyle):
(WebCore::RenderThemeMac::setPopupButtonCellState):
(WebCore::RenderThemeMac::createPopupMenu):
(WebCore::RenderThemeMac::sizeOfArrowControl):
* rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::createPopupMenu):
* rendering/RenderThemeWin.h:
2006-07-05 Brady Eidson <beidson@apple.com>
Reviewed by Tim Omernick.
IconDatabase now respects private browsing via the use of in memory, temporary tables
* bridge/mac/WebCoreIconDatabaseBridge.mm:
(-[WebCoreIconDatabaseBridge iconForPageURL:withSize:]):
(-[WebCoreIconDatabaseBridge iconURLForPageURL:]): Renamed WebCore::IconDatabase methods, changes reflected here
* icon/IconDatabase.cpp:
(WebCore::IconDatabase::clearDatabase):
(WebCore::IconDatabase::deletePrivateTables):
(WebCore::IconDatabase::imageDataForIconID):
(WebCore::IconDatabase::imageDataForIconURL):
(WebCore::IconDatabase::imageDataForPageURL):
(WebCore::IconDatabase::setPrivateBrowsingEnabled):
(WebCore::IconDatabase::iconForPageURL):
(WebCore::IconDatabase::iconURLForPageURL):
(WebCore::IconDatabase::setIconDataForIconURL):
(WebCore::IconDatabase::performSetIconDataForIconID):
(WebCore::IconDatabase::establishTemporaryIconIDForEscapedIconURL):
(WebCore::IconDatabase::establishIconIDForEscapedIconURL):
(WebCore::IconDatabase::setHaveNoIconForIconURL):
(WebCore::IconDatabase::setIconURLForPageURL):
(WebCore::IconDatabase::performSetIconURLForPageURL):
(WebCore::IconDatabase::hasIconForIconURL):
-Some style/comment cleanups, but mainly putting private browsing handling in place
* icon/IconDatabase.h: Some methods added, others renamed, some comments added
* icon/SQLStatement.cpp:
(WebCore::SQLStatement::getColumnName):
(WebCore::SQLStatement::getColumnName16):
(WebCore::SQLStatement::getColumnText):
(WebCore::SQLStatement::getColumnText16):
-The above 4 had changes to return String() for empty results instead of "" as it's less expensive;
2006-07-05 John Sullivan <sullivan@apple.com>
Reviewed by Darin and Adele.
- fixed <rdar://problem/4609162> REGRESSION: When tabbing between links on a page,
the window doesn't scroll to link that's not in view
* html/HTMLAnchorElement.cpp:
* html/HTMLAnchorElement.h:
removed HTMLAnchorElement::focus and HTMLAnchorElement::blur.
HTMLAnchorElement::focus just called document()->setFocusNode(). The scroll-to-reveal
code used to be inside document()->setFocusNode(), but now it's in Element::focus, and this override
was preventing that code from running.
HTMLAnchorElement::blur was exactly the same implementation as Element::blur (and there aren't any
other implementations of ::blur in the class hierarchy in between). This change has no practical
effect, other than removing duplicate code.
Adele and I think that it was an oversight not to remove these two methods on 12/20/05
these methods were removed from HTMLButtonElementImpl and HTMLInputElementImpl.
2006-07-05 Anders Carlsson <acarlsson@apple.com>
* bridge/win/FrameWin.cpp:
(WebCore::FrameWin::FrameWin):
* bridge/win/FrameWin.h:
* platform/win/TemporaryLinkStubs.cpp:
(FrameWin::createFrame):
Fix Win32 build.
2006-07-05 Anders Carlsson <acarlsson@apple.com>
* WebCore.xcodeproj/project.pbxproj:
Revert accidental change of debug format to DWARF.
2006-07-05 Anders Carlsson <acarlsson@apple.com>
Reviewed by Maciej.
http://bugzilla.opendarwin.org/show_bug.cgi?id=3581
iFrames set to display:none are Missing from frames array
* bridge/mac/FrameMac.h:
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::FrameMac):
(WebCore::FrameMac::createFrame):
* bridge/mac/WebCoreFrameBridge.h:
* bridge/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge initSubframeWithOwnerElement:]):
(-[WebCoreFrameBridge installInFrame:]):
Modify to pass the owner element instead of the owner renderer.
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::insertBefore):
(WebCore::ContainerNode::replaceChild):
(WebCore::ContainerNode::appendChild):
Dispatch the node inserted events before attaching the nodes. This is what the
tokenizer does.
* html/HTMLFrameElement.cpp:
(WebCore::HTMLFrameElement::openURL):
(WebCore::HTMLFrameElement::attach):
Pass the element to requestFrame.
(WebCore::HTMLFrameElement::setLocation):
Don't call attach/detach on an iframe.
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::insertedIntoDocument):
Load the frame here (using openURL).
(WebCore::HTMLIFrameElement::removedFromDocument):
Call frameDetached.
(WebCore::HTMLIFrameElement::attach):
If there's a renderer, attach the content frame to it.
(WebCore::HTMLIFrameElement::detach):
Reset the renderer's frame.
(WebCore::HTMLIFrameElement::openURL):
Modify to request the frame.
* html/HTMLIFrameElement.h:
Add detach.
* page/Frame.cpp:
(WebCore::parentFromOwnerElement):
(WebCore::Frame::Frame):
(WebCore::Frame::~Frame):
(WebCore::Frame::requestFrame):
(WebCore::Frame::requestObject):
(WebCore::Frame::loadSubframe):
(WebCore::Frame::ownerElement):
(WebCore::Frame::ownerRenderer):
(WebCore::Frame::disconnectOwnerElement):
* page/Frame.h:
* page/FramePrivate.h:
(WebCore::FramePrivate::FramePrivate):
* rendering/RenderPart.cpp:
(WebCore::RenderPart::setFrame):
Modify to keep an owner element around instead of the renderer.
* rendering/RenderPartObject.cpp:
(WebCore::RenderPartObject::updateWidget):
Don't do anything for iframes.
2006-07-04 Kevin Ollivier <kevino@theolliviers.com>
Reviewed by Maciej, reworked a bit by Darin.
Compile fixes for wx port / gcc 4.0.2
* platform/PlatformString.h:
* platform/StringImpl.h:
Include CoreFoundation for CF-specific code.
* dom/DocPtr.h:
* doc/EventTargetNode.h:
Silence warnings about 'extra tokens' after #endif on gcc 4.0.2.
(Not an error but warnings appear frequently.)
* WebCoreSources.bkl:
* webcore-base.bkl:
Synching ports sources file with TOT. Also, making sure SRCDIR variable
overrides any previous values.
* loader/ImageDocument.cpp:
Use PLATFORM(MAC) for the parts that are specific to the Macintosh version,
and move the Objective-C parts to another file.
* loader/mac/ImageDocumentMac.h: Added.
* loader/mac/ImageDocumentMac.mm: Added.
2006-07-04 Sam Weinig <sam.weinig@gmail.com>
Build fix.
* platform/Color.cpp:
(WebCore::makeRGBAFromHSLA):
2006-07-02 David Carson <dacarson@gmail.com>
Reviewed by Darin.
- Added HSL color support as specified in CSS3 spec.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9506
Added parsing support of hsl(h,s,l) and hsla(h,s,l,a)
Added converting code to convert HSL to RGB
* css/cssparser.cpp:
(WebCore::CSSParser::parseColorParameters):
Moved common code to parse RGB/RGBA values into it's
own function. This code was duplicated in the parseColorFromValue()
method.
(WebCore::CSSParser::parseHSLParameters):
Common code to parse HSL/HSLA values.
(WebCore::CSSParser::parseColorFromValue):
Moved RGB/RGBA parsing out to seperate function as the code was
duplicated.
Added parsing support for hsl( and hsla(
* css/cssparser.h:
Added two new functions parseColorParameters() and
parseHSLParameters().
* platform/Color.cpp:
(WebCore::calcHue):
Added Hue parameter to RGB color.
(WebCore::makeRGBAFromHSLA):
New function to convert HSLA to RGBA.
* platform/Color.h:
Added new functions makeRGBAFromHSLA() and calcHue().
2006-07-02 Mike Emmel <mike.emmel@gmail.com>
Reviewed and landed by ggaren.
* platform/gdk/TransferJobManager.cpp
Fixed broken dowload logic
* platform/gdk/ScrollViewGdk.cpp
Add comment that scrollbarSize is a temporary variable
* Projects/gdk/webcore-gdk.bkl
Defined NDEBUG build executable is miscompiled otherwise
* WebCoreSources.bkl
added icon/SiteIcon.cpp editing/IndentOutdentCommand.cpp
html/HTMLViewSourceDocument.cpp
2006-07-02 Shawn Stricker <kb1ibt@gmail.com>
Reviewed by Timothy Hatcher. Build fix for Linux.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9684
[GDK] multiple little fixes and a few new things for Templinkstubs
* platform/gdk/ScrollViewGdk.cpp:
(WebCore::ScrollView::setDrawable): Changed SCROLLBAR_SIZE to scrollbarSize.
* platform/gdk/TemporaryLinkStubs.cpp:
(Image::drawTiled): Added missing parameter to argument list.
* platform/gdk/TransferJobManager.cpp:
(WebCore::writeCallback): Added missing parenthesis to static_cast.
2006-07-02 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9674
REGRESSION (r15075): Blank or incomplete pages on digg.com
Replaced the requestingScript state bit added in the fix for bug 9317
with a m_requestingScript bool that is set before and restored
after calling ref() on a CachedScript.
Test: fast/tokenizer/nested-cached-scripts.html
* html/HTMLTokenizer.cpp:
(WebCore::HTMLTokenizer::HTMLTokenizer):
(WebCore::HTMLTokenizer::begin):
(WebCore::HTMLTokenizer::scriptHandler):
(WebCore::HTMLTokenizer::notifyFinished):
* html/HTMLTokenizer.h:
(WebCore::HTMLTokenizer::State::):
2006-07-01 David Kilzer <ddkilzer@kilzer.net>
Reviewed by NOBODY (build fix).
* platform/gdk/TransferJobManager.cpp:
(WebCore::writeCallback): Changed 'static_cat' to 'static_cast'.
2006-06-30 Mike Emmel <mike.emmel@gmail.com>
Reviewed and worked over a lot by Darin.
- check in first set of GDK-specific sources
* platform/gdk/BrowserExtensionGdk.h: Added.
* platform/gdk/CookieJarGdk.cpp: Added.
* platform/gdk/CursorGdk.cpp: Added.
* platform/gdk/FontCacheGdk.cpp: Added.
* platform/gdk/FontDataGdk.cpp: Added.
* platform/gdk/FontGdk.cpp: Added.
* platform/gdk/FontPlatformData.h: Added.
* platform/gdk/FontPlatformDataGdk.cpp: Added.
* platform/gdk/FrameGdk.cpp: Added.
* platform/gdk/FrameGdk.h: Added.
* platform/gdk/GlyphMapGdk.cpp: Added.
* platform/gdk/KeyEventGdk.cpp: Added.
* platform/gdk/KeyboardCodes.h: Added.
* platform/gdk/MouseEventGdk.cpp: Added.
* platform/gdk/PageGdk.cpp: Added.
* platform/gdk/RenderThemeGdk.cpp: Added.
* platform/gdk/RenderThemeGdk.h: Added.
* platform/gdk/ScreenGdk.cpp: Added.
* platform/gdk/ScrollViewGdk.cpp: Added.
* platform/gdk/SharedTimerLinux.cpp: Added.
* platform/gdk/SystemTimeLinux.cpp: Added.
* platform/gdk/TemporaryLinkStubs.cpp: Added.
* platform/gdk/TransferJobCurl.cpp: Added.
* platform/gdk/TransferJobManager.cpp: Added.
* platform/gdk/TransferJobManager.h: Added.
* platform/gdk/WheelEventGdk.cpp: Added.
* platform/gdk/WidgetGdk.cpp: Added.
* platform/gdk/gdk-encodings.txt: Added.
2006-06-30 Mike Emmel <mike.emmel@gmail.com>
Reviewed by Darin.
* WebCoreSources.bkl: Updated for recent file changes.
2006-06-30 Mike Emmel <mike.emmel@gmail.com>
Reviewed and enhanced by Darin.
Compilation fixes for Linux/Gdk.
* WebCore/platform/FontData.h: Added forward declaration of a class.
* WebCore/platform/cairo/GraphicsContextCairo.cpp: Fixed case on include.
* WebCore/bindings/js/kjs_html.cpp: Added <math.h> include.
* WebCore/css/maketokenizer: Fixed incorrect check for Linux that was
already true even on Mac OS X. Added some additional includes and
defines to the Linux extra generated code.
2006-06-30 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Hyatt.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7204
float inserted in fixed height block via DOM not repainted
Test: fast/repaint/float-move-during-layout.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlockChildren):
(WebCore::RenderBlock::repaintOverhangingFloats): Renamed repaintFloatingDescendants()
to this and limited it to repainting overhanging floats. Added a boolean parameter that forces
all descendant overhanging floats (that don't have their own layer) to paint.
* rendering/RenderBlock.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::repaintDuringLayoutIfMoved): Changed to paint all descendant
floats.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::repaintOverhangingFloats):
* rendering/RenderObject.h:
2006-06-30 Levi Weintraub <lweintraub@apple.com>
Reviewed by justin
* editing/VisiblePosition.cpp: Removed is[Not]EqualIgnoringAffinity and made operator== use the logic that ignores affinity.
* editing/VisiblePosition.h: Ditto.
(WebCore::operator==):
* editing/visible_units.cpp:
(WebCore::isStartOfParagraph): Changed to compare VisiblePositions using ==.
(WebCore::isEndOfParagraph): Ditto.
(WebCore::isStartOfBlock): Ditto.
(WebCore::isEndOfBlock): Ditto.
=== Safari-521.14 ===
2006-06-30 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
* editing/htmlediting.cpp:
(WebCore::canHaveChildrenForEditing): Don't insert children into
object tags while editing.
2006-06-30 Justin Garcia <justin.garcia@apple.com>
Reviewed by harrison
<rdar://problem/4598309
Caret gets stuck when it hits non editable content within an editable body
<http://bugzilla.opendarwin.org/show_bug.cgi?id=9510>
Caret will jump out of an editable region
* dom/Position.cpp:
(WebCore::Position::upstream): Don't move into a new editable region so that
candidates that that straddle an editable/non-editable boundary will
correspond to different VisiblePositions.
(WebCore::Position::downstream): Ditto.
* editing/SelectionController.cpp:
(WebCore::SelectionController::modifyMovingRightForward): Use VisiblePosition::next(true)
(WebCore::SelectionController::modifyMovingLeftBackward): Use VisiblePosition::previous(true)
* editing/VisiblePosition.cpp:
(WebCore::VisiblePosition::next): Added code to jump to the next editable region as long
as it has the same highest editable root.
(WebCore::VisiblePosition::previous): Ditto.
* editing/VisiblePosition.h:
* editing/htmlediting.cpp:
(WebCore::highestEditableRoot): Added, returns the highest editable root of a node if that
node is in editable content, otherwise 0.
* editing/htmlediting.h:
2006-06-30 David Kilzer <ddkilzer@kilzer.net>
Reviewed by Darin.
- Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9358
REGRESSION: Assertion failure in HTMLInputElement::setValueFromRenderer
(value == constrainValue(value)) when deleting all text
Test: editing/deleting/delete-all-text-in-text-field-assertion.html
Bug 9661 filed to fix the follow-up issue:
http://bugzilla.opendarwin.org/show_bug.cgi?id=9661
textContent returns "\n" for a <br> even if it is collapsed
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setValueFromRenderer): Work around "\n" value
when all characters are deleted from a text field.
2006-06-30 David Harrison <harrison@apple.com>
Reviewed by Tim Omernick
<rdar://problem/4609481> Crash calling -[WebScriptObject valueForKey:] when JS disabled
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::executionContextForDOM):
Early return if JS is not enabled.
2006-06-30 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Tim H.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9664
REGRESSION (r15106): Crash in fast/events/mouseover-mouseout2.html
* page/FrameView.cpp:
(WebCore::FrameView::handleMouseMoveEvent): Added a check that oldSubframe is
still a subframe of the view's frame before passing the event to it.
2006-06-29 Timothy Hatcher <timothy@apple.com>
Reviewed by Darin.
<rdar://problem/3694163> -[KWQPageState finalize] is incorrect; design change needed
<rdar://problem/3694165> -[WebCoreFrameBridge finalize] is incorrect; design change needed
Added close methods that need to be called before these
objects can be released. This ensures proper tear-down under GC.
* WebCore.xcodeproj/project.pbxproj:
* bridge/mac/WebCoreFrameBridge.h:
* bridge/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge dealloc]):
(-[WebCoreFrameBridge finalize]):
(-[WebCoreFrameBridge close]):
* bridge/mac/WebCorePageBridge.h:
* bridge/mac/WebCorePageBridge.mm:
(-[WebCorePageBridge setMainFrame:]):
(-[WebCorePageBridge dealloc]):
(-[WebCorePageBridge finalize]):
(-[WebCorePageBridge close]):
(-[WebCorePageBridge mainFrame]):
(-[WebCorePageBridge setGroupName:]):
(-[WebCorePageBridge groupName]):
* kwq/KWQPageState.h:
* kwq/KWQPageState.mm:
(-[KWQPageState dealloc]):
(-[KWQPageState finalize]):
(-[KWQPageState close]):
2006-06-29 Sam Weinig <sam.weinig@gmail.com>
Reviewed by Hyatt.
- test for http://bugzilla.opendarwin.org/show_bug.cgi?id=4874
Table with absolute bottom positioning is positioned incorrectly
Note: patch originally from Mitz, spruced up by Weinig.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::calcAbsoluteVerticalValues):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::layout):
2006-06-29 Graham Dennis <Graham.Dennis@gmail.com>
Reviewed by Justin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9505
moveParagraphContentsToNewBlockIfNecessary creates a new block outside the current position
* editing/CompositeEditCommand.cpp:
Added sanity checking to prevent modifying nodes outside of
where we should be
(WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
2006-06-29 Brady Eidson <beidson@apple.com>
Reviewed by Levi.
In addition to a few small details, logging changes, and style cleanups, this is a stop-gap hack
for a problem in SQLite's blob handling. Querying for a blob in a void* form is reproducibly
returning a corrupt buffer. The temporary solution is to query for the blob as "quoted text" and
manually convert the return string into a character buffer.
* icon/IconDatabase.cpp:
(WebCore::IconDatabase::recreateDatabase):
(WebCore::IconDatabase::createPrivateTables):
(WebCore::hexToUnsignedChar): These two functions are the text-to-character-data converters for the time being
(WebCore::hexStringToVector):
(WebCore::IconDatabase::imageDataForIconID):
(WebCore::IconDatabase::imageDataForIconURL):
(WebCore::IconDatabase::imageDataForPageURL):
(WebCore::IconDatabase::iconForPageURL):
(WebCore::IconDatabase::hasIconForIconURL):
* icon/IconDatabase.h: changes the icon data accessors to return a Vector<unsigned char> instead of void*
* icon/SQLStatement.cpp:
(WebCore::SQLStatement::columnCount):
(WebCore::SQLStatement::getColumnBlob):
* icon/SiteIcon.cpp:
(SiteIcon::getImage):
2006-06-29 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9652
Assertion failure when changing an RTL table cell to display:none
Test: fast/table/rtl-cell-display-none-assert.html
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layoutRows): Corrected the index used as
the last index in the columnPos vector.
2006-06-29 Darin Adler <darin@apple.com>
Reviewed by Anders.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9622
showModalDialog returnValue ignored, function result is always "undefined"
* manual-tests/modal-dialog.html: Added.
* manual-tests/show-modal-dialog-test.html: Added.
* page/Frame.cpp: (WebCore::Frame::clear): Call KJSProxy::clear with the
clearWindowProperties parameter instead of not calling it at all when
clearWindowProperties is false.
* bindings/js/kjs_proxy.h: Add boolean clearWindowProperties parameter.
* bindings/js/kjs_proxy.cpp: (WebCore::KJSProxy::clear): Pass clearWindowProperties
variable through to Window::clear instead of not calling it at all.
* bindings/js/kjs_window.h: Add boolean clearWindowProperties parameter.
* bindings/js/kjs_window.cpp: (KJS::Window::clear): If clearWindowProperties
is false, do only the returnValue work, not the rest of the work.
* manual-tests/modal-dialog.html: Added.
* manual-tests/show-modal-dialog-test.html: Added.
2006-06-29 Beth Dakin <bdakin@apple.com>
Reviewed by Hyatt.
Fix for <rdar://problem/4450615> Add composite mode to background
styles
-webkit-background-composite will set a composite mode on a
background image.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSPropertyNames.in: Add -webkit-background-composite
* css/CSSValueKeywords.in: Add all possible values (clear, copy,
source-over, source-in, source-out, source-atop, destination-over,
destination-in, destination-out, destination-atop, xor, plus-
darker, highlight, and plus-lighter)
* css/cssparser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseBackgroundProperty):
* css/cssstyleselector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
(WebCore::CSSStyleSelector::mapBackgroundComposite):
* css/cssstyleselector.h:
* platform/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawTiledImage):
* platform/GraphicsContext.h: drawTiledImage() now takes a
composite operator.
* platform/Image.h: drawTiled() now takes a composite operator.
* platform/cairo/ImageCairo.cpp:
(WebCore::Image::drawTiled): Set the composite operator.
* platform/mac/ImageMac.mm:
(WebCore::Image::drawTiled): Set the composite operator.
* platform/win/TemporaryLinkStubs.cpp:
(Image::drawTiled):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintBackgroundExtended): Send the composite
operator in the render style over to the graphics context.
* rendering/render_style.cpp:
(WebCore::BackgroundLayer::BackgroundLayer):
(WebCore::BackgroundLayer::operator=):
(WebCore::BackgroundLayer::operator==):
(WebCore::BackgroundLayer::fillUnsetProperties):
(WebCore::BackgroundLayer::cullEmptyLayers):
* rendering/render_style.h:
(WebCore::BackgroundLayer::backgroundComposite):
(WebCore::BackgroundLayer::isBackgroundCompositeSet):
(WebCore::BackgroundLayer::setBackgroundComposite):
(WebCore::BackgroundLayer::clearBackgroundComposite):
(WebCore::RenderStyle::backgroundComposite):
(WebCore::RenderStyle::initialBackgroundComposite):
2006-06-29 David Kilzer <ddkilzer@kilzer.net>
Reviewed by Darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9649
The no-svg build broke after r15091
* bindings/objc/DOMInternal.h: Added #if XPATH_SUPPORT/#endif.
* bindings/objc/DOMInternal.mm: Ditto.
(raiseDOMException):
* bindings/objc/DOMXPath.h: Ditto.
* bindings/objc/DOMXPath.mm: Ditto.
* bindings/objc/DOMXPathInternal.h: Ditto.
2006-06-29 Anders Carlsson <acarlsson@apple.com>
Reviewed by Tim O.
<rdar://problem/4599760> Objective-C XPath support
* WebCore.xcodeproj/project.pbxproj:
Add files.
* bindings/objc/DOMInternal.h:
* bindings/objc/DOMInternal.mm:
(raiseDOMException):
Handle XPath exceptions
* bindings/objc/DOMXPath.h: Added.
(-[DOMXPathNSResolver lookupNamespaceURI:]):
* bindings/objc/DOMXPath.mm: Added.
(-[DOMNativeXPathNSResolver dealloc]):
(-[DOMNativeXPathNSResolver finalize]):
(-[DOMNativeXPathNSResolver _xpathNSResolver]):
(-[DOMNativeXPathNSResolver _initWithXPathNSResolver:]):
(+[DOMNativeXPathNSResolver _xpathNSResolverWith:]):
(-[DOMNativeXPathNSResolver lookupNamespaceURI:]):
(-[DOMXPathResult dealloc]):
(-[DOMXPathResult finalize]):
(-[DOMXPathResult resultType]):
(-[DOMXPathResult numberValue]):
(-[DOMXPathResult stringValue]):
(-[DOMXPathResult booleanValue]):
(-[DOMXPathResult singleNodeValue]):
(-[DOMXPathResult invalidIteratorState]):
(-[DOMXPathResult snapshotLength]):
(-[DOMXPathResult iterateNext]):
(-[DOMXPathResult snapshotItem:]):
(-[DOMXPathResult _xpathResult]):
(-[DOMXPathResult _initWithXPathResult:]):
(+[DOMXPathResult _xpathResultWith:]):
(-[DOMXPathExpression evaluate:::]):
(-[DOMXPathExpression _xpathExpression]):
(-[DOMXPathExpression _initWithXPathExpression:]):
(+[DOMXPathExpression _xpathExpressionWith:]):
(-[DOMDocument createExpression::]):
(-[DOMDocument createNSResolver:]):
(-[DOMDocument evaluate:::::]):
* bindings/objc/DOMXPathInternal.h: Added.
Add Objective-C XPath API.
2006-06-28 David Hyatt <hyatt@apple.com>
Add support for custom highlighting to paint at the root line box level
(and to inflate the box it uses so that it can go outside the bounds of
the line if necessary).
Reviewed by harrison
* bridge/mac/FrameMac.h:
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::customHighlightLineRect):
(WebCore::FrameMac::paintCustomHighlight):
* bridge/mac/WebCoreFrameBridge.h:
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintCustomHighlight):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::paintCustomHighlight):
(WebCore::RootInlineBox::paint):
* rendering/RootInlineBox.h:
2006-06-28 Levi Weintraub <lweintraub@apple.com>
Reviewed by justin
<rdar://problem/4592005> FormatBlock inserts in the wrong place, disregarding editable content
<rdar://problem/4590763> FormatBlock for paragraph style doesn't work
* dom/Node.cpp:
(WebCore::Node::rootEditableElement): Return inline nodes
* editing/FormatBlockCommand.cpp:
(WebCore::FormatBlockCommand::doApply): Keep from inserting before editable content
* editing/JSEditor.cpp: Support html braces (<>) around tag names
2006-06-28 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
svg/custom/text-hit-test.svg was failing
* rendering/RenderContainer.cpp:
(WebCore::RenderContainer::positionForCoordinates): Don't skip child
renderers that have a height of 0 when looking for the closest child
renderer, they may contain content that overflows.
* rendering/RenderText.cpp:
(WebCore::RenderText::positionForCoordinates): Fixed typos.
2006-06-28 David Hyatt <hyatt@apple.com>
Make the view source document properly handle <script>. We don't syntax
highlight the JS yet, but it shows up properly now.
Reviewed by john
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLTokenizer.cpp:
(WebCore::HTMLTokenizer::scriptHandler):
2006-06-28 Timothy Hatcher <timothy@apple.com>
Prefer the Stabs debugging symbols format until DWARF bugs are fixed.
* WebCore.xcodeproj/project.pbxproj:
2006-06-28 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
Fixed EditActions for InsertHorizontalRule and RemoveFormat.
* editing/JSEditor.cpp:
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand):
(WebCore::ReplaceSelectionCommand::editingAction):
* editing/ReplaceSelectionCommand.h:
2006-06-28 Levi Weintraub <lweintraub@apple.com>
Build Fix. Reviewed by NOBODY
* editing/IndentOutdentCommand.cpp:
(WebCore::IndentOutdentCommand::indentRegion):
2006-06-28 Levi Weintraub <lweintraub@apple.com>
Reviewed by justin
http://bugzilla.opendarwin.org/show_bug.cgi?id=7568
Bug 7568: Implement Indent/Outdent
* WebCore.vcproj/WebCore/WebCore.vcproj: Added IndentOutdentCommand.h/cpp
* WebCore.xcodeproj/project.pbxproj: Ditto.
* editing/IndentOutdentCommand.cpp: Added.
(WebCore::IndentOutdentCommand::IndentOutdentCommand):
(WebCore::enclosingListOrBlockquote):
(WebCore::IndentOutdentCommand::splitTreeToNode): Splits the DOM tree from a
descendent node to an ending ancestor, duplicating nodes when necessary. Returns
the last node split. Used to insert blockquotes at the topmost level.
(WebCore::IndentOutdentCommand::indentRegion):
(WebCore::IndentOutdentCommand::outdentParagraph):
(WebCore::IndentOutdentCommand::outdentRegion):
(WebCore::IndentOutdentCommand::doApply):
* editing/IndentOutdentCommand.h: Added.
(WebCore::IndentOutdentCommand::):
* editing/JSEditor.cpp: Added the execCommands Indent and Outdent
* editing/htmlediting.cpp:
(WebCore::enclosingNodeWithTag): Finds the enclosing node with any specified tag.
(WebCore::enclosingListChild): Added checks for nill and editable boundaries.
(WebCore::outermostEnclosingListChild): Returns the highest ancestor list child.
(WebCore::highestAncestor): Added.
(WebCore::createElement): Changed the passed in string to a const reference.
* editing/htmlediting.h:
2006-06-28 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Darin and Hyatt.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9561
REGRESSION: Content property on :before of button causes hang on click or hover
Test: fast/forms/button-generated-content.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::setStyle):
* rendering/RenderButton.cpp:
(WebCore::RenderButton::updatePseudoChild): Added. Calls updatePseudoChildForObject()
on the button itself or on its inner div, if it has one.
* rendering/RenderButton.h:
(WebCore::RenderButton::createsAnonymousWrapper): Added. Returns true.
* rendering/RenderContainer.cpp:
(WebCore::RenderContainer::pseudoChild): Added. Returns the child containing
generated content of the requested type if there is one, or otherwise the
child before/after which such generated content should come.
(WebCore::RenderContainer::updatePseudoChild): Removed the child parameter and moved the guts
of this method into updatePseudoChildForObject, which this method calls unless the object
is an anonymous wrapper.
(WebCore::RenderContainer::updatePseudoChildForObject): Added. Does the what
updatePseudoChildForObject did previously, but fetches the pseudo style from
the styledObject parameter.
* rendering/RenderContainer.h:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::setStyle):
(WebCore::RenderInline::addChildToFlow):
(WebCore::RenderInline::splitInlines):
(WebCore::RenderInline::splitFlow):
* rendering/RenderObject.h:
(WebCore::RenderObject::createsAnonymousWrapper): Added. This method replaces
allowsReusingAnonymousChild and returns the opposite of what that method used to
return. Returns true if the object creates an anonymous child to contain all its
other children.
2006-06-27 Brady Eidson <beidson@apple.com>
Reviewed by Maciej
Hookup the new semi-functional SQLite icon database.
For now, it is living side-by-side with the old DB so one can compare the
two for debugging purposes. Also, it is disabled (in WebKit) by default unless you
compile with ICONDEBUG #defined.
* WebCore.xcodeproj/project.pbxproj: Added file SiteIcon.cpp
* bridge/mac/WebCoreIconDatabaseBridge.h:
* bridge/mac/WebCoreIconDatabaseBridge.mm:
(-[WebCoreIconDatabaseBridge privateBrowsingEnabled]):
(-[WebCoreIconDatabaseBridge iconForPageURL:withSize:]):
(-[WebCoreIconDatabaseBridge iconURLForPageURL:]):
(-[WebCoreIconDatabaseBridge _setIconData:forIconURL:]):
* icon/IconDatabase.cpp:
(WebCore::IconDatabase::isValidDatabase):
(WebCore::IconDatabase::recreateDatabase):
(WebCore::IconDatabase::createPrivateTables):
(WebCore::IconDatabase::deletePrivateTables):
(WebCore::IconDatabase::imageDataForIconID):
(WebCore::IconDatabase::imageDataForIconURL):
(WebCore::IconDatabase::imageDataForPageURL):
(WebCore::IconDatabase::setPrivateBrowsingEnabled):
(WebCore::IconDatabase::iconForPageURL):
(WebCore::IconDatabase::iconURLForURL):
(WebCore::IconDatabase::setIconDataForIconURL):
(WebCore::IconDatabase::establishIconIDForEscapedIconURL):
(WebCore::IconDatabase::setHaveNoIconForIconURL):
(WebCore::IconDatabase::setIconURLForPageURL):
(WebCore::IconDatabase::hasIconForIconURL):
* icon/IconDatabase.h:
(WebCore::SiteIcon::getIconURL):
(WebCore::IconDatabase::getPrivateBrowsingEnabled):
* icon/SiteIcon.cpp: Added.
(SiteIcon::SiteIcon):
(SiteIcon::~SiteIcon):
(SiteIcon::getImage):
(SiteIcon::resetExpiration):
(SiteIcon::getExpiration):
2006-06-27 Rob Buis <buis@kde.org>
Reviewed by Darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9605
REGRESSION: pageX and pageY are both 0 for events created with initMouseEvent
Calculate pageX/pageY and clientX/clientY values when using initMouseEvent.
* dom/MouseEvent.cpp:
(WebCore::MouseEvent::initMouseEvent):
* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::initCoordinates):
* dom/MouseRelatedEvent.h:
2006-06-27 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Maciej and Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9317
REGRESSION: crash in HTML tokenizer at Japanese Apple support page
Test: fast/tokenizer/write-unclosed-script.html
* html/HTMLTokenizer.cpp:
(WebCore::HTMLTokenizer::scriptHandler): Changed to reset the inScript flag
and scriptCodeSize before possible script execution, but not afterwards.
This way, if script execution write()s a <script> tag without closing it,
the tokenizer is left in inScript state. Added code to set the requestingScript
flag around the request for the cached script, to let notifiyFinished() know
that it's being called under scriptHandler().
(WebCore::HTMLTokenizer::scriptExecution): Removed code that saved and restored
the inScript flag. This function is always entered now with inScript being false.
(WebCore::HTMLTokenizer::notifyFinished): Changed to use the new requestingScript
state flag instead of the inScript flag, which is always false now when entering
this function.
* html/HTMLTokenizer.h:
Added the requestingScript state bit, used to tell notifyFinished() that it
is being called under scriptHandler() (which happens when the script is already
in cache).
2006-06-27 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
* editing/JSEditor.cpp: Added RemoveFormat.
2006-06-27 Kevin Decker <kdecker@apple.com>
Reviewed by brady.
Fixed: <rdar://problem/4597679> TOT REGRESSION: popup blocker DOA
Need to add window.open() support to DumpRenderTree before landing an actual layout test.
* bindings/js/kjs_window.cpp:
(KJS::WindowFunc::callAsFunction): Because FrameTree::find() returns true for empty strings,
we must check for empty framenames. Otherwise, illegitimate window.open() calls with no name
will pass right through the popup blocker.
2006-06-28 Anders Carlsson <acarlsson@apple.com>
Reviewed by Darin.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
Move FIXME comment here.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::getComputedStyle):
Don't do a null check on the renderer here. Everything's handled by
CSSComputedStyleDeclaration anyway.
2006-06-27 Justin Garcia <justin.garcia@apple.com>
Reviewed by darin
* rendering/RenderContainer.cpp: Fixed #include formatting.
2006-06-27 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
<rdar://problem/4599735> Clicking out of a table at the extremes of an editable document doesn't appear to work
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::positionForCoordinates): In the fall through case,
where we can't find a child block that contains (x, y), pass to RenderFlow
instead of the last visible child block.
* rendering/RenderContainer.cpp:
(WebCore::RenderContainer::positionForCoordinates): Don't pass to the closest
child renderer if this is a table and (x, y) is outside the table. Return
a VisiblePosition before or after the table.
Fixed the code that finds the closest child renderer.
2006-06-27 David Hyatt <hyatt@apple.com>
Preserve entity text in view source mode. This patch doesn't highlight the
the entities yet, but it at least prevents their resolution and removal.
Reviewed by darin
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLTokenizer.cpp:
(WebCore::HTMLTokenizer::parseEntity):
2006-06-27 Anders Carlsson <acarlsson@apple.com>
Reviewed by Geoff.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9623
REGRESSION: getComputedStyle should do a relayout
* page/DOMWindow.cpp:
(WebCore::DOMWindow::getComputedStyle):
Do a relayout.
2006-06-27 Maciej Stachowiak <mjs@apple.com>
Reviewed by Adele
- fixed <rdar://problem/4550473> Reproducible hang on www.digg.com
* dom/NodeList.cpp:
(WebCore::NodeList::recursiveItem): Make NodeList caching also
work for backwards iteration - if the requested index is before
the last cached, but closer to it than to the start of the list,
then search backwards from there.
(WebCore::NodeList::itemForwardsFromCurrent): Split this out as a
helper method.
(WebCore::NodeList::itemBackwardsFromCurrent): New helper, similar
to the above.
* dom/NodeList.h:
2006-06-27 Brady Eidson <beidson@apple.com>
Reviewed by Levi
Some SQLDatabase cleanup (style stuff) and enhancements
* icon/SQLDatabase.cpp:
(SQLDatabase::open):
(SQLDatabase::executeCommand):
(SQLDatabase::returnsAtLeastOneResult): Accessor to see if this query returns results
(SQLDatabase::lastInsertRowID): Accessor for the rowid of the last insert
* icon/SQLDatabase.h:
(WebCore::SQLStatement::prepareAndStep):
* icon/SQLStatement.cpp:
(WebCore::SQLStatement::bindInt64):
-All of the following used to require the user to manually prepare and step a statement
before asking for the result. Now it will prepare and step itself so you can use a temporary
object to get a quick result
(WebCore::SQLStatement::getColumnName):
(WebCore::SQLStatement::getColumnName16):
(WebCore::SQLStatement::getColumnText):
(WebCore::SQLStatement::getColumnText16):
(WebCore::SQLStatement::getColumnDouble):
(WebCore::SQLStatement::getColumnInt):
(WebCore::SQLStatement::getColumnInt64):
(WebCore::SQLStatement::getColumnBlobAsVector):
(WebCore::SQLStatement::getColumnBlob):
2006-06-27 Ada Chan <adachan@apple.com>
Reviewed by sfalken.
Fixed build.
* WebCore.vcproj/WebCore/WebCore.vcproj:
2006-06-27 Beth Dakin <bdakin@apple.com>
Reviewed by Hyatt.
Fix for <rdar://problem/4602635> Media queries must be extended to
address CSS pixel scaling factor
* css/MediaFeatureNames.h: Add -webkit-device-pixel-ratio, -webkit-
min-device-pixel-ratio, and -webkit-max-device-pixel-ratio to the
list of feature names.
* css/MediaQueryEvaluator.cpp:
(WebCore::cmpvalue): Added a version of cmpvalue that compares
floats.
(WebCore::device_pixel_ratioMediaFeatureEval):
(WebCore::min_device_pixel_ratioMediaFeatureEval):
(WebCore::max_device_pixel_ratioMediaFeatureEval):
2006-06-27 Darin Adler <darin@apple.com>
Reviewed by Geoff.
- finish with http://bugzilla.opendarwin.org/show_bug.cgi?id=9606
REGRESSION: some callers are still using clientX/Y to get pageX/Y
* rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::userResize):
Change to use pageX/Y, but this really doesn't matter since framesets
can't be scrolled -- it's the frames that are scrolled. So this change
has no user-visible effect, but it's still better this way.
2006-06-27 Darin Adler <darin@apple.com>
Reviewed by Geoff.
- fix 2/3 of http://bugzilla.opendarwin.org/show_bug.cgi?id=9606
REGRESSION: some callers are still using clientX/Y to get pageX/Y
Test: fast/events/anchor-image-scrolled-x-y.html
Test: fast/events/input-image-scrolled-x-y.html
* html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::defaultEventHandler): Use pageX/Y.
* html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler): Ditto.
2006-06-27 Brady Eidson <beidson@apple.com>
Reviewed by Maciej
Added functionality to WebCore::Image to get multiple representations/sizes into TIFF data
* platform/mac/ImageMac.mm:
(WebCore::Image::getTIFFRepresentation):
2006-06-26 David Hyatt <hyatt@apple.com>
Fix for 9538, support syntax highlighted HTML source. Lots of loose
ends still (script/style/comments/doctype/entities/accurate whitespace).
Reviewed by darin
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* bridge/mac/WebCoreFrameBridge.h:
* bridge/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge setInViewSourceMode:]):
(-[WebCoreFrameBridge inViewSourceMode]):
* css/cssstyleselector.cpp:
(WebCore::CSSStyleSelector::loadDefaultStyle):
(WebCore::CSSStyleSelector::matchUARules):
* css/cssstyleselector.h:
* css/view-source.css: Added.
* dom/Document.cpp:
(WebCore::Document::implicitClose):
* dom/xml_tokenizer.h:
(WebCore::Tokenizer::Tokenizer):
(WebCore::Tokenizer::~Tokenizer):
(WebCore::Tokenizer::inViewSourceMode):
(WebCore::Tokenizer::setInViewSourceMode):
* html/HTMLAttributeNames.in:
* html/HTMLFrameElement.cpp:
(WebCore::HTMLFrameElement::init):
(WebCore::HTMLFrameElement::parseMappedAttribute):
(WebCore::HTMLFrameElement::attach):
* html/HTMLFrameElement.h:
(WebCore::HTMLFrameElement::viewSourceMode):
* html/HTMLTokenizer.cpp:
(WebCore::HTMLTokenizer::HTMLTokenizer):
(WebCore::HTMLTokenizer::scriptHandler):
(WebCore::HTMLTokenizer::scriptExecution):
(WebCore::HTMLTokenizer::parseTag):
(WebCore::HTMLTokenizer::continueProcessing):
(WebCore::HTMLTokenizer::write):
(WebCore::HTMLTokenizer::timerFired):
(WebCore::HTMLTokenizer::end):
(WebCore::HTMLTokenizer::processToken):
(WebCore::HTMLTokenizer::notifyFinished):
* html/HTMLTokenizer.h:
* html/HTMLViewSourceDocument.cpp: Added.
(WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument):
(WebCore::HTMLViewSourceDocument::createTokenizer):
(WebCore::HTMLViewSourceDocument::addViewSourceToken):
(WebCore::HTMLViewSourceDocument::addViewSourceAttribute):
(WebCore::HTMLViewSourceDocument::addSpanWithClassName):
* html/HTMLViewSourceDocument.h: Added.
* page/Frame.cpp:
(WebCore::Frame::begin):
(WebCore::Frame::inViewSourceMode):
(WebCore::Frame::setInViewSourceMode):
* page/Frame.h:
* page/FramePrivate.h:
(WebCore::FramePrivate::FramePrivate):
* rendering/RenderPartObject.cpp:
(WebCore::RenderPartObject::updateWidget):
2006-06-26 Anders Carlsson <acarlsson@apple.com>
Reviewed by Darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9031
REGRESSION: Crash when closing tabs on newegg.com
* page/Frame.cpp:
(WebCore::Frame::pageDestroyed):
* page/Frame.h:
Add new method which is invoked when the frame's page has been destroyed.
Currently this function disassociates the JS Window object with the frame,
stopping any running JS timers.
* page/Page.cpp:
(WebCore::Page::~Page):
Call pageDestroyed on all frames.
2006-06-26 Rob Buis <buis@kde.org>
Reviewed and reworked by Darin.
Code cleanup, calculate clientX/clientY in one central place.
* dom/EventTargetNode.h:
* dom/EventTargetNode.cpp: (WebCore::EventTargetNode::dispatchMouseEvent):
Renamed parameters to pageX/Y since they aren't clientX/Y values.
Removed code to compute clientX/Y (was a bit confused in naming before),
because that's now done inside MouseEvent.
* dom/MouseEvent.h:
* dom/MouseEvent.cpp:
(WebCore::MouseEvent::MouseEvent): Removed clientX/Y parameters.
(WebCore::MouseEvent::initMouseEvent): Added comments about problems I noticed.
(WebCore::MouseEvent::which): Fixed comment that confusingly mentioned KHTML,
when it was talking about the DOM standard.
* dom/MouseRelatedEvent.h:
* dom/MouseRelatedEvent.cpp:
(WebCore::contentsX): Added helper function.
(WebCore::contentsY): Ditto.
(WebCore::MouseRelatedEvent::MouseRelatedEvent): Removed clientX/Y parameter,
and added code to compute clientX/Y based on pageX/Y.
(WebCore::MouseRelatedEvent::receivedTarget): Fixed comments.
* dom/WheelEvent.h:
* dom/WheelEvent.cpp: (WebCore::WheelEvent::WheelEvent): Removed clientX/Y
parameter.
* page/FrameView.cpp: (WebCore::FrameView::dispatchDragEvent): Removed the code
to compute coordinates, and renamed the confusingly named clientPos (which was
a page-relative position) to contentsPos.
2006-06-25 David Carson <dacarson@gmail.com>
Reviewed and tweaked by Darin.
- http://bugzilla.opendarwin.org/show_bug.cgi?id=9185
REGRESSION: UserID field appears with an incorrect height
on americanexpresslogin page
- Height and Width attribute only applies to IMAGE and HIDDEN
types.
* dom/NamedMappedAttrMap.h:
(WebCore::NamedMappedAttrMap::getAttributeItem):
Added to static_cast method.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setInputType):
Update the style decl if input type has changed.
(WebCore::HTMLInputElement::mapToEntry):
Only Cache height and width if it is an IMAGE or HIDDEN
(WebCore::HTMLInputElement::parseMappedAttribute):
Check type before adding height and width style.
(WebCore::HTMLInputElement::attach):
Remove code for discarding width.
* html/HTMLInputElement.h:
(WebCore::HTMLInputElement::respectHeightAndWidthAttrs):
New method added to report if this input type uses height & width.
2006-06-25 David Kilzer <ddkilzer@kilzer.net>
Reviewed by Darin.
- http://bugzilla.opendarwin.org/show_bug.cgi?id=9537
REGRESSION: Reproducible crash in WebCore::RenderTextField::textWithHardLineBreaks()
Test: fast/forms/textarea-hard-linewrap-empty.html
* rendering/RenderTextField.cpp:
(WebCore::RenderTextField::textWithHardLineBreaks): Added null check for
m_div->firstChild()->renderer().
2006-06-25 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9388
REGRESSION: outlines don't get erased when removed in some cases
Test: fast/repaint/outline-shrinking.html
* rendering/RenderObject.cpp:
(WebCore::RenderObject::setStyle): Always repaint with the old style if the outline is
becoming narrower, even if we are going to relayout.
2006-06-25 Rob Buis <buis@kde.org>
Reviewed by Darin.
Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8707:
event.clientX and event.clientY should be relative to the viewport, not the canvas
Make sure clientX and clientY take into account the scroll offsets
of the view.
* dom/EventTargetNode.cpp:
(WebCore::EventTargetNode::dispatchMouseEvent):
* dom/MouseEvent.cpp:
(WebCore::MouseEvent::MouseEvent):
* dom/MouseEvent.h:
* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::MouseRelatedEvent):
(WebCore::MouseRelatedEvent::initCoordinates):
* dom/MouseRelatedEvent.h:
* dom/WheelEvent.cpp:
(WebCore::WheelEvent::WheelEvent):
* page/FrameView.cpp:
(WebCore::FrameView::dispatchDragEvent):
2006-06-25 Timothy Hatcher <timothy@apple.com>
Reviewed by Darin.
Bug 9574: Drosera should show inline scripts within the original HTML
http://bugzilla.opendarwin.org/show_bug.cgi?id=9574
* Pass the starting line number and error message to the debugger.
* Call parsedSource even if there was a script parse error so the
debugger can show the parse error.
* Pass NSURL objects to the ObjC delegate for the script URLs.
* bridge/mac/WebCoreScriptDebugger.h:
* bridge/mac/WebCoreScriptDebugger.mm:
(toNSURL):
(WebCoreScriptDebuggerImp::sourceParsed):
2006-06-24 David Kilzer <ddkilzer@kilzer.net>
Build fix. Reviewed by NOBODY.
- Backed out patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=8707
event.clientX and event.clientY should be relative to the viewport, not the canvas
* dom/EventTargetNode.cpp:
(WebCore::EventTargetNode::dispatchMouseEvent):
* dom/MouseEvent.cpp:
(WebCore::MouseEvent::MouseEvent):
* dom/MouseEvent.h:
* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::MouseRelatedEvent):
(WebCore::MouseRelatedEvent::initCoordinates):
* dom/MouseRelatedEvent.h:
* dom/WheelEvent.cpp:
(WebCore::WheelEvent::WheelEvent):
2006-06-24 Rob Buis <buis@kde.org>
Reviewed by Darin.
Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8707:
event.clientX and event.clientY should be relative to the viewport, not the canvas
Make sure clientX and clientY take into account the scroll offsets
of the view.
Test: fast/dom/window-xy-properties.html
* dom/EventTargetNode.cpp:
(WebCore::EventTargetNode::dispatchMouseEvent):
* dom/MouseEvent.cpp:
(WebCore::MouseEvent::MouseEvent):
* dom/MouseEvent.h:
* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::MouseRelatedEvent):
(WebCore::MouseRelatedEvent::initCoordinates):
* dom/MouseRelatedEvent.h:
* dom/WheelEvent.cpp:
(WebCore::WheelEvent::WheelEvent):
2006-06-24 Rob Buis <buis@kde.org>
Reviewed by Darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9352
Webkit doesn't respect stroke-width in SVG for smaller <circle>s
Make sure the stroke path is set before applying gradient transforms.
* kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
(WebCore::KRenderingPaintServerGradientQuartz::setup):
(WebCore::KRenderingPaintServerGradientQuartz::renderPath):
2006-06-24 Alexey Proskuryakov <ap@nypop.com>
Rubber-stamped by Eric.
Add a -h (do not follow symlinks) option to ln in derived sources build script (without it,
a symlink was created inside the source directory on second build).
* WebCore.xcodeproj/project.pbxproj:
2006-06-24 James G. Speth <speth@end.com>
Reviewed by Darin. Copyrights tweaked by ddkilzer.
Bug 8331: DOMNodeLists returned to Objective-C are not properly wrapped
http://bugzilla.opendarwin.org/show_bug.cgi?id=8331
DOMNodes were the only objects handled by createObjcInstanceForValue.
now it handles all of these: DOMNode, DOMNodeList, DOMNamedNodeMap, DOMStyleSheetList,
DOMStyleSheet, DOMMediaList, DOMCSSRuleList, DOMCSSRule, DOMCSSStyleDeclaration, and DOMCSSValue
* WebCore.xcodeproj/project.pbxproj: added file DOMCSSInternal.h to project
* bindings/js/kjs_css.cpp:
(KJS::): changed ClassInfo for DOMCSSStyleSheet to have DOMStyleSheet as its parent class
* bindings/objc/DOM.mm:
(-[DOMDocumentType :]): moved DOMNamedNodeMap (WebCoreInternal) interface to DOMInternal.h
* bindings/objc/DOMCSS.mm: moved WebCoreInternal interfaces to DOMCSSInternal.h
* bindings/objc/DOMCSSInternal.h: Added file, contains WebCoreInternal interface for CSS classes
* bindings/objc/DOMInternal.h: added DOMNamedNodeMap (WebCoreInternal) interface
* bindings/objc/DOMUtility.mm:
(KJS::ScriptInterpreter::createObjcInstanceForValue): support for more classes
2006-06-24 David Kilzer <ddkilzer@kilzer.net>
Reviewed by Timothy.
* Info.plist: Fixed copyright to include 2003-2006.
* manual-tests/NPN_Invoke/Info.plist: Added copyright statement.
2006-06-24 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Darin, landed by ap.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9547
Resize corner does not track the mouse accurately
Test: fast/css/resize-corner-tracking.html
* page/FrameView.cpp:
(WebCore::FrameView::handleMousePressEvent): Store the offset from the layer's
resizing corner where dragging has started.
(WebCore::FrameView::handleMouseMoveEvent): Pass the stored offset to the
layer's resize method.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::resize): Added an offset parameter, which is added to
the mouse location.
For objects that may have intrinsic margins applied to them,
added code to lift the margins into the object's style in order to keep them
constant.
Changed to take the content size as the base size if the box-sizing property
is content-box.
(WebCore::RenderLayer::offsetFromResizeCorner): Added. Returns the offset of the
given point from the corner that tracks the mouse when resizing.
* rendering/RenderLayer.h:
2006-06-24 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Darin, landed by ap.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9316
REGRESSION: text field width shrinks on first keystroke
Test: fast/forms/floating-textfield-relayout.html
* page/FrameView.cpp:
(WebCore::FrameView::layoutRoot): Added. During subtree relayout, returns
the subtree root. Otherwise returns 0.
(WebCore::FrameView::layoutPending): Made const.
* page/FrameView.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::calcWidth): Added early return if this is the root
of a subtree being laid out.
2006-06-24 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Hyatt.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9531
Pages that need only a horizontal scroll bar get a vertical one as well
The change affects many existing tests.
* page/FrameView.cpp:
(WebCore::FrameView::layout): Mark the body renderer as needing layout if
the view's height has changed and the body stretches to the view's height.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::calcHeight):
* rendering/RenderBox.h:
(WebCore::RenderBox::stretchesToViewHeight): Added. Moved the logic for when
the HTML block needs to stretch to the view's height from calcHeight() here.
2006-06-24 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7461
Always encode the path part of an URI as UTF-8
Test: http/tests/uri/utf8-path.html
* platform/KURL.cpp:
(encodeRelativeString): Always set pathEncoding to UTF-8.
2006-06-24 Graham Dennis <Graham.Dennis@gmail.com>
Reviewed by Darin, landed by ap.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9467
TreeWalker/NodeIterator do not restrict the traversal
Test: traversal/stay-within-root.html
* dom/Node.cpp:
(WebCore::Node::traversePreviousNode):
* dom/Node.h:
Add a stayWithin argument to traversePreviousNode just like the other
traversal functions
* dom/NodeIterator.cpp:
(WebCore::NodeIterator::findNextNode):
(WebCore::NodeIterator::findPreviousNode):
Ensure that when moving forward or backward that the root node is not
exited
* dom/TreeWalker.cpp:
(WebCore::TreeWalker::previousNode):
(WebCore::TreeWalker::nextNode):
Ditto
(WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
2006-06-24 Jonas Witt <jonas.witt@gmail.com>
Reviewed by ggaren, landed by ap.
- http://bugzilla.opendarwin.org/show_bug.cgi?id=9181
Complete DOMUIEvent Obj-C API to reflect UIEvent
* WebCore.exp: add new classes DOMKeyboardEvent and DOMWheelEvent to the exported
symbols list of WebCore.framework
Updated DOMUIEvent to include all DOM Level 2 properties
Added DOMKeyboardEvent (DOM Level 3)
Added two non-W3C accessors (keyCode, charCode) of DOMKeyboardEvent to a separate file (DOMEventsNonstandard)
Added DOMWheelEvent (non-W3C) in separate file (DOMEventsNonstandard)
Added this file (DOMEventsNonstandard) to the build process
* WebCore.xcodeproj/project.pbxproj:
* bindings/objc/DOM.h:
* bindings/objc/DOMEvents.h:
* bindings/objc/DOMEvents.mm:
(+[DOMEvent _eventWith:]):
(-[DOMUIEvent _UIEvent]):
(-[DOMUIEvent view]):
(-[DOMUIEvent detail]):
(-[DOMUIEvent initUIEvent:::::]):
(-[DOMKeyboardEvent _keyboardEvent]):
(-[DOMKeyboardEvent keyIdentifier]):
(-[DOMKeyboardEvent keyLocation]):
(-[DOMKeyboardEvent ctrlKey]):
(-[DOMKeyboardEvent shiftKey]):
(-[DOMKeyboardEvent altKey]):
(-[DOMKeyboardEvent metaKey]):
(-[DOMKeyboardEvent getModifierState:]):
(-[DOMMouseEvent button]):
* bindings/objc/DOMEventsNonstandard.mm: Added.
(-[DOMWheelEvent _wheelEvent]):
(-[DOMWheelEvent screenX]):
(-[DOMWheelEvent screenY]):
(-[DOMWheelEvent clientX]):
(-[DOMWheelEvent clientY]):
(-[DOMWheelEvent ctrlKey]):
(-[DOMWheelEvent shiftKey]):
(-[DOMWheelEvent altKey]):
(-[DOMWheelEvent metaKey]):
(-[DOMWheelEvent isHorizontal]):
(-[DOMWheelEvent wheelDelta]):
(-[DOMKeyboardEvent _keyboardEvent]):
(-[DOMKeyboardEvent keyCode]):
(-[DOMKeyboardEvent charCode]):
* bindings/objc/DOMPrivate.h:
2006-06-24 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed and landed by ap.
- http://bugzilla.opendarwin.org/show_bug.cgi?id=9563
Remove unused layoutSuppressed field and inLayout() method
No test added because there is no change in functionality.
* page/FrameView.cpp:
(WebCore::FrameViewPrivate::reset):
(WebCore::FrameView::layout):
* page/FrameView.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::layout):
2006-06-24 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Darin.
- http://bugzilla.opendarwin.org/show_bug.cgi?id=8177
Javascript search incredibly slow
No change in functionality, thus no test.
Use info sharing for named collections, too. Moved shared HTMLCollection infos from HTMLDocument
to Document. Renamed collection types to use the preferred WebKit style. Replaced direct
HTMLCollection creation with using accessors from Document in a few places.
* bindings/objc/DOMHTML.mm:
(-[DOMHTMLElement children]):
(-[DOMHTMLDocument images]):
(-[DOMHTMLDocument applets]):
(-[DOMHTMLDocument links]):
(-[DOMHTMLDocument forms]):
(-[DOMHTMLDocument anchors]):
(-[DOMHTMLMapElement areas]):
(-[DOMHTMLTableSectionElement rows]):
(-[DOMHTMLTableElement rows]):
(-[DOMHTMLTableElement tBodies]):
(-[DOMHTMLTableRowElement cells]):
* dom/Document.cpp:
(WebCore::Document::images):
(WebCore::Document::applets):
(WebCore::Document::embeds):
(WebCore::Document::objects):
(WebCore::Document::scripts):
(WebCore::Document::links):
(WebCore::Document::forms):
(WebCore::Document::anchors):
(WebCore::Document::all):
(WebCore::Document::windowNamedItems):
(WebCore::Document::documentNamedItems):
(WebCore::Document::nameCollectionInfo):
* dom/Document.h:
(WebCore::Document::collectionInfo):
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
(WebCore::HTMLCollection::traverseNextItem):
(WebCore::HTMLCollection::checkForNameMatch):
(WebCore::HTMLCollection::updateNameCache):
* html/HTMLCollection.h:
(WebCore::HTMLCollection::):
* html/HTMLDocument.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::children):
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::areas):
* html/HTMLNameCollection.h:
* html/HTMLNameCollection.cpp:
(WebCore::HTMLNameCollection::HTMLNameCollection):
(WebCore::HTMLNameCollection::traverseNextItem):
* html/HTMLFormCollection.cpp:
* html/HTMLOptionsCollection.cpp:
(WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
* html/HTMLSelectElement.h:
(WebCore::HTMLSelectElement::collectionInfo):
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::rows):
(WebCore::HTMLTableElement::tBodies):
* html/HTMLTableRowElement.cpp:
(WebCore::HTMLTableRowElement::cells):
* html/HTMLTableSectionElement.cpp:
(WebCore::HTMLTableSectionElement::rows):
* kwq/WebCoreAXObject.mm:
(-[WebCoreAXObject accessibilityAttributeValue:]):
* page/Frame.cpp:
(WebCore::Frame::gotoAnchor):
2006-06-24 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Darin.
- http://bugzilla.opendarwin.org/show_bug.cgi?id=9418
WebKit will not build when Space exists in path
* WebCore.xcodeproj/project.pbxproj: Enclose search paths in quotes; create symlinks to
avoid passing paths with spaces to make.
2006-06-23 Tim Omernick <timo@apple.com>
Reviewed by Tim Hatcher.
<rdar://problem/4560947> Leopard REGRESSION: Dragging to TileGame Widget is broken
* page/FrameView.cpp:
(WebCore::FrameView::updateDragAndDrop):
Use the passed mouse event, instead of the "current" event. There is no such thing as
a "drag event". Asking for the current event during a drag returns a weird system-
internal event with an invalid mouse location.
2006-06-23 Timothy Hatcher <timothy@apple.com>
Reviewed by Eric.
Manual test added: cursor.html
Bug 9560: should support new CSS3 cursor types to get more resizing directions
http://bugzilla.opendarwin.org/show_bug.cgi?id=9560
Adds support for ew-resize, ns-resize, nesw-resize, nwse-resize,
col-resize and row-resize CSS3 cursor values.
Also converted some of the cursor images to grayscale tiffs,
some were RGB but had no color data.
* Resources/eastResizeCursor.tiff:
* Resources/eastWestResizeCursor.tiff: Added.
* Resources/helpCursor.tiff:
* Resources/moveCursor.tiff:
* Resources/northEastResizeCursor.tiff:
* Resources/northEastSouthWestResizeCursor.tiff: Added.
* Resources/northResizeCursor.tiff:
* Resources/northSouthResizeCursor.tiff: Added.
* Resources/northWestResizeCursor.tiff:
* Resources/northWestSouthEastResizeCursor.tiff: Added.
* Resources/southEastResizeCursor.tiff:
* Resources/southResizeCursor.tiff:
* Resources/southWestResizeCursor.tiff:
* Resources/textAreaResizeCorner.tiff:
* Resources/waitCursor.tiff:
* Resources/westResizeCursor.tiff:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSValueKeywords.in:
* css/cssparser.cpp:
(WebCore::CSSParser::parseValue):
* manual-tests/cursor.html: Added.
* page/FrameView.cpp:
(WebCore::selectCursor):
* platform/Cursor.h:
* platform/mac/CursorMac.mm:
(WebCore::northSouthResizeCursor):
(WebCore::eastWestResizeCursor):
(WebCore::northEastSouthWestResizeCursor):
(WebCore::northWestSouthEastResizeCursor):
(WebCore::columnResizeCursor):
(WebCore::rowResizeCursor):
* platform/win/CursorWin.cpp:
(WebCore::northSouthResizeCursor):
(WebCore::eastWestResizeCursor):
(WebCore::northEastSouthWestResizeCursor):
(WebCore::northWestSouthEastResizeCursor):
(WebCore::columnResizeCursor):
(WebCore::rowResizeCursor):
* rendering/render_style.h: cursor needs 5 bits now
2006-06-23 John Sullivan <sullivan@apple.com>
Reviewed by Tim Omernick
- fixed <rdar://problem/4597685> stale rects for document markers can be left behind in certain cases
* dom/Document.h:
* dom/Document.cpp:
(WebCore::Document::setRenderedRectForMarker):
changed parameter from IntRect to const IntRect& at Darin's request
(WebCore::Document::invalidateRenderedRectsForMarkersInRect):
new method, tests whether the rendered rect for each marker intersects the
passed rect. If so, sets the rendered rect back to the placeholder rect that
means that the rect for this marker isn't known.
* page/Frame.cpp:
(WebCore::Frame::paint):
call invalidateRenderedRectsForMarkersInRect on the rect we're about to paint.
This ensures that old stale rects won't be preserved if the associated marker
has moved such that it is out of the painted area.
2006-06-23 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
<rdar://problem/4527702>
REGRESSION: Quote bars go away on first paragraph when I delete reply text
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::mergeParagraphs):
Add a rule for when to merge into empty blocks.
=== WebCore-521.13 ===
2006-06-23 Patrick Beard <beard@apple.com>
Reviewed by Tim Hatcher.
<rdar://problem/4223619> Safari crashed in -[NSFont __isSystemFont]
CFRetain and CFRelease NSFont's when FontPlatformData has a reference.
We only do this when GC is enabled for performance reasons.
No tests possible.
* platform/mac/FontPlatformData.h:
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::~FontPlatformData):
2006-06-23 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
<http://bugzilla.opendarwin.org/show_bug.cgi?id=8074>
Caret before/after block tables is too small
<rdar://problem/4598331>
right arrow out of a table shows cursor in a weird place
* rendering/RenderBox.cpp:
(WebCore::RenderBox::caretRect): Don't propagate to children,
VisiblePositions inside containers don't refer to children.
Don't use the font height for tables.
2006-06-23 Brady Eidson <beidson@apple.com>
Reviewed by Kevin.
Added 64-bit String::number() functions
* platform/PlatformString.h:
* platform/String.cpp:
(WebCore::String::number):
2006-06-22 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Hyatt.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9497
REGRESSION: Incomplete repainting when scrolling thumbnails on Flickr
Test: fast/repaint/clipped-relative.html
* page/FrameView.cpp:
(WebCore::FrameView::layout):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::removePositionedObjects): Removed call to computeRepaintRects().
Previously, it was needed to update the cached rects before RenderBox::setStyle()
called updateLayerPositions().
* rendering/RenderBox.cpp:
(WebCore::RenderBox::setStyle): Changed to call updateLayerPositions() for a newly-
created layer only if it does not need layout. Otherwise, updateLayerPositions() will
be called after layout. This saves a repaint in some cases.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::checkForRepaintOnResize): Renamed computeRepaintRects() to
this and deleted the code that cached the absolute position and repaint rects.
(WebCore::RenderLayer::updateLayerPositions): Added code to cache the absolute
position and repaint rects right after updating the layer's position.
* rendering/RenderLayer.h:
2006-06-22 Beth Dakin <bdakin@apple.com>
Reviewed by Maciej.
Fix for <rdar://problem/4599015> REGRESSION: Hand on clock widget
don't appear at all
This regression was caused by <rdar://problem/4567520> HIDPI: pixel
cracks in weather widget at 1.83 scaling
* html/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawImage): Do the contains
check before rounding to integral device pixels.
2006-06-22 Anders Carlsson <acarlsson@apple.com>
Reviewed by John.
<rdar://problem/4529334> REGRESSION: Can't configure RadarInMotion widget for U.S. locations on Leopard (Javascript errors)
* dom/Document.cpp:
(WebCore::Document::completeURL):
Check if both the URL and base URL are empty instead of using URL() which returns "about:blank" if the URL is empty.
2006-06-22 Anders Carlsson <acarlsson@apple.com>
Reviewed by Maciej.
<rdar://problem/4499675> Package Tracker widget always crashes in WebCore::Frame::jScriptEnabled() const + 0
* html/HTMLParser.cpp:
(WebCore::HTMLParser::noscriptCreateErrorCheck):
(WebCore::HTMLParser::canvasCreateErrorCheck):
(WebCore::HTMLParser::isInline):
Add null-checks for document->frame() since it can be 0 for documents created using createHTMLDocument.
2006-06-22 Anders Carlsson <acarlsson@apple.com>
Reviewed by Maciej.
<rdar://problem/4524840> Entities contained in DOCTYPE referenced DTD in XSLT source document are unknown
* dom/xml_tokenizer.cpp:
(WebCore::shouldAllowExternalLoad):
Use correct path for the catalog.
(WebCore::errorFunc):
Add error function to keep parser errors from going to the console.
(WebCore::XMLTokenizer::write):
Remove if (0 &&)
(WebCore::XMLTokenizer::end):
Pass DocLoader to xmlDocPtrForString.
(WebCore::xmlDocPtrForString):
* dom/xml_tokenizer.h:
Add DocLoader argument to xmlDocPtrForString so external DTDs and entities can be loaded.
* xml/XSLTProcessor.cpp:
(WebCore::xmlDocPtrFromNode):
Pass DocLoader to xmlDocPtrForString
2006-06-21 David Hyatt <hyatt@apple.com>
Back out -webkit-overlay and just rename it back to overlay.
Reviewed by darin
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSValueKeywords.in:
* css/cssparser.cpp:
(WebCore::CSSParser::parseValue):
* css/cssstyleselector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
2006-06-21 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::initializePositionData): Fix a bug in the code
to stop merges across table cells.
(WebCore::DeleteSelectionCommand::mergeParagraphs): Move the code to stop merges
across table cells to initializePositionData so that its changes to
m_mergeBlocksAfterDelete can take effect on the endingPosition.
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::doApply): Turn into an InsertLineBreak
instead of splitting/cloning a table cell.
2006-06-21 Beth Dakin <bdakin@apple.com>
Reviewed by John.
Fix for <rdar://problem/3914965> Misspelled text underline doesn't
look right at non-standard scale factors
* platform/mac/GraphicsContextMac.mm:
(WebCore::GraphicsContext::drawLineForMisspelling): We need to call
into our previously-created SPI for pattern-drawing so that the
phase is right at all scale factors.
2006-06-21 David Hyatt <hyatt@apple.com>
Fix for 7362, implement the CSS3 overflow-x and overflow-y properties.
Reviewed by adele
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSPropertyNames.in:
* css/cssparser.cpp:
(WebCore::CSSParser::parseValue):
* css/cssstyleselector.cpp:
(WebCore::CSSStyleSelector::adjustRenderStyle):
(WebCore::CSSStyleSelector::applyProperty):
* page/FrameView.cpp:
(WebCore::FrameView::applyOverflowToViewport):
(WebCore::FrameView::layout):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::determineHorizontalPosition):
(WebCore::RenderBlock::layoutBlockChildren):
(WebCore::RenderBlock::rightOffset):
(WebCore::RenderBlock::rightmostPosition):
(WebCore::RenderBlock::calcMinMaxWidth):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::setStyle):
(WebCore::RenderBox::contentWidth):
(WebCore::RenderBox::contentHeight):
(WebCore::RenderBox::sizesToIntrinsicWidth):
(WebCore::RenderBox::calcHeight):
(WebCore::RenderBox::calcPercentageHeight):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollToOffset):
(WebCore::RenderLayer::shouldAutoscroll):
(WebCore::RenderLayer::updateScrollInfoAfterLayout):
(WebCore::RenderLayer::styleChanged):
* rendering/RenderLayer.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::clientWidth):
(WebCore::RenderObject::clientHeight):
* rendering/RenderObject.h:
(WebCore::RenderObject::hasAutoVerticalScrollbar):
(WebCore::RenderObject::hasAutoHorizontalScrollbar):
(WebCore::RenderObject::scrollsOverflow):
(WebCore::RenderObject::scrollsOverflowX):
(WebCore::RenderObject::scrollsOverflowY):
(WebCore::RenderObject::includeVerticalScrollbarSize):
(WebCore::RenderObject::includeHorizontalScrollbarSize):
* rendering/RenderTextArea.cpp:
(WebCore::RenderTextArea::setStyle):
* rendering/RenderTextField.cpp:
(WebCore::RenderTextField::createDivStyle):
(WebCore::RenderTextField::calcHeight):
(WebCore::RenderTextField::calcMinMaxWidth):
* rendering/bidi.cpp:
(WebCore::RenderBlock::layoutInlineChildren):
* rendering/render_style.cpp:
(WebCore::RenderStyle::diff):
* rendering/render_style.h:
(WebCore::):
(WebCore::RenderStyle::NonInheritedFlags::operator==):
(WebCore::RenderStyle::setBitDefaults):
(WebCore::RenderStyle::overflowX):
(WebCore::RenderStyle::overflowY):
(WebCore::RenderStyle::setOverflowX):
(WebCore::RenderStyle::setOverflowY):
(WebCore::RenderStyle::initialOverflowX):
(WebCore::RenderStyle::initialOverflowY):
2006-06-21 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
<rdar://problem/4590366>
REGRESSION: Selection incorrectly paints gaps on TOT
* dom/Document.cpp:
(WebCore::Document::updateSelection): Use the leftmost candidate for the end of the
selection and the rightmost candidate for the start of the selection.
* dom/Position.cpp:
(WebCore::Position::upstream): Cross line wraps so that we can use upstream/downstream
to get to candidates before/after linewraps.
(WebCore::Position::downstream):
(WebCore::Position::inRenderedContent):
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::handleGeneralDelete):
(WebCore::DeleteSelectionCommand::mergeParagraphs):
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::doApply):
Ensure that the leftmost candidate is used. We should sample the style from that one.
When the block to insert is after a br, a br should be inserted even in strict mode.
* editing/InsertTextCommand.cpp:
(WebCore::InsertTextCommand::input):
Insert at the leftmost candidate, get rid of a use of trailingWhitespacePosition.
Don't apply a style if its unnecessary.
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::doApply): "pos" can be invalidated, don't use it.
* editing/VisiblePosition.cpp:
Renamed initDeepPosition and made it return the canonical position.
(WebCore::VisiblePosition::init):
(WebCore::VisiblePosition::canonicalPosition):
* editing/VisiblePosition.h:
(WebCore::VisiblePosition::characterBefore): Added.
* editing/visible_units.cpp:
(WebCore::startOfParagraph):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::selectionState): When a selection ends at a line wrap, it shouldn't extend
onto the next line.
2006-06-21 David Hyatt <hyatt@apple.com>
Reviewed and committed by Beth.
Fix for <rdar://problem/4595337> Resizing a containing block
strictly vertically does not cause contained height:100% element to
also be resized.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlockChildren): Also layout if the
child's min or max height is a percent.
2006-06-21 Anders Carlsson <acarlsson@apple.com>
Reviewed by Geoff.
http://bugzilla.opendarwin.org/show_bug.cgi?id=6058
XMLTokenizer runs all <script> tags at once instead of as they're encountered
* dom/xml_tokenizer.cpp:
(WebCore::XMLTokenizer::XMLTokenizer):
Initialize new members.
(WebCore::XMLTokenizer::endElementNs):
If we've encountered a script tag, execute the script here. If the script
tag refers to an external resource, pause the parser while loading it.
(WebCore::XMLTokenizer::end):
Move code from finish() to here
(WebCore::XMLTokenizer::finish):
Only call end() if the parser isn't paused.
(WebCore::XMLTokenizer::notifyFinished):
Evaluate the script here and resume the parser.
(WebCore::XMLTokenizer::resumeParsing):
If finish() was called, call end() after writing all data.
2006-06-21 Steve Falkenburg <sfalken@apple.com>
Fix build break
* platform/win/TemporaryLinkStubs.cpp:
(FrameWin::shouldInterruptJavaScript):
2006-06-21 Anders Carlsson <acarlsson@apple.com>
Move FrameWin::shouldInterruptJavaScript to TemporaryLinkStubs.cpp
* bridge/win/FrameWin.cpp:
* platform/win/TemporaryLinkStubs.cpp:
(FrameWin::shouldInterruptJavaScript):
2006-06-21 Ben Goodger <bengoodger@gmail.com>
Reviewed by Maciej.
Fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=9523
More Win32 build bustage.
* WebCore.vcproj/WebCore/WebCore.vcproj:
* bridge/win/FrameWin.cpp:
(WebCore::FrameWin::shouldInterruptJavaScript):
* bridge/win/FrameWin.h:
2006-06-20 Adele Peterson <adele@apple.com>
Reviewed by Anders.
Fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=8948
Switch to use new text field implementation for <textarea>
* css/html4.css:
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::selectionStart):
(WebCore::HTMLTextAreaElement::selectionEnd):
(WebCore::HTMLTextAreaElement::setSelectionStart):
(WebCore::HTMLTextAreaElement::setSelectionEnd):
(WebCore::HTMLTextAreaElement::select):
(WebCore::HTMLTextAreaElement::setSelectionRange):
(WebCore::HTMLTextAreaElement::createRenderer):
(WebCore::HTMLTextAreaElement::appendFormData):
(WebCore::HTMLTextAreaElement::isKeyboardFocusable):
(WebCore::HTMLTextAreaElement::isMouseFocusable):
(WebCore::HTMLTextAreaElement::focus):
(WebCore::HTMLTextAreaElement::defaultEventHandler):
(WebCore::HTMLTextAreaElement::updateValue):
(WebCore::HTMLTextAreaElement::setValue):
2006-06-20 Brady Eidson <beidson@apple.com>
Reviewed by Maciej
Fixed capitalization mistake that I made, someone else fixed, then I accidentally made it go back to the old way
* icon/SQLStatement.cpp:
2006-06-20 Brady Eidson <beidson@apple.com>
Reviewed by Maciej.
More changes/additions setting the stage for the major IconDatabase hookup.
* WebCore.xcodeproj/project.pbxproj: Added SQLTransaction.cpp
* bridge/mac/WebCoreIconDatabaseBridge.h: Added call-throughs and translations to pass WebKit DB to WebCore DB
* bridge/mac/WebCoreIconDatabaseBridge.mm:
(+[WebCoreIconDatabaseBridge sharedBridgeInstance]):
(-[WebCoreIconDatabaseBridge setPrivateBrowsingEnabled:]):
(-[WebCoreIconDatabaseBridge iconForURL:withSize:]):
(-[WebCoreIconDatabaseBridge iconURLForURL:]):
(-[WebCoreIconDatabaseBridge defaultIconWithSize:]):
(-[WebCoreIconDatabaseBridge retainIconForURL:]):
(-[WebCoreIconDatabaseBridge releaseIconForURL:]):
(-[WebCoreIconDatabaseBridge _setIconData:forIconURL:]):
(-[WebCoreIconDatabaseBridge _setHaveNoIconForIconURL:]):
(-[WebCoreIconDatabaseBridge _setIconURL:forURL:]):
(-[WebCoreIconDatabaseBridge _hasIconForIconURL:]):
* bridge/mac/WebCorePageBridge.mm: Added WebCore's IconDatabase logging channel to the user-prefs check
(initializeLoggingChannelsIfNecessary):
* icon/IconDatabase.cpp: Added stubs and basic SQL usage to create the sqlite DB and respond to WebKit calls
(WebCore::IconDatabase::IconDatabase):
(WebCore::IconDatabase::open):
(WebCore::IconDatabase::close):
(WebCore::IconDatabase::isValidDatabase):
(WebCore::IconDatabase::recreateDatabase):
(WebCore::IconDatabase::setPrivateBrowsingEnabled):
(WebCore::IconDatabase::iconForURL):
(WebCore::IconDatabase::iconURLForURL):
(WebCore::IconDatabase::defaultIcon):
(WebCore::IconDatabase::retainIconForURL):
(WebCore::IconDatabase::releaseIconForURL):
(WebCore::IconDatabase::setIconForIconURL):
(WebCore::IconDatabase::setHaveNoIconForIconURL):
(WebCore::IconDatabase::setIconURLForPageURL):
(WebCore::IconDatabase::hasIconForIconURL):
* icon/IconDatabase.h: WebIcon will be an internal class used in IconDatabase but is not complete yet
(WebCore::WebIcon::getExpiration):
(WebCore::WebIcon::getTouch):
* icon/SQLDatabase.cpp: Added more SQLite convenience methods
(SQLDatabase::setFullsync):
(SQLDatabase::setBusyTimeout):
(SQLDatabase::setBusyHandler):
* icon/SQLDatabase.h:
* icon/SQLStatement.cpp:
(WebCore::SQLStatement::returnsAtLeastOneResult):
* icon/SQLTransaction.cpp: Added basic commit/rollback support with this simple class
(SQLTransaction::SQLTransaction):
(SQLTransaction::~SQLTransaction):
(SQLTransaction::begin):
(SQLTransaction::commit):
(SQLTransaction::rollback):
2006-06-20 Adele Peterson <adele@apple.com>
Reviewed by Maciej.
Fixes for:
http://bugzilla.opendarwin.org/show_bug.cgi?id=8724
REGRESSION: onSelect handler doesn't work for text fields
http://bugzilla.opendarwin.org/show_bug.cgi?id=7676
REGRESSION: Selection methods on new text fields don't work if text field is hidden
http://bugzilla.opendarwin.org/show_bug.cgi?id=8867
REGRESSION: selectionStart/End return 0 for input element once it no longer has focus
Implemented onSelect for new text fields and textareas. Also fixed selection restore
behavior to better match other browsers and Safari 2.0 behavior.
Tests:
* fast/forms/input-selection-restore.html
* fast/forms/input-selection-hidden.html
* fast/forms/onselect-textarea.html
* fast/forms/onselect-textfield.html
* html/HTMLInputElement.h: (WebCore::HTMLInputElement::cacheSelection): Added.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::init): Initializes cached selection.
(WebCore::HTMLInputElement::selectionStart): If this element doesn't have focus, return the cached selection value.
(WebCore::HTMLInputElement::selectionEnd): ditto.
(WebCore::HTMLInputElement::setValue): Restore a caret at the starting point of the old selection. Matches Safari 2.0 behavior.
* html/HTMLTextAreaElement.h: (WebCore::HTMLTextAreaElement::cacheSelection): Added.
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::HTMLTextAreaElement): Initializes cached selection.
(WebCore::HTMLTextAreaElement::selectionStart): If this element doesn't have focus, return the cached selection value.
(WebCore::HTMLTextAreaElement::selectionEnd): ditto.
(WebCore::HTMLTextAreaElement::focus): If this is the first focus, set a caret at the end of the text. Otherwise,
restore the cached selection. This matches other browsers' behavior.
(WebCore::HTMLTextAreaElement::setValue): Restore a caret at the starting point of the old selection. Matches Safari 2.0 behavior.
* page/Frame.h: Added notifyRendererOfSelectionChange method.
* page/Frame.cpp:
(WebCore::Frame::notifyRendererOfSelectionChange): Added. Calls selectionChanged for text fields and textareas. Forwards a userTriggered
argument so selectionChanged knows whether or not to fire onSelect.
(WebCore::Frame::setSelection): Calls notifyRendererOfSelectionChange(false). This gets called for all selection changes, so the renderer
can always update its cached selection values.
(WebCore::Frame::handleMouseReleaseEvent): Calls notifyRendererOfSelectionChange(true) so onSelect will get fired when the user is done
making a selection with the mouse.
* bridge/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge alterCurrentSelection:direction:granularity:]): Calls notifyRendererOfSelectionChange(true) so onSelect gets
fired when the user makes a selection with the keyboard.
(-[WebCoreFrameBridge alterCurrentSelection:verticalDistance:]): ditto.
* rendering/RenderTextField.h: Add userTriggered parameter to selectionChanged.
* rendering/RenderTextField.cpp:
(WebCore::RenderTextField::setSelectionRange): For visibility:hidden, cache the selection and
return early since we won't be able to actually set the selection.
(WebCore::RenderTextField::selectionChanged): Caches the selection.
If the selection is a range, and its triggered by user action, then fire the onSelect event.
2006-06-21 Anders Carlsson <acarlsson@apple.com>
* bridge/win/FrameWin.cpp:
(WebCore::shouldInterruptJavaScript):
* bridge/win/FrameWin.h:
Try fixing the Windows build.
2006-06-20 Adele Peterson <adele@apple.com>
RS by Tim Hatcher.
Renamed RenderSelect to DeprecatedRenderSelect to prepare for new popup menu and list menu implementations.
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLOptionElement.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::recalcStyle):
(WebCore::HTMLSelectElement::createRenderer):
(WebCore::HTMLSelectElement::setRecalcListItems):
(WebCore::HTMLSelectElement::reset):
(WebCore::HTMLSelectElement::notifyOptionSelected):
* html/HTMLSelectElement.h:
* rendering/DeprecatedRenderSelect.cpp: Added.
(WebCore::DeprecatedRenderSelect::DeprecatedRenderSelect):
(WebCore::DeprecatedRenderSelect::setWidgetWritingDirection):
(WebCore::DeprecatedRenderSelect::setStyle):
(WebCore::DeprecatedRenderSelect::updateFromElement):
(WebCore::DeprecatedRenderSelect::baselinePosition):
(WebCore::DeprecatedRenderSelect::calcMinMaxWidth):
(WebCore::DeprecatedRenderSelect::layout):
(WebCore::DeprecatedRenderSelect::valueChanged):
(WebCore::DeprecatedRenderSelect::selectionChanged):
(WebCore::DeprecatedRenderSelect::setOptionsChanged):
(WebCore::DeprecatedRenderSelect::createListBox):
(WebCore::DeprecatedRenderSelect::updateSelection):
* rendering/DeprecatedRenderSelect.h: Added.
(WebCore::DeprecatedRenderSelect::renderName):
* rendering/RenderSelect.cpp: Removed.
* rendering/RenderSelect.h: Removed.
2006-06-20 Anders Carlsson <acarlsson@apple.com>
Reviewed by Geoff.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9509
Would like a way to pause/resume XML parsing
* dom/xml_tokenizer.cpp:
(WebCore::PendingCallbacks::PendingCallbacks):
(WebCore::PendingCallbacks::appendStartElementNSCallback):
(WebCore::PendingCallbacks::appendEndElementNSCallback):
(WebCore::PendingCallbacks::appendCharactersCallback):
(WebCore::PendingCallbacks::appendProcessingInstructionCallback):
(WebCore::PendingCallbacks::appendCDATABlockCallback):
(WebCore::PendingCallbacks::appendCommentCallback):
(WebCore::PendingCallbacks::appendInternalSubsetCallback):
(WebCore::PendingCallbacks::appendErrorCallback):
(WebCore::PendingCallbacks::callAndRemoveFirstCallback):
(WebCore::PendingCallbacks::isEmpty):
(WebCore::PendingCallbacks::PendingCallback::~PendingCallback):
(WebCore::PendingCallbacks::PendingStartElementNSCallback::~PendingStartElementNSCallback):
(WebCore::PendingCallbacks::PendingStartElementNSCallback::call):
(WebCore::PendingCallbacks::PendingEndElementNSCallback::call):
(WebCore::PendingCallbacks::PendingCharactersCallback::~PendingCharactersCallback):
(WebCore::PendingCallbacks::PendingCharactersCallback::call):
(WebCore::PendingCallbacks::PendingProcessingInstructionCallback::~PendingProcessingInstructionCallback):
(WebCore::PendingCallbacks::PendingProcessingInstructionCallback::call):
(WebCore::PendingCallbacks::PendingCDATABlockCallback::~PendingCDATABlockCallback):
(WebCore::PendingCallbacks::PendingCDATABlockCallback::call):
(WebCore::PendingCallbacks::PendingCommentCallback::~PendingCommentCallback):
(WebCore::PendingCallbacks::PendingCommentCallback::call):
(WebCore::PendingCallbacks::PendingInternalSubsetCallback::~PendingInternalSubsetCallback):
(WebCore::PendingCallbacks::PendingInternalSubsetCallback::call):
(WebCore::PendingCallbacks::):
New classes which manage a list of pending SAX callbacks that have not yet
been sent to the tokenizer.
(WebCore::XMLTokenizer::XMLTokenizer):
Initialize new member variables.
(WebCore::XMLTokenizer::~XMLTokenizer):
Delete PendingCallbacks object.
(WebCore::XMLTokenizer::write):
If the parser is paused, queue the data to be written.
(WebCore::XMLTokenizer::startElementNs):
(WebCore::XMLTokenizer::endElementNs):
(WebCore::XMLTokenizer::characters):
(WebCore::XMLTokenizer::error):
(WebCore::XMLTokenizer::processingInstruction):
(WebCore::XMLTokenizer::cdataBlock):
(WebCore::XMLTokenizer::comment):
(WebCore::XMLTokenizer::internalSubset):
If the parser has been paused, queue the callbacks instead.
(WebCore::XMLTokenizer::handleError):
New function, called by both ::error and :PendingCallbacks::callAndRemoveFirstCallback
(WebCore::XMLTokenizer::finish):
(WebCore::XMLTokenizer::pauseParsing):
Set m_parserPaused to true.
(WebCore::XMLTokenizer::resumeParsing):
Call the pending callbacks and then parse the pending source.
2006-06-20 David Hyatt <hyatt@apple.com>
Don't send the custom highlighter callback when painting is disabled.
Reviewed by harrison
* WebCore.xcodeproj/project.pbxproj:
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
2006-06-20 Anders Carlsson <acarlsson@apple.com>
Reviewed by John
<rdar://problem/4592244> REGRESSION (417.9.3 - 420+): (some?) plain text files have all lines concatenated into one line
* loader/TextDocument.cpp:
(WebCore::TextTokenizer::checkBuffer):
(WebCore::TextTokenizer::TextTokenizer):
(WebCore::TextTokenizer::write):
(WebCore::TextTokenizer::finish):
Add a text buffer which is used for translation of CR and CRLF to plain LF,
like the HTML tokenizer does.
2006-06-20 Maciej Stachowiak <mjs@apple.com>
Reviewed by Eric.
- fix crasher on one of the layout tests caused by my recent checkin
* kcanvas/RenderSVGText.cpp:
(WebCore::RenderSVGText::paint):
2006-06-19 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Darin.
- http://bugzilla.opendarwin.org/show_bug.cgi?id=5499
Page reload does not send any cache control headers
Test: http/tests/misc/refresh-headers.php
* bindings/js/kjs_window.cpp:
(KJS::LocationFunc::callAsFunction): Call scheduleRefresh() for Location::Reload.
* page/Frame.h: Add scheduleRefresh(). Don't derive from TransferJob or implement its methods - that was
used only for storing response HTTP headers, which was an overkill.
* page/FramePrivate.h: Replace TransferJob with a HashMap for storing response headers.
* page/Frame.cpp:
(WebCore::Frame::didOpenURL): Don't needlessly change d->m_cachePolicy. Don't create a TransferJob.
(WebCore::Frame::stopLoading): Directly access the metadata map, instead of going through a TransferJob.
(WebCore::Frame::receivedFirstData): Ditto.
(WebCore::Frame::addMetaData): Ditto.
(WebCore::Frame::scheduleRefresh): A new function that schedules a refresh, similarly to what
scheduleRedirection() does.
(WebCore::Frame::changeLocation): Set request.reload attribute based on the current cache policy.
2006-06-19 Ben Goodger <bengoodger@gmail.com>
Reviewed by Darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9501
Windows build fails with link error CharsetTable not defined
* platform/make-charset-table.pl:
(process_iana_charsets): Move test for equality to alias "None" until after
normalization steps to ensure escape characters in the input data don't
interfere with processing. Convert nearby tabs to 4 spaces in this function.
2006-06-18 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=9488
"Animated GIFs do not respect transforms in SVG"
http://bugzilla.opendarwin.org/show_bug.cgi?id=6946
"SVG shows invalidation issues in WebKit"
http://www.treebuilder.de/default.asp?file=441875.xml
"Invalidation issues with "SVG 3d" demo"
http://code.google.com/webstats/2005-12/pages.html
"SVG text doesn't repaint correctly"
* kcanvas/KCanvasContainer.cpp:
(WebCore::KCanvasContainer::computeAbsoluteRepaintRect): Override base class, and apply
appropriate transforms, so damage rects in transformed SVG content get propagated up properly.
(WebCore::KCanvasContainer::getAbsoluteRepaintRect): note a FIXME; this method
seems wrong.
* kcanvas/KCanvasContainer.h: Prototype new method.
* css/svg.css: Don't apply overflow:hidden to foreignObject, since that makes it a RenderLayer
so it paints twice.
* kcanvas/RenderForeignObject.cpp:
(WebCore::RenderForeignObject::paint): Transform the damage rect before passing it down to HTML content,
so everything paints that is supposed to. Also handle opacity here since we won't get layers.
(WebCore::RenderForeignObject::computeAbsoluteRepaintRect): Override base class, and apply
appropriate transforms, so damage rects in HTML embedded in SVG get propagated up properly.
(WebCore::RenderForeignObject::requiresLayer): Never use a RenderLayer.
(WebCore::RenderForeignObject::layout): Make sure to dirty our previous bounds when layout
changes, as by transform.
* kcanvas/RenderForeignObject.h:
* kcanvas/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::paint): Transform the damage rect when painting. Also handle opacity
here since we won't get layers.
(WebCore::RenderForeignObject::computeAbsoluteRepaintRect): Override base class, and apply
appropriate transforms, so damage rects in SVG images get propagated up properly.
(WebCore::RenderSVGImage::translationForAttributes): New helper method, factored out of below.
(WebCore::RenderSVGImage::translateForAttributes): Use above.
(WebCore::RenderSVGImage::requiresLayer): Never use a RenderLayer.
(WebCore::RenderSVGImage::layout): Make sure to properly dirty the old bounds, accounting
for transforms.
(WebCore::RenderSVGImage::relativeBBox): Correct bbox computation.
* kcanvas/RenderSVGImage.h:
* kcanvas/RenderSVGText.cpp:
(WebCore::RenderSVGText::paint): Transform incoming damage rect. Handle opacity here since we
won't get a layer.
(WebCore::RenderSVGText::computeAbsoluteRepaintRect): Apply transforms.
(WebCore::RenderSVGText::requiresLayer): Never use a RenderLayer.
(WebCore::RenderSVGText::layout): Make sure to dirty the old bounds.
* platform/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::roundToDevicePixels): Instead of transforming rect to device space
and back to user space, do this for the origin and lower right corner of the rect. Otherwise the
rect will get inflated if user space is rotated or skewed.
* kcanvas/RenderPath.cpp:
(WebCore::RenderPath::layout): Make sure to dirty the old bounds.
(WebCore::RenderPath::paint): Hhandle opacity here.
Bonus fix:
* kcanvas/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::nodeAtPoint): Fix hit testing. Wasn't applying the x/y
attribute transform.
2006-06-19 Sam Weinig <sam.weinig@gmail.com>
Reviewed by Darin.
- fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9500
Split dom2_eventsimpl.* into separate files (one class per file).
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/kjs_binding.cpp:
* bindings/js/kjs_dom.cpp:
* bindings/js/kjs_events.cpp:
* bindings/js/kjs_html.cpp:
* bindings/js/kjs_window.cpp:
* bindings/objc/DOM.mm:
* bindings/objc/DOMEvents.mm:
* bindings/objc/DOMInternal.mm:
* bindings/scripts/CodeGeneratorJS.pm:
* bridge/mac/FrameMac.mm:
* dom/BeforeTextInsertedEvent.h:
* dom/BeforeUnloadEvent.cpp: Added.
* dom/BeforeUnloadEvent.h: Added.
(WebCore::BeforeUnloadEvent::result):
* dom/CharacterData.cpp:
* dom/Clipboard.h: Added.
(WebCore::Clipboard::~Clipboard):
* dom/ClipboardEvent.cpp: Added.
(WebCore::ClipboardEvent::ClipboardEvent):
* dom/ClipboardEvent.h: Added.
(WebCore::ClipboardEvent::clipboard):
* dom/ContainerNode.cpp:
* dom/Document.cpp:
* dom/Event.cpp: Added.
(WebCore::Event::Event):
(WebCore::Event::initEvent):
* dom/Event.h: Added.
(WebCore::):
(WebCore::Event::):
(WebCore::Event::type):
(WebCore::Event::target):
(WebCore::Event::currentTarget):
(WebCore::Event::setCurrentTarget):
(WebCore::Event::eventPhase):
(WebCore::Event::setEventPhase):
(WebCore::Event::bubbles):
(WebCore::Event::cancelable):
(WebCore::Event::timeStamp):
(WebCore::Event::stopPropagation):
(WebCore::Event::propagationStopped):
(WebCore::Event::defaultPrevented):
(WebCore::Event::setDefaultHandled):
(WebCore::Event::defaultHandled):
(WebCore::Event::preventDefault):
(WebCore::Event::setDefaultPrevented):
(WebCore::Event::setCancelBubble):
(WebCore::Event::getCancelBubble):
(WebCore::Event::dispatched):
* dom/EventTargetNode.cpp:
* dom/KeyboardEvent.cpp: Added.
(WebCore::KeyboardEvent::KeyboardEvent):
(WebCore::KeyboardEvent::initKeyboardEvent):
* dom/KeyboardEvent.h: Added.
(WebCore::KeyboardEvent::):
(WebCore::KeyboardEvent::keyIdentifier):
(WebCore::KeyboardEvent::keyLocation):
(WebCore::KeyboardEvent::altGraphKey):
(WebCore::KeyboardEvent::keyEvent):
* dom/MouseEvent.cpp: Added.
(WebCore::MouseEvent::MouseEvent):
(WebCore::MouseEvent::initMouseEvent):
(WebCore::MouseEvent::isDragEvent):
(WebCore::MouseEvent::toElement):
(WebCore::MouseEvent::fromElement):
* dom/MouseEvent.h: Added.
(WebCore::MouseEvent::button):
(WebCore::MouseEvent::relatedTarget):
(WebCore::MouseEvent::clipboard):
* dom/MouseRelatedEvent.cpp: Added.
(WebCore::MouseRelatedEvent::MouseRelatedEvent):
* dom/MouseRelatedEvent.h: Added.
(WebCore::MouseRelatedEvent::screenX):
(WebCore::MouseRelatedEvent::screenY):
(WebCore::MouseRelatedEvent::clientX):
(WebCore::MouseRelatedEvent::clientY):
(WebCore::MouseRelatedEvent::layerX):
(WebCore::MouseRelatedEvent::layerY):
(WebCore::MouseRelatedEvent::offsetX):
(WebCore::MouseRelatedEvent::offsetY):
(WebCore::MouseRelatedEvent::isSimulated):
* dom/MutationEvent.cpp: Added.
(WebCore::MutationEvent::MutationEvent):
(WebCore::MutationEvent::initMutationEvent):
* dom/MutationEvent.h: Added.
(WebCore::MutationEvent::):
(WebCore::MutationEvent::relatedNode):
(WebCore::MutationEvent::prevValue):
(WebCore::MutationEvent::newValue):
(WebCore::MutationEvent::attrName):
(WebCore::MutationEvent::attrChange):
* dom/RegisteredEventListener.cpp: Added.
(WebCore::RegisteredEventListener::RegisteredEventListener):
(WebCore::operator==):
* dom/RegisteredEventListener.h: Added.
(WebCore::RegisteredEventListener::eventType):
(WebCore::RegisteredEventListener::listener):
(WebCore::RegisteredEventListener::useCapture):
(WebCore::RegisteredEventListener::removed):
(WebCore::RegisteredEventListener::setRemoved):
(WebCore::operator!=):
* dom/UIEvent.cpp: Added.
(WebCore::UIEvent::UIEvent):
(WebCore::UIEvent::initUIEvent):
* dom/UIEvent.h: Added.
(WebCore::UIEvent::view):
(WebCore::UIEvent::detail):
* dom/UIEventWithKeyState.h: Added.
(WebCore::UIEventWithKeyState::UIEventWithKeyState):
(WebCore::UIEventWithKeyState::ctrlKey):
(WebCore::UIEventWithKeyState::shiftKey):
(WebCore::UIEventWithKeyState::altKey):
(WebCore::UIEventWithKeyState::metaKey):
* dom/WheelEvent.cpp: Added.
(WebCore::WheelEvent::WheelEvent):
* dom/WheelEvent.h: Added.
(WebCore::WheelEvent::isHorizontal):
(WebCore::WheelEvent::wheelDelta):
* dom/dom2_eventsimpl.cpp: Removed.
* dom/dom2_eventsimpl.h: Removed.
* editing/EditCommand.cpp:
* editing/SelectionController.cpp:
* html/HTMLAnchorElement.cpp:
* html/HTMLButtonElement.cpp:
* html/HTMLDocument.cpp:
* html/HTMLElement.cpp:
* html/HTMLFrameSetElement.cpp:
* html/HTMLInputElement.cpp:
* html/HTMLSelectElement.cpp:
* html/HTMLTextAreaElement.cpp:
* ksvg2/events/SVGZoomEvent.h:
* ksvg2/svg/SVGAElement.cpp:
* page/Frame.cpp:
* page/FrameView.cpp:
* platform/PlatformKeyboardEvent.h:
* platform/PlatformMouseEvent.h:
(WebCore::PlatformMouseEvent::PlatformMouseEvent):
* platform/PlatformWheelEvent.h:
* platform/mac/ClipboardMac.h:
* rendering/RenderFrameSet.cpp:
* rendering/RenderLayer.cpp:
* rendering/RenderObject.cpp:
* rendering/RenderTextField.cpp:
* xml/xmlhttprequest.cpp:
2006-06-19 Darin Adler <darin@apple.com>
Reviewed by Brady.
- removed a few empty/unused files Brady found by tracking down the nm error message
* editing/VisibleRange.cpp: Removed.
* editing/VisibleRange.h: Removed.
* kcanvas/KCanvasImage.cpp: Removed.
* WebCore.vcproj/WebCore/WebCore.vcproj: Removed VisibleRange.cpp/h.
* WebCore.xcodeproj/project.pbxproj: Removed VisibleRange.cpp/h and KCanvasImage.cpp.
* WebCoreSources.bkl: Removed VisibleRange.cpp.
2006-06-19 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Darin.
- http://bugzilla.opendarwin.org/show_bug.cgi?id=9492
Fix or remove window.debug.
It was only available in newly created windows, and became undefined after changing the URL
or reloading. Let's try removing it; hopefully, no-one will notice.
* bindings/js/kjs_proxy.cpp:
(WebCore::KJSProxy::initScriptIfNeeded): Don't add window.debug.
2006-06-19 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Darin.
- http://bugzilla.opendarwin.org/show_bug.cgi?id=8972
REGRESSION: invalid UTF-8 sequences are not displayed
Test: LayoutTests/fast/encoding/invalid-UTF-8.html
* dom/xml_tokenizer.cpp:
(WebCore::getXHTMLEntity): Properly null-terminate the result. This didn't matter
before, because the garbage at the end was guaranteed to be invalid UTF-8, and was
omitted in appendOmittingUnwanted();
* platform/StreamingTextDecoder.cpp:
(WebCore::StreamingTextDecoder::appendOmittingBOM): Only omit BOM characters.
Renamed back from appendOmittingUnwanted();
(WebCore::StreamingTextDecoder::convertUsingICU):
* platform/StreamingTextDecoder.h:
Update for the above function renaming.
2006-06-18 David Kilzer <ddkilzer@kilzer.net>
Reviewed by darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9498
Remove dead code left in JSHTMLDocument::getOwnPropertySlot() from r14298 (Bug 7838)
* bindings/js/kjs_html.cpp:
(KJS::JSHTMLDocument::getOwnPropertySlot): Remove dead code.
2006-06-18 David Kilzer <ddkilzer@kilzer.net>
Reviewed by ggaren.
* manual-tests/redraw-page-cache-visited-links.html: Changed to use DOM mouse event.
2006-06-18 David Kilzer <ddkilzer@kilzer.net>
Reviewed by ggaren.
- Update a manual test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9150
DumpRenderTree should be able to keep URL history during runs
* manual-tests/redraw-page-cache-visited-links.html: Added note about window.history hack.
Fixed coordinates for mouse events. Added call to keepWebHistory().
* manual-tests/resources/redraw-page-cache-visited-links-2.html: Added note about
window.history hack.
2006-06-17 Anders Carlsson <acarlsson@apple.com>
Reviewed by Geoff.
* bindings/js/kjs_binding.cpp:
(KJS::ScriptInterpreter::ScriptInterpreter):
Set the default script timeout.
(KJS::ScriptInterpreter::shouldInterruptScript):
New function which asks the frame if the script should be interrupted.
* bindings/js/kjs_binding.h:
* bindings/js/kjs_events.cpp:
(KJS::JSAbstractEventListener::handleEvent):
* bindings/js/kjs_proxy.cpp:
(WebCore::KJSProxy::evaluate):
Add calls to startTimeoutCheck/stopTimeoutCheck
* bindings/js/kjs_window.cpp:
(KJS::WindowFunc::callAsFunction):
Add calls to pauseTimeoutCheck/unpauseTimeoutCheck
(KJS::ScheduledAction::execute):
Add calls to startTimeoutCheck/stopTimeoutCheck
* bridge/mac/FrameMac.h:
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::shouldInterruptJavaScript):
New function which asks the bridge if the script should be interrupted.
* bridge/mac/WebCoreFrameBridge.h:
* page/Frame.h:
Add function declarations.
2006-06-17 Alexey Proskuryakov <ap@nypop.com>
Reviewed by ggaren.
- http://bugzilla.opendarwin.org/show_bug.cgi?id=8131
Some properties and methods of window and document objects cannot be converted to a string
Most of the properties were already fixed, this just adds adds a prototype to window.debug.
Test: fast/dom/everything-to-string.html
* bindings/js/kjs_proxy.cpp:
(WebCore::TestFunctionImp::TestFunctionImp):
(WebCore::KJSProxy::initScriptIfNeeded):
2006-06-17 David Kilzer <ddkilzer@kilzer.net>
Reviewed by Maciej.
- Fix capitalization issue for case-sensitive filesystems.
* icon/SQLStatement.cpp: Change assertions.h to Assertions.h.
2006-06-17 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Hyatt.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7395
Table not properly re-flowed when floated div removed from layout
Test: fast/block/float/table-relayout.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout): Added marking
of children that use lineWidth.
* rendering/RenderBlock.h: Added a FIXME.
2006-06-17 Rob Buis <buis@kde.org>
Reviewed by Darin.
Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6282:
Adding new Option with new Option(text, value, defaultSelected, selected) fails to update selectedIndex
Update selectedIndex when a new option is added using javascript.
* bindings/js/kjs_html.cpp:
(KJS::JSHTMLSelectCollection::put):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::setSelectedIndex):
(WebCore::HTMLSelectElement::setOption):
(WebCore::HTMLSelectElement::setLength):
* html/HTMLSelectElement.h:
2006-06-17 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Darin.
- test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9466
Assertion failure when dragging an image from the document into Safari's address bar
* manual-tests/reset-initiatedDrag.html: Added.
2006-06-16 David Kilzer <ddkilzer@kilzer.net>
Reviewed by darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9463
REGRESSION (r14879): Assertion failure in CSSParser::sinkFloatingSelector()
(m_floatingSelectors.contains(selector)) in some CSS tests
* css/CSSGrammar.y: Create CSSSelector for FUNCTION using CSSParser::createFloatingSelector()
instead of the bare constructor.
2006-06-16 David Harrison <harrison@apple.com>
Reviewed by Hatcher.
<rdar://problem/4565312> Mail has a weird drawing artifact with dotted red lines running across the window
Problem was that revision lost a check to not draw the markers
when paintingDisabled(). This led the markers to be drawn when
the window deactivated, at which time the view happens to be flipped.
It is similar but not the same as the Mail ToDo highlighting
issue, which is due to the custom highlight method
drawing when the focusView is nil. Mail team knows this
and has tested the fix.
* platform/mac/GraphicsContextMac.mm:
(WebCore::GraphicsContext::drawLineForMisspelling):
Early return if paintingDisabled().
2006-06-16 Adele Peterson <adele@apple.com>
Reviewed by Hyatt.
Adjust padding of inner div so text lines up with text fields.
Adjust height of textarea so it only leaves room for the horizontal
scrollbar if overflow is set to scroll, or if overflow is set to
auto and there's no word wrap.
These changes will be tested by current layout tests when the
new textarea implementation takes effect.
* rendering/RenderTextField.cpp:
(WebCore::RenderTextField::createDivStyle):
(WebCore::RenderTextField::calcHeight):
2006-06-16 John Sullivan <sullivan@apple.com>
Reviewed by Darin
- fixed <rdar://problem/4590062> crash in marker code with particular set of steps on daringfireball.net
* dom/Document.cpp:
(WebCore::Document::addMarker):
Store [it - markers.begin()] in a local variable before modifying markers, since modifying markers can
change value of [it - markers.begin()].
2006-06-16 Adele Peterson <adele@apple.com>
Reviewed by Alice.
Added code to draw Cocoa-like border for textareas instead of just using CSS.
* WebCore.exp:
* css/html4.css: Sets a 1px solid border.
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
* rendering/RenderThemeMac.h: Formatting changes.
* rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintTextArea):
Uses new wkDrawBezeledTextArea to draw border.
2006-06-16 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by hyatt.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9432
REGRESSION: crash in capitalization code due to empty-string generated content
Test: fast/text/capitalize-empty-generated-string.html
* rendering/RenderText.cpp:
(WebCore::RenderText::setText): Skip empty-string text renderers when
looking for the previous character.
2006-06-15 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
<http://bugzilla.opendarwin.org/show_bug.cgi?id=8637>
REGRESSION (11-16-05): Selection gaps left behind after delete
* editing/SelectionController.cpp:
(WebCore::SelectionController::nodeWillBeRemoved): Invalidate the selection so that
selection gaps are invalidated.
2006-06-15 Timothy Hatcher <timothy@apple.com>
Reviewed by Geoff and Darin.
Prefer the DWARF debugging symbols format for use in Xcode 2.3.
* WebCore.xcodeproj/project.pbxproj:
2006-06-15 Justin Garcia <justin.garcia@apple.com>
Reviewed by harrison
* editing/CompositeEditCommand.cpp:
(WebCore::hasARenderedDescendant):
(WebCore::CompositeEditCommand::prune): Ascend using the DOM
(WebCore::CompositeEditCommand::moveParagraphs): Placeholder insertion
during deletion is fixed, removing the fall back.
2006-06-15 Nicholas Shanks <contact@nickshanks.com>
Reviewed by Hyatt, landed by Joost de Valk.
Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=3233
Add support for the :lang pseudo-class.
* css/CSSGrammar.y:
* css/CSSSelector.cpp:
(WebCore::CSSSelector::operator == ):
* css/CSSSelector.h:
(WebCore::CSSSelector::CSSSelector):
* css/cssparser.cpp:
(WebCore::CSSParser::lex):
* css/cssstyleselector.cpp:
(WebCore::CSSStyleSelector::checkOneSelector):
* css/tokenizer.flex:
2006-06-15 Justin Garcia <justin.garcia@apple.com>
Reviewed by harrison
<http://bugzilla.opendarwin.org/show_bug.cgi?id=9456>
REGRESSION (417.9.2-420+): Cmd-G doesn't work in Safari after double-click and Cmd-E
* page/Frame.cpp:
(WebCore::Frame::findString): When comparing the found range with
what's currently selected a) build a selection with the found
range to remove collapsed whitespace and b) compare ranges
instead of selection objects to ignore the way that the
current selection was made (to ignore the base and extent).
2006-06-15 David Kilzer <ddkilzer@kilzer.net>
Reviewed by mjs.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9382
IDL files missing copyright/license headers
Add Apple BSD license and copyright to IDL files.
* ksvg2/bindings/idl/svg/GetSVGDocument.idl:
* ksvg2/bindings/idl/svg/SVGAElement.idl:
* ksvg2/bindings/idl/svg/SVGAnimateColorElement.idl:
* ksvg2/bindings/idl/svg/SVGAnimateElement.idl:
* ksvg2/bindings/idl/svg/SVGAnimateTransformElement.idl:
* ksvg2/bindings/idl/svg/SVGAnimatedAngle.idl:
* ksvg2/bindings/idl/svg/SVGAnimatedBoolean.idl:
* ksvg2/bindings/idl/svg/SVGAnimatedEnumeration.idl:
* ksvg2/bindings/idl/svg/SVGAnimatedInteger.idl:
* ksvg2/bindings/idl/svg/SVGAnimatedLengthList.idl:
* ksvg2/bindings/idl/svg/SVGAnimatedNumber.idl:
* ksvg2/bindings/idl/svg/SVGAnimatedNumberList.idl:
* ksvg2/bindings/idl/svg/SVGAnimatedPathData.idl:
* ksvg2/bindings/idl/svg/SVGAnimatedPoints.idl:
* ksvg2/bindings/idl/svg/SVGAnimatedPreserveAspectRatio.idl:
* ksvg2/bindings/idl/svg/SVGAnimatedRect.idl:
* ksvg2/bindings/idl/svg/SVGAnimatedString.idl:
* ksvg2/bindings/idl/svg/SVGAnimatedTransformList.idl:
* ksvg2/bindings/idl/svg/SVGAnimationElement.idl:
* ksvg2/bindings/idl/svg/SVGCircleElement.idl:
* ksvg2/bindings/idl/svg/SVGClipPathElement.idl:
* ksvg2/bindings/idl/svg/SVGComponentTransferFunctionElement.idl:
* ksvg2/bindings/idl/svg/SVGCursorElement.idl:
* ksvg2/bindings/idl/svg/SVGDOMImplementation.idl:
* ksvg2/bindings/idl/svg/SVGDefsElement.idl:
* ksvg2/bindings/idl/svg/SVGDescElement.idl:
* ksvg2/bindings/idl/svg/SVGElementInstance.idl:
* ksvg2/bindings/idl/svg/SVGElementInstanceList.idl:
* ksvg2/bindings/idl/svg/SVGEllipseElement.idl:
* ksvg2/bindings/idl/svg/SVGEvent.idl:
* ksvg2/bindings/idl/svg/SVGException.idl:
* ksvg2/bindings/idl/svg/SVGExternalResourcesRequired.idl:
* ksvg2/bindings/idl/svg/SVGFEBlendElement.idl:
* ksvg2/bindings/idl/svg/SVGFEColorMatrixElement.idl:
* ksvg2/bindings/idl/svg/SVGFEComponentTransferElement.idl:
* ksvg2/bindings/idl/svg/SVGFECompositeElement.idl:
* ksvg2/bindings/idl/svg/SVGFEFloodElement.idl:
* ksvg2/bindings/idl/svg/SVGFEFuncAElement.idl:
* ksvg2/bindings/idl/svg/SVGFEFuncBElement.idl:
* ksvg2/bindings/idl/svg/SVGFEFuncGElement.idl:
* ksvg2/bindings/idl/svg/SVGFEFuncRElement.idl:
* ksvg2/bindings/idl/svg/SVGFEGaussianBlurElement.idl:
* ksvg2/bindings/idl/svg/SVGFEImageElement.idl:
* ksvg2/bindings/idl/svg/SVGFEMergeElement.idl:
* ksvg2/bindings/idl/svg/SVGFEMergeNodeElement.idl:
* ksvg2/bindings/idl/svg/SVGFEOffsetElement.idl:
* ksvg2/bindings/idl/svg/SVGFETileElement.idl:
* ksvg2/bindings/idl/svg/SVGFETurbulenceElement.idl:
* ksvg2/bindings/idl/svg/SVGFilterElement.idl:
* ksvg2/bindings/idl/svg/SVGFilterPrimitiveStandardAttributes.idl:
* ksvg2/bindings/idl/svg/SVGFitToViewBox.idl:
* ksvg2/bindings/idl/svg/SVGGElement.idl:
* ksvg2/bindings/idl/svg/SVGGradientElement.idl:
* ksvg2/bindings/idl/svg/SVGICCColor.idl:
* ksvg2/bindings/idl/svg/SVGImageElement.idl:
* ksvg2/bindings/idl/svg/SVGLangSpace.idl:
* ksvg2/bindings/idl/svg/SVGLengthList.idl:
* ksvg2/bindings/idl/svg/SVGLineElement.idl:
* ksvg2/bindings/idl/svg/SVGLinearGradientElement.idl:
* ksvg2/bindings/idl/svg/SVGLocatable.idl:
* ksvg2/bindings/idl/svg/SVGMarkerElement.idl:
* ksvg2/bindings/idl/svg/SVGNumberList.idl:
* ksvg2/bindings/idl/svg/SVGPaint.idl:
* ksvg2/bindings/idl/svg/SVGPathElement.idl:
* ksvg2/bindings/idl/svg/SVGPathSeg.idl:
* ksvg2/bindings/idl/svg/SVGPathSegArc.idl:
* ksvg2/bindings/idl/svg/SVGPathSegClosePath.idl:
* ksvg2/bindings/idl/svg/SVGPathSegCurvetoCubic.idl:
* ksvg2/bindings/idl/svg/SVGPathSegCurvetoCubicSmooth.idl:
* ksvg2/bindings/idl/svg/SVGPathSegCurvetoQuadratic.idl:
* ksvg2/bindings/idl/svg/SVGPathSegCurvetoQuadraticSmooth.idl:
* ksvg2/bindings/idl/svg/SVGPathSegLineto.idl:
* ksvg2/bindings/idl/svg/SVGPathSegLinetoHorizontal.idl:
* ksvg2/bindings/idl/svg/SVGPathSegLinetoVertical.idl:
* ksvg2/bindings/idl/svg/SVGPathSegList.idl:
* ksvg2/bindings/idl/svg/SVGPathSegMoveto.idl:
* ksvg2/bindings/idl/svg/SVGPatternElement.idl:
* ksvg2/bindings/idl/svg/SVGPointList.idl:
* ksvg2/bindings/idl/svg/SVGPolygonElement.idl:
* ksvg2/bindings/idl/svg/SVGPolylineElement.idl:
* ksvg2/bindings/idl/svg/SVGPreserveAspectRatio.idl:
* ksvg2/bindings/idl/svg/SVGRadialGradientElement.idl:
* ksvg2/bindings/idl/svg/SVGRectElement.idl:
* ksvg2/bindings/idl/svg/SVGRenderingIntent.idl:
* ksvg2/bindings/idl/svg/SVGScriptElement.idl:
* ksvg2/bindings/idl/svg/SVGSetElement.idl:
* ksvg2/bindings/idl/svg/SVGStopElement.idl:
* ksvg2/bindings/idl/svg/SVGStringList.idl:
* ksvg2/bindings/idl/svg/SVGStylable.idl:
* ksvg2/bindings/idl/svg/SVGStyleElement.idl:
* ksvg2/bindings/idl/svg/SVGSwitchElement.idl:
* ksvg2/bindings/idl/svg/SVGSymbolElement.idl:
* ksvg2/bindings/idl/svg/SVGTSpanElement.idl:
* ksvg2/bindings/idl/svg/SVGTests.idl:
* ksvg2/bindings/idl/svg/SVGTextContentElement.idl:
* ksvg2/bindings/idl/svg/SVGTextElement.idl:
* ksvg2/bindings/idl/svg/SVGTextPositioningElement.idl:
* ksvg2/bindings/idl/svg/SVGTitleElement.idl:
* ksvg2/bindings/idl/svg/SVGTransformList.idl:
* ksvg2/bindings/idl/svg/SVGTransformable.idl:
* ksvg2/bindings/idl/svg/SVGURIReference.idl:
* ksvg2/bindings/idl/svg/SVGUnitTypes.idl:
* ksvg2/bindings/idl/svg/SVGUseElement.idl:
* ksvg2/bindings/idl/svg/SVGViewElement.idl:
* ksvg2/bindings/idl/svg/SVGZoomAndPan.idl:
* ksvg2/bindings/idl/svg/SVGZoomEvent.idl:
* ksvg2/svg/SVGAnimatedLength.idl:
2006-06-14 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
<rdar://problem/4439248>
REGRESSION(412-417): [RTL] Serious problem with RTL signatures in Mail.app in 10.4.4 (7766)
* editing/markup.cpp:
(WebCore::renderedText): Use plainText so that we'll pull rendered text but in DOM order.
2006-06-14 Levi Weintraub <lweintraub@apple.com>
Reviewed by justin
<http://bugzilla.opendarwin.org/show_bug.cgi?id=7580>
TinyMCE: Implement execCommand(formatBlock, ...)
* WebCore.xcodeproj/project.pbxproj: Added FormatBlock.{h,cpp} to the project.
* WebCore.vcproj/WebCore/WebCore.vcproj: Ditto.
* bridge/mac/WebCoreFrameBridge.h: Added WebUndoActions
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::moveParagraph): Added a preserveStyle bool.
(WebCore::CompositeEditCommand::moveParagraphs): Ditto. downstream() the start
or else we'll move collapsed whitespace and uncollapse it.
* editing/CompositeEditCommand.h:
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::initializePositionData):
(WebCore::DeleteSelectionCommand::handleSpecialCaseBRDelete): Don't update m_endingPosition
because that's removeNode's responsibility.
(WebCore::updatePositionForNodeRemoval): Added.
(WebCore::DeleteSelectionCommand::removeNode): Turned removeFullySelectedNode into a virtual
overload of removeNode so that we can update positions as we remove nodes.
(WebCore::updatePositionForTextRemoval): Added.
(WebCore::DeleteSelectionCommand::deleteTextFromNode):
(WebCore::DeleteSelectionCommand::handleGeneralDelete):
(WebCore::DeleteSelectionCommand::fixupWhitespace): Got rid of m_trailingWhitespaceValid
since m_trailingWhitespace is always valid (we update it as we remove nodes).
(WebCore::DeleteSelectionCommand::mergeParagraphs):
(WebCore::DeleteSelectionCommand::doApply): Leading and trailing spaces should
be fixed if they have collapsed before merging paragraphs.
* editing/DeleteSelectionCommand.h:
* editing/EditAction.h:
(WebCore::):
* editing/FormatBlockCommand.cpp: Added.
(WebCore::FormatBlockCommand::FormatBlockCommand):
(WebCore::FormatBlockCommand::modifyRange): Similar to InsertListCommand::modifyRange().
(WebCore::FormatBlockCommand::doApply):
* editing/FormatBlockCommand.h: Added.
(WebCore::FormatBlockCommand::editingAction):
* editing/InsertListCommand.h:
(WebCore::InsertListCommand::editingAction):
* editing/JSEditor.cpp:
* editing/MergeIdenticalElementsCommand.cpp:
(WebCore::MergeIdenticalElementsCommand::doApply):
* editing/htmlediting.cpp:
(WebCore::validBlockTag):
(WebCore::createElement):
* editing/htmlediting.h:
2006-06-14 Maciej Stachowiak <mjs@apple.com>
Reviewed by Anders.
- fixed <rdar://problem/4586051> 10.4.7 regression: 'Saved and recent' button on mapquest.com does not work
* dom/EventTargetNode.cpp:
(WebCore::EventTargetNode::dispatchWindowEvent):
2006-06-14 David Hyatt <hyatt@apple.com>
Rename RenderSlider to DeprecatedSlider, so that I can start work on
the new NSView-less slider.
Reviewed by john
* WebCore.vcproj/WebCore/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::createRenderer):
* rendering/DeprecatedSlider.cpp: Added.
(WebCore::DeprecatedSlider::DeprecatedSlider):
(WebCore::DeprecatedSlider::calcMinMaxWidth):
(WebCore::DeprecatedSlider::updateFromElement):
(WebCore::DeprecatedSlider::valueChanged):
* rendering/DeprecatedSlider.h: Added.
(WebCore::DeprecatedSlider::renderName):
* rendering/RenderSlider.cpp: Removed.
* rendering/RenderSlider.h: Removed.
2006-06-13 Geoffrey Garen <ggaren@apple.com>
Reviewed by Maciej.
- Fixed <rdar://problem/4562192> Creating a new DOMHTMLDocument
appears challenging.
- Added createHTMLDocument to Objc bindings, fixed up implementation
to comply with the DOM 2 Candidate Recommendation in which is was defined.
(It never made the final spec.) Also removed use of deprecatedString,
to avoid unnecessary killing of puppies.
* WebCore.xcodeproj/project.pbxproj:
* bindings/objc/DOM.mm:
(-[DOMImplementation createHTMLDocument:]):
* bindings/objc/DOMPrivate.h:
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocument):
(WebCore::DOMImplementation::createHTMLDocument):
2006-06-13 Alice Liu <alice.liu@apple.com>
Reviewed by Adele.
fixed <rdar://problem/4457902> HTMLSelectElement.remove() can't handle an option obj being passed to it, results in hang on http://www.ibc-solar.de/www_ibc/fst_solarmonitoring.jsp
* bindings/js/kjs_html.cpp:
(KJS::HTMLElementFunction::callAsFunction):
support this by converting the argument to an options object
before passing to remove()
2006-06-13 Darin Adler <darin@apple.com>
Reviewed by Geoff.
- fix <rdar://problem/4585333> Changing location for weather on yahoo.com home page redirects to another page
This patch fixes a bug where the event listener cache does not distinguish
HTML and non-HTML listeners. Incorrect behavior where stopPropagation also
prevented default masked a case of this bug on the yahoo.com home page until
we fixed bug 5180 on 2005-10-03.
Test: fast/events/event-listener-html-non-html-confusion.html
* bindings/js/kjs_window.h: Add additional listener maps for HTML event listeners.
* bindings/js/kjs_window.cpp:
(KJS::Window::~Window): Go through the additional maps when clearing the window object
pointer in event listeners.
(KJS::Window::getJSEventListener): Look in the HTML or non-HTML map depending on the
argument passed.
(KJS::Window::getJSUnprotectedEventListener): Ditto.
* bindings/js/kjs_events.cpp:
(KJS::JSUnprotectedEventListener::JSUnprotectedEventListener): Add to either the HTML
or non-HTML map depending on the argument passed.
(KJS::JSUnprotectedEventListener::~JSUnprotectedEventListener): Remove from either the
HTML or non-HTML map depending on whether the HTML flag is set.
(KJS::JSEventListener::JSEventListener): More of the same.
(KJS::JSEventListener::~JSEventListener): Ditto.
(KJS::JSLazyEventListener::parseCode): Same thing here. In a lazy event listener there
is not a listener at construction time, thus the code here to put the listener into a
map needs the HTML vs. non-HTML logic.
2006-06-13 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
<rdar://problem/4583892> 10.4.7 regression: Hang occurs when attempting to load search results at mapquest.com
* dom/EventTargetNode.cpp:
(WebCore::EventTargetNode::dispatchGenericEvent): Don't allow
"load" events to propagate up to the window. We need this quirk to
avoid site hangs, because they depend on an old Mozilla bug.
2006-06-13 Antti Koivisto <koivisto@iki.fi>
Reviewed by Hyatt.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9314
Relative positioned block size doesnt update root layer size
- take relative positioning into account in leftmost/rightmost/lowestPosition()
- ignore zero width/height boxes in leftmost/rightmost/lowestPosition()
- split relativePositionOffset() to x and y functions
* rendering/RenderBox.cpp:
(WebCore::RenderBox::absolutePosition):
(WebCore::RenderBox::relativePositionOffsetX):
(WebCore::RenderBox::relativePositionOffsetY):
(WebCore::RenderBox::lowestPosition):
(WebCore::RenderBox::rightmostPosition):
(WebCore::RenderBox::leftmostPosition):
* rendering/RenderBox.h:
* rendering/RenderFlow.cpp:
(WebCore::RenderFlow::lowestPosition):
(WebCore::RenderFlow::rightmostPosition):
(WebCore::RenderFlow::leftmostPosition):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPosition):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::offsetLeft):
(WebCore::RenderObject::offsetTop):
2006-06-13 Anders Carlsson <acarlsson@apple.com>
Reviewed by Dave Hyatt.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9427
xml-stylesheet processing instructions outside of the prolog should have no effect.
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::checkStyleSheet):
Remove todo comment.
* dom/xml_tokenizer.cpp:
(WebCore::XMLTokenizer::processingInstruction):
Only check for style sheet if the root element hasn't yet been encountered.
2006-06-13 Anders Carlsson <acarlsson@apple.com>
Reviewed by Geoff.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9406
REGRESSION: fix for bug 9390 broke two layout tests
* loader/PluginDocument.cpp:
(WebCore::PluginTokenizer::writeRawData):
Call finished() after setting up the document structure so we'll emit onload events.
2006-06-12 Geoffrey Garen <ggaren@apple.com>
build fix -- forgot to svn add this file
* ForwardingHeaders/kjs/SavedBuiltins.h: Added.
2006-06-12 Brady Eidson <beidson@apple.com>
Reviewed by Maciej.
Fixed a bug in append(char) and append(UChar) where our intended copy-on-write semantics was ignored!
* platform/String.cpp:
(WebCore::String::append):
2006-06-12 Geoffrey Garen <ggaren@apple.com>
Reviewed by TimO, Maciej.
- WebCore part of merging InterpreterImp into Interpreter. No test
because there's no behavior change.
A substantive change here is that ScriptInterpreter::mark must now chain to
Interpreter::mark, since Interpreter needs to mark the things that
InterpreterImp used to mark.
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/kjs_binding.cpp:
* bindings/js/kjs_window.cpp:
(KJS::Window::put):
* bridge/mac/WebCoreFrameBridge.mm:
* bridge/mac/WebCoreScriptDebugger.mm:
(-[WebCoreScriptCallFrame evaluateWebScript:]):
* kwq/KWQPageState.mm:
2006-06-12 Brady Eidson <beidson@apple.com>
Reviewed by Maciej.
Changed String::ascii() to return a Vector<char> instead of const char*
This allows us to use it "regularly" as the returned vector will destruct
and not leak memory like the previous approach.
We can now do a String.ascii().data() to get a char* buffer instead of
String.deprecatedString().ascii(). It doesn't improve the style much but
dumping the memory-leak issue is a plus.
* icon/IconDatabase.cpp:
(WebCore::IconDatabase::open):
(WebCore::IconDatabase::clearDatabase):
* icon/SQLDatabase.cpp:
(SQLDatabase::open):
* icon/SQLStatement.cpp:
(WebCore::SQLStatement::prepare):
(WebCore::SQLStatement::step):
(WebCore::SQLStatement::returnTextResults):
(WebCore::SQLStatement::returnTextResults16):
(WebCore::SQLStatement::returnIntResults):
(WebCore::SQLStatement::returnInt64Results):
(WebCore::SQLStatement::returnDoubleResults):
In addition to the changes to the string classes, changed my database code over to the new
preferred method.
* platform/PlatformString.h:
* platform/String.cpp:
(WebCore::String::ascii):
* platform/StringImpl.cpp:
(WebCore::StringImpl::ascii):
* platform/StringImpl.h:
2006-06-12 Dave Hyatt <hyatt@apple.com>
Add the notion of a selection foreground color to the engine for
Win32. Rename existing selectionColor methods to be
selectionBackgroundColor instead.
Change the 60% alpha blend rule for transparent selection to
instead be a range from 60-80%, with less transparency being
used as needed to ensure the transformed color more closely
approximates the original operating system color when blended
with a white background.
Reviewed by mjs
* platform/Color.cpp:
(WebCore::blend):
(WebCore::Color::blendWithWhite):
* platform/Color.h:
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::paintSelection):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::fillHorizontalSelectionGap):
(WebCore::RenderBlock::fillVerticalSelectionGap):
(WebCore::RenderBlock::fillLeftSelectionGap):
(WebCore::RenderBlock::fillRightSelectionGap):
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::paint):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paint):
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::paint):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::selectionBackgroundColor):
(WebCore::RenderObject::selectionForegroundColor):
* rendering/RenderObject.h:
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::activeSelectionBackgroundColor):
(WebCore::RenderTheme::inactiveSelectionBackgroundColor):
(WebCore::RenderTheme::platformActiveSelectionBackgroundColor):
(WebCore::RenderTheme::platformInactiveSelectionBackgroundColor):
(WebCore::RenderTheme::platformActiveSelectionForegroundColor):
(WebCore::RenderTheme::platformInactiveSelectionForegroundColor):
* rendering/RenderTheme.h:
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::platformActiveSelectionBackgroundColor):
(WebCore::RenderThemeMac::platformInactiveSelectionBackgroundColor):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::platformActiveSelectionBackgroundColor):
(WebCore::RenderThemeWin::platformInactiveSelectionBackgroundColor):
(WebCore::RenderThemeWin::platformActiveSelectionForegroundColor):
(WebCore::RenderThemeWin::platformInactiveSelectionForegroundColor):
* rendering/RenderThemeWin.h:
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::paint):
2006-06-12 John Sullivan <sullivan@apple.com>
Reviewed by Darin Adler.
* page/Frame.cpp:
(WebCore::Frame::markAllMatchesForText):
Do a "fake" paint here so that the rectangles for the text matches will have been
computed by the time this method returns.
2006-06-12 Brady Eidson <beidson@apple.com>
Reviewed by Levi and Tim Omernick.
-Added a skeleton sqlite3 icon database file to IconDatabase
-Added functionality to validate and recreate this icon.db file
-Fixed some buggys in SQLDatabase.cpp
* icon/IconDatabase.cpp:
(WebCore::IconDatabase::open):
(WebCore::IconDatabase::isValidDatabase):
(WebCore::IconDatabase::clearDatabase):
(WebCore::IconDatabase::recreateDatabase):
* icon/IconDatabase.h:
* icon/SQLStatement.cpp:
(WebCore::SQLStatement::columnCount):
(WebCore::SQLStatement::getColumnName):
(WebCore::SQLStatement::getColumnName16):
(WebCore::SQLStatement::getColumnText):
(WebCore::SQLStatement::getColumnText16):
(WebCore::SQLStatement::getColumnDouble):
(WebCore::SQLStatement::getColumnInt):
(WebCore::SQLStatement::getColumnInt64):
(WebCore::SQLStatement::getColumnBlob):
-Added checks to make sure we had a valid working sqlite3_statement as the sqlite3_*
function calls weren't as error-tolerant as documentation advertised
(maybe differences between the 3.3 docs I looked at and the 3.1.3 version installed on OSX)
2006-06-12 Brady Eidson <beidson@apple.com>
Reviewed by Levi.
-Added SQLite helper wrappers to ease use of SQLite in the IconDatabase.
-Changed the base IconDatabase over to this new framework.
* WebCore.xcodeproj/project.pbxproj:
* bridge/mac/WebCoreIconDatabaseBridge.mm:
(-[WebCoreIconDatabaseBridge closeSharedDatabase]):
-By popular request, removed an annoying log message I'd accidentally left in
* icon/IconDatabase.cpp:
(WebCore::IconDatabase::IconDatabase):
(WebCore::IconDatabase::open):
(WebCore::IconDatabase::close):
(WebCore::IconDatabase::~IconDatabase):
* icon/IconDatabase.h:
(WebCore::IconDatabase::isOpen):
-Changed over IconDatabase from direct sqlite3_* calls to the new SQLDatabase calls
* icon/SQLDatabase.cpp: Added.
(SQLDatabase::SQLDatabase):
(SQLDatabase::open):
(SQLDatabase::close):
(SQLDatabase::executeCommand):
(SQLDatabase::tableExists):
* icon/SQLDatabase.h: Added.
(WebCore::SQLDatabase::isOpen):
(WebCore::SQLDatabase::getPath):
(WebCore::SQLDatabase::lastError):
(WebCore::SQLDatabase::lastErrorMsg):
(WebCore::SQLStatement::isPrepared):
(WebCore::SQLStatement::lastError):
(WebCore::SQLStatement::lastErrorMsg):
* icon/SQLStatement.cpp: Added.
(WebCore::SQLStatement::SQLStatement):
(WebCore::SQLStatement::~SQLStatement):
(WebCore::SQLStatement::prepare):
(WebCore::SQLStatement::step):
(WebCore::SQLStatement::finalize):
(WebCore::SQLStatement::reset):
(WebCore::SQLStatement::executeCommand):
(WebCore::SQLStatement::bindBlob):
(WebCore::SQLStatement::bindText):
(WebCore::SQLStatement::columnCount):
(WebCore::SQLStatement::getColumnName):
(WebCore::SQLStatement::getColumnName16):
(WebCore::SQLStatement::getColumnText):
(WebCore::SQLStatement::getColumnText16):
(WebCore::SQLStatement::getColumnDouble):
(WebCore::SQLStatement::getColumnInt):
(WebCore::SQLStatement::getColumnInt64):
(WebCore::SQLStatement::getColumnBlob):
(WebCore::SQLStatement::returnTextResults):
(WebCore::SQLStatement::returnTextResults16):
(WebCore::SQLStatement::returnIntResults):
(WebCore::SQLStatement::returnInt64Results):
(WebCore::SQLStatement::returnDoubleResults):
-Initial checking of SQLDatabase framework
* platform/PlatformString.h:
* platform/String.cpp:
(WebCore::String::String):
-Added an explicit UChar* constructor to our string class as much of sqlite3's UTF16 handling is based on
null-terminated UTF16 which we didn't yet support.
2006-06-11 David Kilzer <ddkilzer@kilzer.net>
Reviewed by Maciej.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9408
Clean build fails with "make: *** No rule to make target `SVGElementFactory.cpp', needed by `all'. Stop"
* DerivedSources.make: Fix clean builds.
2006-06-11 Darin Adler <darin@apple.com>
- another try at fixing Windows
* loader/CachedResource.h:
* platform/cairo/GraphicsContextCairo.cpp:
* platform/image-decoders/ImageDecoder.h:
(WebCore::ImageDecoder::setData):
* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoderPrivate::decode):
(WebCore::GIFImageDecoder::setData):
* platform/image-decoders/gif/GIFImageDecoder.h:
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::JPEGImageReader::decode):
(WebCore::JPEGImageDecoder::setData):
* platform/image-decoders/jpeg/JPEGImageDecoder.h:
* platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore::PNGImageReader::decode):
(WebCore::PNGImageDecoder::setData):
* platform/image-decoders/png/PNGImageDecoder.h:
s/DeprecatedByteArray/Vector<char>/
2006-06-11 Darin Adler <darin@apple.com>
- try to fix Windows build
* platform/cairo/ImageCairo.cpp: (WebCore::Image::loadResource):
Use Vector<char> instead of DeprecatedByteArray.
* platform/win/TemporaryLinkStubs.cpp: (KWQServeSynchronousRequest):
Don't try to return 0 from a function that returns a Vector<char>.
2006-06-11 Sam Weinig <sam.weinig@gmail.com>
Reviewed by Hyatt, tweaked quite a bit and landed by Darin.
- Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8039
Remove use of DeprecatedArray in favor of new Vector class
This removes most of the uses of DeprecatedArray and
DeprecatedByteArray, with the exception of DeprecatedCString.
No test cases added because there is no change in
functionality.
* loader/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::data):
* loader/CachedCSSStyleSheet.h:
* loader/CachedImage.cpp:
(WebCore::CachedImage::bufferData):
(WebCore::CachedImage::data):
(WebCore::CachedImage::checkNotify):
(WebCore::CachedImage::shouldStopAnimation):
* loader/CachedImage.h:
* loader/CachedObject.cpp:
(WebCore::CachedObject::bufferData):
(WebCore::CachedObject::setExpireDate):
* loader/CachedObject.h:
(WebCore::CachedObject::setCharset):
* loader/CachedScript.cpp:
(WebCore::CachedScript::data):
* loader/CachedScript.h:
* loader/CachedXBLDocument.cpp:
(WebCore::CachedXBLDocument::data):
(WebCore::CachedXBLDocument::checkNotify):
* loader/CachedXBLDocument.h:
* loader/CachedXSLStyleSheet.cpp:
(WebCore::CachedXSLStyleSheet::data):
* loader/CachedXSLStyleSheet.h:
* loader/Request.cpp:
(WebCore::Request::Request):
(WebCore::Request::~Request):
* loader/Request.h:
(WebCore::Request::buffer):
(WebCore::Request::cachedObject):
(WebCore::Request::docLoader):
(WebCore::Request::isIncremental):
(WebCore::Request::setIsIncremental):
(WebCore::Request::isMultipart):
(WebCore::Request::setIsMultipart):
* loader/loader.cpp:
(WebCore::crossDomain):
(WebCore::Loader::Loader):
(WebCore::Loader::load):
(WebCore::Loader::servePendingRequests):
(WebCore::Loader::receivedAllData):
(WebCore::Loader::receivedResponse):
(WebCore::Loader::receivedData):
(WebCore::Loader::numRequests):
(WebCore::Loader::cancelRequests):
(WebCore::Loader::removeBackgroundDecodingRequest):
(WebCore::Loader::jobForRequest):
* platform/Image.cpp:
(WebCore::Image::setData):
* platform/Image.h:
(WebCore::Image::dataBuffer):
* css/cssstyleselector.cpp:
(WebCore::CSSStyleSelector::init):
(WebCore::CSSStyleSelector::matchRules):
(WebCore::CSSStyleSelector::matchRulesForList):
(WebCore::CSSStyleSelector::sortMatchedRules):
(WebCore::CSSStyleSelector::initForStyleResolve):
(WebCore::CSSStyleSelector::createStyleForElement):
(WebCore::CSSStyleSelector::createPseudoStyleForElement):
* css/cssstyleselector.h:
(WebCore::CSSStyleSelector::addMatchedRule):
(WebCore::CSSStyleSelector::addMatchedDeclaration):
* dom/xml_tokenizer.cpp:
(WebCore::OffsetBuffer::OffsetBuffer):
(WebCore::openFunc):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::index):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::selectedIndex):
(WebCore::HTMLSelectElement::setSelectedIndex):
(WebCore::HTMLSelectElement::length):
(WebCore::HTMLSelectElement::remove):
(WebCore::HTMLSelectElement::value):
(WebCore::HTMLSelectElement::setValue):
(WebCore::HTMLSelectElement::state):
(WebCore::HTMLSelectElement::restoreState):
(WebCore::HTMLSelectElement::appendFormData):
(WebCore::HTMLSelectElement::optionToListIndex):
(WebCore::HTMLSelectElement::listToOptionIndex):
(WebCore::HTMLSelectElement::recalcListItems):
(WebCore::HTMLSelectElement::reset):
(WebCore::HTMLSelectElement::notifyOptionSelected):
* html/HTMLSelectElement.h:
(WebCore::HTMLSelectElement::listItems):
* kwq/KWQLoader.h:
* kwq/KWQLoader.mm:
(KWQServeSynchronousRequest):
* kwq/KWQTextStream.cpp:
(QTextStream::operator<<):
* kwq/KWQTextStream.h:
* loader/FormData.cpp:
(WebCore::FormData::flatten):
(WebCore::FormData::flattenToString):
* loader/FormData.h:
(WebCore::FormDataElement::FormDataElement):
* platform/DeprecatedString.cpp:
* platform/DeprecatedString.h:
* platform/IntPointArray.cpp: Removed.
* platform/IntPointArray.h: Removed.
* platform/TextEncoding.cpp:
(WebCore::TextEncoding::toUnicode):
* platform/TextEncoding.h:
* platform/cairo/pixman/src/pixregion.c:
* platform/cg/PathCG.cpp:
(WebCore::Path::Path):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::drawBorder):
* rendering/RenderTable.h:
(WebCore::RenderTable::colToEffCol):
(WebCore::RenderTable::effColToCol):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::ensureRows):
(WebCore::RenderTableSection::addCell):
(WebCore::RenderTableSection::setCellWidths):
* rendering/RenderTableSection.h:
* rendering/bidi.cpp:
(WebCore::addMidpoint):
(WebCore::RenderBlock::layoutInlineChildren):
* rendering/render_form.cpp:
(WebCore::RenderSelect::updateFromElement):
(WebCore::RenderSelect::layout):
(WebCore::RenderSelect::valueChanged):
(WebCore::RenderSelect::selectionChanged):
(WebCore::RenderSelect::updateSelection):
* rendering/table_layout.cpp:
(WebCore::FixedTableLayout::layout):
* rendering/table_layout.h:
* xml/XSLTProcessor.cpp:
(WebCore::docLoaderFunc):
* xml/xmlhttprequest.cpp:
(WebCore::XMLHttpRequest::send):
(WebCore::XMLHttpRequest::processSyncLoadResults):
* xml/xmlhttprequest.h:
2006-06-11 David Kilzer <ddkilzer@kilzer.net>
Reviewed by darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9394
Fix no-SVG build
* DerivedSources.make: Removed tabs. Create empty SVGElementFactory.cpp on no-svg build.
* ksvg2/bindings/js/JSSVGElementWrapperFactory.cpp: Added #if SVG_SUPPORT/#endif.
* ksvg2/bindings/js/JSSVGElementWrapperFactory.h: Ditto.
* ksvg2/bindings/idl/svg/SVGAElement.idl: Add "Conditional=SVG" to all interfaces.
* ksvg2/bindings/idl/svg/SVGAnimateColorElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGAnimateElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGAnimateTransformElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGAnimatedAngle.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGAnimatedBoolean.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGAnimatedEnumeration.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGAnimatedInteger.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGAnimatedLengthList.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGAnimatedNumber.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGAnimatedNumberList.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGAnimatedPathData.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGAnimatedPoints.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGAnimatedPreserveAspectRatio.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGAnimatedRect.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGAnimatedString.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGAnimatedTransformList.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGAnimationElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGCircleElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGClipPathElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGComponentTransferFunctionElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGCursorElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGDOMImplementation.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGDefsElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGDescElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGElementInstance.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGElementInstanceList.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGEllipseElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGEvent.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGException.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGExternalResourcesRequired.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGFEBlendElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGFEColorMatrixElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGFEComponentTransferElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGFECompositeElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGFEFloodElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGFEFuncAElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGFEFuncBElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGFEFuncGElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGFEFuncRElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGFEGaussianBlurElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGFEImageElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGFEMergeElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGFEMergeNodeElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGFEOffsetElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGFETileElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGFETurbulenceElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGFilterElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGFilterPrimitiveStandardAttributes.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGFitToViewBox.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGGElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGGradientElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGICCColor.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGImageElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGLangSpace.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGLengthList.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGLineElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGLinearGradientElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGLocatable.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGMarkerElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGNumberList.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGPaint.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGPathElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGPathSeg.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGPathSegArc.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGPathSegClosePath.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGPathSegCurvetoCubic.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGPathSegCurvetoCubicSmooth.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGPathSegCurvetoQuadratic.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGPathSegCurvetoQuadraticSmooth.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGPathSegLineto.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGPathSegLinetoHorizontal.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGPathSegLinetoVertical.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGPathSegList.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGPathSegMoveto.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGPatternElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGPointList.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGPolygonElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGPolylineElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGPreserveAspectRatio.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGRadialGradientElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGRectElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGRenderingIntent.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGScriptElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGSetElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGStopElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGStringList.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGStylable.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGStyleElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGSwitchElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGSymbolElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGTSpanElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGTests.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGTextContentElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGTextElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGTextPositioningElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGTitleElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGTransformList.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGTransformable.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGURIReference.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGUnitTypes.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGUseElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGViewElement.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGZoomAndPan.idl: Ditto.
* ksvg2/bindings/idl/svg/SVGZoomEvent.idl: Ditto.
* ksvg2/svg/SVGAngle.idl: Ditto.
* ksvg2/svg/SVGAnimatedLength.idl: Ditto.
* ksvg2/svg/SVGColor.idl: Ditto.
* ksvg2/svg/SVGDocument.idl: Ditto.
* ksvg2/svg/SVGElement.idl: Ditto.
* ksvg2/svg/SVGEvent.idl: Ditto.
* ksvg2/svg/SVGLength.idl: Ditto.
* ksvg2/svg/SVGMatrix.idl: Ditto.
* ksvg2/svg/SVGNumber.idl: Ditto.
* ksvg2/svg/SVGPoint.idl: Ditto.
* ksvg2/svg/SVGRect.idl: Ditto.
* ksvg2/svg/SVGSVGElement.idl: Ditto.
* ksvg2/svg/SVGTransform.idl: Ditto.
2006-06-11 Anders Carlsson <acarlsson@apple.com>
Reviewed by Geoff.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9390
Move full-frame plugins to WebCore
* WebCore.vcproj/WebCore/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
Add PluginDocument
* bridge/mac/FrameMac.h:
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::redirectDataToPlugin):
Call the bridge.
* bridge/mac/WebCoreFrameBridge.h:
* bridge/mac/WebCoreFrameBridge.mm:
Add redirectDataToPlugin which is used to redirect incoming data
to a plugin.
* bridge/mac/WebCoreViewFactory.h:
Add pluginSupportsMIMEType which returns whether any plugins support a given MIME type.
* dom/DOMImplementation.cpp:
* dom/DOMImplementation.h:
Get rid of createTextDocument and just create a text document explicitly when needed.
* dom/Document.h:
(WebCore::Document::isPluginDocument):
* loader/PluginDocument.cpp: Added.
(WebCore::PluginTokenizer::PluginTokenizer):
(WebCore::PluginTokenizer::wantsRawData):
(WebCore::PluginTokenizer::write):
(WebCore::PluginTokenizer::createDocumentStructure):
(WebCore::PluginTokenizer::writeRawData):
(WebCore::PluginTokenizer::stopParsing):
(WebCore::PluginTokenizer::finish):
(WebCore::PluginTokenizer::isWaitingForScripts):
(WebCore::PluginDocument::PluginDocument):
(WebCore::PluginDocument::createTokenizer):
* loader/PluginDocument.h: Added.
(WebCore::PluginDocument::isPluginDocument):
Add PluginDocument.
* page/Frame.cpp:
(WebCore::Frame::begin):
Possibly create a plugin document.
* page/Frame.h:
(WebCore::Frame::redirectDataToPlugin):
Add declaration.
* platform/PlugInInfoStore.h:
* platform/mac/PlugInInfoStoreMac.mm:
(WebCore::PlugInInfoStore::supportsMIMEType):
Ask WebCoreViewFactory if the MIME type is supported.
2006-06-10 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by hyatt.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9334
Incomplete repaint when changing block from non-positioned to positioned
Test: fast/repaint/static-to-positioned.html
* rendering/RenderObject.cpp:
(WebCore::RenderObject::setStyle): If changing from static to positioned, repaint
as static.
2006-06-10 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by hyatt.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9193
REGRESSION: setting an opacity on an element with an outline causes the outline to disappear completely
Test: fast/layers/opacity-outline.html
- fix repainting of layer children's outlines that extend beyond the layer
Test: fast/repaint/layer-child-outline.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::intersectsDamageRect): Account for outlines.
(WebCore::RenderLayer::absoluteBoundingBox): Ditto.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::maximalOutlineSize): Changed to return the view's maximal
outline size rather than 0 for PaintPhaseChildOutlines.
2006-06-10 Steve Falkenburg <sfalken@apple.com>
Fix build break
* platform/cairo/GraphicsContextCairo.cpp:
* platform/win/TemporaryLinkStubs.cpp:
(GraphicsContext::scale):
2006-06-10 Geoffrey Garen <ggaren@apple.com>
- http://bugzilla.opendarwin.org/show_bug.cgi?id=8515
Linux porting compile bug
Fix by Mike Emmel, Reviewed by Darin.
* Projects/gdk/webcore-gdk.bkl:
* WebCoreSources.bkl:
* css/maketokenizer:
* html/HTMLCanvasElement.cpp:
* html/HTMLImageElement.h:
* icon/IconDatabase.cpp:
* make-generated-sources.sh:
* page/Frame.h:
* page/FramePrivate.h:
* platform/Cursor.h:
* platform/FontData.h:
(WebCore::FontData::getGlyphIndex):
* platform/GlyphBuffer.h:
(WebCore::GlyphBuffer::glyphAt):
(WebCore::GlyphBuffer::advanceAt):
(WebCore::GlyphBuffer::add):
* platform/GraphicsContext.h:
* platform/PlatformKeyboardEvent.h:
* platform/PlatformMouseEvent.h:
* platform/PlatformWheelEvent.h:
* platform/ScrollView.h:
* platform/TransferJob.h:
(WebCore::TransferJob::getInternal):
* platform/TransferJobInternal.h:
(WebCore::TransferJobInternal::TransferJobInternal):
* platform/Widget.h:
* platform/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::GraphicsContext):
(WebCore::GraphicsContext::roundToDevicePixels):
* webcore-base.bkl:
* xpath/impl/XPathValue.cpp:
2006-06-09 John Sullivan <sullivan@apple.com>
Reviewed by Tim Omernick and Dave Hyatt.
WebCore support for computing but not highlighting rects for text matches.
* dom/Document.h:
added setRenderedRectForMarker() and renderedRectsForMarkers(), and redefined
MarkerMap to be a hashtable of node -> (pair of vectors), one vector of markers
and one vector of rects
* dom/Document.cpp:
(placeholderRectForMarker()):
new function, returns a recognizable degenerate rect used until a real rect has been set
(WebCore::Document::addMarker):
Reworked for new MarkerMap data structure; now adds parallel placeholder rect
along with marker
(WebCore::Document::copyMarkers):
Reworked for new MarkerMap data structure
(WebCore::Document::removeMarkers):
Reworked for new MarkerMap data structure; now removed corresponding rect along
with marker
(WebCore::Document::markersForNode):
Reworked for new MarkerMap data structure
(WebCore::Document::renderedRectsForMarkers):
New method, returns an array of all non-placeholder rects for the given marker type
(WebCore::Document::repaintMarkers):
Reworked for new MarkerMap data structure
(WebCore::Document::setRenderedRectForMarker):
New method, sets the rendered rect for a given marker
(WebCore::Document::shiftMarkers):
Reworked for new MarkerMap data structure; resets rendered rects to placeholders.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
removed markedTextMatchesAreHighlighted guard; we always want to call paintTextMatchMarker
now, but sometimes we will end up only computing the rect, not actually highlighting it.
(Maybe some names should be improved here?)
(WebCore::InlineTextBox::paintTextMatchMarker):
Reorganized to move all the code that actually draws into a block that's guarded by
markedTextMatchesAreHighlighted. The rest of the code computes where the highlight will
go, and now we always use that computation in order to call setRenderedRectForMarker.
* bridge/mac/WebCoreFrameBridge.h:
* bridge/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge rectsForTextMatches]):
New method, returns an array of NSValues representing NSRects. Gets them
from Document::renderedRectsForMarkers
2006-06-10 Anders Carlsson <acarlsson@apple.com>
Reviewed by Eric.
* bindings/js/kjs_html.cpp:
(KJS::JSHTMLElement::put):
Call WebCore::JSHTMLElement::put so that autogenerated setters will work
for HTMLElement.
2006-06-09 Geoffrey Garen <ggaren@apple.com>
- Build fix after last JSC check-in (oops!)
* bridge/mac/WebCoreScriptDebugger.mm:
(-[WebCoreScriptCallFrame scopeChain]):
(-[WebCoreScriptCallFrame functionName]):
(-[WebCoreScriptCallFrame evaluateWebScript:]):
2006-06-09 David Hyatt <hyatt@apple.com>
Rename m_isFocused on the frame to m_isActive, since it isn't really
about focus but is instead about whether or not the top-level window is
active.
Pull code that was incorrectly factored into Mac-only code out of FrameMac
and back up into Frame.
Reviewed by andersca
* bridge/mac/FrameMac.h:
* bridge/mac/FrameMac.mm:
* page/Frame.cpp:
(WebCore::Frame::setFocusNodeIfNeeded):
(WebCore::Frame::isActive):
(WebCore::Frame::setIsActive):
* page/FramePrivate.h:
(WebCore::FramePrivate::FramePrivate):
2006-06-09 David Hyatt <hyatt@apple.com>
Rework selection coloring. Rename displaysWithFocusAttributes
to isActive. Move the white-blending code onto the Color API to make
it more convenient to mutate colors for selection blending. Eliminate all
the selection state from the GraphicsContext and move it to the RenderTheme.
Implement both Win32 and Mac theme selection colors.
Reviewed by sfalken
* bridge/mac/FrameMac.h:
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::setIsActive):
* bridge/mac/WebCoreFrameBridge.h:
* bridge/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge drawRect:]):
(-[WebCoreFrameBridge setIsActive:]):
(-[WebCoreFrameBridge selectionColor]):
* css/cssstyleselector.cpp:
(WebCore::CSSStyleSelector::checkOneSelector):
* page/Frame.cpp:
(WebCore::Frame::isActive):
(WebCore::Frame::setIsActive):
* page/Frame.h:
* platform/Color.cpp:
(WebCore::blend):
(WebCore::Color::blendWithWhite):
* platform/Color.h:
(WebCore::Color::hasAlpha):
* platform/GraphicsContext.cpp:
(WebCore::GraphicsContextPrivate::GraphicsContextPrivate):
* platform/GraphicsContext.h:
* platform/mac/GraphicsContextMac.mm:
* platform/win/TemporaryLinkStubs.cpp:
(GraphicsContext::endTransparencyLayer):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintSelection):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::fillHorizontalSelectionGap):
(WebCore::RenderBlock::fillVerticalSelectionGap):
(WebCore::RenderBlock::fillLeftSelectionGap):
(WebCore::RenderBlock::fillRightSelectionGap):
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::paint):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paint):
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::paint):
* rendering/RenderListMarker.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::selectionColor):
* rendering/RenderObject.h:
* rendering/RenderReplaced.cpp:
* rendering/RenderReplaced.h:
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::activeSelectionColor):
(WebCore::RenderTheme::inactiveSelectionColor):
(WebCore::RenderTheme::platformActiveSelectionColor):
(WebCore::RenderTheme::platformInactiveSelectionColor):
* rendering/RenderTheme.h:
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::platformActiveSelectionColor):
(WebCore::RenderThemeMac::platformInactiveSelectionColor):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::platformActiveSelectionColor):
(WebCore::RenderThemeWin::platformInactiveSelectionColor):
* rendering/RenderThemeWin.h:
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::paint):
2006-06-09 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
<rdar://problem/4549980>
REGRESSION: "Find Again" can get stuck when searching for string with a trailing space
* bridge/mac/FrameMac.h: Moved findString to Frame.
* bridge/mac/FrameMac.mm: Ditto.
* bridge/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge searchFor:direction:caseSensitive:wrap:]):
Convert the NSString to a String.
* editing/JSEditor.cpp: Added execCommand(FindString, ...)
* editing/Selection.cpp: Added a constructor for Ranges
(WebCore::Selection::Selection):
* editing/Selection.h:
* page/Frame.cpp:
(WebCore::Frame::findString): Moved from FrameMac. Compare a selection created
using the found range with the current selection in case the current selection is
the found range minus some collapsed whitespace on the edges.
* page/Frame.h:
2006-06-09 Steve Falkenburg <sfalken@apple.com>
Fix build break
* WebCore.vcproj/WebCore/WebCore.vcproj:
* css/MediaQueryEvaluator.cpp:
* platform/win/TemporaryLinkStubs.cpp:
(GraphicsContext::addRoundedRectClip):
(GraphicsContext::addInnerRoundedRectClip):
(WebCore::screenDepthPerComponent):
(WebCore::screenIsMonochrome):
2006-06-09 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
Reviewed by Hyatt. Tweaked by Maciej. Tweaks reviewed by Beth.
Landed by Beth.
CSS3 Media Queries implementation.
<http://bugzilla.opendarwin.org/show_bug.cgi?id=4127>
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/kjs_css.cpp:
(KJS::DOMMediaList::put):
(KJS::KJS::DOMMediaListProtoFunc::callAsFunction):
* bindings/objc/DOMCSS.mm:
(-[DOMMediaList setMediaText:]):
(-[DOMMediaList deleteMedium:]):
(-[DOMMediaList appendMedium:]):
* css/CSSGrammar.y:
* css/MediaFeatureNames.cpp: Added.
(WebCore::MediaFeatureNames::init):
* css/MediaFeatureNames.h: Added.
* css/MediaList.cpp:
(WebCore::MediaList::MediaList):
(WebCore::MediaList::~MediaList):
(WebCore::parseMediaDescriptor):
(WebCore::MediaList::deleteMedium):
(WebCore::MediaList::mediaText):
(WebCore::MediaList::setMediaText):
(WebCore::MediaList::item):
(WebCore::MediaList::appendMedium):
(WebCore::MediaList::appendMediaQuery):
* css/MediaList.h:
(WebCore::MediaList::MediaList):
(WebCore::MediaList::length):
(WebCore::MediaList::mediaQueries):
* css/MediaQuery.cpp: Added.
(WebCore::MediaQuery::MediaQuery):
(WebCore::MediaQuery::~MediaQuery):
(WebCore::MediaQuery::operator==):
(WebCore::MediaQuery::cssText):
* css/MediaQuery.h: Added.
(WebCore::MediaQuery::):
(WebCore::MediaQuery::restrictor):
(WebCore::MediaQuery::expressions):
(WebCore::MediaQuery::mediaType):
(WebCore::MediaQuery::append):
* css/MediaQueryEvaluator.cpp: Added.
(WebCore::):
(WebCore::MediaQueryEvaluator):
(WebCore::MediaQueryEvaluator::~MediaQueryEvaluator):
(WebCore::MediaQueryEvaluator::mediaTypeMatch):
(WebCore::applyRestrictor):
(WebCore::MediaQueryEvaluator::eval):
(WebCore::parseAspectRatio):
(WebCore::cmpvalue):
(WebCore::numberValue):
(WebCore::colorMediaFeatureEval):
(WebCore::monochromeMediaFeatureEval):
(WebCore::device_aspect_ratioMediaFeatureEval):
(WebCore::gridMediaFeatureEval):
(WebCore::device_heightMediaFeatureEval):
(WebCore::device_widthMediaFeatureEval):
(WebCore::heightMediaFeatureEval):
(WebCore::widthMediaFeatureEval):
(WebCore::min_colorMediaFeatureEval):
(WebCore::max_colorMediaFeatureEval):
(WebCore::min_monochromeMediaFeatureEval):
(WebCore::max_monochromeMediaFeatureEval):
(WebCore::min_device_aspect_ratioMediaFeatureEval):
(WebCore::max_device_aspect_ratioMediaFeatureEval):
(WebCore::min_heightMediaFeatureEval):
(WebCore::max_heightMediaFeatureEval):
(WebCore::min_widthMediaFeatureEval):
(WebCore::max_widthMediaFeatureEval):
(WebCore::min_device_heightMediaFeatureEval):
(WebCore::max_device_heightMediaFeatureEval):
(WebCore::min_device_widthMediaFeatureEval):
(WebCore::max_device_widthMediaFeatureEval):
(WebCore::createFunctionMap):
* css/MediaQueryEvaluator.h: Added.
* css/MediaQueryExp.cpp: Added.
(WebCore::MediaQueryExp::MediaQueryExp):
(WebCore::MediaQueryExp::~MediaQueryExp):
* css/MediaQueryExp.h: Added.
(WebCore::MediaQueryExp::mediaFeature):
(WebCore::MediaQueryExp::value):
(WebCore::MediaQueryExp::operator==):
* css/StyleSheet.cpp:
(WebCore::StyleSheet::setMedia):
* css/cssparser.cpp:
(WebCore::CSSParser::CSSParser):
(WebCore::CSSParser::~CSSParser):
(WebCore::CSSParser::setupParser):
(WebCore::CSSParser::parseMediaQuery):
(WebCore::CSSParser::createFloatingMediaQueryExp):
(WebCore::CSSParser::sinkFloatingMediaQueryExp):
(WebCore::CSSParser::createFloatingMediaQueryExpList):
(WebCore::CSSParser::sinkFloatingMediaQueryExpList):
(WebCore::CSSParser::createFloatingMediaQuery):
(WebCore::CSSParser::sinkFloatingMediaQuery):
* css/cssparser.h:
* css/cssstyleselector.cpp:
(WebCore::CSSStyleSelector::CSSStyleSelector):
(WebCore::CSSStyleSelector::init):
(WebCore::CSSStyleSelector::~CSSStyleSelector):
(WebCore::CSSStyleSelector::loadDefaultStyle):
(WebCore::CSSStyleSelector::matchUARules):
(WebCore::CSSStyleSelector::styleForElement):
(WebCore::CSSStyleSelector::pseudoStyleForElement):
(WebCore::CSSStyleSelector::updateFont):
(WebCore::CSSStyleSelector::cacheBorderAndBackground):
(WebCore::CSSStyleSelector::styleRulesForElement):
(WebCore::CSSRuleSet::addRulesFromSheet):
* css/cssstyleselector.h:
* css/maketokenizer:
* css/tokenizer.flex:
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createCSSStyleSheet):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::process):
(WebCore::HTMLLinkElement::setStyleSheet):
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::childrenChanged):
* ksvg2/svg/SVGDOMImplementation.cpp:
(SVGDOMImplementation::createCSSStyleSheet):
* ksvg2/svg/SVGStyleElement.cpp:
(WebCore::SVGStyleElement::childrenChanged):
* page/Frame.cpp:
(WebCore::Frame::Frame):
* platform/Screen.h:
* platform/mac/ScreenMac.mm:
(WebCore::screenDepthPerComponent):
(WebCore::screenIsMonochrome):
2006-06-08 Levi Weintraub <lweintraub@apple.com>
Reviewed by justin
<http://bugzilla.opendarwin.org/show_bug.cgi?id=4468>
Implement execCommand(Insert{Un}OrderedList)
* WebCore.xcodeproj/project.pbxproj: Added InsertListCommand.{h,cpp} to the project.
* dom/Position.cpp:
(WebCore::hasRenderedNonAnonymousDescendantsWithHeight):
Added. A block with height is only a candidate if this is false. This should fix the problems
getting carets into empty blocks.
(WebCore::Position::inRenderedContent):
* editing/AppendNodeCommand.cpp:
(WebCore::AppendNodeCommand::doApply):
* editing/CompositeEditCommand.cpp:
(WebCore::hasARenderedDescendant):
(WebCore::CompositeEditCommand::prune): A node can have DOM descendants that are rendered, yet
have a renderer with no descendants. Fixed the pruning rule to avoid removing a node like this.
(WebCore::CompositeEditCommand::mergeIdenticalElements): Put the two elements next to
each other if they aren't already, as a convenience.
(WebCore::CompositeEditCommand::moveParagraph): Added code to preserve the current selection.
(WebCore::CompositeEditCommand::moveParagraphs): Ditto.
* editing/CompositeEditCommand.h:
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::initializeStartEnd): Expansion for special elements should
continue to happen until it is no longer possible.
(WebCore::DeleteSelectionCommand::handleGeneralDelete): The code to adjust the start node
wouldn't always avoid removing the start block.
* editing/InsertListCommand.cpp: Added.
(WebCore::InsertListCommand::fixOrphanedListChild): Puts a list item that isn't inside a list
into a list.
(WebCore::InsertListCommand::InsertListCommand):
(WebCore::InsertListCommand::modifyRange):
(WebCore::InsertListCommand::doApply):
* editing/InsertListCommand.h: Added.
(WebCore::InsertListCommand::):
* editing/InsertNodeBeforeCommand.cpp:
(WebCore::InsertNodeBeforeCommand::doApply):
* editing/InsertParagraphSeparatorCommand.cpp:
* editing/JSEditor.cpp:
* editing/TextIterator.cpp:
(WebCore::TextIterator::advance): Don't handle a node if the end of the range used to create the
iterator ends at the start of that node.
* editing/VisiblePosition.cpp:
(WebCore::VisiblePosition::next):
(WebCore::VisiblePosition::previous):
* editing/VisiblePosition.h:
Added a parameter to next/previous that can prevent them from leaving the current editable region.
* editing/htmlediting.cpp:
(WebCore::highestAncestor):
(WebCore::enclosingList):
(WebCore::enclosingListChild):
(WebCore::outermostEnclosingList):
(WebCore::createListItemElement):
* editing/htmlediting.h:
* page/Frame.cpp:
(WebCore::Frame::selectionListState): Added.
* page/Frame.h:
2006-06-08 David Harrison <harrison@apple.com>
Reviewed by Geoff and John.
<rdar://problem/4558879> -[DOMCSSPrimitiveValue setStringValue:] throws an exception (12)
Problem was the primitive value was getting reset to a generic state before the parameter
check that relies on that state.
Test: fast/dom/setPrimitiveValue.html
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::setFloatValue):
(WebCore::CSSPrimitiveValue::setStringValue):
Move parameter checks ahead of call to cleanup().
2006-06-08 Alice Liu <alice.liu@apple.com>
Reviewed by justin.
- fixed <rdar://problem/4578115> support Range.isPointInRange
- fixed <rdar://problem/4578123> support Range.comparePoint
* dom/Range.cpp:
(WebCore::Range::isPointInRange):
added implementation
(WebCore::Range::comparePoint):
added implementation
* dom/Range.h:
added prototypes
* dom/Range.idl:
added bindings
2006-06-08 Darin Adler <darin@apple.com>
Reviewed by justin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8616
REGRESSION: TinyMCE: Crash on Undo
* bridge/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge getInnerNonSharedNode:innerNode:URLElement:atPoint:allowShadowContent:]):
Changed to call nodeInfoAtPoint directly.
(-[WebCoreFrameBridge _visiblePositionForPoint:]): Changed to call nodeInfoAtPoint directly.
Also added code to convert coordinates so it works for points that are in nodes in subframes.
* page/Frame.cpp:
(WebCore::Frame::setMark): Added assertions to catch if we attempt to set selection
endpoints in another document.
(WebCore::Frame::setSelection): Ditto.
2006-06-07 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
Fixed some comments and removed an unused variable.
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::removeBlockPlaceholder):
Don't remove a br if it isn't at the start of a block, since
it isn't really a "block placeholder".
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::initializePositionData):
(WebCore::DeleteSelectionCommand::mergeParagraphs):
(WebCore::DeleteSelectionCommand::doApply):
* editing/InsertLineBreakCommand.cpp:
(WebCore::InsertLineBreakCommand::doApply):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::doApply):
(WebCore::ReplaceSelectionCommand::completeHTMLReplacement):
* editing/htmlediting.cpp:
2006-06-07 David Hyatt <hyatt@apple.com>
Add support for custom highlighting. This is all ifdefed to be Mac-only.
Reviewed by justin
* WebCore.xcodeproj/project.pbxproj:
* bridge/mac/FrameMac.h:
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::paintCustomHighlight):
* bridge/mac/WebCoreFrameBridge.h:
* platform/mac/ClipboardMac.h:
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::paintCustomHighlight):
* rendering/InlineTextBox.h:
2006-06-07 Adele Peterson <adele@apple.com>
Reviewed by Hyatt
Added support for cross-platform resize property.
* platform/PlatformMouseEvent.h: Removed isMouseButtonDown, since we
already cache this info when we handle mouse down and mouse up.
* platform/mac/MouseEventMac.mm: ditto.
* platform/win/TemporaryLinkStubs.cpp: ditto.
* page/Frame.cpp:
(WebCore::Frame::autoscrollTimerFired): Use d->m_bMousePressed instead of isMouseButtonDown.
* page/FrameView.cpp:
(WebCore::FrameView::handleMouseMoveEvent): Passes event to layer resize method.
(WebCore::FrameView::mousePressed): Added.
* page/FrameView.h: Added mousePressed.
* rendering/RenderTheme.h: Removed paintResizeControl.
Since its not dependent on the theme, the layer can just paint this.
* rendering/RenderTheme.cpp: ditto.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer): Initializes m_resizeCornerImage.
(WebCore::RenderLayer::~RenderLayer): Deletes m_resizeCornerImage.
(WebCore::RenderLayer::resize): Uses passed in event instead of creating a new one.
(WebCore::RenderLayer::paintResizeControl): Now loads and paints the resize image.
* rendering/RenderLayer.h: Added m_resizeCornerImage. Important to have one per-layer for when we allow
more customization.
* platform/cairo/ImageCairo.cpp:
(WebCore::Image::loadResource): Loads image resources.
2006-06-07 David Hyatt <hyatt@apple.com>
Add support for a new property for custom highlighting. This patch just
adds support for the parsing of the property. It doesn't do anything yet.
Reviewed by beth
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSPropertyNames.in:
* css/cssparser.cpp:
(WebCore::CSSParser::parseValue):
* css/cssstyleselector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* rendering/render_style.cpp:
(WebCore::StyleCSS3InheritedData::StyleCSS3InheritedData):
(WebCore::StyleCSS3InheritedData::operator==):
(WebCore::RenderStyle::diff):
* rendering/render_style.h:
(WebCore::RenderStyle::highlight):
(WebCore::RenderStyle::setHighlight):
(WebCore::RenderStyle::initialHighlight):
2006-06-07 Mitz Pettel <opendarwin.org@mitzpettel.com>
Fix suggested by Rob Buis. Reviewed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9341
REGRESSION: Repro crash caused by style="font:bold"
Test: fast/css/font-shorthand-weight-only.html
* css/cssparser.cpp: (WebCore::CSSParser::parseFont): Revert part of the change
made to fix bug 5564.
2006-06-07 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Hyatt.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9122
REGRESSION: Incorrect vertical position for text fields in a "display: table" block
Test: fast/table/text-field-baseline.html
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::baselinePosition): Do not descend into replaced objects, just
use their baseline.
2006-06-07 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Hyatt (concept) and Darin (some coding details).
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=4334
REGRESSION: Flickering when css-hover should change opacity on floating elements
Pixel test: fast/block/float/nopaint-after-layer-destruction.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::setPaintsFloatingObject): Added. Changes the noPaint flag
in the block's FloatingObject for the given float and calls setChildNeedsLayout.
* rendering/RenderBlock.h:
* rendering/RenderBox.cpp:
(WebCore::blockThatPaintsFloat): Added this helper function.
(WebCore::RenderBox::setStyle): Added. Calls to setPaintsFloatingObject when a float
gains or loses its layer.
2006-06-06 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Hyatt.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9121
REGRESSION: [Incremental Repaint] DHTML movement test failures
Test (repaint): fast/repaint/containing-block-position-change.html
* manual-tests/containing-block-position-chage.html: Added.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlock): Unrelated change: fixed typo from
the RenderCanvas to RenderView rename.
(WebCore::RenderBlock::removePositionedObject): Added a return immediately
after removing the object.
(WebCore::RenderBlock::removePositionedObjects): Added.
* rendering/RenderBlock.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::setStyle): Added code to remove absolutely positioned
descendants from the positioned objects list of their current containing block
when they are going to have a new one as a result of this block's position
property changing.
* rendering/RenderObject.h:
(WebCore::RenderObject::removePositionedObjects):
2006-06-06 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
* dom/Node.cpp:
(WebCore::Node::firstDescendant): Added.
* dom/Node.h:
* dom/Range.cpp: Added a constructor that takes in Positions.
(WebCore::Range::Range):
* dom/Range.h:
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::insertNodeAt):
Let this function insert children into empty containers.
Calls canHaveChildrenForEditing.
(WebCore::CompositeEditCommand::appendNode): Assert that the parent canHaveChildrenForEditing.
(WebCore::CompositeEditCommand::moveParagraph): Tell ReplaceSelectionCommand to select the
replacement so that moveParagraph's callers have a valid destination after the move.
* editing/CompositeEditCommand.h: Moved removeFullySelectedNode to DeleteSelectionCommand,
made deleteTextFromNode virtual so that DeleteSelectionCommand can update it's endingPosition.
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::DeleteSelectionCommand):
Removed m_startNode, used a local variable.
(WebCore::DeleteSelectionCommand::initializeStartEnd): Fixed special element expansion.
(WebCore::DeleteSelectionCommand::initializePositionData): Compute the endingPosition up
front and keep track of it as nodes and text are removed.
(WebCore::DeleteSelectionCommand::handleSpecialCaseBRDelete): Removed use of m_startNode.
(WebCore::DeleteSelectionCommand::removeFullySelectedNode): Moved from CompositeEditCommand.
Update m_endingPosition as we remove nodes.
(WebCore::DeleteSelectionCommand::deleteTextFromNode):
Update m_endingPosition as we delete text.
(WebCore::DeleteSelectionCommand::handleGeneralDelete): Retain the start block. Cleaned up.
(WebCore::DeleteSelectionCommand::mergeParagraphs): Recompute m_endingPosition since moveParagraph
clobbers the old one.
(WebCore::DeleteSelectionCommand::doApply): Fixed the logic for placeholder insertion after
deletion. Make the placeholder decision before we do special element expansion.
* editing/DeleteSelectionCommand.h:
* editing/InsertLineBreakCommand.cpp:
(WebCore::InsertLineBreakCommand::doApply): Fixed a bug where an extra br was inserted and cleaned
up the code.
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::doApply): Deletion of the current selection should do
a merge (added a testcase).
* editing/RebalanceWhitespaceCommand.cpp:
(WebCore::RebalanceWhitespaceCommand::doUnapply): Remove/insert in a way that will trigger a layout.
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::doApply): Ditto.
Merge even when the incoming fragment has interchange newlines (added a testcase).
Merge when the selection being pasted into starts at the start of a block because not
doing so would leave one or more hanging empty blocks.
(WebCore::ReplaceSelectionCommand::completeHTMLReplacement):
Rebalance whitespace using rebalanceWhitespaceAt because rebalanceWhitespace requires
a selection, and a selection can't be created until whitespace has been rebalanced.
* editing/htmlediting.cpp:
(WebCore::canHaveChildrenForEditing): Added.
* editing/htmlediting.h:
2006-06-06 Beth Dakin <bdakin@apple.com>
Reviewed by Maciej.
Fix for <rdar://problem/4570475> Dashboard regions do not scale for
non-1.0 scale factors.
No test cases added since this only affects non-1.0 resolution
scale factors.
* platform/FloatRect.cpp:
(WebCore::FloatRect::scale): Added new function that scales a
rect's origin and size by a given factor.
* platform/FloatRect.h:
* platform/IntRect.cpp:
(WebCore::IntRect::scale): Same as above.
* platform/IntRect.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::addDashboardRegions): After the bounds and
clip rects on the Dashboard region have been calculated, get the
user space scale factor, and if it is not 1.0, scale the rects.
2006-06-06 John Sullivan <sullivan@apple.com>
Reviewed by Darin Adler.
- fixed <rdar://problem/4566087> REGRESSION (420+): Crash occurs while completing a find again query at
http://www.apple.com/ (RenderObject::repaint(bool))
This wasn't a new problem in the code, but the recent use of DocumentMarkers for find results brought
it to the surface.
* dom/Document.h:
Use a RefPtr<Node> instead of a Node* in MarkerMap, so the node will be retained
* dom/Document.cpp:
(WebCore::Document::removeMarkers):
Add a .get() to compensate for using RefPtr. Also, only repaint if this node actually had a marker
removed.
(WebCore::Document::repaintMarkers):
Add a .get() to compensate for using RefPtr.
2006-06-06 Anders Carlsson <acarlsson@apple.com>
Reviewed by Darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9325
clientWidth/clientHeight on document element in strict mode should return visible frame size
* dom/Element.cpp:
(WebCore::Element::clientWidth):
(WebCore::Element::clientHeight):
If we're the document element, and in strict mode, return the visible size of the frame.
2006-06-06 Anders Carlsson <acarlsson@apple.com>
Reviewed by John.
* bridge/mac/WebCoreFrameBridge.h:
* bridge/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge containsPlugins]):
* page/Frame.cpp:
(WebCore::Frame::containsPlugins):
* page/Frame.h:
Add containsPlugins function which returns whether a frame contains plugins
or not.
2006-06-05 Rob Buis <buis@kde.org>
Reviewed by mjs.
http://bugzilla.opendarwin.org/show_bug.cgi?id=5564
'font' shorthand parsing should be more tolerant in quirks mode
When not in strict mode accept font property specifications
lacking a font family part, like WinIE does.
* css/cssparser.cpp:
(WebCore::CSSParser::parseFont):
2006-06-05 Beth Dakin <bdakin@apple.com>
Reviewed by Darin.
Fix for <rdar://problem/4567520> Pixel cracks in weather widget at
1.83 scaling
To prevent pixel cracks at non-integral scaling factors, before we
call into CG to draw an image, we have to convert the rect to
device space, round the origin and size to integers in device
space, and convert back to user space.
No test cases added since this only affects non-1.0 resolution
scale factors.
* bindings/js/JSCanvasRenderingContext2DCustom.cpp:
(WebCore::JSCanvasRenderingContext2D::drawImage): drawImage() now
takes FloatRects.
* html/CanvasPattern.cpp:
(WebCore::patternCallback): Call roundToDevicePixels()
* html/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawImage): drawImage() now
takes FloatRects and call roundToDevicePixels()
* html/CanvasRenderingContext2D.h: drawImage() now takes
FloatRects.
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::paint): Call roundToDevicePixels()
* kcanvas/device/quartz/QuartzSupport.mm:
(WebCore::debugDumpCGImageToFile): Same as above.
* platform/GraphicsContext.h:
* platform/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::roundToDevicePixels): Takes care of
converting between coordinate spaces and rounding.
(WebCore::GraphicsContext::drawLineForText):
* platform/mac/ImageMac.mm: Call roundToDevicePixels()
(WebCore::Image::draw): Same as above.
(WebCore::drawPattern): Same as above.
2006-06-05 Geoffrey Garen <ggaren@apple.com>
Reviewed by Darin.
- http://bugzilla.opendarwin.org/show_bug.cgi?id=9310
Add missing DOM prototypes and other DOM cleanup
- Added the built-in object prototype to DOM objects that were missing it
so that primitive operations like == work on them.
- Removed dead EventConstructor class (it's autogenerated now)
- Changed HTML collections to describe themselves as "[object Collection]",
to match IE.
- Made DOMCSSRule constructor private because JSCSSRule is the class
to use.
* bindings/js/JSHTMLOptionElementConstructor.cpp:
(WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor):
* bindings/js/kjs_css.cpp:
(KJS::DOMStyleSheet::DOMStyleSheet):
(KJS::DOMStyleSheetList::DOMStyleSheetList):
(KJS::DOMCSSRule::DOMCSSRule):
(KJS::DOMCSSValue::DOMCSSValue):
(KJS::toJS):
(KJS::DOMRGBColor::DOMRGBColor):
(KJS::getDOMRGBColor):
(KJS::DOMRect::DOMRect):
* bindings/js/kjs_css.h:
* bindings/js/kjs_dom.cpp:
(KJS::DOMNodeList::DOMNodeList):
(KJS::DOMExceptionConstructor::DOMExceptionConstructor):
(KJS::DOMExceptionConstructor::getOwnPropertySlot):
(KJS::):
(KJS::DOMNamedNodesCollection::DOMNamedNodesCollection):
* bindings/js/kjs_dom.h:
(KJS::DOMNamedNodesCollection::classInfo):
* bindings/js/kjs_events.h:
* bindings/js/kjs_html.cpp:
(KJS::):
2006-06-04 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9031
REGRESSION: Crash when closing tabs on newegg.com
- removed a no-longer-needed Win32-specific workaround (not reviewed)
* bindings/js/kjs_window.cpp: Added include of <wtf/MathExtras.h>.
(WebCore::floatFeature): Remove WIN32 ifdef around isnan.
(WebCore::toJS): Add null checks.
2006-06-04 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9176
REGRESSION: repro crash in WebCore::StringImpl::hash() const + 28 (StringImpl.h:67)
Test: fast/loader/link-no-URL.html
* loader/Cache.h:
* loader/Cache.cpp:
(WebCore::Cache::updateCacheStatus): Removed the URL parameter. Instead get the URL
from the cached object itself. Callers were passing in the wrong URL. When it was a
null string, it caused the crash mentioned above. But in other cases it may have
caused some other minor problems as well. Added an assert to catch cases where the
URL is null (should never happen).
(WebCore::Cache::requestImage): Changed call site to not pass URL.
(WebCore::Cache::requestStyleSheet): Ditto.
(WebCore::Cache::requestScript): Ditto.
(WebCore::Cache::requestXSLStyleSheet): Ditto.
(WebCore::Cache::requestXBLDocument): Ditto.
2006-06-04 Darin Adler <darin@apple.com>
Reviewed by Adele.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7291
REGRESSION: delete key does not work in isIndex fields
* platform/mac/WebCoreTextField.mm:
(inputElement): Added. Helper function to get the Objective-C wrapper for an
input element associated with a QTextEdit. Returns nil if the element is not
an input element. The bug was caused by passing a non-input element to the
delegate methods.
(-[KWQTextFieldController controlTextDidBeginEditing:]): Use inputElement
and don't make the delegate call at all if there is none. This happens only
with isindex elements; it's not important to have auto-fill work with those.
(-[KWQTextFieldController controlTextDidEndEditing:]): Ditto.
(-[KWQTextFieldController controlTextDidChange:]): Ditto.
(-[KWQTextFieldController control:textShouldEndEditing:]): Ditto.
(-[KWQTextFieldController control:textView:doCommandBySelector:]): Ditto.
(-[KWQTextFieldController textView:shouldHandleEvent:]): Ditto.
2006-06-04 Darin Adler <darin@apple.com>
Reviewed by Anders.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8995
memory leak in XPath code -- seen in layout tests
- fixed malloc error on exit due to SVGDOMImplementation destructor
- attempted to fix the no-XPATH_SUPPORT build by adding an #if
- changed around includes and header-file formatting in XPath code
* bindings/scripts/CodeGeneratorJS.pm: Include PlatformString.h when
generating the bindings for XPathNSResolver.
* dom/DOMImplementation.h: Added a virtual destructor for the benefit of
SVGDOMImplementation.
* dom/DOMImplementation.cpp: (WebCore::DOMImplementation::~DOMImplementation): Added.
* ksvg2/svg/SVGDOMImplementation.h: Reformatted a bit, removed unneeded declarations.
* ksvg2/svg/SVGDOMImplementation.cpp:
(SVGDOMImplementation::~SVGDOMImplementation): Remove commented-out code.
(SVGDOMImplementation::createDocument): Remove a reference to KDOMView.
* xpath/XPathExpression.cpp:
(WebCore::XPathExpression::createExpression): Called release to avoid a tiny bit of
reference count churn.
(WebCore::XPathExpression::evaluate): Set exception code explicitly, because the code
relies on it being 0 when the function succeeds.
* xpath/XPathResult.cpp:
(WebCore::InvalidatingEventListener::InvalidatingEventListener): Removed
unneeded target node data member.
(WebCore::XPathResult::XPathResult): Updated for enum name changes and
InvalidatingEventListener name change. Added an assertion.
* xpath/impl/XPathFunctions.h: Removed the FunctionLibrary class. Changed the parameter
for createFunction to be a String instead of char*.
* xpath/impl/XPathFunctions.cpp: Got rid of local implementation of "round", and
used <wtf/MathExtras.h> instead. Also removed unused Interval::asString. Marked all
the Interval functions inline.
(WebCore::XPath::FunSubstring::doEvaluate): Use lround() instead of (long)round().
(WebCore::XPath::FunLang::doEvaluate): Removed some unneeded temporary String variables.
Use equalIgnoringCase() instead of calling lower() on two strings.
(WebCore::XPath::createFunctionMap): Changed how this works so that it's all local to
this function. Also removed a duplicate entry for the "last" function.
(WebCore::XPath::createFunction): Changed from a member function to a separate function.
Also changed so that if the args are not used in the function they are deleted.
This was one of the sources of the storage leaks.
* xpath/impl/XPathGrammar.y: Put XPATH_SUPPORT ifdef in. Replaced <num> with values of
specific types (numop, eqop). Updated for name change from AxisType to Axis. Changed
tokens that were declared as <str> but weren't actually using the string to be
declared with no type (PLUS, MINUS, OR, AND, DOTDOT, SLASHSLASH). Replaced use of
unregisterString, unregisterPredicateVector, and unregisterExpressionVector to
call delete functions instead that both unregister and delete. Change call sites for
createFunction to just use the String, removing the deprecatedString().latin1() call
that is no longer needed. Added a call to unregisterParseNode that was missing in the
"FilterExpr DescendantOrSelf RelativeLocationPath" production.
* xpath/impl/XPathParser.h: Changed Token to hold a String, Step::Axis, NumericOp::Opcode,
and EqTestOp::Opcode. The token ID number tells us which to use. Rearranged to put the private
part of the Parser class last. Moved a number of private things inside the cpp file.
* xpath/impl/XPathParser.cpp:
(WebCore::XPath::charCat): Made this a separate function, instead of a static member.
(WebCore::XPath::isAxisName): Ditto. Also put the global axis map inside the function,
allowing use of a map instead of a map pointer.
(WebCore::XPath::isNodeTypeName): Ditto.
(WebCore::XPath::Parser::isOperatorContext): Made this const.
(WebCore::XPath::Parser::makeTokenAndAdvance): Got rid of the "int" version of this.
By using the actual types, we can safely use overload instead.
(WebCore::XPath::Parser::lexString): Use substring() instead of deprecatedString().mid().
(WebCore::XPath::Parser::lexNumber): Ditto.
(WebCore::XPath::Parser::lexNCName): Changed to return a bool and a String instead of a
Token. This avoids the hack of using a token value of "ERROR + 1" which I found quite
confusing and is also a bit more explicit.
(WebCore::XPath::Parser::lexQName): Ditto.
(WebCore::XPath::Parser::nextTokenInternal): Changed to adapt to the changes above and
to remove some unneeded else statements.
(WebCore::XPath::Parser::lex): Changed the logic that sets up yylval to use the token ID
to decide what the type is. This matches what the grammar expects, and removes the need
for the token object to track which part of the value is good and the need to reserve 0
to have a special meaning.
(WebCore::XPath::Parser::parseStatement): Added code to delete the predicates and the
expressions in the predicate and expression vectors. Before, we were only deleting
the vectors. This was one of the sources of the storage leaks.
(WebCore::XPath::Parser::deletePredicateVector): Renamed, and changed to delete
the vector. However this does not delete the predicates in the vector.
(WebCore::XPath::Parser::deleteExpressionVector): Renamed, and changed to delete
the vector. However this does not delete the expressions in the vector.
(WebCore::XPath::Parser::deleteString): Renamed, and changed to delete the string.
* xpath/impl/XPathPredicate.h:
* xpath/impl/XPathPredicate.cpp:
(WebCore::XPath::NumericOp::NumericOp): Changed opcode from an int to an enum, and
renamed to "opcode" instead of "opCode".
(WebCore::XPath::NumericOp::doEvaluate): More of the same.
(WebCore::XPath::EqTestOp::EqTestOp): Ditto.
(WebCore::XPath::EqTestOp::doEvaluate): Ditto.
(WebCore::XPath::LogicalOp::LogicalOp): Ditto.
(WebCore::XPath::LogicalOp::shortCircuitOn): Ditto.
(WebCore::XPath::Predicate::evaluate): Removed an unneeded "new".
* xpath/impl/XPathStep.h:
* xpath/impl/XPathStep.cpp: Renamed AxisType to Axis. Removed unused axisAsString
function and default constructor.
* xpath/impl/XPathValue.h: Renamed the type constants to have a Value suffix,
instead of the underscore suffix used before on NodeVector and String.
* xpath/impl/XPathValue.cpp: Updated for name change. Added asserts.
* xpath/impl/XPathVariableReference.cpp: (WebCore::XPath::VariableReference::doEvaluate):
Use a reference instead of a pointer.
* xpath/XPathEvaluator.cpp:
* xpath/XPathEvaluator.h:
* xpath/XPathExpression.h:
* xpath/XPathNSResolver.cpp:
* xpath/XPathNSResolver.h:
* xpath/XPathNamespace.cpp:
* xpath/XPathNamespace.h:
* xpath/XPathResult.h:
* xpath/impl/XPathExpressionNode.cpp:
* xpath/impl/XPathExpressionNode.h:
* xpath/impl/XPathPath.cpp:
* xpath/impl/XPathPath.h:
* xpath/impl/XPathUtil.cpp:
* xpath/impl/XPathUtil.h:
* xpath/impl/XPathVariableReference.h:
Reformatted and changed includes around; no substantive changes.
2006-06-04 Sam Weinig <sam.weinig@gmail.com>
Reviewed by hyatt.
- fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9213
Absolutely positioned objects with relatively positioned inline
containing blocks are rendered incorrectly
* rendering/RenderBox.cpp:
(WebCore::RenderBox::containingBlockWidthForPositioned):
(WebCore::RenderBox::containingBlockHeightForPositioned):
(WebCore::RenderBox::calcAbsoluteHorizontal):
(WebCore::RenderBox::calcAbsoluteHorizontalValues):
(WebCore::RenderBox::calcAbsoluteVertical):
(WebCore::RenderBox::calcAbsoluteHorizontalReplaced):
(WebCore::RenderBox::calcAbsoluteVerticalReplaced):
* rendering/RenderBox.h:
2006-06-04 Anders Carlsson <acarlsson@apple.com>
Reviewed by Darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9035
document.evaluate and createNSResolver miss on namespaced elements
* xpath/XPathExpression.cpp:
(WebCore::XPathExpression::createExpression):
Pass the resolver to the parser.
* xpath/XPathResult.cpp:
(WebCore::XPathResult::iterateNext):
Fix off-by-one error.
* xpath/impl/XPathExpressionNode.h:
(WebCore::XPath::EvaluationContext::EvaluationContext):
Get rid of the resolver in the evaluation context.
* xpath/impl/XPathGrammar.y:
Fetch the resolver from the parser. Only return the local name.
* xpath/impl/XPathParser.cpp:
(WebCore::XPath::Parser::parseStatement):
* xpath/impl/XPathParser.h:
(WebCore::XPath::Parser::resolver):
Update to hold the resolver.
* xpath/impl/XPathStep.cpp:
(WebCore::XPath::Step::Step):
If the parser has stored a namespace URI, set it.
(WebCore::XPath::Step::nodeTestMatches):
Check namespace URIs.
* xpath/impl/XPathStep.h:
Add m_namespaceURI.
2006-06-03 Rob Buis <buis@kde.org>
Reviewed by mjs. Tweaked and landed by ddkilzer.
http://bugzilla.opendarwin.org/show_bug.cgi?id=7281
With java disabled wrong information is displayed.
Test: fast/replaced/applet-rendering-java-disabled.html
Match WinIE, render applet content inline when java is
disabled.
* WebCore.vcproj/WebCore/WebCore.vcproj: Removed RenderEmptyApplet.cpp and RenderEmptyApplet.h.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* WebCoreSources.bkl: Ditto.
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::createRenderer):
* rendering/RenderEmptyApplet.cpp: Removed.
* rendering/RenderEmptyApplet.h: Removed.
2006-06-03 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Hyatt.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9252
REGRESSION: Very odd roll-over issues (content disappearing)
Test: fast/dom/HTMLLinkElement/pending-stylesheet-count.html
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::~HTMLLinkElement): If the stylesheet was being
loaded, call stylesheetLoaded() on the document, to keep the pending stylesheet
count correct.
2006-06-03 Darin Adler <darin@apple.com>
- fix Windows build
* platform/Widget.h: Moved scaleFactor function out of Apple-specific
section of the header into the common part.
2006-06-03 Beth Dakin <bdakin@apple.com>
Reviewed by Darin.
Fix for <rdar://problem/4537274> HiDPI: <canvas> needs to apply a
scale. <canvas> needs to scale itself along with whatever scale
factor is set on the window.
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::createDrawingContext): Get the scale
factor and use it to create a larger buffer and to scale the
CGContext.
* platform/Widget.h: Provide a new function that returns the user
space scale factor.
* platform/mac/WidgetMac.mm:
(WebCore::Widget::scaleFactor): Get the scale factor from the
window and return it.
* platform/win/WidgetWin.cpp:
(WebCore::Widget::scaleFactor): Just return 1.0f for now.
2006-06-03 Steve Falkenburg <sfalken@apple.com>
Reviewed by hyatt.
Don't send empty referrers. Fixes image load fail on Spinneret default content.
* platform/win/TransferJobWin.cpp:
(WebCore::TransferJob::start):
2006-06-02 Adele Peterson <adele@apple.com>
Reviewed by Darin.
Windows theme for textareas. Also made some formatting changes.
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::supportsFocus):
(WebCore::RenderThemeWin::getThemeData):
(WebCore::RenderThemeWin::adjustButtonStyle):
(WebCore::RenderThemeWin::adjustTextFieldStyle):
(WebCore::RenderThemeWin::adjustTextAreaStyle):
(WebCore::RenderThemeWin::paintTextArea):
* rendering/RenderThemeWin.h:
(WebCore::RenderThemeWin::supportsHover):
2006-06-02 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
Reviewed by Hyatt, checked in by Tim H.
Explicitly run perl on *.pl files instead of relying
on Windows shell figuring out which program to run for
this extention.
* DerivedSources.make:
2006-06-02 David Carson <dacarson@gmail.com>
Reviewed by Hyatt, checked in by Tim H.
fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=9115
Changed RenderLayer to only render layers that are not
totally transparent.
* rendering/RenderLayer.cpp
(RenderLayer::paintLayer):
Changed function to also check if the layer is totally transparent
and if it is, don't bother painting it.
2006-06-02 Rob Buis <buis@kde.org>
Reviewed by Hyatt, checked in by Tim H.
http://bugzilla.opendarwin.org/show_bug.cgi?id=8223
WebKit fails to update style on element via DOM
Handle !important by detecting it and using a different code
path from normal priority.
* bindings/js/kjs_css.cpp:
(KJS::DOMCSSStyleDeclaration::put):
* css/CSSStyleDeclaration.cpp:
(WebCore::CSSStyleDeclaration::setProperty):
* css/CSSStyleDeclaration.h:
2006-06-02 Darin Adler <darin@apple.com>
Reviewed by Geoff, checked in by Maciej.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9236
REGRESSION: focus method does not work on some elements before they are laid out
* dom/Element.cpp: (WebCore::Element::focus): Do the updateLayout call before
calling isFocusable, since isFocusable looks at the size of the renderer.
2006-06-02 Steve Falkenburg <sfalken@apple.com>
Reviewed by darin.
Platform hookup fixes
* bridge/win/FrameWin.cpp:
(WebCore::FrameWin::urlSelected):
(WebCore::FrameWin::setTitle):
(WebCore::FrameWin::setStatusBarText):
* bridge/win/FrameWin.h:
* platform/win/TemporaryLinkStubs.cpp:
(FrameWin::overrideMediaType):
* platform/win/TransferJobWin.cpp:
(WebCore::TransferJobWndProc):
(WebCore::TransferJob::start):
(WebCore::TransferJob::fileLoadTimer):
(WebCore::TransferJob::cancel):
2006-06-02 Rémi Zara <remi_zara@mac.com>
Reviewed by Hyatt.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=3379
attr(X) does not work
Test: fast/css-generated-content/016.html
* css/cssstyleselector.cpp:
(WebCore::CSSStyleSelector::canShareStyleWithElement): Don't share style
if the unique bit is set.
(WebCore::CSSStyleSelector::applyProperty): When applying the "attr" property,
set the unique bit and add to m_selectorAttrs.
* rendering/render_style.cpp: Did a lot of reformatting, and this one real change.
(WebCore::RenderStyle::RenderStyle): Initialize m_unique to false.
* rendering/render_style.h:
(WebCore::RenderStyle::unique): Added. Returns value of m_unique.
(WebCore::RenderStyle::setUnique): Added. Sets m_unique.
2006-06-02 David Kilzer <ddkilzer@kilzer.net>
Reviewed by mjs.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9183
Finish renaming of RenderCanvas to RenderView
* rendering/RenderView.h: Changed renderName from "RenderCanvas" to "RenderView".
2006-06-01 Darin Adler <darin@apple.com>
- try to fix Windows build
* bridge/win/FrameWin.cpp: Added include of Decoder.h.
2006-06-01 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- WebCore doesn't need to load WebKit images any more; removed code for that
* WebCore.exp: Removed WebCoreImageRendererFactory.
* WebCore.xcodeproj/project.pbxproj: Removed WebCoreImageRendererFactory.h/mm.
* bridge/mac/WebCoreFrameBridge.mm: Removed include of WebCoreImageRendererFactory.h.
* platform/mac/ImageMac.mm: Removed include of WebCoreImageRendererFactory.h.
* platform/mac/WebCoreImageRendererFactory.h: Removed.
* platform/mac/WebCoreImageRendererFactory.m: Removed.
2006-06-01 Sam Weinig <sam.weinig@gmail.com>
Reviewed by Geoff, tweaked a bit by Darin.
- http://bugzilla.opendarwin.org/show_bug.cgi?id=9064
Split dom2_traversalimpl.* into separate files (one class per file).
* WebCore.xcodeproj/project.pbxproj: Updated for new files.
* WebCore.vcproj/WebCore/WebCore.vcproj: Ditto.
* bindings/js/kjs_traversal.h:
* bindings/scripts/CodeGeneratorJS.pm:
* bindings/objc/DOM.mm:
* dom/Document.cpp:
* dom/Document.h:
Updated includes.
* dom/NodeFilter.cpp: Added.
* dom/NodeFilter.h: Added.
* dom/NodeFilterCondition.cpp: Added.
* dom/NodeFilterCondition.h: Added.
* dom/NodeIterator.cpp: Added.
* dom/NodeIterator.h: Added.
* dom/Traversal.cpp: Added.
* dom/Traversal.h: Added.
* dom/TreeWalker.cpp: Added.
* dom/TreeWalker.h: Added.
* dom/dom2_traversalimpl.cpp: Removed.
* dom/dom2_traversalimpl.h: Removed.
2006-06-01 David Carson <dacarson@gmail.com>
Reviewed by Maciej and Adele
Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8398
REGRESSION: LABEL in OPTION element is clobbering display #TEXT
Patch provided by Darin.
* rendering/RenderSelect.cpp
(RenderSelect::updateFromElement):
Changed to use the containing text by default, and not the label text
2006-06-01 David Carson <dacarson@gmail.com>
Reviewed by Hyatt.
Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8646
Correcting the value returned for window.screen.pixelDepth and
window.screen.colorDepth
* platform/mac/ScreenMac.mm
(screenDepth):
Changed to return the BitsPerPixelFromDepth rather than the WindowDepth
2006-06-01 Adele Peterson <adele@apple.com>
Reviewed by Maciej.
Missed an initialization in my last checkin which caused too many
resizers to be drawn.
* rendering/render_style.cpp: (WebCore::resize):
Initialize resize to RESIZE_NONE.
2006-06-01 Dave Hyatt <hyatt@apple.com>
Implement form POST using WinINet. This code is crazy... CRAZY!
* platform/TransferJobInternal.h:
(WebCore::TransferJobInternal::TransferJobInternal):
* platform/win/CookieJarWin.cpp:
(WebCore::setCookies):
(WebCore::cookies):
* platform/win/TransferJobWin.cpp:
(WebCore::TransferJobWndProc):
(WebCore::TransferJob::start):
2006-06-01 Adele Peterson <adele@apple.com>
Reviewed by Hyatt.
Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9216
Implement CSS3 resize property
* css/html4.css: Sets resize:both for textareas. This won't affect old-style textareas.
* css/CSSPropertyNames.in: Added resize property.
* css/cssparser.cpp: (WebCore::CSSParser::parseValue): Added case for CSS_PROP_RESIZE.
* css/cssstyleselector.cpp: (WebCore::CSSStyleSelector::applyProperty): ditto.
* css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): ditto.
* rendering/render_style.cpp: (WebCore::StyleCSS3InheritedData): Initialize resize.
* rendering/render_style.h:
(WebCore::): Added EResize enum.
(WebCore::RenderStyle::resize):
(WebCore::RenderStyle::setResize):
(WebCore::RenderStyle::initialResize):
* page/FrameView.cpp:
(WebCore::FrameViewPrivate::FrameViewPrivate): Added m_resizeLayer to keep track of a layer that has begun resizing.
(WebCore::FrameViewPrivate::reset): Reset m_resizeLayer.
(WebCore::FrameView::handleMousePressEvent): If the mouse was pressed in a layer's resize control, then put the layer into resize mode.
(WebCore::selectCursor): Updated so we get a pointer cursor for the resize control.
(WebCore::FrameView::handleMouseMoveEvent): If there's a layer currently resizing, then tell the layer to continue resizing.
(WebCore::FrameView::handleMouseReleaseEvent): If there's a layer currently resizing, then pull it out of resize mode.
* rendering/RenderBlock.cpp: (WebCore::RenderBlock::isPointInScrollbar): Updated so the resize control isn't considered part of the scrollbar.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer): Initialize m_inResizeMode
(WebCore::RenderLayer::updateLayerPositions): Calls positionResizeControl.
(WebCore::RenderLayer::resize): Added. Sets a new width and height based on the current mouse point.
(WebCore::RenderLayer::isPointInResizeControl): Added.
(WebCore::RenderLayer::positionResizeControl): Added.
(WebCore::RenderLayer::positionScrollbars): Calls positionResizeControl.
(WebCore::RenderLayer::paintScrollbars): Calls positionResizeControl.
(WebCore::RenderLayer::paintResizeControl): Added.
(WebCore::RenderLayer::paintLayer): Calls paintResizeControl.
* rendering/RenderLayer.h: Added m_inResizeMode.
(WebCore::RenderLayer::resizeControlRect):
(WebCore::RenderLayer::setResizeControlRect):
(WebCore::RenderLayer::inResizeMode): Added.
(WebCore::RenderLayer::setInResizeMode): Added.
* platform/mac/ImageMac.mm: (WebCore::Image::loadResource): Moved code from WebImageRendererFactory. Now loads images from WebCore's resources.
WebImageRendererFactory is no longer used and should be removed.
* Resources/missingImage.tiff: Added. Copied from WebKit.
* WebCore.xcodeproj/project.pbxproj: Added missingImage.tiff
* loader/Cache.cpp: (WebCore::Cache::init): Updated name from missing_image to missingImage.
* rendering/RenderTheme.h:
* rendering/RenderTheme.cpp: (WebCore::RenderTheme::paintResizeControl): Added.
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::RenderThemeMac): Initialize resizeCornerImage.
(WebCore::RenderThemeMac::paintResizeControl): Paints resizeCornerImage.
2006-06-01 Brady Eidson <beidson@apple.com>
Reviewed by Maciej.
Added the beginnings of sqlite-based code in a WebCore
based version of the Icon Database. Right now the code
is very loosely hooked up through a Bridge and only
creates an sqlite3 database.
There are also changes to our String classes to allow appending
a single character to a String without creating a temporary object.
* WebCore.exp:
-Added a symbol export
* WebCore.xcodeproj/project.pbxproj:
* bridge/mac/WebCoreIconDatabaseBridge.h: Added.
* bridge/mac/WebCoreIconDatabaseBridge.mm: Added.
(-[WebCoreIconDatabaseBridge openSharedDatabaseWithPath:]):
(-[WebCoreIconDatabaseBridge closeSharedDatabase]):
(-[WebCoreIconDatabaseBridge isOpen]):
-This class will eventually shadow WebIconDatabase but for now
is a minimal interface to make the sql code live
* icon: Added.
* icon/IconDatabase.cpp: Added.
-This class will eventually resemble WebIconDatabase but for now
is minimal just to make the sql code live
(WebCore::IconDatabase::sharedIconDatabase):
(WebCore::IconDatabase::IconDatabase):
(WebCore::IconDatabase::open):
-This method calls a mkdir to make sure the target directory
exists
(WebCore::IconDatabase::close):
(WebCore::IconDatabase::~IconDatabase):
* icon/IconDatabase.h: Added.
(WebCore::IconDatabase::isOpen):
* platform/Logging.cpp:
* platform/Logging.h:
-Added an IconDatabase logging channel
* platform/PlatformString.h:
* platform/String.cpp:
(WebCore::String::append):
* platform/StringImpl.cpp:
(WebCore::StringImpl::append):
* platform/StringImpl.h:
-Added append(char) and append(UChar) to allow appending a
single character without creating a temporary object. Required
to facilitate manually adding a null character to a unicode 16
string
2006-06-01 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed and landed by Anders.
- fixed all places in the Canvas to RenderView rename patch where
view() should have been changed to frameView().
* kwq/WebCoreAXObject.mm:
(-[WebCoreAXObject position]):
(-[WebCoreAXObject accessibilityAttributeValue:]):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlock):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintBackgroundExtended):
* rendering/RenderTreeAsText.cpp:
(externalRepresentation):
2006-06-01 Geoffrey Garen <ggaren@apple.com>
Fix by Mitz. Reviewed, tweaked, tested, landed by me.
- Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=9113
REGRESSION (14581): XMLHttpRequest never calls onreadystatechange with
a readystate == 4
An XMLHttpRequest must be added to the DOMObject cache so that its
DOM implementation object can protect it, and by extension, its event
listeners.
This design seems slightly backwards to me -- the bindings should know
about the DOM, not the other way around -- but I'm restoring it for
now to fix the regression.
* bindings/js/JSXMLHttpRequest.cpp:
(KJS::JSXMLHttpRequest::JSXMLHttpRequest):
(KJS::JSXMLHttpRequest::~JSXMLHttpRequest):
2006-06-01 Anders Carlsson <acarlsson@apple.com>
* platform/KURL.cpp:
(equalIgnoringRef):
Whoops. Fix build.
2006-06-01 Anders Carlsson <acarlsson@apple.com>
Reviewed by Darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=6309
multiple problems prevent bookmarking/back button technique for AJAX/DHTML applications from working
* bindings/js/kjs_window.cpp:
(KJS::Location::put):
Handle the case where the hash starts with a "#". Also, don't do anything if the previous and new hashes
are equal.
* bridge/BrowserExtension.h:
* bridge/mac/BrowserExtensionMac.h:
* bridge/mac/BrowserExtensionMac.mm:
(WebCore::BrowserExtensionMac::historyURL):
* bridge/mac/WebCoreFrameBridge.h:
* bridge/mac/WebCoreFrameBridge.mm:
New function historyURL which returns the complete URL for a given item in the history.
* page/Frame.cpp:
(WebCore::Frame::scheduleLocationChange):
(WebCore::Frame::scheduleHistoryNavigation):
If the URL of the new location only differs in the hash, don't schedule the load. Instead, load it
directly.
* platform/KURL.cpp:
* platform/KURL.h:
Add equalsIgnoringRef which returns whether two URLs are equal, ignoring the ref.
2006-06-01 Anders Carlsson <acarlsson@apple.com>
Reviewed by Maciej.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9212
dispatchEvent13.html crashes under GuardMalloc
* dom/EventTargetNode.cpp:
(WebCore::EventTargetNode::addEventListener):
(WebCore::EventTargetNode::removeEventListener):
(WebCore::EventTargetNode::handleLocalEvents):
(WebCore::EventTargetNode::removeHTMLEventListener):
(WebCore::EventTargetNode::getHTMLEventListener):
* dom/EventTargetNode.h:
Make the list of registered event listeners refcount the listeners
by using a value list of RefPtr objects.
Set removed flag to true in removeEventListener
Only invoke event listeners if they don't have the removed flag.
* dom/dom2_eventsimpl.cpp:
(WebCore::RegisteredEventListener::RegisteredEventListener):
* dom/dom2_eventsimpl.h:
Make RegisteredEventListener refcounted.
(WebCore::RegisteredEventListener::removed):
(WebCore::RegisteredEventListener::setRemoved):
Add removed flag and getter and setter
2006-06-01 Justin Garcia <justin.garcia@apple.com>
Reviewed by harrison
<rdar://problem/4567752> When forwarding a message, pressing TAB key to place caret in body actually selects the entire message instead
* dom/Element.cpp:
(WebCore::Element::focus):
2006-06-01 David Kilzer <ddkilzer@kilzer.net>
Reviewed by darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9144
Test for Bug 8079 (REGRESSION: Redraw from page cache does not show visited links)
* manual-tests/redraw-page-cache-visited-links.html: Added.
* manual-tests/resources/redraw-page-cache-visited-links-2.html: Added.
2006-05-31 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Hyatt.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9124
Drop shadow obscures "add more stuff" bubble at live.com
Test: fast/css/find-next-layer.html
* rendering/RenderObject.cpp:
(WebCore::RenderObject::findNextLayer): Fixed a bug where this function could reach
two levels down in the layer tree and return 0.
2006-05-31 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Geoff.
- http://bugzilla.opendarwin.org/show_bug.cgi?id=9109
Remove bogus assertion in RenderBlock::tabWidth
Changed the uninitialized value of m_tabWidth to -1 and removed the
assertion that it cannot be 0.
* rendering/RenderBlock.cpp:
(WebCore:::RenderBlock::RenderBlock):
(WebCore::RenderBlock::setStyle):
* rendering/bidi.cpp:
(WebCore::RenderBlock::tabWidth):
2006-05-31 Sam Weinig <sam.weinig@gmail.com>
Reviewed by Hyatt.
- fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9100
Absolutely positioned replaced elements with all non-auto
values are rendered incorrectly
* rendering/RenderBox.cpp:
(WebCore::RenderBox::calcAbsoluteHorizontalReplaced): Add support for case when all values are specified.
(WebCore::RenderBox::calcAbsoluteVerticalReplaced): ditto
2006-05-31 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Hyatt.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9012
Row height not updated when cell heights change
Test: fast/table/row-height-recalc.html
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::setStyle): Mark the section as needing recalculation
if the height property changed.
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::setStyle): Ditto.
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::recalcCells): Initialize the grid row height
to the height of the row element (like addChild() does).
2006-05-31 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Hyatt.
- fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8969
REGRESSION: typing in textfield repaints whole web page at gamefaqs.com
No test possible (no functionality change)
* dom/Document.cpp:
(WebCore::Document::updateLayout): Changed to ensure that pending subtree
layouts are performed too.
* page/Frame.cpp:
(WebCore::Frame::forceLayout): Force a full layout.
* page/FrameView.cpp:
(WebCore::FrameViewPrivate::reset):
(WebCore::FrameView::layout): Changed to relayout only the subtree rooted
at d->layoutRoot if it's non-zero and allowSubtree is true.
(WebCore::FrameView::scheduleRelayout): Change pending subtree relayout into
normal relayout by clearing d->layoutRoot and propagating needsLayout to the
root.
(WebCore::FrameView::scheduleRelayoutOfSubtree): Added.
* page/FrameView.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::markContainingBlocksForLayout): Added scheduleRelayout
parameter. FrameView passes false to force marking all the way to the root
when turning a pending subtree relayout into a full relayout. Otherwise,
marking stops at the first textField (or at the root) and
relayout of the last object reached is scheduled.
(WebCore::RenderObject::scheduleRelayout):
* rendering/RenderObject.h:
2006-05-31 Sam Weinig <sam.weinig@gmail.com>
Reviewed by Darin.
patch for <http://bugzilla.opendarwin.org/show_bug.cgi?id=8910>
Bug 8910: Various code cleanups in RenderBox
Clean up with some slight optimizations.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::contentWidth):
(WebCore::RenderBox::contentHeight):
(WebCore::RenderBox::setPos):
(WebCore::RenderBox::calcWidth):
(WebCore::RenderBox::calcWidthUsing):
* rendering/RenderBox.h:
2006-05-31 Sam Weinig <sam.weinig@gmail.com>
Reviewed by Hyatt.
patch for <http://bugzilla.opendarwin.org/show_bug.cgi?id=8899>
Bug 8899: Removes some unneeded code from RenderBox
Removes the use of WidthType where not needed to simplify
the code a little.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::calcWidthUsing):
(WebCore::RenderBox::sizesToIntrinsicWidth):
(WebCore::RenderBox::calcReplacedWidth):
(WebCore::RenderBox::calcReplacedWidthUsing):
(WebCore::RenderBox::calcReplacedHeight):
(WebCore::RenderBox::calcReplacedHeightUsing):
* rendering/RenderBox.h:
(WebCore::):
(WebCore::RenderBox::renderName):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::calcReplacedWidth):
(WebCore::RenderImage::calcReplacedHeight):
2006-05-31 Rob Buis <buis@kde.org>
Reviewed by Geoff.
Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8455
selectedIndex for a select after a Form reset() has wrong value
Make sure the list items are reset properly by selecting
the first option in case no options have the selected attribute
set.
* html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::reset):
2006-05-31 Rob Buis <buis@kde.org>
Reviewed by Geoff.
Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8024
"Go" button (search) doesn't work at fifa.com (document.all.FormName)
Allow input elements with name attributes as possible named
items for document.all.
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::checkForNameMatch):
(WebCore::HTMLCollection::updateNameCache):
2006-05-31 Dave Hyatt <hyatt@apple.com>
Adding stubs for BMP/ICO/XBM image decoders. They don't
do anything yet though.
* WebCore.vcproj/WebCore/WebCore.vcproj:
* platform/cairo/ImageSourceCairo.cpp:
(WebCore::createDecoder):
* platform/image-decoders/bmp: Added.
* platform/image-decoders/bmp/BMPImageDecoder.cpp: Added.
(WebCore::BMPImageDecoder::isSizeAvailable):
(WebCore::BMPImageDecoder::frameBufferAtIndex):
* platform/image-decoders/bmp/BMPImageDecoder.h: Added.
* platform/image-decoders/ico: Added.
* platform/image-decoders/ico/ICOImageDecoder.cpp: Added.
(WebCore::ICOImageDecoder::isSizeAvailable):
(WebCore::ICOImageDecoder::frameBufferAtIndex):
* platform/image-decoders/ico/ICOImageDecoder.h: Added.
* platform/image-decoders/xbm: Added.
* platform/image-decoders/xbm/XBMImageDecoder.cpp: Added.
(WebCore::XBMImageDecoder::isSizeAvailable):
(WebCore::XBMImageDecoder::frameBufferAtIndex):
* platform/image-decoders/xbm/XBMImageDecoder.h: Added.
2006-05-31 David Hyatt <hyatt@apple.com>
Fix for the gmail tab-focus-stealing bug.
Reviewed by darin
* bindings/js/kjs_window.cpp:
(KJS::WindowFunc::callAsFunction):
* bridge/mac/BrowserExtensionMac.mm:
(WebCore::BrowserExtensionMac::createNewWindow):
* bridge/mac/FrameMac.h:
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::focusWindow):
(WebCore::FrameMac::unfocusWindow):
* bridge/mac/WebCoreFrameBridge.h:
* page/Frame.h:
* platform/Widget.h:
* platform/mac/WidgetMac.mm:
* platform/win/TemporaryLinkStubs.cpp:
(FrameWin::focusWindow):
* platform/win/WidgetWin.cpp:
2006-05-31 Beth Dakin <bdakin@apple.com>
Reviewed by Hyatt.
Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6755 CSS3:
Borders rounded with border-radius don't draw the roundings
This patch does not draw all of the different border styles
perfectly, so I have filed a few followup bugs that I will
reference from this Bugzilla.
* platform/GraphicsContext.h:
* platform/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::drawArc): drawArc() has different
parameters now, but mostly this needs to be implemented to match
the Mac side later.
(WebCore::GraphicsContext::addRoundedRectClip): Just a stub.
Implement this later.
(WebCore::GraphicsContext::addInnerRoundedRectClip): Just a stub.
Implement this later.
* platform/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawArc): drawArc() now handles drawing
elliptical arcs as well as circular arcs, it also takes a thickness
parameter to draw an arc of a given thickness and draws with the
appropriate pen style.
(WebCore::GraphicsContext::addInnerRoundedRectClip): Adds a clip to
the inside of an arc instead of to the outside which is already
done by addRoundedClipRect()
* rendering/RenderObject.cpp:
(WebCore::RenderObject::drawBorderArc): Draws the border arcs in
the appropriate styles.
(WebCore::RenderObject::paintBorder): Calls drawBorderArc() when
border arcs are needed.
* rendering/RenderObject.h:
2006-05-30 Eric Seidel <eric@eseidel.com>
Reviewed by andersca.
Add first-cut SVG JS bindings autogeneration.
SVGSVGElement and various other support classes are generated.
Various small style fixes.
http://bugzilla.opendarwin.org/show_bug.cgi?id=4249
* DerivedSources.make:
* WebCore+SVG/RGBColor.cpp: Removed.
* WebCore+SVG/RGBColor.h: Removed.
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSHTMLElementWrapperFactory.cpp:
(WebCore::createJSHTMLWrapper): renamed from createJSWrapper
* bindings/js/JSHTMLElementWrapperFactory.h:
* bindings/js/kjs_dom.cpp:
(KJS::DOMNode::DOMNode):
(KJS::DOMNode::toBoolean):
(KJS::DOMNode::getOwnPropertySlot):
(KJS::DOMNode::getValueProperty):
(KJS::DOMNode::put):
(KJS::DOMNode::putValueProperty):
(KJS::DOMNode::toPrimitive):
(KJS::DOMNode::toString):
(KJS::DOMNodeProtoFunc::callAsFunction):
(KJS::toEventTargetNode):
(KJS::DOMEventTargetNode::getOwnPropertySlot):
(KJS::DOMEventTargetNode::getValueProperty):
(KJS::DOMEventTargetNode::put):
(KJS::DOMEventTargetNode::putValueProperty):
(KJS::DOMEventTargetNode::setListener):
(KJS::DOMEventTargetNode::getListener):
(KJS::DOMEventTargetNode::pushEventHandlerScope):
(KJS::DOMEventTargetNodeProtoFunc::callAsFunction):
(KJS::DOMNodeList::toPrimitive):
(KJS::DOMNodeList::getValueProperty):
(KJS::DOMNodeList::indexGetter):
(KJS::DOMNodeList::nameGetter):
(KJS::DOMNodeList::getOwnPropertySlot):
(KJS::DOMNodeList::callAsFunction):
(KJS::DOMNodeListFunc::callAsFunction):
(KJS::toElement):
(KJS::toDocumentType):
(KJS::DOMNamedNodeMap::DOMNamedNodeMap):
(KJS::DOMNamedNodeMap::~DOMNamedNodeMap):
(KJS::DOMNamedNodeMap::lengthGetter):
(KJS::DOMNamedNodeMap::indexGetter):
(KJS::DOMNamedNodeMap::nameGetter):
(KJS::DOMNamedNodeMapProtoFunc::callAsFunction):
(KJS::toJS):
(KJS::checkNodeSecurity):
(KJS::getRuntimeObject):
(KJS::DOMExceptionConstructor::getOwnPropertySlot):
(KJS::DOMExceptionConstructor::getValueProperty):
(KJS::getDOMExceptionConstructor):
(KJS::DOMNamedNodesCollection::DOMNamedNodesCollection):
(KJS::DOMNamedNodesCollection::lengthGetter):
(KJS::DOMNamedNodesCollection::indexGetter):
(KJS::DOMNamedNodesCollection::getOwnPropertySlot):
* bindings/scripts/CodeGenerator.pm:
* bindings/scripts/CodeGeneratorJS.pm:
* dom/Document.cpp:
(WebCore::Document::implicitClose):
* dom/Element.h:
* dom/StyledElement.h:
* ksvg2/bindings/idl/svg/SVGAngle.idl: Removed.
* ksvg2/bindings/idl/svg/SVGAnimatedLength.idl: Removed.
* ksvg2/bindings/idl/svg/SVGColor.idl: Removed.
* ksvg2/bindings/idl/svg/SVGDocument.idl: Removed.
* ksvg2/bindings/idl/svg/SVGElement.idl: Removed.
* ksvg2/bindings/idl/svg/SVGLength.idl: Removed.
* ksvg2/bindings/idl/svg/SVGMatrix.idl: Removed.
* ksvg2/bindings/idl/svg/SVGNumber.idl: Removed.
* ksvg2/bindings/idl/svg/SVGPoint.idl: Removed.
* ksvg2/bindings/idl/svg/SVGRect.idl: Removed.
* ksvg2/bindings/idl/svg/SVGSVGElement.idl: Removed.
* ksvg2/bindings/idl/svg/SVGTransform.idl: Removed.
* ksvg2/bindings/idl/svg/kdomdefs.idl: Removed.
* ksvg2/bindings/js: Added.
* ksvg2/bindings/js/JSSVGNumber.cpp: Added.
(WebCore::):
(WebCore::JSSVGNumber::~JSSVGNumber):
(WebCore::JSSVGNumber::getOwnPropertySlot):
(WebCore::JSSVGNumber::getValue):
(WebCore::getJSSVGNumber):
* ksvg2/bindings/js/JSSVGNumber.h: Added.
(WebCore::JSSVGNumber::JSSVGNumber):
(WebCore::JSSVGNumber::classInfo):
* ksvg2/bindings/js/JSSVGPoint.cpp: Added.
(WebCore::):
(WebCore::JSSVGPoint::~JSSVGPoint):
(WebCore::JSSVGPoint::getOwnPropertySlot):
(WebCore::JSSVGPoint::getValueProperty):
(WebCore::getJSSVGPoint):
(WebCore::toFloatPoint):
* ksvg2/bindings/js/JSSVGPoint.h: Added.
(WebCore::JSSVGPoint::JSSVGPoint):
(WebCore::JSSVGPoint::classInfo):
(WebCore::JSSVGPoint::):
(WebCore::JSSVGPoint::impl):
* ksvg2/bindings/js/JSSVGRect.cpp: Added.
(WebCore::):
(WebCore::JSSVGRect::~JSSVGRect):
(WebCore::JSSVGRect::getOwnPropertySlot):
(WebCore::JSSVGRect::getValueProperty):
(WebCore::getJSSVGRect):
(WebCore::toFloatRect):
* ksvg2/bindings/js/JSSVGRect.h: Added.
(WebCore::JSSVGRect::JSSVGRect):
(WebCore::JSSVGRect::classInfo):
(WebCore::JSSVGRect::):
(WebCore::JSSVGRect::impl):
* ksvg2/css/SVGCSSParser.cpp:
(WebCore::CSSParser::parseSVGValue):
* ksvg2/css/SVGCSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applySVGProperty):
* ksvg2/events/SVGZoomEvent.cpp:
(SVGZoomEvent::SVGZoomEvent):
(SVGZoomEvent::zoomRectScreen):
(SVGZoomEvent::previousTranslate):
(SVGZoomEvent::newTranslate):
* ksvg2/events/SVGZoomEvent.h:
* ksvg2/ksvg.h:
(WebCore::):
* ksvg2/misc/SVGDocumentExtensions.cpp:
(WebCore::SVGDocumentExtensions::SVGDocumentExtensions):
(WebCore::SVGDocumentExtensions::~SVGDocumentExtensions):
(WebCore::SVGDocumentExtensions::addTimeContainer):
(WebCore::SVGDocumentExtensions::removeTimeContainer):
(WebCore::SVGDocumentExtensions::startAnimations):
(WebCore::SVGDocumentExtensions::pauseAnimations):
(WebCore::SVGDocumentExtensions::unpauseAnimations):
* ksvg2/misc/SVGDocumentExtensions.h:
* ksvg2/svg/SVGAElement.h:
* ksvg2/svg/SVGAngle.h:
(WebCore::SVGAngle::):
* ksvg2/svg/SVGAngle.idl: Added.
* ksvg2/svg/SVGAnimateColorElement.cpp:
(WebCore::SVGAnimateColorElement::SVGAnimateColorElement):
(WebCore::SVGAnimateColorElement::handleTimerEvent):
(WebCore::SVGAnimateColorElement::clampColor):
* ksvg2/svg/SVGAnimateColorElement.h:
* ksvg2/svg/SVGAnimateElement.cpp:
(SVGAnimateElement::SVGAnimateElement):
(SVGAnimateElement::handleTimerEvent):
* ksvg2/svg/SVGAnimateElement.h:
* ksvg2/svg/SVGAnimateTransformElement.cpp:
(WebCore::SVGAnimateTransformElement::SVGAnimateTransformElement):
(WebCore::SVGAnimateTransformElement::parseMappedAttribute):
(WebCore::SVGAnimateTransformElement::handleTimerEvent):
(WebCore::SVGAnimateTransformElement::parseTransformValue):
(WebCore::SVGAnimateTransformElement::calculateRotationFromMatrix):
(WebCore::SVGAnimateTransformElement::initialMatrix):
* ksvg2/svg/SVGAnimateTransformElement.h:
* ksvg2/svg/SVGAnimatedLength.idl: Added.
* ksvg2/svg/SVGAnimationElement.cpp:
(SVGAnimationElement::closeRenderer):
* ksvg2/svg/SVGAnimationElement.h:
* ksvg2/svg/SVGCircleElement.h:
* ksvg2/svg/SVGClipPathElement.h:
* ksvg2/svg/SVGColor.cpp:
(WebCore::SVGColor::SVGColor):
(WebCore::SVGColor::rgbColor):
(WebCore::SVGColor::setRGBColor):
(WebCore::SVGColor::setRGBColorICCColor):
(WebCore::SVGColor::setColor):
(WebCore::SVGColor::color):
* ksvg2/svg/SVGColor.h:
(WebCore::SVGColor::):
(WebCore::SVGColor::setRGBColor):
* ksvg2/svg/SVGColor.idl: Added.
* ksvg2/svg/SVGComponentTransferFunctionElement.h:
* ksvg2/svg/SVGCursorElement.h:
* ksvg2/svg/SVGDefsElement.h:
* ksvg2/svg/SVGDescElement.h:
* ksvg2/svg/SVGDocument.idl: Added.
* ksvg2/svg/SVGElement.cpp:
(WebCore::SVGElement::SVGElement):
(WebCore::SVGElement::isSupported):
(WebCore::SVGElement::id):
(WebCore::SVGElement::setId):
(WebCore::SVGElement::xmlbase):
(WebCore::SVGElement::setXmlbase):
(WebCore::SVGElement::ownerSVGElement):
(WebCore::SVGElement::viewportElement):
(WebCore::SVGElement::tryGetAttribute):
(WebCore::SVGElement::tryGetAttributeNS):
(WebCore::SVGElement::childShouldCreateRenderer):
* ksvg2/svg/SVGElement.h:
* ksvg2/svg/SVGElement.idl: Added.
* ksvg2/svg/SVGEllipseElement.h:
* ksvg2/svg/SVGEvent.idl: Added.
* ksvg2/svg/SVGFEBlendElement.h:
* ksvg2/svg/SVGFEColorMatrixElement.h:
* ksvg2/svg/SVGFEComponentTransferElement.h:
* ksvg2/svg/SVGFECompositeElement.h:
* ksvg2/svg/SVGFEDiffuseLightingElement.h:
* ksvg2/svg/SVGFEDistantLightElement.h:
* ksvg2/svg/SVGFEFloodElement.h:
* ksvg2/svg/SVGFEFuncAElement.h:
* ksvg2/svg/SVGFEFuncBElement.h:
* ksvg2/svg/SVGFEFuncGElement.h:
* ksvg2/svg/SVGFEFuncRElement.h:
* ksvg2/svg/SVGFEGaussianBlurElement.h:
* ksvg2/svg/SVGFEImageElement.h:
* ksvg2/svg/SVGFELightElement.h:
* ksvg2/svg/SVGFEMergeElement.h:
* ksvg2/svg/SVGFEMergeNodeElement.h:
* ksvg2/svg/SVGFEOffsetElement.h:
* ksvg2/svg/SVGFEPointLightElement.h:
* ksvg2/svg/SVGFESpecularLightingElement.h:
* ksvg2/svg/SVGFESpotLightElement.h:
* ksvg2/svg/SVGFETileElement.h:
* ksvg2/svg/SVGFETurbulenceElement.h:
* ksvg2/svg/SVGFilterElement.h:
* ksvg2/svg/SVGFilterPrimitiveStandardAttributes.h:
* ksvg2/svg/SVGForeignObjectElement.h:
* ksvg2/svg/SVGGElement.h:
* ksvg2/svg/SVGGradientElement.h:
* ksvg2/svg/SVGHelper.cpp:
(WebCore::SVGHelper::PercentageOfViewport):
(WebCore::SVGHelper::ParseSeperatedList):
* ksvg2/svg/SVGImageElement.h:
* ksvg2/svg/SVGLength.h:
(WebCore::SVGLength::):
* ksvg2/svg/SVGLength.idl: Added.
* ksvg2/svg/SVGLineElement.h:
* ksvg2/svg/SVGLinearGradientElement.h:
* ksvg2/svg/SVGLocatable.cpp:
(SVGLocatable::getBBox):
* ksvg2/svg/SVGLocatable.h:
* ksvg2/svg/SVGMarkerElement.h:
* ksvg2/svg/SVGMaskElement.h:
* ksvg2/svg/SVGMatrix.cpp:
(SVGMatrix::inverse):
(SVGMatrix::rotateFromVector):
* ksvg2/svg/SVGMatrix.h:
* ksvg2/svg/SVGMatrix.idl: Added.
* ksvg2/svg/SVGNumber.idl: Added.
* ksvg2/svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::getPointAtLength):
* ksvg2/svg/SVGPathElement.h:
* ksvg2/svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::x):
(WebCore::SVGPatternElement::y):
(WebCore::SVGPatternElement::width):
(WebCore::SVGPatternElement::height):
(WebCore::SVGPatternElement::pushAttributeContext):
(WebCore::SVGPatternElement::fillAttributesFromReferencePattern):
(WebCore::SVGPatternElement::drawPatternContentIntoTile):
(WebCore::SVGPatternElement::notifyClientsToRepaint):
(WebCore::SVGPatternElement::notifyAttributeChange):
(WebCore::SVGPatternElement::canvasResource):
(WebCore::SVGPatternElement::getCTM):
* ksvg2/svg/SVGPatternElement.h:
* ksvg2/svg/SVGPoint.idl: Added.
* ksvg2/svg/SVGPolyElement.h:
* ksvg2/svg/SVGPolygonElement.h:
* ksvg2/svg/SVGPolylineElement.h:
* ksvg2/svg/SVGRadialGradientElement.h:
* ksvg2/svg/SVGRect.idl: Added.
* ksvg2/svg/SVGRectElement.h:
* ksvg2/svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::SVGSVGElement):
(WebCore::SVGSVGElement::~SVGSVGElement):
(WebCore::SVGSVGElement::viewport):
(WebCore::SVGSVGElement::currentTranslate):
(WebCore::SVGSVGElement::unsuspendRedraw):
(WebCore::SVGSVGElement::getIntersectionList):
(WebCore::SVGSVGElement::getEnclosureList):
(WebCore::SVGSVGElement::checkIntersection):
(WebCore::SVGSVGElement::checkEnclosure):
(WebCore::SVGSVGElement::createSVGNumber):
(WebCore::SVGSVGElement::createSVGPoint):
(WebCore::SVGSVGElement::createSVGRect):
(WebCore::SVGSVGElement::pauseAnimations):
(WebCore::SVGSVGElement::unpauseAnimations):
(WebCore::SVGSVGElement::animationsPaused):
(WebCore::SVGSVGElement::getCurrentTime):
(WebCore::SVGSVGElement::setCurrentTime):
* ksvg2/svg/SVGSVGElement.h:
(WebCore::SVGSVGElement::timeScheduler):
* ksvg2/svg/SVGSVGElement.idl: Added.
* ksvg2/svg/SVGScriptElement.h:
* ksvg2/svg/SVGSetElement.cpp:
(WebCore::SVGSetElement::SVGSetElement):
(WebCore::SVGSetElement::handleTimerEvent):
* ksvg2/svg/SVGSetElement.h:
* ksvg2/svg/SVGStopElement.h:
* ksvg2/svg/SVGStyleElement.h:
* ksvg2/svg/SVGStyledElement.h:
* ksvg2/svg/SVGStyledLocatableElement.cpp:
(SVGStyledLocatableElement::getBBox):
* ksvg2/svg/SVGStyledLocatableElement.h:
* ksvg2/svg/SVGStyledTransformableElement.cpp:
(SVGStyledTransformableElement::getBBox):
* ksvg2/svg/SVGStyledTransformableElement.h:
* ksvg2/svg/SVGSwitchElement.h:
* ksvg2/svg/SVGSymbolElement.h:
* ksvg2/svg/SVGTRefElement.h:
* ksvg2/svg/SVGTSpanElement.h:
* ksvg2/svg/SVGTextContentElement.cpp:
(SVGTextContentElement::getStartPositionOfChar):
(SVGTextContentElement::getEndPositionOfChar):
(SVGTextContentElement::getExtentOfChar):
(SVGTextContentElement::getCharNumAtPosition):
(SVGTextContentElement::parseMappedAttribute):
* ksvg2/svg/SVGTextContentElement.h:
* ksvg2/svg/SVGTextElement.cpp:
(WebCore::SVGTextElement::getBBox):
* ksvg2/svg/SVGTextElement.h:
* ksvg2/svg/SVGTextPositioningElement.h:
* ksvg2/svg/SVGTitleElement.h:
* ksvg2/svg/SVGTransform.h:
(WebCore::SVGTransform::):
* ksvg2/svg/SVGTransform.idl: Added.
* ksvg2/svg/SVGUseElement.h:
* ksvg2/svg/SVGViewElement.h:
* page/Frame.cpp:
(WebCore::Frame::Frame):
(WebCore::Frame::pauseTimeouts):
(WebCore::Frame::resumeTimeouts):
* platform/Color.h:
* rendering/RenderBR.h:
* rendering/RenderBox.h:
(WebCore::RenderBox::renderName):
* rendering/RenderCanvas.h:
(WebCore::RenderCanvas::view):
* rendering/RenderContainer.h:
* rendering/RenderFlexibleBox.h:
* rendering/RenderFlow.h:
(WebCore::RenderFlow::RenderFlow):
* rendering/RenderInline.h:
* rendering/RenderTableSection.h:
* rendering/RenderTextFragment.h:
(WebCore::RenderTextFragment::contentString):
* xml/xmlattrs.in: Added.
2006-05-30 Geoffrey Garen <ggaren@apple.com>
Reviewed by Maciej.
- Fixed <rdar://problem/4559720> window sizing: make javascript window
and screen sizing methods and properties work @ HIDPI
The general approach here is to change some ints to floats, make
a few key functions that scale between WebView and window/screen
coordinates, and change other functions that work with screen
coordinates to use the scaling functions for their underlying
implementations.
* manual-tests/window-open-features.html: Removed.
* manual-tests/window-sizing.html: Added. More test coverage.
* bindings/js/kjs_window.cpp: Changed ints to floats and IntRects to
FloatRects, because window coordinates can be fractional when scaled
to WebView/DOM coordinates.
(KJS::floatFeature):
(KJS::showModalDialog):
(KJS::Window::getValueProperty):
(KJS::constrainToVisible):
(KJS::WindowFunc::callAsFunction):
* bridge/BrowserExtension.h:
* bridge/mac/BrowserExtensionMac.mm:
(WebCore::BrowserExtensionMac::createNewWindow): Removed custom scaling
code and replaced with calls to Page::windowRect and
Page::setWindowRect. Renamed 'page' and 'bridge' to 'pageBridge' and
'frameBridge,' respectively.
* bridge/mac/PageMac.mm:
(WebCore::Page::windowRect): Changed to use scaling
(WebCore::Page::setWindowRect): ditto
* bridge/mac/WebCoreFrameBridge.mm:
(globalPoint):
* page/Page.h:
* platform/IntRect.h:
* platform/Screen.h:
* platform/mac/MouseEventMac.mm:
(WebCore::globalPositionForEvent): Changed to use flipScreenPoint
* platform/mac/ScreenMac.mm:
(WebCore::flipScreenRect): New key function
(WebCore::flipScreenPoint): New key function
(WebCore::scaleScreenRectToView): New key function
(WebCore::scaleViewRectToScreen): New key function
(WebCore::screenRect): Changed to use scaling
(WebCore::usableScreenRect): ditto
Feeble attempt to preserve Windows build:
* platform/win/ScreenWin.cpp:
(WebCore::scaleScreenRectToWidget): stub -- doesn't actually scale
(WebCore::scaleWidgetRectToScreen): ditto
* bridge/win/PageWin.cpp:
(WebCore::Page::Page):
(WebCore::Page::widget):
2006-05-30 David Hyatt <hyatt@apple.com>
Rename RenderCanvas to RenderView. Rename canvas(), isCanvas()
to view(), isView(). Rename the frame view accessor on the old canvas
from view() to frameView() (to avoid view()->view(), since that just looks
stupid). :)
Reviewed by andersca
* WebCore.vcproj/WebCore/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/kjs_dom.cpp:
* bindings/js/kjs_window.cpp:
* bridge/mac/FrameMac.mm:
* bridge/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge _setupRootForPrinting:]):
(-[WebCoreFrameBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]):
(-[WebCoreFrameBridge selectionColor]):
(-[WebCoreFrameBridge accessibilityTree]):
* dom/Document.cpp:
(WebCore::Document::attach):
(WebCore::Document::updateSelection):
(WebCore::Document::prepareMouseEvent):
* editing/SelectionController.cpp:
* kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
* ksvg2/svg/SVGClipPathElement.cpp:
(SVGClipPathElement::canvasResource):
* ksvg2/svg/SVGFEFloodElement.cpp:
(SVGFEFloodElement::filterEffect):
* ksvg2/svg/SVGGradientElement.cpp:
(SVGGradientElement::rebuildStops):
* ksvg2/svg/SVGHelper.cpp:
(SVGHelper::PercentageOfViewport):
* ksvg2/svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::getPointAtLength):
* ksvg2/svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::currentTranslate):
* ksvg2/svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::view):
(WebCore::SVGStyledElement::pushAttributeContext):
* ksvg2/svg/SVGStyledElement.h:
* kwq/WebCoreAXObject.mm:
(-[WebCoreAXObject accessibilityShouldUseUniqueId]):
(-[WebCoreAXObject role]):
(-[WebCoreAXObject value]):
(-[WebCoreAXObject position]):
(-[WebCoreAXObject accessibilityIsIgnored]):
(-[WebCoreAXObject accessibilityAttributeNames]):
(-[WebCoreAXObject topView]):
(-[WebCoreAXObject accessibilityAttributeValue:]):
* page/Frame.cpp:
(WebCore::Frame::selectionRect):
(WebCore::Frame::paint):
(WebCore::Frame::adjustPageHeight):
(WebCore::Frame::forceLayoutWithPageWidthRange):
* page/FrameView.cpp:
(WebCore::FrameView::adjustViewSize):
(WebCore::FrameView::layout):
* page/FrameView.h:
* rendering/AutoTableLayout.cpp:
(WebCore::shouldScaleColumns):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::MarginInfo::MarginInfo):
(WebCore::RenderBlock::isSelfCollapsingBlock):
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::paintChildren):
(WebCore::RenderBlock::setSelectionState):
(WebCore::RenderBlock::isSelectionRoot):
(WebCore::RenderBlock::fillInlineSelectionGaps):
(WebCore::RenderBlock::lowestPosition):
(WebCore::RenderBlock::rightmostPosition):
(WebCore::RenderBlock::leftmostPosition):
(WebCore::RenderBlock::clearFloats):
(WebCore::RenderBlock::nodeAtPoint):
(WebCore::RenderBlock::calcBlocminMaxWidth):
(WebCore::RenderBlock::inRootBlockContext):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::setStyle):
(WebCore::RenderBox::paintRootBoxDecorations):
(WebCore::RenderBox::paintBackgroundExtended):
(WebCore::RenderBox::calcHeight):
(WebCore::RenderBox::calcPercentageHeight):
(WebCore::RenderBox::availableHeightUsing):
* rendering/RenderCanvas.cpp: Removed.
* rendering/RenderCanvas.h: Removed.
* rendering/RenderContainer.cpp:
(WebCore::RenderContainer::removeChildNode):
* rendering/RenderFileButton.cpp:
(WebCore::RenderFileButton::RenderFileButton):
* rendering/RenderFlow.cpp:
(WebCore::RenderFlow::destroy):
(WebCore::RenderFlow::paintLines):
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::layout):
(WebCore::RenderFrameSet::userResize):
(WebCore::RenderFrameSet::setResizing):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paint):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPositions):
(WebCore::RenderLayer::updateLayerPosition):
(WebCore::RenderLayer::stackingContext):
(WebCore::RenderLayer::enclosingPositionedAncestor):
(WebCore::RenderLayer::convertToLayerCoords):
(WebCore::RenderLayer::scrollToOffset):
(WebCore::isSubframeCanvas):
(WebCore::RenderLayer::intersectsDamageRect):
* rendering/RenderLayer.h:
(WebCore::RenderLayer::isStackingContext):
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::paint):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::scroll):
(WebCore::RenderObject::containingBlock):
(WebCore::RenderObject::repaint):
(WebCore::RenderObject::repaintRectangle):
(WebCore::RenderObject::repaintAfterLayoutIfNeeded):
(WebCore::RenderObject::draggableNode):
(WebCore::RenderObject::selectionStartEnd):
(WebCore::RenderObject::setStyle):
(WebCore::RenderObject::viewRect):
(WebCore::RenderObject::view):
(WebCore::RenderObject::container):
(WebCore::RenderObject::removeFromObjectLists):
(WebCore::RenderObject::scheduleRelayout):
(WebCore::RenderObject::imageChanged):
(WebCore::RenderObject::maximalOutlineSize):
* rendering/RenderObject.h:
(WebCore::RenderObject::isRenderView):
* rendering/RenderTextArea.cpp:
(WebCore::RenderTextArea::RenderTextArea):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintCheckbox):
(WebCore::RenderThemeMac::paintRadio):
(WebCore::RenderThemeMac::paintButton):
* rendering/RenderTreeAsText.cpp:
(externalRepresentation):
* rendering/RenderView.cpp: Added.
(WebCore::RenderView::RenderView):
(WebCore::RenderView::~RenderView):
(WebCore::RenderView::calcHeight):
(WebCore::RenderView::calcWidth):
(WebCore::RenderView::calcMinMaxWidth):
(WebCore::RenderView::layout):
(WebCore::RenderView::absolutePosition):
(WebCore::RenderView::paint):
(WebCore::RenderView::paintBoxDecorations):
(WebCore::RenderView::repaintViewRectangle):
(WebCore::RenderView::getAbsoluteRepaintRect):
(WebCore::RenderView::computeAbsoluteRepaintRect):
(WebCore::RenderView::absoluteRects):
(WebCore::RenderView::selectionRect):
(WebCore::RenderView::setSelection):
(WebCore::RenderView::clearSelection):
(WebCore::RenderView::selectionStartEnd):
(WebCore::RenderView::updateWidgetPositions):
(WebCore::RenderView::addWidget):
(WebCore::RenderView::removeWidget):
(WebCore::RenderView::viewRect):
(WebCore::RenderView::docHeight):
(WebCore::RenderView::docWidth):
(WebCore::RenderView::setBestTruncatedAt):
* rendering/RenderView.h: Added.
(WebCore::RenderView::renderName):
(WebCore::RenderView::isRenderView):
(WebCore::RenderView::frameView):
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::RenderWidget):
(WebCore::RenderWidget::destroy):
(WebCore::RenderWidget::updateWidgetPosition):
* rendering/RenderWidget.h:
(WebCore::RenderWidget::widget):
* rendering/bidi.cpp:
(WebCore::RenderBlock::layoutInlineChildren):
2006-05-30 Tim Omernick <timo@apple.com>
Reviewed by Geoff.
<rdar://problem/4567776> REGRESSION: window.open() links do not work at www.newarchery.com
* bindings/js/kjs_window.cpp:
(KJS::WindowFunc::callAsFunction):
Set the URL in the ResourceRequest; otherwise, it'll be uninitialized and createNewWindow() will
not be able to load the URL into a pre-existing frame.
2006-05-30 Sam Weinig <sam.weinig@gmail.com>
Reviewed by Maciej, landed by Beth.
- fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9137
Children with percentage heights of absolutely positioned element
with height: auto and top and bottom non-auto does not lay out
correctly
Adds special case.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::calcPercentageHeight):
(WebCore::RenderBox::calcReplacedHeightUsing):
2006-05-30 Sam Weinig <sam.weinig@gmail.com>
Reviewed by Hyatt, landed by Beth.
- Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9085
Absolutely positioned objects with 'height': auto and 'top': and
'bottom': non-auto should not be content based
* rendering/RenderBox.cpp:
(WebCore::RenderBox::calcAbsoluteVertical):
(WebCore::RenderBox::calcAbsoluteVerticalValues):
(WebCore::RenderBox::calcAbsoluteHorizontalReplaced):
(WebCore::RenderBox::calcAbsoluteVerticalReplaced):
2006-05-30 Eric Seidel <eric@eseidel.com>
Reviewed by andersca.
Small amount of svg-related code cleanup.
No test case possible.
* ksvg2/svg/SVGColor.h:
* ksvg2/svg/SVGLength.cpp:
(SVGLength::SVGLength):
(SVGLength::value):
* ksvg2/svg/SVGMarkerElement.cpp:
* ksvg2/svg/SVGMatrix.cpp:
(SVGMatrix::SVGMatrix):
(SVGMatrix::copy):
(SVGMatrix::postMultiply):
(SVGMatrix::inverse):
(SVGMatrix::postTranslate):
(SVGMatrix::postScale):
(SVGMatrix::postScaleNonUniform):
(SVGMatrix::postRotate):
(SVGMatrix::postRotateFromVector):
(SVGMatrix::postFlipX):
(SVGMatrix::postFlipY):
(SVGMatrix::postSkewX):
(SVGMatrix::postSkewY):
(SVGMatrix::multiply):
(SVGMatrix::translate):
(SVGMatrix::scale):
(SVGMatrix::scaleNonUniform):
(SVGMatrix::rotate):
(SVGMatrix::rotateFromVector):
(SVGMatrix::flipX):
(SVGMatrix::flipY):
(SVGMatrix::skewX):
(SVGMatrix::skewY):
(SVGMatrix::setMatrix):
(SVGMatrix::qmatrix):
(SVGMatrix::removeScale):
* ksvg2/svg/SVGMatrix.h:
2006-05-30 Eric Seidel <eric@eseidel.com>
Reviewed by andersca.
Small amount of bindings-related code cleanup.
No test case possible.
* bindings/js/JSHTMLFormElementCustom.cpp:
(WebCore::JSHTMLFormElement::nameGetter):
* bindings/js/JSXMLSerializer.cpp:
(WebCore::JSXMLSerializerConstructorImp::JSXMLSerializerConstructorImp):
(WebCore::JSXMLSerializerConstructorImp::implementsConstruct):
(WebCore::JSXMLSerializerConstructorImp::construct):
(WebCore::):
(WebCore::JSXMLSerializer::JSXMLSerializer):
(WebCore::JSXMLSerializerProtoFunc::callAsFunction):
* bindings/js/JSXMLSerializer.h:
(WebCore::JSXMLSerializer::toBoolean):
(WebCore::JSXMLSerializer::classInfo):
(WebCore::JSXMLSerializer::):
* bindings/js/kjs_window.cpp:
(KJS::Window::getValueProperty):
2006-05-27 Anders Carlsson <acarlsson@apple.com>
* bindings/js/JSHTMLElementWrapperFactory.cpp:
Correct include file names.
2006-05-26 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
<rdar://problem/4564296> Mail crashes on Leopard9A184 when I attempt to compose a new message
* dom/Position.cpp:
(WebCore::Position::inRenderedContent):
Removed a candidate at [html, 0].
* editing/CreateLinkCommand.cpp:
(WebCore::CreateLinkCommand::doApply): Added early return when there is no selection.
* editing/InsertLineBreakCommand.cpp:
(WebCore::InsertLineBreakCommand::doApply): Ditto.
* editing/InsertTextCommand.cpp:
(WebCore::InsertTextCommand::input): Ditto.
* editing/Selection.cpp:
(WebCore::Selection::validate): If visible positions can't be created from the endpoints,
then create a null selection. Not doing this was making editing code think there was
a valid, editable selection even though there wasn't.
* editing/UnlinkCommand.cpp:
(WebCore::UnlinkCommand::doApply): Early return.
* editing/VisiblePosition.cpp:
(WebCore::VisiblePosition::initDeepPosition): Special case the html/body element boundary.
It looks like a non-editable/editable boundary since rootEditableElement stops at the body
even if the html element is editable.
2006-05-26 Adele Peterson <adele@apple.com>
Reviewed by Justin.
Fixes a mistake in my last checkin. Uses maxDeepOffset to get the end position for
the textarea's inner div.
* rendering/RenderTextField.cpp: (WebCore::RenderTextField::textWithHardLineBreaks):
2006-05-26 Adele Peterson <adele@apple.com>
Reviewed by Hyatt.
Added support for wrap=hard for new textarea implementation.
Tests: fast/forms/textarea-appearance-wrap.html
* dom/Range.h: Added version of toString that will convert BRs to newlines.
* dom/Range.cpp: (WebCore::Range::toString):
* editing/ReplaceSelectionCommand.cpp: (WebCore::ReplacementFragment::ReplacementFragment):
When in plain-text mode, and a white-space mode that doesn't collapse whitespace, create a fragment with one text node.
* editing/visible_units.cpp:
(WebCore::previousLinePosition): Subtract scroll offset so the absolute position for the containing block is correct.
(WebCore::nextLinePosition): ditto.
* rendering/RenderText.cpp:
(WebCore::RenderText::positionForCoordinates): If the position is equal to the left edge of the box,
make the affinity downstream so the position doesn't jump back to the previous line.
(WebCore::RenderText::atLineWrap): The logic was reversed here in a recent change.
If the box is not at a line break, then its at a line wrap.
(WebCore::RenderText::caretRect): Only go to the next text box if its at a line wrap and the
affinity is also downstream. If its upstream, then the correct box is on the current line.
(WebCore::RenderText::inlineBox): ditto.
* rendering/RenderTextField.cpp:
(WebCore::RenderTextField::updateFromElement): multi line controls don't need to check
valueMatchesRenderer before updating the renderer. For textareas, the renderer should always try to update.
This matches our old textarea behavior.
(WebCore::RenderTextField::text): Pass true to textContent so it converts BRs to newlines.
(WebCore::RenderTextField::textWithHardLineBreaks): Iterate through the RootLineBoxes to find the soft wraps and replace them with newlines.
2006-05-26 Anders Carlsson <acarlsson@apple.com>
Reviewed by Geoff.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9127
Invoke capturing event listeners when AT_TARGET
* dom/EventTargetNode.cpp:
(WebCore::EventTargetNode::handleLocalEvents):
Invoke capturing event listeners for the AT_TARGET phase. This violates the
DOM spec but it's what Mozilla does.
2006-05-26 David Harrison <harrison@apple.com>
Reviewed by John Sullivan.
<rdar://problem/4514529> Add a list type parameter and a return value to _increaseSelectionListLevel
* WebCore.vcproj/WebCore/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
- Renamed ModifySelectionListLevelCommand .cpp and .h to ModifySelectionListLevel .cpp and .h
* bridge/mac/WebCoreFrameBridge.h:
* bridge/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge canIncreaseSelectionListLevel]):
(-[WebCoreFrameBridge canDecreaseSelectionListLevel]):
(-[WebCoreFrameBridge increaseSelectionListLevel]):
(-[WebCoreFrameBridge decreaseSelectionListLevel]):
- Call functions in IncreaseSelectionListLevelCommand or DecreaseSelectionListLevelCommand instead
of ModifySelectionListLevelCommand.
(-[WebCoreFrameBridge increaseSelectionListLevelOrdered]):
(-[WebCoreFrameBridge increaseSelectionListLevelUnordered]):
- Added.
* editing/ModifySelectionListLevel.cpp: Added.
- Renamed from ModifySelectionListLevelCommand.cpp
- Made ModifySelectionListLevelCommand class into a useful base class for new
classes IncreaseSelectionListLevelCommand and DecreaseSelectionListLevelCommand.
(WebCore::ModifySelectionListLevelCommand::ModifySelectionListLevelCommand):
(WebCore::getStartEndListChildren):
(WebCore::ModifySelectionListLevelCommand::insertSiblingNodeRangeBefore):
(WebCore::ModifySelectionListLevelCommand::appendSiblingNodeRange):
- ModifySelectionListLevelCommand is base class for IncreaseSelectionListLevelCommand and DecreaseSelectionListLevelCommand
(WebCore::IncreaseSelectionListLevelCommand::IncreaseSelectionListLevelCommand):
(WebCore::IncreaseSelectionListLevelCommand::listElement):
(WebCore::canIncreaseListLevel):
(WebCore::IncreaseSelectionListLevelCommand::doApply):
(WebCore::IncreaseSelectionListLevelCommand::canIncreaseSelectionListLevel):
(WebCore::increaseSelectionListLevelWithType):
(WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevel):
(WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevelOrdered):
(WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevelUnordered):
- Now a subclass of ModifySelectionListLevelCommand
- Added Ordered and Unordered increaser functions
- Increaser functions return the list element that the items were moved into
(WebCore::DecreaseSelectionListLevelCommand::DecreaseSelectionListLevelCommand):
(WebCore::canDecreaseListLevel):
(WebCore::DecreaseSelectionListLevelCommand::doApply):
(WebCore::DecreaseSelectionListLevelCommand::canDecreaseSelectionListLevel):
(WebCore::DecreaseSelectionListLevelCommand::decreaseSelectionListLevel):
- No functional changes other than to become a subclass of ModifySelectionListLevelCommand
* editing/ModifySelectionListLevel.h: Added.
(WebCore::):
- Renamed from ModifySelectionListLevelCommand.cpp
* editing/ModifySelectionListLevelCommand.cpp: Removed.
- Renamed to ModifySelectionListLevel.cpp
* editing/ModifySelectionListLevelCommand.h: Removed.
- Renamed to ModifySelectionListLevel.h
* editing/htmlediting.cpp:
(WebCore::createOrderedListElement):
(WebCore::createUnorderedListElement):
* editing/htmlediting.h:
2006-05-26 Steve Falkenburg <sfalken@apple.com>
Reviewed by adele.
Build fixes/tweaks
* WebCore.vcproj/WebCore/WebCore.vcproj:
* config.h:
* ksvg2/scripts/make_names.pl:
2006-05-26 Steve Falkenburg <sfalken@apple.com>
Reviewed by adele.
Fix build
* WebCore.vcproj/WebCore/WebCore.vcproj:
* config.h:
2006-05-25 Dave Hyatt <hyatt@apple.com>
Change default font size for fixed pitch to 13 to match Safari
on Mac (and every other browser on the planet too).
Reviewed by adele
* bridge/win/FrameWin.cpp:
(WebCore::FrameWin::FrameWin):
* platform/win/FontCacheWin.cpp:
(WebCore::FontCache::getFontLinkInterface):
2006-05-25 Alice Liu <alice.liu@apple.com>
Reviewed by Adele.
* bindings/js/kjs_html.cpp:
added bindings
(KJS::HTMLElementFunction::callAsFunction):
added case to handle namedItem for select elements
* bindings/js/kjs_html.h:
added enum value for bindings
(KJS::JSHTMLElement::):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::namedItem):
implemented namedItem method
* html/HTMLSelectElement.h:
added prototype for namedItem method
2006-05-25 Dave Hyatt <hyatt@apple.com>
Make soft hyphens work on Win32 by special casing them
along with normal hyphens.
Reviewed by mjs
* rendering/break_lines.cpp:
(WebCore::nextBreakablePosition):
2006-05-25 Dave Hyatt <hyatt@apple.com>
Implement the fallback method containsCharacters for
checking if a font has the necessary glyphs to be
selected as a fallback choide.
* platform/win/FontDataWin.cpp:
(WebCore::FontData::containsCharacters):
2006-05-25 Dave Hyatt <hyatt@apple.com>
For now eliminate the logical scale factor from Cairo.
This enables bitmap fonts like MS Sans Serif to work on
Win32.
* platform/cairo/cairo/src/cairo-win32-font.c:
(cairo_win32_scaled_font_select_font):
* platform/cairo/cairo/src/cairo-win32-private.h:
* platform/cairo/font-bug-patch.txt: Removed.
* platform/cairo/scale-removal.txt: Added.
* platform/win/FontCacheWin.cpp:
(WebCore::FontCache::createFontPlatformData):
* platform/win/FontDataWin.cpp:
(WebCore::FontData::smallCapsFontData):
(WebCore::FontData::platformWidthForGlyph):
* platform/win/FontPlatformData.h:
* platform/win/GlyphMapWin.cpp:
(WebCore::GlyphMap::fillPage):
2006-05-25 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by hyatt. Landed by eseidel.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8848
TFOOT borders are copied to THEAD and TBODY
Test: fast/table/border-collapsing/border-collapsing-head-foot.html
* rendering/RenderTable.cpp:
(WebCore::RenderTable::sectionAbove): Added.
(WebCore::RenderTable::sectionBelow): Added.
(WebCore::RenderTable::cellAbove): Changed to call sectionAbove.
(WebCore::RenderTable::cellBelow): Changed to call sectionBelow.
* rendering/RenderTable.h:
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::collapsedTopBorder): Changed to call sectionAbove.
(WebCore::RenderTableCell::collapsedBottomBorder): Changed to call sectionBelow.
2006-05-25 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by hyatt. Landed by eseidel.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=3297
height property is not honored on table rows
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::addChild): Assign the row renderer to the
grid row.
(WebCore::RenderTableSection::calcRowHeight): Fix off-by-one index bug
and add vertical spacing only for grid rows that have a renderer.
(WebCore::RenderTableSection::recalcCells): Assign row renderers to
grid rows.
2006-05-25 Rob Buis <buis@kde.org>
Reviewed by darin. Landed by eseidel.
Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=5978
WebKIt+SVG should use SVGDocumentImpl for image/svg+xml
Make sure SVGDocument is created for standalone svg
documents.
* ksvg2/svg/SVGDOMImplementation.cpp:
(SVGDOMImplementation::instance):
(SVGDOMImplementation::createDocument):
* ksvg2/svg/SVGDOMImplementation.h:
* ksvg2/svg/SVGDocument.cpp:
(WebCore::SVGDocument::SVGDocument):
(WebCore::SVGDocument::~SVGDocument):
* ksvg2/svg/SVGDocument.h:
* ksvg2/svg/SVGTests.cpp:
(WebCore::SVGTests::isValid):
* ksvg2/svg/SVGTitleElement.cpp:
* ksvg2/svg/SVGTitleElement.h:
* page/Frame.cpp:
(WebCore::Frame::begin):
2006-05-25 Rob Buis <buis@kde.org>
Reviewed by darin. Landed by eseidel.
http://bugzilla.opendarwin.org/show_bug.cgi?id=5889
HTMLNames.* should be generated using make_names.pl
Use a patched make_names.pl to autogenerate HTMLNames.*
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLNames.cpp: Removed.
* html/HTMLNames.h: Removed.
* html/HTMLTagNames.in: Added.
* html/HTMLAttributeNames.in: Added.
* ksvg2/scripts/make_names.pl:
2006-05-25 Eric Seidel <eric@eseidel.com>
Reviewed by andersca.
Add "HasIndexGetter" support to bindings autogen system.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9057
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSHTMLInputElementBase.cpp:
* bindings/js/kjs_css.cpp:
(KJS::toJS):
* bindings/js/kjs_css.h:
* bindings/js/kjs_dom.cpp:
(KJS::DOMNamedNodeMap::getOwnPropertySlot):
* bindings/scripts/CodeGeneratorJS.pm:
* css/CSSValueList.idl: Added.
2006-05-24 David Hyatt <hyatt@apple.com>
Implement font aliasing of family names for Courier/Courier New,
Arial/Helvetica, and Times/Times New Roman. This behavior matches
WinIE and Firefox.
Reviewed by maciej
Test cases not really possible, since they would have to rely on people
not having the fonts installed (so not having installed Office).
* platform/FontCache.cpp:
(WebCore::alternateFamilyName):
(WebCore::FontCache::getCachedFontPlatformData):
* platform/FontCache.h:
* rendering/RenderContainer.cpp:
(WebCore::RenderContainer::removeLeftoverAnonymousBoxes):
=== WebCore-521.11 ===
2006-05-24 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
<rdar://problem/4549610> REGRESSION: No initial cursor in Mail reply or Blot document
<rdar://problem/4560698> Mail is very crashy in Leopard9A182, WebCore::Range::compareBoundaryPoints(WebCore::Node*, int, WebCore::Node*, int)
* page/Frame.cpp:
(WebCore::Frame::setSelectionFromNone): Find the body and stick a caret
in it.
2006-05-24 Geoffrey Garen <ggaren@apple.com>
Rubber stamped by Anders.
Removed meaningless 'dom::' prefix in IDL files.
* dom/Range.idl:
* html/CanvasRenderingContext2D.idl:
* html/HTMLOptionElement.idl:
2006-05-24 Geoffrey Garen <ggaren@apple.com>
Reviewed by andersca.
- Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=9095
regression: can't select by setting option.selected to true
'text' and 'selected' were erroneously marked read-only for option elements.
* html/HTMLOptionElement.idl:
2006-05-24 Geoffrey Garen <ggaren@apple.com>
Reviewed by mjs.
- WebCore half of fix for <rdar://problem/4557926> TOT REGRESSION: Crash
occurs when attempting to view image in slideshow mode at
http://d.smugmug.com/gallery/581716 ( KJS::IfNode::execute
(KJS::ExecState*) + 312)
On alternate threads, DOMObjects remain in the
ScriptInterpreter's cache because they're not collected. So, they
need an opportunity to mark their children.
I'm not particularly happy with this solution because it fails to
resolve many outstanding issues with the DOM object cache. Since none
of those issues is a crasher or a serious compatibility concern,
and since the behavior of other browsers is not much to go on in this
case, I've filed <rdar://problem/4561439> about that, and I'm moving
on with my life.
Also added functionality for testing garbage collection from inside
DumpRenderTree.
Also removed XMLHttpRequest from the DOM object cache because XMLHttpRequest
objects aren't accessed through the DOM.
Also added JS locking around access to some shared data structures in
WebCoreJavaScript, even though it probably doesn't matter in practice.
* bindings/js/JSXMLHttpRequest.cpp:
(KJS::JSXMLHttpRequest::JSXMLHttpRequest):
(KJS::JSXMLHttpRequest::~JSXMLHttpRequest):
* bindings/js/kjs_binding.cpp:
(KJS::ScriptInterpreter::mark):
* bindings/js/kjs_binding.h:
* bridge/mac/WebCoreJavaScript.h:
* bridge/mac/WebCoreJavaScript.mm:
(collect):
(+[WebCoreJavaScript objectCount]):
(+[WebCoreJavaScript interpreterCount]):
(+[WebCoreJavaScript protectedObjectCount]):
(+[WebCoreJavaScript garbageCollect]):
(+[WebCoreJavaScript garbageCollectOnAlternateThread:]):
(+[WebCoreJavaScript shouldPrintExceptions]):
(+[WebCoreJavaScript setShouldPrintExceptions:]):
2006-05-24 Dave Hyatt <hyatt@apple.com>
Fix the font cache corruption problems on Win32. Move the
native font destruction code out of FontPlatformData and
into FontData. Implement smallCaps.
* platform/win/FontDataWin.cpp:
(WebCore::FontData::platformDestroy):
(WebCore::FontData::smallCapsFontData):
* platform/win/FontPlatformDataWin.cpp:
(WebCore::FontPlatformData::~FontPlatformData):
2006-05-24 Anders Carlsson <acarlsson@apple.com>
Reviewed by Maciej.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9093
Implement document.scripts
* bindings/js/kjs_html.cpp:
(KJS::JSHTMLDocument::getValueProperty):
Return document.scripts() instead of a placeholder object.
* dom/Document.cpp:
(WebCore::Document::scripts):
* dom/Document.h:
Add Document::scripts.
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::traverseNextItem):
* html/HTMLCollection.h:
(WebCore::HTMLCollection::):
Add scripts collection type which traverses all script elements.
2006-05-24 Anders Carlsson <acarlsson@apple.com>
Reviewed by Geoff.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9092
innerText is empty for elements without renderers
* dom/Node.cpp:
(WebCore::Node::textContent):
* dom/Node.h:
Add optional convertBRsToNewlines argument for textContent.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::innerText):
If the element doesn't have a renderer, return textContent.
2006-05-24 Dave Hyatt <hyatt@apple.com>
Fix a bug with the computation of the Cairo glyph offsets
on the Win32 code path.
* ChangeLog:
* platform/GlyphBuffer.h:
(WebCore::GlyphBuffer::add):
* platform/win/FontWin.cpp:
(WebCore::Font::drawGlyphs):
2006-05-23 Dave Hyatt <hyatt@apple.com>
Disable some code in Cairo that is attempting to clip
runs of text to their glyph boundaries, since:
(a) Why re-measure text again when I just gave you
the glyph bounds anyway.
(b) It gets the measurements wrong.
* platform/GlyphBuffer.h:
(WebCore::GlyphBuffer::add):
* platform/cairo/cairo/src/cairo-surface-fallback.c:
(_cairo_surface_fallback_show_glyphs):
* platform/cairo/clipping-cleartype-font-bug-patch.txt: Added.
* platform/win/FontWin.cpp:
(WebCore::Font::drawGlyphs):
2006-05-23 Timothy Hatcher <timothy@apple.com>
Reviewed by Eric.
Remove the recent idl files from the WebCore target to prevent them
from being copied into the framework resources.
* WebCore.xcodeproj/project.pbxproj:
2006-05-23 John Sullivan <sullivan@apple.com>
Reviewed by Justin Garcia and Levi Weintraub.
- fixed Bug 9072: REGRESSION: Misspelling marker incorrect in editing/deleting/delete-and-undo.html
* dom/Document.cpp:
(WebCore::Document::removeMarkers):
One more time to get this right, ugh. There is still one case where we don't want to advance the
iterator, and that's when we remove a marker and do not insert a replacement marker. So I undid
my previous patch, and added it++ to each of the two cases that insert a replacement marker. Now
the layout tests pass even with the pixel tests enabled.
2006-05-23 Dave Hyatt <hyatt@apple.com>
Do an initial implementation of CookieJar on Win32. No policy
checking yet and the cookies are just always on.
Reviewed by mjs
* WebCore.vcproj/WebCore/WebCore.vcproj:
* platform/win/CookieJarWin.cpp: Added.
(WebCore::setCookies):
(WebCore::cookies):
(WebCore::cookiesEnabled):
* platform/win/TemporaryLinkStubs.cpp:
2006-05-23 Dave Hyatt <hyatt@apple.com>
Fix the JS autogeneration for WebCore so that the hashtables
are correct on Win32.
Switch to using GetCharWidthI so that we can obtain widths
for glyphs instead of having to obtain them from UChars.
Reviewed by eric (autogeneration) and maciej (fonts)
* bindings/scripts/CodeGeneratorJS.pm:
* platform/Font.cpp:
(WebCore::WidthIterator::advance):
* platform/FontData.cpp:
(WebCore::m_smallCapsFontData):
(WebCore::FontData::widthForGlyph):
* platform/FontData.h:
* platform/mac/FontDataMac.mm:
(-[NSFont WebCore]):
* platform/win/FontDataWin.cpp:
(WebCore::FontData::platformWidthForGlyph):
2006-05-23 Levi Weintraub <lweintraub@apple.com>
Reviewed by Hyatt.
Cleaned up changes to markup by adding the non-virtual
nodeNamePreservingCase accessor function.
* dom/Element.cpp:
(WebCore::Element::nodeNamePreservingCase):
* dom/Element.h:
* editing/markup.cpp:
(WebCore::startMarkup):
(WebCore::endMarkup):
2006-05-23 John Sullivan <sullivan@apple.com>
Reviewed by Anders Carlsson.
* dom/Document.cpp:
(WebCore::Document::removeMarkers):
Fix to my previous checkin (which broke a layout test).
Advance the iterator position every time through the loop; formerly it was not advanced in the
case where a marker was actually removed, causing an infinite loop in certain cases. Also
modified a comment that was confusing the situation by falsely claiming that iterating over a
just-inserted node would always be OK.
2006-05-23 Anders Carlsson <acarlsson@apple.com>
Reviewed by Maciej.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9017
Weather2.css incorrectly treated as JavaScript file @ www.live.com
* dom/Element.cpp:
(WebCore::Element::getAttribute):
(WebCore::Element::setAttribute):
(WebCore::Element::removeAttribute):
(WebCore::Element::getAttributeNode):
(WebCore::Element::hasAttribute):
Use new getAttributeItem method.
* dom/NamedAttrMap.cpp:
(WebCore::NamedAttrMap::getNamedItem):
(WebCore::NamedAttrMap::removeNamedItem):
Use new getAttributeItem method.
(WebCore::NamedAttrMap::getAttributeItem):
* dom/NamedAttrMap.h:
New method which returns the attribute based on the nodeName.
2006-05-22 Eric Seidel <eric@eseidel.com>
Rubber-stamped by adele.
* bindings/js/kjs_html.h: simple style cleanup.
=== WebCore-521.10 ===
2006-05-22 John Sullivan <sullivan@apple.com>
Reviewed by Anders Carlsson.
- fixed Bug 9038: Rework Document::TextMarker mechanism to not use deprecated data structures
Changed Document::markersForNode and Document::MarkerMap to use Vector rather than
DeprecatedValueList and DeprecatedValueListIterator.
* dom/Document.h:
* dom/Document.cpp:
(WebCore::Document::addMarker):
(WebCore::Document::copyMarkers):
(WebCore::Document::removeMarkers):
(WebCore::Document::markersForNode):
(WebCore::Document::repaintMarkers):
(WebCore::Document::shiftMarkers):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintAllMarkersOfType):
2006-05-22 Levi Weintraub <lweintraub@apple.com>
Reviewed by Eric.
- Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8393
<br>s created by createMarkup aren't valid xhtml
Fixed uppered output from innerHTML
* editing/markup.cpp:
(WebCore::startMarkup):
(WebCore::endMarkup):
2006-05-21 Dave Hyatt <hyatt@apple.com>
Fix Win32 bustage. I forgot to add a bunch of files.
Also tweak some existing functions a bit (just cleanup).
* platform/FontCache.cpp:
(WebCore::FontCache::getCachedFontPlatformData):
(WebCore::FontCache::getFontData):
* platform/FontCache.h:
* platform/mac/FontCacheMac.mm:
(WebCore::FontCache::createFontPlatformData):
* platform/win/FontDataWin.cpp:
(WebCore::FontData::platformDestroy):
(WebCore::FontData::smallCapsFontData):
2006-05-21 Adele Peterson <adele@apple.com>
Reviewed by Maciej.
- Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9016
crash loading live.com in TreeShared::ref because accessing RenderTextField::text() can destroy the RenderTextField
* rendering/RenderTextField.cpp: (WebCore::RenderTextField::text):
Reverting recent change to user innerText instead of textContent. For textareas,
we need a better solution than textContent that also takes newlines into account,
but this should fix this crasher.
2006-05-21 Anders Carlsson <acarlsson@apple.com>
Fix build.
* ForwardingHeaders/wtf/MathExtras.h: Added.
2006-05-20 Dave Hyatt <hyatt@apple.com>
Switch on Cairo-based text rendering on Win32. This is tracked
by bug 9019.
Reviewed by maciej
* WebCore.vcproj/WebCore/WebCore.vcproj:
* config.h:
* platform/Font.cpp:
(WebCore::WidthIterator::advance):
(WebCore::WidthIterator::normalizeVoicingMarks):
(WebCore::Font::width):
* platform/Font.h:
(WebCore::Font::isRoundingHackCharacter):
* platform/FontCache.cpp:
(WebCore::computeHash):
(WebCore::FontPlatformDataCacheKeyTraits::deletedValue):
(WebCore::FontPlatformDataCacheKeyTraits::emptyValue):
(WebCore::FontDataCacheKeyTraits::deletedValue):
(WebCore::FontDataCacheKeyTraits::emptyValue):
* platform/FontData.cpp:
(WebCore::m_smallCapsFontData):
(WebCore::FontData::widthForGlyph):
* platform/FontData.h:
* platform/FontPlatformData.h: Removed.
* platform/GlyphBuffer.h:
(WebCore::GlyphBuffer::clear):
(WebCore::GlyphBuffer::glyphs):
(WebCore::GlyphBuffer::advances):
(WebCore::GlyphBuffer::swap):
(WebCore::GlyphBuffer::glyphAt):
(WebCore::GlyphBuffer::advanceAt):
(WebCore::GlyphBuffer::add):
* platform/GlyphMap.cpp:
(WebCore::GlyphMap::locatePage):
* platform/cairo/cairo/src/cairo-win32-font.c:
(cairo_win32_scaled_font_select_font):
* platform/cairo/font-bug-patch.txt: Added.
* platform/mac/FontDataMac.mm:
(-[NSFont WebCore]):
* platform/mac/FontPlatformData.h: Added.
(WebCore::FontPlatformData::FontPlatformData):
* platform/win/FontDataWin.cpp: Added.
(WebCore::FontData::platformInit):
(WebCore::FontData::platformDestroy):
(WebCore::FontData::smallCapsFontData):
(WebCore::FontData::containsCharacters):
(WebCore::FontData::determinePitch):
(WebCore::FontData::platformWidthForGlyph):
* platform/win/FontPlatformDataWin.cpp:
(WebCore::m_size):
(WebCore::FontPlatformData::~FontPlatformData):
* platform/win/FontWin.cpp:
(WebCore::notImplemented):
(WebCore::Font::drawGlyphs):
(WebCore::Font::selectionRectForComplexText):
(WebCore::Font::drawComplexText):
(WebCore::Font::floatWidthForComplexText):
(WebCore::Font::offsetForPositionForComplexText):
2006-05-20 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Darin.
- http://bugzilla.opendarwin.org/show_bug.cgi?id=8991
REGRESSION: missing or broken CSS custom cursors are displayed as
a missing image icon
* page/FrameView.cpp:
(WebCore::selectCursor): Fallback to CURSOR_AUTO if the image is an error image.
* manual-tests/custom-cursors.html: Added.
2006-05-20 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed and landed by ap.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9009
REGRESSION: ToT crash in WebCore at Zap2it
Test: fast/table/empty-section-crash.html
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::paint): Return immediately if the section
has 0 rows or 0 columns.
2006-05-19 Levi Weintraub <lweintraub@apple.com>
Reviewed by justin.
<http://bugzilla.opendarwin.org/show_bug.cgi?id=8931>
Drag caret not painted for editable sub-frames
Moved the drag caret out of Frame and into Page.
Only the Frame that contains the drag caret will paint it.
* editing/SelectionController.h:
* page/Frame.cpp:
(WebCore::Frame::dragCaret):
(WebCore::Frame::setDragCaret):
(WebCore::Frame::paintDragCaret):
* page/FramePrivate.h:
* page/Page.cpp:
(WebCore::Page::dragCaret):
(WebCore::Page::setDragCaret):
* page/Page.h:
2006-05-19 Alice Liu <alice.liu@apple.com>
Reviewed by Adele.
* html/HTMLButtonElement.idl:
added support for HTMLButtonElement.click()
2006-05-19 Geoffrey Garen <ggaren@apple.com>
Reviewed by Eric.
- Fixed non-autogenerated global constructors to match autogenerated
ones and FF. (Found this bug while @ the GOOG.)
(1) They're no longer read-only, so they can be overridden.
(2) They now have the default object prototype, so they can do things
like 'toString' and 'valueOf', necessary for general functionality,
including my layout test.
(3) Their prototype properties are now enumerable and not read-only.
* bindings/js/JSDOMParser.cpp:
(KJS::DOMParserConstructorImp::DOMParserConstructorImp):
* bindings/js/JSXMLHttpRequest.cpp:
(KJS::JSXMLHttpRequestConstructorImp::JSXMLHttpRequestConstructorImp):
* bindings/js/JSXMLHttpRequest.h:
* bindings/js/JSXMLSerializer.cpp:
(KJS::XMLSerializerConstructorImp::XMLSerializerConstructorImp):
* bindings/js/JSXSLTProcessor.cpp:
(KJS::XSLTProcessorConstructorImp::XSLTProcessorConstructorImp):
* bindings/js/kjs_html.cpp:
(KJS::OptionConstructorImp::OptionConstructorImp):
(KJS::ImageConstructorImp::ImageConstructorImp):
* bindings/js/kjs_window.cpp:
2006-05-19 Anders Carlsson <acarlsson@apple.com>
Reviewed by Eric.
http://bugzilla.opendarwin.org/show_bug.cgi?id=8983
Autogenerate another 22 HTML classes
Already covered by existing DOM tests.
* DerivedSources.make:
* WebCore.vcproj/WebCore/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
Add new IDL files and generated sources.
* bindings/js/JSCanvasRenderingContext2DCustom.cpp:
(WebCore::JSCanvasRenderingContext2D::drawImage):
(WebCore::JSCanvasRenderingContext2D::drawImageFromRect):
(WebCore::JSCanvasRenderingContext2D::createPattern):
Use JSHTMLImageElement::info in inherits.
* bindings/js/JSHTMLElementWrapperFactory.cpp:
(WebCore::createJSWrapper):
Add macros for the functions and the code to populate the hash set.
* bindings/js/kjs_html.cpp:
(KJS::):
(KJS::JSHTMLElement::classInfo):
(KJS::JSHTMLElement::accessors):
(KJS::HTMLElementFunction::callAsFunction):
* bindings/js/kjs_html.h:
(KJS::JSHTMLElement::):
Delete old cruft.
* bindings/scripts/CodeGeneratorJS.pm:
Add support for creating a JS object from a HTMLCollection.
* html/HTMLAreaElement.idl: Added.
* html/HTMLBRElement.idl: Added.
* html/HTMLBaseFontElement.idl: Added.
* html/HTMLBlockquoteElement.idl: Added.
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::scrollLeft):
(WebCore::HTMLBodyElement::setScrollLeft):
(WebCore::HTMLBodyElement::scrollTop):
(WebCore::HTMLBodyElement::setScrollTop):
(WebCore::HTMLBodyElement::scrollHeight):
(WebCore::HTMLBodyElement::scrollWidth):
* html/HTMLBodyElement.h:
Add new functions that used to be implemented in kjs_html.cpp
* html/HTMLBodyElement.idl: Added.
* html/HTMLFieldSetElement.idl: Added.
* html/HTMLFontElement.idl: Added.
* html/HTMLHRElement.idl: Added.
* html/HTMLHeadingElement.idl: Added.
* html/HTMLImageElement.idl: Added.
* html/HTMLIsIndexElement.idl: Added.
* html/HTMLLIElement.idl: Added.
* html/HTMLLabelElement.idl: Added.
* html/HTMLLegendElement.idl: Added.
* html/HTMLMapElement.idl: Added.
* html/HTMLMenuElement.idl: Added.
* html/HTMLModElement.idl: Added.
* html/HTMLParagraphElement.idl: Added.
* html/HTMLParamElement.idl: Added.
* html/HTMLPreElement.idl: Added.
* html/HTMLQuoteElement.idl: Added.
* html/HTMLScriptElement.idl: Added.
2006-05-18 David Hyatt <hyatt@apple.com>
Turn off responding to font changes while running. It doesn't work
right anyway.
Reviewed by darin
* platform/FontCache.cpp:
(WebCore::FontCache::getCachedFontPlatformData):
* platform/FontCache.h:
* platform/GlyphMap.h:
(WebCore::GlyphMap::~GlyphMap):
* platform/GlyphWidthMap.h:
(WebCore::GlyphWidthMap::~GlyphWidthMap):
* platform/mac/FontCacheMac.mm:
(WebCore::FontCache::platformInit):
2006-05-18 Darin Adler <darin@apple.com>
- try to fix the Windows build
* platform/TextEncoding.h: Changed a ";" to a ",".
* WebCore.vcproj/WebCore/WebCore.vcproj: Removed
JSCanvasRenderingContext2DBase.cpp and
JSCanvasRenderingContext2DBase.h. Added
JSCanvasRenderingContext2DCustom.cpp.
2006-05-18 Sam Weinig <sam.weinig@gmail.com>
Reviewed by Hyatt.
Fix for <http://bugzilla.opendarwin.org/show_bug.cgi?id=8896>
Bug 8896: Absolutely positioned elements should use their parent's
direction when left, right and width are auto in quirks mode.
Use the parent's direction instead of the containing
block's in quirks mode for absolute positioning to match
WinIE.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::calcAbsoluteHorizontal):
(WebCore::RenderBox::calcAbsoluteHorizontalValues):
(WebCore::RenderBox::calcAbsoluteHorizontalReplaced):
* rendering/RenderBox.h:
2006-05-18 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed and tweaked (way too much) by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8937
EncodingMap uses 0 as its empty value but 0 is a valid TextEncodingID
* platform/CharsetNames.cpp:
(WebCore::TextEncodingIDHashTraits::emptyValue): Added a non-zero empty value,
InvalidEncoding, and used InvalidEncoding2 for the deleted value.
(WebCore::buildCharsetMaps): Added an assertion that the deleted and empty
values are not valid encodings.
* platform/TextEncoding.h: Defined InvalidEncoding2.
2006-05-18 David Hyatt <hyatt@apple.com>
Horrible glyph map performance regression fix.
The initial page of the map was being rebuilt over and over again.
Reviewed by andersca
* platform/GlyphMap.cpp:
(WebCore::GlyphMap::locatePage):
* platform/GlyphWidthMap.cpp:
(WebCore::GlyphWidthMap::locatePage):
2006-05-18 Anders Carlsson <acarlsson@apple.com>
Reviewed by Darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=8964
Autogenerate more HTML classes
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
Add new files.
* bindings/js/JSHTMLElementWrapperFactory.cpp:
(WebCore::createAnchorWrapper):
(WebCore::createAppletWrapper):
(WebCore::createDivWrapper):
(WebCore::createDirectoryWrapper):
(WebCore::createDListWrapper):
(WebCore::createHtmlWrapper):
(WebCore::createOListWrapper):
(WebCore::createUListWrapper):
(WebCore::createJSWrapper):
Add wrappers.
* bindings/js/kjs_html.cpp:
(KJS::):
(KJS::JSHTMLElement::classInfo):
(KJS::JSHTMLElement::accessors):
(KJS::HTMLElementFunction::callAsFunction):
* bindings/js/kjs_html.h:
(KJS::JSHTMLElement::):
Delete the old implementations.
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::hash):
(WebCore::HTMLAnchorElement::host):
(WebCore::HTMLAnchorElement::hostname):
(WebCore::HTMLAnchorElement::pathname):
(WebCore::HTMLAnchorElement::port):
(WebCore::HTMLAnchorElement::protocol):
(WebCore::HTMLAnchorElement::search):
(WebCore::HTMLAnchorElement::text):
* html/HTMLAnchorElement.h:
Add some new accessor methods which used to be in kjs_html.cpp.
* html/HTMLAnchorElement.idl: Added.
* html/HTMLAppletElement.idl: Added.
* html/HTMLDListElement.idl: Added.
* html/HTMLDirectoryElement.idl: Added.
* html/HTMLDivElement.idl: Added.
* html/HTMLHtmlElement.idl: Added.
* html/HTMLOListElement.idl: Added.
* html/HTMLUListElement.idl: Added.
2006-05-17 David Hyatt <hyatt@apple.com>
Convert the width map for glyphs into the same new HashMap-style as the
glyph map for characters.
* WebCore.xcodeproj/project.pbxproj:
* platform/FontData.cpp:
(WebCore::FontData::~FontData):
(WebCore::FontData::widthForGlyph):
* platform/FontData.h:
* platform/GlyphWidthMap.cpp: Added.
(WebCore::GlyphWidthMap::widthForGlyph):
(WebCore::GlyphWidthMap::setWidthForGlyph):
(WebCore::GlyphWidthMap::locatePage):
* platform/GlyphWidthMap.h: Added.
(WebCore::GlyphWidthMap::GlyphWidthMap):
(WebCore::GlyphWidthMap::~GlyphWidthMap):
(WebCore::GlyphWidthMap::GlyphWidthPage::widthForGlyph):
(WebCore::GlyphWidthMap::GlyphWidthPage::setWidthForGlyph):
(WebCore::GlyphWidthMap::GlyphWidthPage::setWidthForIndex):
2006-05-17 David Hyatt <hyatt@apple.com>
Rename FontData.mm to FontData.cpp, since it has no obj-c in it.
* WebCore.xcodeproj/project.pbxproj:
* platform/FontData.cpp: Added.
2006-05-17 David Hyatt <hyatt@apple.com>
Split FontData.mm into platform-specific and cross-platform pieces.
Reviewed by andersca
* WebCore.xcodeproj/project.pbxproj:
* platform/FontData.h:
(WebCore::FontData::xHeight):
* platform/mac/FontData.mm:
(WebCore::FontData::widthForGlyph):
(WebCore::m_smallCapsFontData):
(WebCore::FontData::~FontData):
(WebCore::extendWidthMap):
2006-05-17 John Sullivan <sullivan@apple.com>
Reviewed by Darin Adler
Improvement to my previous patch, suggested by Darin
* dom/Document.cpp:
(WebCore::Document::repaintMarkers):
new method, similar in structure to removeMarkers but just repaints each node that
has a marker of the specified type
* dom/Document.h:
declare new method, and tweak style in related method declarations
* page/Frame.cpp:
(WebCore::Frame::setMarkedTextMatchesAreHighlighted):
if the value changes, call repaintMarkers
2006-05-17 Eric Seidel <eseidel@apple.com>
Reviewed by andersca.
Autogenerate button, optgroup, option, input and textarea js bindings
http://bugzilla.opendarwin.org/show_bug.cgi?id=8953
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSHTMLElementWrapperFactory.cpp:
(WebCore::createButtonWrapper):
(WebCore::createInputWrapper):
(WebCore::createOptGroupWrapper):
(WebCore::createOptionWrapper):
(WebCore::createTextAreaWrapper):
(WebCore::createJSWrapper):
* bindings/js/JSHTMLInputElementBase.cpp: Added.
(WebCore::JSHTMLInputElementBaseProtoFunc::callAsFunction):
(WebCore::):
(WebCore::JSHTMLInputElementBase::JSHTMLInputElementBase):
(WebCore::JSHTMLInputElementBase::getOwnPropertySlot):
* bindings/js/JSHTMLInputElementBase.h: Added.
(WebCore::JSHTMLInputElementBase::classInfo):
(WebCore::JSHTMLInputElementBase::):
(WebCore::JSHTMLInputElementBase::impl):
* bindings/js/JSHTMLOptionElementConstructor.cpp: Added.
(WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor):
(WebCore::JSHTMLOptionElementConstructor::implementsConstruct):
(WebCore::JSHTMLOptionElementConstructor::construct):
* bindings/js/JSHTMLOptionElementConstructor.h: Added.
* bindings/js/kjs_domnode.h:
* bindings/js/kjs_html.cpp:
(KJS::):
(KJS::JSHTMLElement::classInfo):
(KJS::JSHTMLElement::accessors):
(KJS::JSHTMLElement::getOwnPropertySlot):
(KJS::HTMLElementFunction::callAsFunction):
(KJS::JSHTMLElement::put):
(KJS::JSHTMLElement::htmlSetter):
* bindings/js/kjs_html.h:
(KJS::JSHTMLElement::):
* bindings/js/kjs_window.cpp:
(KJS::Window::getValueProperty):
* bindings/scripts/CodeGeneratorJS.pm:
* html/HTMLButtonElement.idl: Added.
* html/HTMLInputElement.idl: Added.
* html/HTMLOptGroupElement.idl: Added.
* html/HTMLOptionElement.idl: Added.
* html/HTMLTextAreaElement.idl: Added.
2006-05-17 Adele Peterson <adele@apple.com>
Reviewed by Hyatt.
First step for http://bugzilla.opendarwin.org/show_bug.cgi?id=8948
Switch to use new text field implementation for <textarea>
New textareas can be turned on by setting -webkit-appearance:textarea.
Tests:
* LayoutTests/fast/block/float/032.html - Updated results.
* bridge/mac/FrameMac.h: Added textDidChangeinTextArea to send notification over the bridge to form delegate.
* bridge/mac/FrameMac.mm: (WebCore::FrameMac::textDidChangeInTextArea): ditto.
* page/Frame.cpp: (WebCore::Frame::textDidChangeInTextArea): ditto.
* page/Frame.h: ditto.
* css/CSSValueKeywords.in: Added textarea.
* css/cssparser.cpp: (WebCore::CSSParser::parseValue): Updates to check for textarea.
* css/html4.css: Added style for textarea. Leaved background-color and appearance values commented out.
* rendering/render_style.h: (WebCore::): Added TextAreaAppearance.
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::adjustStyle): Updated for textarea.
(WebCore::RenderTheme::paint): ditto.
(WebCore::RenderTheme::paintBorderOnly): ditto.
(WebCore::RenderTheme::isControlStyled): ditto.
(WebCore::RenderTheme::supportsFocusRing): ditto.
(WebCore::RenderTheme::adjustTextFieldStyle): ditto.
(WebCore::RenderTheme::adjustTextAreaStyle): ditto.
* rendering/RenderTheme.h: (WebCore::RenderTheme::paintTextArea): Added.
* rendering/RenderThemeMac.h: Added adjustTextAreaStyle.
Note- I didn't add a paintTextArea function for RenderThemeMac, since we can just paint the border
specified in html4.css to match the NSTextView border. Added a paintTextArea function to the Windows
theme can override that border.
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::isControlStyled): Updated for textarea.
(WebCore::RenderThemeMac::adjustTextAreaStyle): ditto.
* html/HTMLGenericFormElement.cpp: (WebCore::HTMLGenericFormElement::HTMLGenericFormElement):
Moved m_valueMatchesRenderer and its setters and getters into this class so HTMLInputElement and
HTMLTextArea can share.
* html/HTMLGenericFormElement.h:
(WebCore::HTMLGenericFormElement::valueMatchesRenderer): Added.
(WebCore::HTMLGenericFormElement::setValueMatchesRenderer): Added.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::init): Remove m_valueMatchesRenderer intialization.
(WebCore::HTMLInputElement::isKeyboardFocusable): Updated spelling.
(WebCore::HTMLInputElement::createRenderer): Pass multiLine bool to RenderTextField constructor.
(WebCore::HTMLInputElement::parseMappedAttribute): Use setValueMatchesRenderer instead of m_valueMatchesRenderer.
(WebCore::HTMLInputElement::detach): ditto.
(WebCore::HTMLInputElement::setValue): ditto.
(WebCore::HTMLInputElement::setValueFromRenderer): ditto.
* html/HTMLInputElement.h: Remove setValueMatchesRenderer and valueMatchesRenderer and m_valueMatchesRenderer.
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::HTMLTextAreaElement): Calls setValueMatchesRenderer to intialize m_valueMatchesRenderer.
(WebCore::HTMLTextAreaElement::selectionStart): Uses appearance to determine which renderer to use.
(WebCore::HTMLTextAreaElement::selectionEnd): ditto.
(WebCore::HTMLTextAreaElement::setSelectionStart): ditto.
(WebCore::HTMLTextAreaElement::setSelectionEnd): ditto.
(WebCore::HTMLTextAreaElement::select): ditto.
(WebCore::HTMLTextAreaElement::setSelectionRange): ditto.
(WebCore::HTMLTextAreaElement::createRenderer): ditto.
(WebCore::HTMLTextAreaElement::appendFormData): ditto.
(WebCore::HTMLTextAreaElement::updateValue): ditto.
(WebCore::HTMLTextAreaElement::isKeyboardFocusable): Added.
(WebCore::HTMLTextAreaElement::isMouseFocusable): Added.
(WebCore::HTMLTextAreaElement::focus): Added.
(WebCore::HTMLTextAreaElement::defaultEventHandler): Added to forward events to the inner div.
(WebCore::HTMLTextAreaElement::setValue): Calls setValueMatchesRenderer.
* html/HTMLTextAreaElement.h: Added defaultEventHandler, isMouseFocusable, isKeyboardFocusable, and focus methods.
Removed invalidateValue and m_valueMatchesRenderer since those are now handled in the base class.
* html/HTMLTextFieldInnerElement.cpp: (WebCore::HTMLTextFieldInnerElement::defaultEventHandler):
Updated to handle textareas.
* rendering/RenderTextArea.cpp: (WebCore::RenderTextArea::valueChanged):
Calls setValueMatchesRenderer(false) instead of invalidateValue.
* rendering/RenderTextField.h: Changed to be a RenderFlexibleBox instead of a RenderBlock.
This was necessary to get the inner div's height to grow and shrink with the size of the textarea.
Added m_multiLine bool, and calcHeight, canHaveChildren, baselinePosition, isTextArea, textWithHardLineBreaks, selectionChanged.
(WebCore::RenderTextField::canHaveChildren): Returns false now so that no renderer gets created for
the textarea's child text node for its initial contents.
(WebCore::RenderTextField::isTextField): Returns true if m_multiLine is false.
(WebCore::RenderTextField::isTextArea): Returns true if m_multiLine is true.
* rendering/RenderTextField.cpp:
(WebCore::RenderTextField::RenderTextField): Initializes m_multiLine.
(WebCore::RenderTextField::~RenderTextField): Notifies HTMLTextAreaElement that the renderer is being destroyed so the value gets updated.
(WebCore::RenderTextField::setStyle): Makes sure there's no overflow clip on the RenderTextField, since we're handling overflow on the inner div.
(WebCore::RenderTextField::createDivStyle): Sets white-space, box-flex, overflow, word-wrap styles needed for text area.
(WebCore::RenderTextField::updateFromElement): Updated for textarea elements.
(WebCore::RenderTextField::setSelectionRange): Optimized caret case by checking to see if start is equal to end before calculating
the same VisiblePosition twice.
(WebCore::RenderTextField::subtreeHasChanged): Updated for textarea elements.
(WebCore::RenderTextField::text): Use innerText so newlines are considered.
(WebCore::RenderTextField::textWithHardLineBreaks): Added. Not implemented yet. Just calls text method.
(WebCore::RenderTextField::calcHeight): Added. Sets initial height based on specified number of rows, and then calls the base class.
(WebCore::RenderTextField::baselinePosition): Added. Unlike text fields, textareas align to the bottom.
(WebCore::RenderTextField::calcMinMaxWidth): Updated for textareas.
(WebCore::RenderTextField::selectionChanged): Added. Not implemented yet.
2006-05-17 David Hyatt <hyatt@apple.com>
Fix for 8954, separate the glyph map out into its own files and make it
cross-platform.
Reviewed by darin
* WebCore.xcodeproj/project.pbxproj:
* platform/Font.cpp:
(WebCore::WidthIterator::advance):
* platform/FontData.h:
(WebCore::FontData::glyphDataForCharacter):
(WebCore::FontData::setGlyphDataForCharacter):
* platform/GlyphMap.cpp: Added.
(WebCore::GlyphMap::glyphDataForCharacter):
(WebCore::GlyphMap::setGlyphDataForCharacter):
(WebCore::GlyphMap::locatePage):
* platform/GlyphMap.h: Added.
(WebCore::GlyphMap::GlyphMap):
(WebCore::GlyphMap::~GlyphMap):
(WebCore::GlyphMap::GlyphPage::glyphDataForCharacter):
(WebCore::GlyphMap::GlyphPage::setGlyphDataForCharacter):
(WebCore::GlyphMap::GlyphPage::setGlyphDataForIndex):
* platform/mac/FontData.mm:
(-[NSFont WebCore]):
(WidthMap::m_ATSUMirrors):
(WidthMap::FontData::~FontData):
(WidthMap::FontData::xHeight):
(WidthMap::FontData::platformInit):
(WidthMap::extendWidthMap):
* platform/mac/GlyphMapMac.cpp: Added.
(WebCore::GlyphMap::fillPage):
* platform/mac/WebCoreSystemInterface.h:
2006-05-17 Anders Carlsson <acarlsson@apple.com>
Reviewed by Maciej.
http://bugzilla.opendarwin.org/show_bug.cgi?id=8958
Should be able to have custom implementations for JS methods
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCanvasRenderingContext2DBase.cpp: Removed.
* bindings/js/JSCanvasRenderingContext2DBase.h: Removed.
* bindings/js/JSCanvasRenderingContext2DCustom.cpp: Added.
Remove JSCanvasRenderingContext2DBase and add
JSCanvasRenderingContext2DCustom with custom implementations.
(WebCore::toJS):
(WebCore::toHTMLCanvasStyle):
(WebCore::JSCanvasRenderingContext2D::strokeStyle):
(WebCore::JSCanvasRenderingContext2D::setStrokeStyle):
(WebCore::JSCanvasRenderingContext2D::fillStyle):
(WebCore::JSCanvasRenderingContext2D::setFillStyle):
(WebCore::JSCanvasRenderingContext2D::setFillColor):
(WebCore::JSCanvasRenderingContext2D::setStrokeColor):
(WebCore::JSCanvasRenderingContext2D::strokeRect):
(WebCore::JSCanvasRenderingContext2D::drawImage):
(WebCore::JSCanvasRenderingContext2D::drawImageFromRect):
(WebCore::JSCanvasRenderingContext2D::setShadow):
(WebCore::JSCanvasRenderingContext2D::createPattern):
Move implementations from JSCanvasRenderingContext2DBase.
* bindings/scripts/CodeGeneratorJS.pm:
Add new "Custom" extended attribute for functions and attributes. When a function or
attribute has this attribute, a custom implementation is called instead of calling down to
the DOM object.
* html/CanvasRenderingContext2D.idl:
Add bunch of custom attributes and functions.
2006-05-17 John Sullivan <sullivan@apple.com>
Reviewed by Maciej.
First step towards making text-matching mechanism more flexible; now caller can
control whether or not the matches are highlighted.
* bridge/mac/WebCoreFrameBridge.h:
* bridge/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge markAllMatchesForText:caseSensitive:]):
renamed from highlightAllMatchesForString:
(-[WebCoreFrameBridge markedTextMatchesAreHighlighted]):
new getter method
(-[WebCoreFrameBridge setMarkedTextMatchesAreHighlighted:]):
new setter method
(-[WebCoreFrameBridge unmarkAllTextMatches]):
renamed from clearHighlightedMatches
* page/Frame.h:
* page/Frame.cpp:
(WebCore::Frame::markAllMatchesForText):
renamed from highlightAllMatchesForString
(WebCore::Ferame::markedTextMatchesAreHighlighted):
new getter method, uses boolean ivar in FramePrivate
(WebCore::Frame::setMarkedTextMatchesAreHighlighted):
new setter method, uses boolean ivar in FramePrivate
* page/FramePrivate.h:
(WebCore::FramePrivate::FramePrivate):
added boolean ivar m_highlightTextMatches, initialized to 0
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
respect markedTextMatchesAreHighlighted
* WebCore.xcodeproj/project.pbxproj:
newer Xcode removed some obsolete settings
2006-05-17 Adele Peterson <adele@apple.com>
Reviewed by Beth.
* editing/htmlediting.cpp: (WebCore::editingIgnoresContent):
Reverting change that Darin made a few weeks ago. He was trying
to make editingIgnoresContent return true for the new text fields, but the code
actually didn't change that result. When the new text fields actually do return
true for editingIgnoresContent, other editing problems are exposed. For example,
moving the cursor around an editable area that contains a text field will cross the
text field boundary and descend into the shadow tree. So for now, we'll revert this
change.
2006-05-17 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Maciej, tweaked by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8951
AtomicString hash corrupted by high-bit Latin-1
Test: fast/encoding/high-bit-latin1.html
* platform/AtomicString.cpp: (WebCore::CStringTranslator::equal): Use an
unsigned char local.
* platform/StringImpl.cpp: (WebCore::StringImpl::init): Ditto.
2006-05-17 Rob Buis <buis@kde.org>
Reviewed by Maciej.
Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=7492
CSS attribute selectors fail when the setAttribute() method is used
to create an attribute and the attribute name is not Class or ID.
Keep track of attributes used in attribute selectors to
check after setAttribute whether a style recalc is needed.
Test: fast/css/selector-set-attribute.html
* css/cssstyleselector.cpp:
(WebCore::CSSStyleSelector::checkOneSelector):
(WebCore::CSSStyleSelector::hasSelectorForAttribute):
* css/cssstyleselector.h:
* dom/StyledElement.cpp:
(WebCore::StyledElement::attributeChanged):
2006-05-17 Rob Buis <buis@kde.org>
Reviewed by Darin.
Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=5264
document.createElementNS() should not allow to insert a second <html> element
Do extra checks for document nodes to detect multiple document elements
and document types.
Test: fast/dom/createDocumentType2.html
Test: fast/dom/createElementNS.html
* dom/Document.cpp:
(WebCore::Document::childTypeAllowed):
* dom/Document.h:
2006-05-17 Anders Carlsson <acarlsson@apple.com>
Reviewed by Darin.
* DerivedSources.make:
Conditionally generate the SVG and XPath related files based on the value of
FEATURE_DEFINES. Also, pass FEATURE_DEFINES to the bindings generator.
* WebCore.xcodeproj/project.pbxproj:
Add FEATURE_DEFINES as a toplevel build setting and set it to "SVG_SUPPORT XPATH_SUPPORT"
to keep SVG and XPath support turned on. Add FEATURE_DEFINES to the CPP defines.
* bindings/js/kjs_binding.cpp:
(KJS::setDOMException):
Add #ifdefs around the XPath code.
* bindings/scripts/CodeGeneratorJS.pm:
Add "Conditional" extended attribute for interfaces. If this is set, the generated code will be
surrounded by an #if.
* bindings/scripts/IDLParser.pm:
Pass the define flags on to the preprocessor.
* bindings/scripts/generate-bindings.pl:
Add a --defines property and pass it on to the parser.
* css/cssstyleselector.h:
Add DeprecatedString.h include.
* dom/Document.idl:
Put back #if around the XPath functions
* page/DOMWindow.idl:
Put #if around the XPath constructors
* xpath/XPathEvaluator.idl:
* xpath/XPathExpression.idl:
* xpath/XPathNSResolver.cpp:
* xpath/XPathNSResolver.idl:
* xpath/XPathNamespace.cpp:
* xpath/XPathResult.idl:
Add "Conditional=XPATH" to all interfaces.
2006-05-16 Darin Adler <darin@apple.com>
Reviewed by Anders.
- http://bugzilla.opendarwin.org/show_bug.cgi?id=8940
remove extra copy of image code
* WebCore.xcodeproj/project.pbxproj: Removed WebCoreImageRenderer.h.
* platform/mac/WebCoreImageRenderer.h: Removed.
* bridge/mac/WebCoreFrameBridge.h: Added supportedImageResourceMIMETypes.
Like supportedImageMIMETypes, but includes PDF and PostScript.
* bridge/mac/WebCoreFrameBridge.mm:
(+[WebCoreFrameBridge supportedImageResourceMIMETypes]): Added.
Has code that came from -[WebImageRendererFactory supportedMIMETypes].
(+[WebCoreFrameBridge supportedImageMIMETypes]):
* platform/mac/ImageMac.mm:
(WebCore::Image::supportsType): Instead of calling the old
-[WebCoreImageRendererFactory supportedMIMETypes], call the new
+[WebCoreFrameBridge supportedImageResourceMIMETypes].
(WebCore::Image::drawTiled): Use wkSetPatternPhaseInUserSpace instead of
the WebCoreImageRendererFactory.
* platform/mac/ClipboardMac.mm: Removed an unneeded include of
WebCoreImageRenderer.h.
* platform/mac/WebCoreImageRendererFactory.h: Removed everything except
for the one remaining method, imageDataForName:, which gets resources
from the WebKit localized resources. We should figure out how to remove
that one too later.
* platform/mac/WebCoreImageRendererFactory.m: Ditto.
* platform/mac/WebCoreSystemInterface.h: Added some new calls.
* platform/mac/WebCoreSystemInterface.mm: Ditto.
* WebCore.exp: Ditto.
* platform/cairo/ImageCairo.cpp: Moved a stub to the stubs file. If it's
here it has to have a FIXME comment and also it contains a big commented-out
pile of code. Better to have it in the stubs file with all the other stubs.
* platform/win/TemporaryLinkStubs.cpp: (Image::drawTiled): Put stub here
instead of having it in ImageCairo.cpp.
2006-05-16 Anders Carlsson <acarlsson@apple.com>
Reviewed by Dave Hyatt.
http://bugzilla.opendarwin.org/show_bug.cgi?id=8941
document.cookie undefined for documents of type text/javascript
* loader/TextDocument.cpp:
(WebCore::TextDocument::TextDocument):
* loader/TextDocument.h:
Inherit from HTMLDocument.
2006-05-16 Darin Adler <darin@apple.com>
Reviewed by Hyatt.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8898
REGRESSION: Attempting to right-click image in own tab on website causes crash
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8919
REGRESSION: image could not be dragged, subsequent click-drag activity caused crash
* bridge/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge domain]): Removed unneeded check of isHTMLDocument.
(-[WebCoreFrameBridge getData:andResponse:forURL:]): Handle document() of 0.
(-[WebCoreFrameBridge getAllResourceDatas:andResponses:]): Ditto.
2006-05-16 Eric Seidel <eseidel@apple.com>
Reviewed by andersca.
Autogenerate BASE, HEAD, LINK, STYLE and TITLE JS bindings.
Already covered by existing dom tests.
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSHTMLElementWrapperFactory.cpp:
(WebCore::createBaseWrapper):
(WebCore::createHeadWrapper):
(WebCore::createLinkWrapper):
(WebCore::createStyleWrapper):
(WebCore::createTitleWrapper):
(WebCore::createJSWrapper):
* bindings/js/kjs_html.cpp:
(KJS::):
(KJS::JSHTMLElement::classInfo):
(KJS::JSHTMLElement::accessors):
* bindings/js/kjs_html.h:
* html/HTMLBaseElement.idl: Added.
* html/HTMLHeadElement.idl: Added.
* html/HTMLLinkElement.idl: Added.
* html/HTMLStyleElement.idl: Added.
* html/HTMLTitleElement.idl: Added.
2006-05-16 Anders Carlsson <acarlsson@apple.com>
Reviewed by Maciej.
http://bugzilla.opendarwin.org/show_bug.cgi?id=8921
Use WebCore to render full-frame images.
* WebCore.xcodeproj/project.pbxproj:
Add ImageDocument.
* bridge/mac/WebCoreFrameBridge.h:
Add mainResourceURLResponse and imageTitleForFilename.
* bridge/mac/WebCoreFrameBridge.mm:
(+[WebCoreFrameBridge supportedNonImageMIMETypes]):
This used to be supportedMIMETypes but WebKit requires that we handle the
image MIME types separately.
(+[WebCoreFrameBridge supportedImageMIMETypes]):
Add image types from WebCoreImageRendererFactory.
(-[WebCoreFrameBridge canProvideDocumentSource]):
Return no for image types.
* dom/xml_tokenizer.h:
(WebCore::Tokenizer::wantsRawData):
(WebCore::Tokenizer::writeRawData):
New virtual functions which tokenizers can override if they want to get
raw data (which isn't fed through the decoder)
* html/HTMLImageElement.h:
(WebCore::HTMLImageElement::setLoadManually):
New function which calls HTMLImageLoader::setLoadManually
* html/HTMLImageLoader.cpp:
(WebCore::HTMLImageLoader::HTMLImageLoader):
(WebCore::HTMLImageLoader::updateFromElement):
Don't request the image from the loader if the load is set to be manual.
* html/HTMLImageLoader.h:
(WebCore::HTMLImageLoader::setLoadManually):
New function which decides if the image data should be fed manually or loaded
by the loader.
* loader/DocLoader.h:
Add HTMLImageLoader as a friend.
* loader/ImageDocument.cpp: Added.
(WebCore::ImageTokenizer::ImageTokenizer):
(WebCore::ImageTokenizer::wantsRawData):
(WebCore::ImageTokenizer::write):
(WebCore::ImageTokenizer::writeRawData):
(WebCore::ImageTokenizer::stopParsing):
(WebCore::ImageTokenizer::finish):
(WebCore::ImageTokenizer::isWaitingForScripts):
(WebCore::ImageDocument::ImageDocument):
(WebCore::ImageDocument::createTokenizer):
* loader/ImageDocument.h: Added.
Add new ImageDocument class which will feed its data to a created image element.
* loader/TextDocument.h:
Inherit from HTMLDocument here too, in case any broken web pages want to manipulate
the DOM of any plain text documents.
* page/Frame.cpp:
(WebCore::Frame::begin):
(WebCore::Frame::write):
Don't create or use the decoder if the tokenizer is in "raw mode".
2006-05-16 Eric Seidel <eseidel@apple.com>
Reviewed by andersca.
Autogenerate JSHTMLMetaElement.
http://bugzilla.opendarwin.org/show_bug.cgi?id=8938
Test: fast/dom/HTMLMetaElement/meta-attributes.html
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSHTMLElementWrapperFactory.cpp:
(WebCore::createMetaWrapper):
(WebCore::createJSWrapper):
* bindings/js/kjs_html.cpp:
(KJS::):
(KJS::JSHTMLElement::classInfo):
(KJS::JSHTMLElement::accessors):
* bindings/js/kjs_html.h:
* html/HTMLMetaElement.h:
2006-05-16 David Hyatt <hyatt@apple.com>
Bug 8936, eliminate WebTextRendererFactory and convert it over to the
new FontCache.
Reviewed by andersca
* WebCore.xcodeproj/project.pbxproj:
* bridge/mac/WebCoreStringTruncator.mm:
* kwq/KWQComboBox.mm:
* kwq/KWQLineEdit.mm:
* kwq/KWQListBox.mm:
* platform/Font.h:
(WebCore::Font::bold):
* platform/FontCache.cpp: Added.
(WebCore::FontPlatformDataCacheKey::m_italic):
(WebCore::FontPlatformDataCacheKey::operator==):
(WebCore::computeHash):
(WebCore::FontPlatformDataCacheKeyHash::hash):
(WebCore::FontPlatformDataCacheKeyHash::equal):
(WebCore::FontPlatformDataCacheKeyTraits::deletedValue):
(WebCore::FontCache::getCachedFontPlatformData):
(WebCore::FontDataCacheKeyHash::hash):
(WebCore::FontDataCacheKeyHash::equal):
(WebCore::FontDataCacheKeyTraits::deletedValue):
(WebCore::FontCache::getCachedFontData):
(WebCore::FontCache::getFontData):
(WebCore::FontCache::clearCommonCaches):
* platform/FontCache.h:
* platform/FontData.h:
* platform/FontFamily.cpp:
(WebCore::FontFamily::FontFamily):
(WebCore::FontFamily::operator=):
(WebCore::FontFamily::setFamily):
* platform/FontFamily.h:
(WebCore::FontFamily::familyIsEmpty):
* platform/FontPlatformData.h:
(WebCore::FontPlatformData::hash):
(WebCore::FontPlatformData::operator==):
* platform/mac/FontCacheMac.mm:
(WebCore::getAppDefaultValue):
(WebCore::getUserDefaultValue):
(WebCore::getLCDScaleParameters):
(WebCore::fontsChanged):
(WebCore::FontCache::registerForFontChanges):
(WebCore::FontCache::clearCaches):
(WebCore::FontCache::getFontDataForCharacters):
(WebCore::FontCache::getSimilarFontPlatformData):
(WebCore::FontCache::getLastResortFallbackFont):
(WebCore::FontCache::createFontPlatformData):
* platform/mac/FontData.mm:
(-[NSFont WebCore]):
(WidthMap::FontData::xHeight):
(WidthMap::FontData::smallCapsFontData):
(WidthMap::computeWidthForSpace):
(WidthMap::setUpFont):
(WidthMap::fillStyleWithAttributes):
(WidthMap::FontData::determinePitch):
* platform/mac/FontFallbackListMac.mm:
(WebCore::FontFallbackList::setPlatformFont):
* platform/mac/FontFamilyMac.mm: Removed.
* platform/mac/FontMac.mm:
* platform/mac/WebCoreTextRenderer.mm:
(WebCoreFindFont):
* platform/mac/WebFontCache.h: Added.
* platform/mac/WebFontCache.mm: Added.
(acceptableChoice):
(betterChoice):
(+[WebFontCache fontWithFamily:traits:size:]):
* platform/mac/WebTextRendererFactory.h: Removed.
* platform/mac/WebTextRendererFactory.mm: Removed.
2006-05-16 Eric Seidel <eseidel@apple.com>
Reviewed by andersca.
Add Rect.idl, even though it can't be used quite yet due to generator limitations.
* WebCore.xcodeproj/project.pbxproj:
* css/Rect.idl: Added.
2006-05-16 Sam Weinig <sam.weinig@gmail.com>
Reviewed by darin. Landed by eseidel.
Patch for <http://bugzilla.opendarwin.org/show_bug.cgi?id=8924>
Bug 8924: re-apply the 'disabled type=file' change
from bug 5882 to RenderFileButton
* rendering/RenderFileButton.cpp:
(WebCore::RenderFileButton::updateFromElement):
2006-05-16 Eric Seidel <eseidel@apple.com>
Reviewed by hyatt.
Split css_base.* into separate files (one per class).
http://bugzilla.opendarwin.org/show_bug.cgi?id=8935
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/kjs_css.cpp:
* css/CSSBorderImageValue.cpp:
* css/CSSBorderImageValue.h:
* css/CSSCharsetRule.h:
* css/CSSFontFaceRule.h:
* css/CSSGrammar.y:
* css/CSSImportRule.h:
* css/CSSInheritedValue.cpp:
* css/CSSInitialValue.cpp:
* css/CSSMediaRule.h:
* css/CSSMutableStyleDeclaration.h:
* css/CSSNamespace.h: Added.
(WebCore::CSSNamespace::CSSNamespace):
(WebCore::CSSNamespace::namespaceForPrefix):
* css/CSSPageRule.h:
* css/CSSPrimitiveValue.h:
* css/CSSProperty.cpp:
* css/CSSProperty.h:
* css/CSSRule.h:
* css/CSSRuleList.cpp:
* css/CSSSelector.cpp: Added.
* css/CSSSelector.h: Added.
(WebCore::CSSSelector::CSSSelector):
* css/CSSStyleDeclaration.h:
* css/CSSStyleRule.cpp:
* css/CSSStyleRule.h:
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::~CSSStyleSheet):
* css/CSSStyleSheet.h:
* css/CSSValue.h:
* css/CSSValueList.cpp:
* css/CSSValueList.h:
* css/FontFamilyValue.cpp:
* css/FontValue.cpp:
* css/FontValue.h:
* css/MediaList.h:
* css/ShadowValue.cpp:
* css/ShadowValue.h:
* css/StyleBase.cpp: Added.
(WebCore::StyleBase::stylesheet):
* css/StyleBase.h: Added.
(WebCore::StyleBase::StyleBase):
* css/StyleList.cpp: Added.
* css/StyleList.h: Added.
* css/StyleSheet.h:
* css/css_base.cpp: Removed.
* css/css_base.h: Removed.
* css/cssparser.cpp:
* css/cssstyleselector.cpp:
(WebCore::CSSStyleSelector::matchRulesForList):
* css/cssstyleselector.h:
* dom/CSSMappedAttributeDeclaration.h:
* ksvg2/svg/SVGColor.cpp:
(WebCore::SVGColor::SVGColor):
(WebCore::SVGColor::setRGBColor):
(WebCore::SVGColor::setRGBColorICCColor):
(WebCore::SVGColor::setColor):
(WebCore::SVGColor::cssText):
(WebCore::SVGColor::color):
* ksvg2/svg/SVGColor.h:
* ksvg2/svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::SVGStyledElement):
(WebCore::SVGStyledElement::className):
(WebCore::SVGStyledElement::createRenderer):
(WebCore::SVGStyledElement::parseMappedAttribute):
(WebCore::SVGStyledElement::notifyAttributeChange):
(WebCore::SVGStyledElement::attributeChanged):
(WebCore::SVGStyledElement::canvas):
(WebCore::SVGStyledElement::updateCanvasItem):
(WebCore::SVGStyledElement::pushAttributeContext):
2006-05-15 Eric Seidel <eseidel@apple.com>
Reviewed by hyatt.
Split css_valueimpl.* and css_ruleimpl.* into separate files (one per class).
http://bugzilla.opendarwin.org/show_bug.cgi?id=8934
* WebCore+SVG/RGBColor.cpp:
(WebCore::RGBColor::RGBColor):
* WebCore.vcproj/WebCore/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/kjs_css.cpp:
(KJS::DOMCSSRule::classInfo):
* bindings/js/kjs_css.h:
* bindings/js/kjs_dom.cpp:
* bindings/js/kjs_html.cpp:
* bindings/js/kjs_window.cpp:
* bindings/objc/DOMCSS.mm:
* bindings/scripts/CodeGeneratorJS.pm:
* css/CSSBorderImageValue.cpp: Added.
(WebCore::CSSBorderImageValue::CSSBorderImageValue):
* css/CSSBorderImageValue.h: Added.
* css/CSSCharsetRule.h: Added.
(WebCore::CSSCharsetRule::CSSCharsetRule):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForShadow):
(WebCore::):
* css/CSSComputedStyleDeclaration.h:
* css/CSSFontFaceRule.cpp: Added.
(WebCore::CSSFontFaceRule::CSSFontFaceRule):
* css/CSSFontFaceRule.h: Added.
(WebCore::CSSFontFaceRule::isFontFaceRule):
* css/CSSGrammar.y:
* css/CSSImageValue.cpp: Added.
(WebCore::CSSImageValue::CSSImageValue):
* css/CSSImageValue.h: Added.
* css/CSSImportRule.cpp: Added.
* css/CSSImportRule.h: Added.
* css/CSSInheritedValue.cpp: Added.
* css/CSSInheritedValue.h: Added.
* css/CSSInitialValue.cpp: Added.
* css/CSSInitialValue.h: Added.
* css/CSSMediaRule.cpp: Added.
(WebCore::CSSMediaRule::CSSMediaRule):
(WebCore::CSSMediaRule::~CSSMediaRule):
(WebCore::CSSMediaRule::append):
(WebCore::CSSMediaRule::deleteRule):
(WebCore::CSSMediaRule::cssText):
* css/CSSMediaRule.h: Added.
(WebCore::CSSMediaRule::media):
(WebCore::CSSMediaRule::cssRules):
* css/CSSMutableStyleDeclaration.cpp: Added.
(WebCore::CSSMutableStyleDeclaration::CSSMutableStyleDeclaration):
(WebCore::CSSMutableStyleDeclaration::setChanged):
* css/CSSMutableStyleDeclaration.h: Added.
* css/CSSPageRule.cpp: Added.
(WebCore::CSSPageRule::CSSPageRule):
* css/CSSPageRule.h: Added.
(WebCore::CSSPageRule::isPageRule):
* css/CSSPrimitiveValue.cpp: Added.
* css/CSSPrimitiveValue.h: Added.
* css/CSSProperty.cpp: Added.
(WebCore::CSSProperty::cssText):
* css/CSSProperty.h: Added.
(WebCore::CSSProperty::CSSProperty):
* css/CSSQuirkPrimitiveValue.h: Added.
* css/CSSRule.cpp: Added.
* css/CSSRule.h: Added.
(WebCore::CSSRule::CSSRule):
* css/CSSRuleList.cpp: Added.
(WebCore::CSSRuleList::CSSRuleList):
(WebCore::CSSRuleList::~CSSRuleList):
(WebCore::CSSRuleList::deleteRule):
(WebCore::CSSRuleList::append):
(WebCore::CSSRuleList::insertRule):
* css/CSSRuleList.h: Added.
(WebCore::CSSRuleList::item):
* css/CSSStyleDeclaration.cpp: Added.
(WebCore::CSSStyleDeclaration::CSSStyleDeclaration):
(WebCore::CSSStyleDeclaration::diff):
* css/CSSStyleDeclaration.h: Added.
* css/CSSStyleRule.cpp: Added.
(WebCore::CSSStyleRule::CSSStyleRule):
(WebCore::CSSStyleRule::selectorText):
* css/CSSStyleRule.h: Added.
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::ownerRule):
* css/CSSUnknownRule.h: Added.
(WebCore::CSSUnknownRule::CSSUnknownRule):
* css/CSSValue.h: Added.
* css/CSSValueList.cpp: Added.
* css/CSSValueList.h: Added.
* css/Counter.h: Added.
* css/DashboardRegion.h: Added.
* css/FontFamilyValue.cpp: Added.
* css/FontFamilyValue.h: Added.
(WebCore::FontFamilyValue::genericFamilyType):
* css/FontValue.cpp: Added.
(WebCore::FontValue::cssText):
* css/FontValue.h: Added.
* css/MediaList.cpp:
* css/Pair.h: Added.
(WebCore::Pair::~Pair):
* css/RectImpl.h: Added.
(WebCore::RectImpl::~RectImpl):
* css/ShadowValue.cpp: Added.
(WebCore::ShadowValue::ShadowValue):
* css/ShadowValue.h: Added.
* css/css_base.cpp:
* css/css_ruleimpl.cpp: Removed.
* css/css_ruleimpl.h: Removed.
* css/css_valueimpl.cpp: Removed.
* css/css_valueimpl.h: Removed.
* css/cssparser.cpp:
(WebCore::CSSParser::parseColor):
(WebCore::CSSParser::parseFontFamily):
* css/cssstyleselector.cpp:
(WebCore::CSSStyleSelector::locateCousinList):
(WebCore::CSSStyleSelector::checkSelector):
(WebCore::CSSRuleSet::addRulesFromSheet):
(WebCore::CSSStyleSelector::applyProperty):
(WebCore::CSSStyleSelector::mapBackgroundImage):
* css/cssstyleselector.h:
* dom/CSSMappedAttributeDeclaration.h:
(WebCore::CSSMappedAttributeDeclaration::CSSMappedAttributeDeclaration):
* dom/Document.cpp:
* editing/ApplyStyleCommand.cpp:
* editing/CompositeEditCommand.h:
* editing/EditCommand.cpp:
* editing/InsertLineBreakCommand.cpp:
(WebCore::InsertLineBreakCommand::doApply):
* editing/InsertLineBreakCommand.h:
* editing/InsertTextCommand.cpp:
(WebCore::InsertTextCommand::input):
* editing/RemoveCSSPropertyCommand.cpp:
(WebCore::RemoveCSSPropertyCommand::RemoveCSSPropertyCommand):
(WebCore::RemoveCSSPropertyCommand::~RemoveCSSPropertyCommand):
* editing/RemoveCSSPropertyCommand.h:
(WebCore::RemoveCSSPropertyCommand::styleDeclaration):
* html/HTMLBodyElement.cpp:
* html/HTMLElement.cpp:
* html/HTMLScriptElement.h:
* html/HTMLTokenizer.h:
* kcanvas/KCanvasFilters.h:
(WebCore::KCanvasFEColorMatrix::values):
(WebCore::KCanvasFEColorMatrix::setValues):
(WebCore::KCanvasFEConvolveMatrix::kernel):
(WebCore::KCanvasFEConvolveMatrix::setKernel):
* kcanvas/KCanvasPath.h:
* kcanvas/KCanvasTreeDebug.h:
(WebCore::operator<<):
* kcanvas/RenderPath.h:
* ksvg2/css/SVGCSSParser.cpp:
(WebCore::CSSParser::parseSVGValue):
(WebCore::CSSParser::parseSVGStrokeDasharray):
(WebCore::CSSParser::parseSVGPaint):
(WebCore::CSSParser::parseSVGColor):
* ksvg2/css/SVGCSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applySVGProperty):
* ksvg2/css/SVGRenderStyleDefs.h:
* ksvg2/ecma/Ecma.cpp:
* ksvg2/misc/KCanvasRenderingStyle.cpp:
* ksvg2/misc/KCanvasRenderingStyle.h:
* ksvg2/svg/SVGAnimationElement.cpp:
* ksvg2/svg/SVGColor.cpp:
* ksvg2/svg/SVGColor.h:
* ksvg2/svg/SVGCursorElement.h:
* ksvg2/svg/SVGFEColorMatrixElement.cpp:
(SVGFEColorMatrixElement::filterEffect):
* page/DOMWindow.cpp:
* page/Frame.cpp:
* page/FramePrivate.h:
* platform/DeprecatedValueList.h:
* rendering/RenderTextField.cpp:
2006-05-15 Darin Adler <darin@apple.com>
* WebCore.xcodeproj/project.pbxproj: Removed duplicate files that were
screwing up Xcode.
2006-05-15 Darin Adler <darin@apple.com>
* make-generated-sources.sh: Changed to be executable and removed
text in the file generated by "svn diff".
* move-js-headers.sh: Ditto.
2006-05-15 Eric Seidel <eseidel@apple.com>
Reviewed by mjs.
Split css_stylesheetimpl.* into separate files (one per class).
http://bugzilla.opendarwin.org/show_bug.cgi?id=8933
* WebCore.vcproj/WebCore/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSStyleSheet.cpp: Added.
(WebCore::CSSStyleSheet::CSSStyleSheet):
(WebCore::CSSStyleSheet::addRule):
(WebCore::CSSStyleSheet::deleteRule):
(WebCore::CSSStyleSheet::parseString):
(WebCore::CSSStyleSheet::docLoader):
* css/CSSStyleSheet.h: Added.
* css/MediaList.cpp: Added.
(WebCore::MediaList::MediaList):
(WebCore::MediaList::contains):
(WebCore::MediaList::parentStyleSheet):
(WebCore::MediaList::parentRule):
(WebCore::MediaList::deleteMedium):
(WebCore::MediaList::setMediaText):
* css/MediaList.h: Added.
* css/StyleSheet.cpp: Added.
(WebCore::StyleSheet::StyleSheet):
(WebCore::StyleSheet::parentStyleSheet):
(WebCore::StyleSheet::setMedia):
* css/StyleSheet.h: Added.
(WebCore::StyleSheet::ownerNode):
* css/StyleSheetList.cpp: Added.
(WebCore::StyleSheetList::~StyleSheetList):
(WebCore::StyleSheetList::add):
(WebCore::StyleSheetList::remove):
(WebCore::StyleSheetList::item):
* css/StyleSheetList.h: Added.
* css/css_stylesheetimpl.cpp: Removed.
* css/css_stylesheetimpl.h: Removed.
2006-05-15 Eric Seidel <eseidel@apple.com>
* WebCore.xcodeproj/project.pbxproj: build fix.
2006-05-15 Eric Seidel <eseidel@apple.com>
Reviewed by ggaren.
Split dom_xmlimpl.* into separate files (one per class).
* WebCore.xcodeproj/project.pbxproj:
* dom/Entity.cpp: Added.
(WebCore::Entity::Entity):
* dom/Entity.h: Added.
* dom/EntityReference.cpp: Added.
(WebCore::EntityReference::EntityReference):
* dom/EntityReference.h: Added.
* dom/Notation.cpp: Added.
(WebCore::Notation::Notation):
* dom/Notation.h: Added.
* dom/ProcessingInstruction.cpp: Added.
(WebCore::ProcessingInstruction::ProcessingInstruction):
* dom/ProcessingInstruction.h: Added.
* dom/dom_xmlimpl.cpp: Removed.
* dom/dom_xmlimpl.h: Removed.
2006-05-15 Eric Seidel <eseidel@apple.com>
Reviewed by Tim Hatcher.
Split html_imageimpl.* into separate files (one per class).
http://bugzilla.opendarwin.org/show_bug.cgi?id=8929
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCanvasRenderingContext2DBase.cpp:
* bindings/js/kjs_events.cpp:
* bindings/js/kjs_html.cpp:
* bindings/objc/DOMHTML.mm:
* bridge/mac/WebCoreFrameBridge.mm:
* dom/Document.cpp:
* editing/JSEditor.cpp:
* html/CanvasRenderingContext2D.cpp:
* html/HTMLAnchorElement.cpp:
* html/HTMLAreaElement.cpp: Added.
(WebCore::HTMLAreaElement::HTMLAreaElement):
(WebCore::HTMLAreaElement::mapMouseEvent):
(WebCore::HTMLAreaElement::getRect):
(WebCore::HTMLAreaElement::getRegion):
* html/HTMLAreaElement.h: Added.
* html/HTMLCanvasElement.h:
* html/HTMLDocument.cpp:
* html/HTMLElementFactory.cpp:
* html/HTMLFormCollection.cpp:
* html/HTMLFormElement.cpp:
* html/HTMLImageElement.cpp: Added.
(WebCore::HTMLImageElement::HTMLImageElement):
* html/HTMLImageElement.h: Added.
* html/HTMLImageLoader.cpp: Added.
(WebCore::HTMLImageLoader::HTMLImageLoader):
* html/HTMLImageLoader.h: Added.
* html/HTMLInputElement.cpp:
* html/HTMLMapElement.cpp: Added.
(WebCore::HTMLMapElement::mapMouseEvent):
(WebCore::HTMLMapElement::parseMappedAttribute):
* html/HTMLMapElement.h: Added.
* html/HTMLObjectElement.cpp:
* html/HTMLParser.cpp:
* html/html_imageimpl.cpp: Removed.
* html/html_imageimpl.h: Removed.
* ksvg2/misc/SVGImageLoader.h:
* kwq/WebCoreAXObject.mm:
(-[WebCoreAXObject addChildrenToArray:]):
* page/Frame.cpp:
* rendering/RenderImage.cpp:
(WebCore::RenderImage::RenderImage):
(WebCore::RenderImage::nodeAtPoint):
2006-05-15 Eric Seidel <eseidel@apple.com>
Reviewed by beth.
Split html_blockimpl.* into separate files (one per class).
http://bugzilla.opendarwin.org/show_bug.cgi?id=8927
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/kjs_html.cpp:
* bindings/objc/DOMHTML.mm:
* html/HTMLBlockquoteElement.cpp: Added.
(WebCore::HTMLBlockquoteElement::HTMLBlockquoteElement):
* html/HTMLBlockquoteElement.h: Added.
* html/HTMLDivElement.cpp: Added.
* html/HTMLDivElement.h: Added.
* html/HTMLElementFactory.cpp:
* html/HTMLHRElement.cpp: Added.
* html/HTMLHRElement.h: Added.
* html/HTMLHeadingElement.cpp: Added.
* html/HTMLHeadingElement.h: Added.
* html/HTMLMarqueeElement.cpp: Added.
(WebCore::HTMLMarqueeElement::HTMLMarqueeElement):
(WebCore::HTMLMarqueeElement::parseMappedAttribute):
* html/HTMLMarqueeElement.h: Added.
* html/HTMLParagraphElement.cpp: Added.
* html/HTMLParagraphElement.h: Added.
* html/HTMLParser.cpp:
* html/HTMLPreElement.cpp: Added.
(WebCore::HTMLPreElement::HTMLPreElement):
(WebCore::HTMLPreElement::setWrap):
* html/HTMLPreElement.h: Added.
* html/HTMLTextFieldInnerElement.h:
* html/html_blockimpl.cpp: Removed.
* html/html_blockimpl.h: Removed.
* rendering/RenderLayer.cpp:
2006-05-15 Eric Seidel <eseidel@apple.com>
Reviewed by ggaren.
Split render_list.* and html_listimpl.* into separate files (one per class).
http://bugzilla.opendarwin.org/show_bug.cgi?id=8925
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/kjs_html.cpp:
* bindings/objc/DOMHTML.mm:
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::attributedString):
* html/HTMLDListElement.cpp: Added.
(WebCore::HTMLDListElement::HTMLDListElement):
* html/HTMLDListElement.h: Added.
* html/HTMLDirectoryElement.cpp: Added.
(WebCore::HTMLDirectoryElement::HTMLDirectoryElement):
* html/HTMLDirectoryElement.h: Added.
* html/HTMLElementFactory.cpp:
* html/HTMLKeygenElement.cpp:
* html/HTMLLIElement.cpp: Added.
(WebCore::HTMLLIElement::HTMLLIElement):
(WebCore::HTMLLIElement::parseMappedAttribute):
(WebCore::HTMLLIElement::attach):
(WebCore::HTMLLIElement::setType):
* html/HTMLLIElement.h: Added.
* html/HTMLMenuElement.cpp: Added.
(WebCore::HTMLMenuElement::HTMLMenuElement):
* html/HTMLMenuElement.h: Added.
* html/HTMLOListElement.cpp: Added.
(WebCore::HTMLOListElement::HTMLOListElement):
(WebCore::HTMLOListElement::parseMappedAttribute):
(WebCore::HTMLOListElement::setType):
* html/HTMLOListElement.h: Added.
(WebCore::HTMLOListElement::start):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::HTMLOptionElement):
(WebCore::HTMLOptionElement::checkDTD):
(WebCore::HTMLOptionElement::text):
(WebCore::HTMLOptionElement::setText):
(WebCore::HTMLOptionElement::getSelect):
(WebCore::HTMLOptionElement::setLabel):
* html/HTMLOptionElement.h:
* html/HTMLParser.cpp:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::HTMLSelectElement):
* html/HTMLUListElement.cpp: Added.
(WebCore::HTMLUListElement::HTMLUListElement):
* html/HTMLUListElement.h: Added.
* html/html_listimpl.cpp: Removed.
* html/html_listimpl.h: Removed.
* kwq/WebCoreAXObject.mm:
* rendering/InlineFlowBox.cpp:
* rendering/ListMarkerBox.cpp: Added.
(WebCore::ListMarkerBox::ListMarkerBox):
(WebCore::ListMarkerBox::isText):
* rendering/ListMarkerBox.h: Added.
* rendering/RenderContainer.cpp:
(WebCore::updateListMarkerNumbers):
(WebCore::RenderContainer::addChild):
(WebCore::RenderContainer::removeChild):
(WebCore::RenderContainer::layout):
(WebCore::RenderContainer::removeLeftoverAnonymousBoxes):
(WebCore::RenderContainer::positionForCoordinates):
(WebCore::RenderContainer::lineBoxRects):
* rendering/RenderListItem.cpp: Added.
(WebCore::RenderListItem::RenderListItem):
(WebCore::RenderListItem::setStyle):
(WebCore::RenderListItem::calcValue):
(WebCore::RenderListItem::markerStringValue):
* rendering/RenderListItem.h: Added.
(WebCore::RenderListItem::renderName):
(WebCore::RenderListItem::setValue):
(WebCore::RenderListItem::setNotInList):
(WebCore::RenderListItem::notInList):
* rendering/RenderListMarker.cpp: Added.
(WebCore::RenderListMarker::RenderListMarker):
(WebCore::RenderListMarker::setStyle):
(WebCore::RenderListMarker::paint):
(WebCore::RenderListMarker::layout):
(WebCore::RenderListMarker::calcMinMaxWidth):
* rendering/RenderListMarker.h: Added.
(WebCore::RenderListMarker::renderName):
* rendering/RenderObject.cpp:
* rendering/render_list.cpp: Removed.
* rendering/render_list.h: Removed.
2006-05-15 Sam Weinig <sam.weinig@gmail.com>
Reviewed by eseidel.
Split render_form.* into separate files (one per class).
http://bugzilla.opendarwin.org/show_bug.cgi?id=8889
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLButtonElement.cpp:
(WebCore::HTMLButtonElement::HTMLButtonElement):
* html/HTMLFieldSetElement.cpp:
* html/HTMLFormElement.cpp:
* html/HTMLInputElement.cpp:
* html/HTMLLabelElement.cpp:
* html/HTMLLegendElement.cpp:
(WebCore::HTMLLegendElement::createRenderer):
* html/HTMLOptionElement.cpp:
* html/HTMLSelectElement.cpp:
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::selectionStart):
(WebCore::HTMLTextAreaElement::selectionEnd):
(WebCore::HTMLTextAreaElement::setSelectionStart):
(WebCore::HTMLTextAreaElement::setSelectionEnd):
(WebCore::HTMLTextAreaElement::setSelectionRange):
(WebCore::HTMLTextAreaElement::parseMappedAttribute):
(WebCore::HTMLTextAreaElement::createRenderer):
(WebCore::HTMLTextAreaElement::setValue):
(WebCore::HTMLTextAreaElement::setDefaultValue):
(WebCore::HTMLTextAreaElement::setAccessKey):
* kwq/KWQComboBox.mm:
* kwq/KWQFileButton.mm:
* kwq/KWQListBox.mm:
* kwq/KWQSlider.mm:
* platform/mac/WebCoreTextField.mm:
* rendering/RenderFieldset.cpp: Added.
(WebCore::RenderFieldset::RenderFieldset):
(WebCore::RenderFieldset::findLegend):
(WebCore::RenderFieldset::paintBorderMinusLegend):
(WebCore::RenderFieldset::setStyle):
* rendering/RenderFieldset.h: Added.
(WebCore::RenderFieldset::renderName):
* rendering/RenderFileButton.cpp: Added.
(WebCore::RenderFileButton::RenderFileButton):
(WebCore::RenderFileButton::calcMinMaxWidth):
(WebCore::RenderFileButton::updateFromElement):
(WebCore::RenderFileButton::click):
* rendering/RenderFileButton.h: Added.
(WebCore::RenderFileButton::renderName):
(WebCore::RenderFileButton::calcReplacedHeight):
(WebCore::RenderFileButton::isEditable):
* rendering/RenderFormElement.cpp: Added.
(WebCore::RenderFormElement::RenderFormElement):
(WebCore::RenderFormElement::baselinePosition):
(WebCore::RenderFormElement::layout):
* rendering/RenderFormElement.h: Added.
(WebCore::RenderFormElement::renderName):
(WebCore::RenderFormElement::isFormElement):
(WebCore::RenderFormElement::borderTop):
(WebCore::RenderFormElement::borderBottom):
(WebCore::RenderFormElement::borderLeft):
(WebCore::RenderFormElement::borderRight):
(WebCore::RenderFormElement::paddingTop):
(WebCore::RenderFormElement::paddingBottom):
(WebCore::RenderFormElement::paddingLeft):
(WebCore::RenderFormElement::paddingRight):
(WebCore::RenderFormElement::canHaveIntrinsicMargins):
(WebCore::RenderFormElement::intrinsicMargin):
(WebCore::RenderFormElement::isEditable):
* rendering/RenderImageButton.cpp: Added.
(WebCore::RenderImageButton::RenderImageButton):
* rendering/RenderImageButton.h: Added.
(WebCore::RenderImageButton::renderName):
(WebCore::RenderImageButton::isImageButton):
* rendering/RenderLabel.cpp: Added.
(WebCore::RenderLabel::RenderLabel):
* rendering/RenderLabel.h: Added.
(WebCore::RenderLabel::renderName):
* rendering/RenderLegend.cpp: Added.
(WebCore::RenderLegend::RenderLegend):
* rendering/RenderLegend.h: Added.
(WebCore::RenderLegend::renderName):
* rendering/RenderLineEdit.cpp: Added.
(WebCore::RenderLineEdit::RenderLineEdit):
* rendering/RenderLineEdit.h: Added.
(WebCore::RenderLineEdit::renderName):
(WebCore::RenderLineEdit::calcReplacedHeight):
(WebCore::RenderLineEdit::canHaveIntrinsicMargins):
(WebCore::RenderLineEdit::isTextField):
(WebCore::RenderLineEdit::isEditable):
* rendering/RenderSelect.cpp: Added.
(WebCore::RenderSelect::RenderSelect):
(WebCore::RenderSelect::setWidgetWritingDirection):
(WebCore::RenderSelect::setStyle):
(WebCore::RenderSelect::updateFromElement):
(WebCore::RenderSelect::baselinePosition):
(WebCore::RenderSelect::calcMinMaxWidth):
(WebCore::RenderSelect::layout):
(WebCore::RenderSelect::valueChanged):
(WebCore::RenderSelect::selectionChanged):
(WebCore::RenderSelect::updateSelection):
* rendering/RenderSelect.h: Added.
(WebCore::RenderSelect::renderName):
(WebCore::RenderSelect::calcReplacedHeight):
(WebCore::RenderSelect::canHaveIntrinsicMargins):
(WebCore::RenderSelect::selectionChanged):
(WebCore::RenderSelect::setSelectionChanged):
* rendering/RenderSlider.cpp: Added.
(WebCore::RenderSlider::calcMinMaxWidth):
(WebCore::RenderSlider::updateFromElement):
* rendering/RenderSlider.h: Added.
(WebCore::RenderSlider::renderName):
(WebCore::RenderSlider::canHaveIntrinsicMargins):
* rendering/RenderTextArea.cpp: Added.
(WebCore::RenderTextArea::RenderTextArea):
(WebCore::RenderTextArea::calcMinMaxWidth):
(WebCore::RenderTextArea::setStyle):
(WebCore::RenderTextArea::updateFromElement):
(WebCore::RenderTextArea::selectionStart):
(WebCore::RenderTextArea::selectionEnd):
(WebCore::RenderTextArea::setSelectionStart):
(WebCore::RenderTextArea::setSelectionEnd):
(WebCore::RenderTextArea::select):
(WebCore::RenderTextArea::setSelectionRange):
* rendering/RenderTextArea.h: Added.
(WebCore::RenderTextArea::renderName):
(WebCore::RenderTextArea::isTextArea):
(WebCore::RenderTextArea::isEdited):
(WebCore::RenderTextArea::canHaveIntrinsicMargins):
(WebCore::RenderTextArea::isEditable):
* rendering/render_form.cpp: Removed.
* rendering/render_form.h: Removed.
2006-05-15 Anders Carlsson <acarlsson@apple.com>
Reviewed by Eric.
Remove the XPath log calls. They were causing leaks and were never
really useful.
* bridge/mac/WebCorePageBridge.mm:
(initializeLoggingChannelsIfNecessary):
* platform/Logging.cpp:
* platform/Logging.h:
* xpath/XPathResult.cpp:
(WebCore::XPathResult::convertTo):
* xpath/impl/XPathFunctions.cpp:
(round):
(WebCore::XPath::FunCount::doEvaluate):
(WebCore::XPath::FunSum::doEvaluate):
(WebCore::XPath::FunctionLibrary::createFunction):
* xpath/impl/XPathPath.cpp:
(WebCore::XPath::Filter::doEvaluate):
(WebCore::XPath::LocationPath::doEvaluate):
* xpath/impl/XPathPredicate.cpp:
(WebCore::XPath::Negative::doEvaluate):
(WebCore::XPath::NumericOp::doEvaluate):
(WebCore::XPath::Union::doEvaluate):
* xpath/impl/XPathStep.cpp:
(WebCore::XPath::Step::evaluate):
(WebCore::XPath::Step::nodesInAxis):
(WebCore::XPath::Step::nodeTestMatches):
* xpath/impl/XPathValue.cpp:
(WebCore::XPath::Value::toNodeVector):
2006-05-15 Eric Seidel <eseidel@apple.com>
Fix linux build.
* html/HTMLBodyElement.cpp: Fix case of #include "cssstyleselector.h"
2006-05-15 Anders Carlsson <acarlsson@apple.com>
Reviewed by Maciej.
http://bugzilla.opendarwin.org/show_bug.cgi?id=8913
REGRESSION: Can view source for text files
* bridge/mac/WebCoreFrameBridge.h:
* bridge/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge canProvideDocumentSource]):
(-[WebCoreFrameBridge canSaveAsWebArchive]):
2006-05-15 David Hyatt <hyatt@apple.com>
Remove the .forPrinter boolean from FontPlatformData. After the initial
acquisition of an NSFont, the font is then adjusted to printer or screen
when put into a FontPlatformData. Then it can simply be used in the hash
lookup to get a FontData.
Reviewed by mjs
* platform/Font.cpp:
(WebCore::WidthIterator::advance):
* platform/FontData.h:
* platform/FontDescription.h:
(WebCore::FontDescription::bold):
* platform/FontPlatformData.h:
(WebCore::FontPlatformData::syntheticOblique):
* platform/mac/FontCacheMac.mm:
(WebCore::FontCache::getFontDataForCharacters):
* platform/mac/FontData.mm:
(WebCore::FontData::smallCapsFontData):
(WebCore::getSmallCapsFontData):
(WebCore::setUpFont):
* platform/mac/FontMac.mm:
(WebCore::ATSULayoutParameters::initialize):
* platform/mac/WebTextRendererFactory.h:
* platform/mac/WebTextRendererFactory.mm:
(-[WebTextRendererFactory rendererWithFont:]):
(-[WebTextRendererFactory fontWithDescription:WebCore::familyIndex:]):
2006-05-15 Anders Carlsson <acarlsson@apple.com>
Reviewed by Maciej.
* dom/Document.idl:
Remove #if XPATH_SUPPORT until we have a way to feed defines to the bindings generator
(see http://bugzilla.opendarwin.org/show_bug.cgi?id=8912)
2006-05-14 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Hyatt.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6838
Incomplete repaint of collapsed table borders
This patch updates the implementation of collapsing borders to match
the current spec.
Test: fast/repaint/table-collapsed-border.html
* rendering/RenderTable.cpp:
(WebCore::RenderTable::RenderTable):
(WebCore::RenderTable::layout): Calculate horizontal overflows.
(WebCore::RenderTable::calcMinMaxWidth): Added call to recalcHorizontalBorders.
(WebCore::RenderTable::colElement): Made const.
(WebCore::RenderTable::calcBorderLeft): Calculates the left border. In the collapsing
borders model, this is the left border of the leftmost cell of the first row.
(WebCore::RenderTable::calcBorderRight): Ditto for the right border.
(WebCore::RenderTable::recalcHorizontalBorders): Added.
(WebCore::RenderTable::borderTop): Changed to return outerBorderTop in the
collapsing case.
(WebCore::RenderTable::borderBottom): Changed to return outerBorderBottom in
the collapsing case.
(WebCore::RenderTable::outerBorderTop): Added. Returns the table half of the
top border, which is half the widest top border on the first row.
(WebCore::RenderTable::outerBorderBottom): Added. Returns the table half of the
bottom border, which is half the widest bottom border on the last row.
(WebCore::RenderTable::outerBorderLeft): Added. Returns the table half of the
left border, which is half the widest left border on the leftmost column.
(WebCore::RenderTable::outerBorderRight): Added. Returns the table half of the
right border, which is half the widest right border on the rightmost column.
(WebCore::RenderTable::cellAbove): Return 0 if the cell is in the first row
of the header.
(WebCore::RenderTable::cellBelow): Return 0 if the cell is in the last row
of the footer.
* rendering/RenderTable.h:
(WebCore::RenderTable::borderLeft):
(WebCore::RenderTable::borderRight):
(WebCore::RenderTable::overflowHeight):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::borderLeft): Removed unnecessary use of floats.
(WebCore::RenderTableCell::borderTop): Ditto.
(WebCore::RenderTableCell::paint): Account for the table half of the vertical
borders.
(WebCore::RenderTableCell::paintCollapsedBorder): Removed unnecessary use of
floats.
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::RenderTableSection):
(WebCore::RenderTableSection::layoutRows): Added call to recalcOuterBorder.
(WebCore::RenderTableSection::calcOuterBorderTop): Added. Calculates the outer half of
the section's top border, which is half the widest top border on the first row.
(WebCore::RenderTableSection::calcOuterBorderBottom): Ditto for the bottom border.
(WebCore::RenderTableSection::calcOuterBorderLeft): Ditto for the left border.
(WebCore::RenderTableSection::calcOuterBorderRight): Ditto for the right border.
(WebCore::RenderTableSection::recalcOuterBorder): Added.
(WebCore::RenderTableSection::paint): Account for the table half of the borders.
* rendering/RenderTableSection.h:
(WebCore::RenderTableSection::outerBorderTop):
(WebCore::RenderTableSection::outerBorderBottom):
(WebCore::RenderTableSection::outerBorderLeft):
(WebCore::RenderTableSection::outerBorderRight):
* rendering/render_style.cpp:
(WebCore::RenderStyle::diff): Changed to return Layout if a border style changed
from 'hidden' to 'none' or vice versa in the collapsing borders model, since
'hidden' suppresses other borders.
2006-05-14 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Darin.
- test for http://bugzilla.opendarwin.org/show_bug.cgi?id=8739
Crash in RenderTableSection::paint due to manipulating DOM on resize
* manual-tests/dom-manipulation-on-resize.html: Added.
2006-05-14 Rob Buis <buis@kde.org>
Reviewed by Darin.
Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=5882:
disabled type="file" element doesn't appear disabled
Be sure to call setDisabled on the file button when in
RenderFileButton::updateFromElement.
* kwq/KWQFileButton.h:
* kwq/KWQFileButton.mm:
(-[WebFileChooserButton setEnabled:]):
(KWQFileButton::setDisabled):
* rendering/render_form.cpp:
(WebCore::RenderFileButton::updateFromElement):
2006-05-14 Steve Falkenburg <sfalken@apple.com>
Fix Windows build.
* platform/win/FontWin.cpp:
(WebCore::FontFallbackList::fontDataAt):
(WebCore::hackishExtentForString):
(WebCore::Font::floatWidth):
(WebCore::Font::drawText):
(WebCore::Font::selectionRectForText):
(WebCore::Font::offsetForPosition):
2006-05-14 David Hyatt <hyatt@apple.com>
Bug 8895. Rework font substitution and fallback. Lift the concept of
substitution and fallback out of FontData and up into the FontFallbackList.
See the bug for details of issues fixed in the fallback code.
Reviewed by darin
* WebCore.xcodeproj/project.pbxproj:
* platform/Font.cpp:
(WebCore::m_finalRoundingWidth):
(WebCore::WidthIterator::advance):
(WebCore::Font::primaryFont):
(WebCore::Font::fontDataAt):
(WebCore::Font::fontDataForCharacters):
(WebCore::Font::ascent):
(WebCore::Font::descent):
(WebCore::Font::lineSpacing):
(WebCore::Font::xHeight):
(WebCore::Font::isFixedPitch):
* platform/Font.h:
(WebCore::Font::getNSFont):
* platform/FontCache.h: Added.
* platform/FontData.h:
(WebCore::FontData::pitch):
(WebCore::FontData::getNSFont):
(WebCore::):
* platform/FontFallbackList.cpp: Added.
(WebCore::m_pitch):
(WebCore::FontFallbackList::~FontFallbackList):
(WebCore::FontFallbackList::invalidate):
(WebCore::FontFallbackList::determinePitch):
(WebCore::FontFallbackList::fontDataAt):
(WebCore::FontFallbackList::fontDataForCharacters):
* platform/FontFallbackList.h:
(WebCore::FontFallbackList::isFixedPitch):
(WebCore::FontFallbackList::primaryFont):
* platform/FontFamily.h:
* platform/mac/FontCacheMac.mm: Added.
(WebCore::FontCache::getFontData):
(WebCore::FontCache::getFontDataForCharacters):
* platform/mac/FontData.mm:
(WebCore::FontData::containsCharacters):
* platform/mac/FontMac.mm:
(WebCore::ATSULayoutParameters::initialize):
* platform/mac/WebTextRendererFactory.h:
* platform/mac/WebTextRendererFactory.mm:
(-[WebTextRendererFactory fallbackFontWithTraits:size:]):
(-[WebTextRendererFactory fontWithDescription:WebCore::familyIndex:]):
* platform/win/FontWin.cpp:
(WebCore::FontFallbackList::determinePitch):
(WebCore::FontFallbackList::primaryFont):
(WebCore::FontFallbackList::fontDataAt):
(WebCore::FontFallbackList::fontDataForCharacters):
2006-05-14 Sam Weinig <sam.weinig@gmail.com>
Reviewed by Hyatt, landed by ap.
Fix for <http://bugzilla.opendarwin.org/show_bug.cgi?id=8387>
"border-left/padding-Left do not show up on multiline rtl inline boxes"
Test: fast/inline/inline-borders-with-bidi-override.html: added
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
2006-05-14 Steve Falkenburg <sfalken@apple.com>
Fix the Windows build the rest of the way
* WebCore.vcproj/WebCore/WebCore.vcproj:
2006-05-14 Steve Falkenburg <sfalken@apple.com>
Get FontWin.cpp compiling.
WebCore and JSCore now build, but Spinneret still gets link errors.
* platform/win/FontWin.cpp:
(WebCore::Font::offsetForPosition):
2006-05-14 Steve Falkenburg <sfalken@apple.com>
Reviewed by maciej.
Fix Windows build except for fontwin.cpp.
* WebCore/platform/win/FontWin.cpp:
* WebCore.vcproj/WebCore/WebCore.vcproj:
* bridge/win/FrameWin.cpp:
2006-05-13 Kevin M. Ollivier <kevino@theolliviers.com>
Reviewed by Darin, landed by ap.
- http://bugzilla.opendarwin.org/show_bug.cgi?id=8528
Bakefiles (and generated Makefiles) for wx and gdk ports
* make-generated-sources.sh:
Added script to configure environment to run DerivedSources.make
* move-js-headers.sh:
Added script to copy JavaScriptCore includes into one dir so that
Framework-style includes will work on all OSes. (written by Mike Emmel)
* platform/wx: New dir, home for the wxWidgets port
* platform/wx/wx-encodings.txt: Added temp. stub for wx encodings file.
* Projects: New dir, for various project files for ports.
* Projects/gdk: New dir, GDK port files.
* Projects/webcore-gdk.bkl: Bakefile to generate GDK port project files
* Projects/wx: New dir, wxWidgets port files.
* Projects/webcore-wx.bkl: Bakefile to generate wxWidgets port project files
2006-05-13 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Darin, landed by ap.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8485
iExploder(#11705): Freeze in RenderBlock::layout()
Test: fast/text/midword-break-hang.html
* rendering/bidi.cpp:
(WebCore::RenderBlock::findNextLineBreak): If this is a mid-word break,
ignore breakOnlyAfterWhiteSpace.
2006-05-13 Alexey Proskuryakov <ap@nypop.com>
Fix release build.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::calcAbsoluteHorizontalValues): Initialize leftValue.
This value will never be used, because 'left' and 'right' cannot both be 'auto'.
(WebCore::RenderBox::calcAbsoluteVerticalValues): Initialize topValue.
(WebCore::RenderBox::calcAbsoluteVerticalReplaced): Same changes as above.
2006-05-13 Alexey Proskuryakov <ap@nypop.com>
Re-applied the fix for bug 8835 (REGRESSION: Line moves but selection
highlight stays behind) to a correct file; removed the stale one.
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::adjustPosition): Adjust m_selectionTop
and m_selectionBottom.
* rendering/render_line.cpp: Removed.
2006-05-13 Rob Buis <buis@kde.org>
Reviewed by Darin, landed by ap.
Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8132
CSS parser sometimes accepts real number as integer
Add a boolean variable per css value to catch whether values
are specified as floats or integers.
Test: fast/css/rgb-float.html
* css/CSSGrammar.y:
* css/cssparser.cpp:
(WebCore::CSSParser::validUnit):
(WebCore::CSSParser::lex):
* css/cssparser.h:
* css/tokenizer.flex:
2006-05-13 Sam Weinig <sam.weinig@gmail.com>
Reviewed by Hyatt, landed by ap.
Patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=7604
calcAbsoluteHorizontalValues() is being getting passed arguments
in the wrong order in calcAbsoluteHorizontal()
Cleans up the RenderBox code for absolutely positioned elements
and adds new functions for replaced absolutely positioned
elements. Now uses Length so that magic number -666666 for
auto lengths is no longer used.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::calcAbsoluteHorizontal):
(WebCore::RenderBox::calcAbsoluteHorizontalValues):
(WebCore::RenderBox::calcAbsoluteVertical):
(WebCore::RenderBox::calcAbsoluteVerticalValues):
(WebCore::RenderBox::calcAbsoluteHorizontalReplaced): Handle replaced
case separately.
(WebCore::RenderBox::calcAbsoluteVerticalReplaced): ditto.
* rendering/RenderBox.h:
2006-05-12 David Hyatt <hyatt@apple.com>
Bug 8880, remove the remaining drawing/hit testing code from
FontData.
Reviewed by tim h
* platform/Font.cpp:
(WebCore::m_finalRoundingWidth):
(WebCore::WidthIterator::advanceOneCharacter):
(WebCore::Font::selectionRectForText):
(WebCore::Font::selectionRectForSimpleText):
(WebCore::Font::offsetForPosition):
(WebCore::Font::offsetForPositionForSimpleText):
* platform/Font.h:
(WebCore::TextRun::makeComplete):
* platform/FontData.h:
* platform/GlyphBuffer.h:
(WebCore::GlyphBuffer::clear):
* platform/mac/FontData.mm:
* platform/mac/FontMac.mm:
(WebCore::Font::selectionRectForComplexText):
(WebCore::Font::offsetForPositionForComplexText):
2006-05-12 Kevin M. Ollivier <kevino@theolliviers.com>
Reviewed by Maciej.
Add missing include.
* dom/Node.h: Add missing include for DeprecatedString.
2006-05-12 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8835
REGRESSION: Line moves but selection highlight stays behind
Test: fast/dynamic/selection-highlight-adjust.html
* rendering/render_line.cpp:
(WebCore::RootInlineBox::adjustPosition): Adjust m_selectionTop
and m_selectionBottom.
2006-05-12 Timothy Hatcher <timothy@apple.com>
Reviewed by Darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=7156
Bug 7156: TinyMCE: Links are actually activated in editable area, not editable.
Links in editable areas will not activate or perform a navigation
change (on par with WinIE and Firefox.) To visit the link
you can shift-click. Manual test added.
* css/cssstyleselector.cpp:
(WebCore::CSSStyleSelector::adjustRenderStyle):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::defaultEventHandler):
(WebCore::HTMLAnchorElement::setActive):
* html/HTMLAnchorElement.h:
* manual-tests/contenteditable-link.html: Added.
* page/FrameView.cpp:
(WebCore::selectCursor):
2006-05-12 Eric Seidel <eseidel@apple.com>
Reviewed by timo.
Split out html_inlineimpl.* into separate files (one per class).
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/kjs_html.cpp:
* bindings/objc/DOMHTML.mm:
* editing/CreateLinkCommand.cpp:
* editing/UnlinkCommand.cpp:
* html/HTMLAnchorElement.cpp: Added.
(WebCore::HTMLAnchorElement::HTMLAnchorElement):
* html/HTMLAnchorElement.h: Added.
* html/HTMLBRElement.cpp: Added.
* html/HTMLBRElement.h: Added.
* html/HTMLElementFactory.cpp:
* html/HTMLFontElement.cpp: Added.
(WebCore::HTMLFontElement::HTMLFontElement):
(WebCore::HTMLFontElement::setColor):
(WebCore::HTMLFontElement::setFace):
(WebCore::HTMLFontElement::setSize):
* html/HTMLFontElement.h: Added.
* html/HTMLModElement.cpp: Added.
(WebCore::HTMLModElement::setCite):
(WebCore::HTMLModElement::setDateTime):
* html/HTMLModElement.h: Added.
* html/HTMLQuoteElement.cpp: Added.
* html/HTMLQuoteElement.h: Added.
* html/html_imageimpl.h:
* html/html_inlineimpl.cpp: Removed.
* html/html_inlineimpl.h: Removed.
* page/FrameView.cpp:
2006-05-12 Eric Seidel <eseidel@apple.com>
Reviewed by beth.
Fix build error.
* rendering/InlineFlowBox.cpp:
* rendering/RootInlineBox.cpp:
2006-05-12 Eric Seidel <eseidel@apple.com>
Reviewed by beth.
Split out render_line.* into separate files (one per class).
* WebCore.xcodeproj/project.pbxproj:
* dom/ContainerNode.cpp:
* rendering/EllipsisBox.cpp: Added.
* rendering/EllipsisBox.h: Added.
(WebCore::EllipsisBox::EllipsisBox):
* rendering/InlineBox.cpp: Added.
* rendering/InlineBox.h: Added.
(WebCore::InlineBox::InlineBox):
(WebCore::InlineBox::~InlineBox):
(WebCore::InlineBox::bottomOverflow):
(WebCore::InlineBox::rightOverflow):
* rendering/InlineFlowBox.cpp: Added.
(WebCore::InlineFlowBox::placeBoxesHorizontally):
* rendering/InlineFlowBox.h: Added.
* rendering/InlineRunBox.h: Added.
(WebCore::InlineRunBox::InlineRunBox):
(WebCore::InlineRunBox::paintBackgroundAndBorder):
(WebCore::InlineRunBox::paintDecorations):
* rendering/InlineTextBox.h:
* rendering/RenderBlock.h:
* rendering/RenderFlow.h:
* rendering/RenderReplaced.cpp:
* rendering/RootInlineBox.cpp: Added.
* rendering/RootInlineBox.h: Added.
(WebCore::RootInlineBox::RootInlineBox):
* rendering/render_line.h: Removed.
2006-05-12 Eric Seidel <eseidel@apple.com>
Reviewed by hyatt.
Split out table_layout.* into separate files (one per class).
Search replace instance variables "foo" with "m_foo" to comply with modern style.
* WebCore.xcodeproj/project.pbxproj:
* rendering/AutoTableLayout.cpp: Added.
(WebCore::AutoTableLayout::AutoTableLayout):
(WebCore::AutoTableLayout::recalcColumn):
(WebCore::AutoTableLayout::fullRecalc):
(WebCore::AutoTableLayout::calcMinMaxWidth):
(WebCore::AutoTableLayout::calcEffectiveWidth):
(WebCore::AutoTableLayout::insertSpanCell):
(WebCore::AutoTableLayout::layout):
(WebCore::AutoTableLayout::calcPercentages):
* rendering/AutoTableLayout.h: Added.
(WebCore::AutoTableLayout::totalPercent):
(WebCore::AutoTableLayout::Layout::Layout):
* rendering/FixedTableLayout.cpp: Added.
(WebCore::FixedTableLayout::FixedTableLayout):
(WebCore::FixedTableLayout::calcWidthArray):
(WebCore::FixedTableLayout::calcMinMaxWidth):
(WebCore::FixedTableLayout::layout):
* rendering/FixedTableLayout.h: Added.
* rendering/RenderTable.cpp:
* rendering/TableLayout.h: Added.
(WebCore::TableLayout::TableLayout):
* rendering/table_layout.cpp: Removed.
* rendering/table_layout.h: Removed.
2006-05-12 David Hyatt <hyatt@apple.com>
Bug 8877. Change form controls and the bridge entry points from the
Safari UI to use Font instead of FontData.
Reviewed by mjs
* bridge/mac/WebCoreStringTruncator.mm:
(stringWidth):
(truncateString):
(+[WebCoreStringTruncator widthOfString:font:]):
(+[WebCoreStringTruncator clear]):
* kwq/KWQComboBox.mm:
(QComboBox::sizeHint):
* kwq/KWQLineEdit.mm:
(QLineEdit::sizeForCharacterWidth):
* kwq/KWQListBox.mm:
(itemTextRenderer):
(groupLabelTextRenderer):
(QListBox::sizeForNumberOfLines):
(QListBox::clearCachedTextRenderers):
(-[KWQTableView drawRow:clipRect:]):
* platform/Font.cpp:
(WebCore::Font::drawSimpleText):
(WebCore::Font::drawText):
* platform/Font.h:
(WebCore::TextStyle::disableRoundingHacks):
(WebCore::TextStyle::setRTL):
* platform/FontData.h:
* platform/FontFallbackList.h:
* platform/FontPlatformData.h:
(WebCore::FontPlatformData::syntheticOblique):
* platform/Pen.h:
* platform/mac/FontData.mm:
(WebCore::FontData::smallCapsFontData):
(WebCore::findSubstituteRenderer):
* platform/mac/FontMac.mm:
(WebCore::FontFallbackList::setPlatformFont):
(WebCore::m_wordSpacing):
(WebCore::Font::drawComplexText):
* platform/mac/WebCoreTextRenderer.mm:
(WebCoreDrawTextAtPoint):
(WebCoreTextFloatWidth):
* platform/win/FontWin.cpp:
(WebCore::Font::drawText):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::positionForOffset):
2006-05-12 Eric Seidel <eseidel@apple.com>
Reviewed by kevin.
Move render_button to RenderButton.
Various small style cleanup.
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLButtonElement.cpp:
* html/HTMLElement.cpp:
* html/HTMLGenericFormElement.cpp:
* html/HTMLInputElement.cpp:
* platform/mac/WebCoreTextArea.mm:
* rendering/RenderApplet.h:
* rendering/RenderBox.cpp:
* rendering/RenderButton.cpp: Added.
(WebCore::RenderButton::RenderButton):
(WebCore::RenderButton::addChild):
(WebCore::RenderButton::removeChild):
* rendering/RenderButton.h: Added.
* rendering/RenderEmptyApplet.h:
* rendering/RenderHTMLCanvas.h:
* rendering/RenderTreeAsText.cpp:
* rendering/render_button.cpp: Removed.
* rendering/render_button.h: Removed.
* rendering/table_layout.cpp:
(WebCore::FixedTableLayout::FixedTableLayout):
(WebCore::FixedTableLayout::calcWidthArray):
(WebCore::FixedTableLayout::calcMinMaxWidth):
(WebCore::FixedTableLayout::layout):
(WebCore::AutoTableLayout::AutoTableLayout):
(WebCore::AutoTableLayout::recalcColumn):
(WebCore::AutoTableLayout::fullRecalc):
(WebCore::AutoTableLayout::calcMinMaxWidth):
(WebCore::AutoTableLayout::calcEffectiveWidth):
(WebCore::AutoTableLayout::insertSpanCell):
(WebCore::AutoTableLayout::layout):
* rendering/table_layout.h:
(WebCore::TableLayout::TableLayout):
(WebCore::AutoTableLayout::totalPercent):
(WebCore::AutoTableLayout::Layout::Layout):
2006-05-12 Eric Seidel <eseidel@apple.com>
Reviewed by mjs.
Split render_frames.* render_replaced.* and html_baseimpl.* into separate files (one class per file).
http://bugzilla.opendarwin.org/show_bug.cgi?id=8878
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/kjs_html.cpp:
(KJS::JSHTMLDocumentProtoFunc::callAsFunction):
(KJS::JSHTMLDocument::namedItemGetter):
(KJS::JSHTMLDocument::getValueProperty):
(KJS::JSHTMLDocument::getOwnPropertySlot):
(KJS::JSHTMLDocument::putValueProperty):
(KJS::JSHTMLElement::formIndexGetter):
(KJS::JSHTMLElement::formNameGetter):
(KJS::JSHTMLElement::selectIndexGetter):
(KJS::JSHTMLElement::framesetNameGetter):
(KJS::JSHTMLElement::runtimeObjectGetter):
(KJS::JSHTMLElement::runtimeObjectPropertyGetter):
(KJS::JSHTMLElement::getOwnPropertySlot):
(KJS::JSHTMLElement::implementsCall):
(KJS::JSHTMLElement::callAsFunction):
(KJS::JSHTMLElement::getValueProperty):
(KJS::JSHTMLElement::toString):
(KJS::getForm):
(KJS::JSHTMLElement::pushEventHandlerScope):
(KJS::HTMLElementFunction::callAsFunction):
(KJS::JSHTMLElement::put):
(KJS::JSHTMLElement::selectSetter):
(KJS::JSHTMLElement::putValueProperty):
(KJS::toHTMLElement):
(KJS::toHTMLTableCaptionElement):
(KJS::toHTMLTableSectionElement):
(KJS::JSHTMLCollection::lengthGetter):
(KJS::JSHTMLCollection::indexGetter):
(KJS::JSHTMLCollection::nameGetter):
(KJS::JSHTMLCollection::getOwnPropertySlot):
(KJS::HTMLCollectionProtoFunc::callAsFunction):
(KJS::JSHTMLSelectCollection::selectedIndexGetter):
(KJS::JSHTMLSelectCollection::put):
(KJS::OptionConstructorImp::construct):
(KJS::getSelectHTMLCollection):
* bindings/objc/DOMHTML.mm:
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::createFrame):
* bridge/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge copyRenderNode:copier:]):
* dom/Document.cpp:
(WebCore::widgetForNode):
* html/HTMLBodyElement.cpp: Added.
(WebCore::HTMLBodyElement::HTMLBodyElement):
(WebCore::HTMLBodyElement::parseMappedAttribute):
* html/HTMLBodyElement.h: Added.
* html/HTMLDocument.cpp:
* html/HTMLElementFactory.cpp:
* html/HTMLEmbedElement.cpp:
* html/HTMLFrameElement.cpp: Added.
(WebCore::HTMLFrameElement::isURLAllowed):
(WebCore::HTMLFrameElement::parseMappedAttribute):
(WebCore::HTMLFrameElement::setLocation):
* html/HTMLFrameElement.h: Added.
* html/HTMLFrameSetElement.cpp: Added.
(WebCore::HTMLFrameSetElement::HTMLFrameSetElement):
(WebCore::HTMLFrameSetElement::parseMappedAttribute):
(WebCore::HTMLFrameSetElement::attach):
(WebCore::HTMLFrameSetElement::defaultEventHandler):
(WebCore::HTMLFrameSetElement::recalcStyle):
* html/HTMLFrameSetElement.h: Added.
* html/HTMLHeadElement.cpp: Added.
(WebCore::HTMLHeadElement::HTMLHeadElement):
* html/HTMLHeadElement.h: Added.
* html/HTMLHtmlElement.cpp: Added.
(WebCore::HTMLHtmlElement::HTMLHtmlElement):
* html/HTMLHtmlElement.h: Added.
* html/HTMLIFrameElement.cpp: Added.
(WebCore::HTMLIFrameElement::HTMLIFrameElement):
* html/HTMLIFrameElement.h: Added.
* html/HTMLObjectElement.cpp:
* html/HTMLParser.cpp:
* html/html_baseimpl.cpp: Removed.
* html/html_baseimpl.h: Removed.
* kwq/WebCoreAXObject.mm:
* page/Frame.cpp:
(WebCore::isFrameElement):
(WebCore::Frame::applyEditingStyleToBodyElement):
(WebCore::Frame::removeEditingStyleFromBodyElement):
(WebCore::Frame::applyEditingStyleToElement):
(WebCore::Frame::removeEditingStyleFromElement):
(WebCore::Frame::selectionRect):
(WebCore::Frame::isFrameSet):
(WebCore::scanForForm):
(WebCore::Frame::currentForm):
(WebCore::Frame::nodeInfoAtPoint):
(WebCore::Frame::adjustPageHeight):
(WebCore::Frame::frameForWidget):
(WebCore::Frame::forceLayoutWithPageWidthRange):
(WebCore::Frame::passWidgetMouseDownEventToWidget):
* page/FrameView.cpp:
* rendering/RenderFrame.cpp: Added.
(WebCore::RenderFrame::viewCleared):
* rendering/RenderFrame.h: Added.
* rendering/RenderFrameSet.cpp: Added.
(WebCore::RenderFrameSet::RenderFrameSet):
(WebCore::RenderFrameSet::~RenderFrameSet):
(WebCore::RenderFrameSet::layout):
(WebCore::RenderFrameSet::positionFrames):
(WebCore::RenderFrameSet::userResize):
(WebCore::RenderFrameSet::canResize):
(WebCore::RenderFrameSet::dump):
* rendering/RenderFrameSet.h: Added.
* rendering/RenderImage.h:
* rendering/RenderPart.cpp: Added.
(WebCore::RenderPart::RenderPart):
* rendering/RenderPart.h: Added.
* rendering/RenderPartObject.cpp: Added.
(WebCore::isURLAllowed):
(WebCore::RenderPartObject::updateWidget):
(WebCore::RenderPartObject::viewCleared):
* rendering/RenderPartObject.h: Added.
* rendering/RenderReplaced.cpp: Added.
(WebCore::RenderReplaced::selectionColor):
* rendering/RenderReplaced.h: Added.
* rendering/RenderWidget.cpp: Added.
(WebCore::RenderWidget::deleteWidget):
* rendering/RenderWidget.h: Added.
* rendering/render_form.h:
* rendering/render_frames.cpp: Removed.
* rendering/render_frames.h: Removed.
* rendering/render_replaced.cpp: Removed.
* rendering/render_replaced.h: Removed.
2006-05-12 Eric Seidel <eseidel@apple.com>
Reviewed by beth.
Split html_headimpl.* into separate files (one per class)
http://bugzilla.opendarwin.org/show_bug.cgi?id=8875
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/kjs_css.cpp:
* bindings/js/kjs_html.cpp:
(KJS::JSHTMLElement::headGetter):
(KJS::JSHTMLElement::linkGetter):
* bindings/objc/DOMCSS.mm:
(+[DOMCounter _counterWith:]):
(-[DOMCounter finalize]):
(-[DOMCounter _DOMStyleSheet]):
(-[DOMStyleSheet _initWithStyleSheet:]):
(-[DOMStyleSheetList dealloc]):
(-[DOMStyleSheetList finalize]):
(-[DOMStyleSheetList _styleSheetList]):
(-[DOMStyleSheetList _initWithStyleSheetList:]):
(-[DOMCSSStyleSheet _CSSStyleSheet]):
(-[DOMMediaList dealloc]):
(-[DOMMediaList finalize]):
(-[DOMMediaList _mediaList]):
(-[DOMMediaList _initWithMediaList:]):
(-[DOMCSSRuleList dealloc]):
(-[DOMCSSRuleList finalize]):
(-[DOMCSSRuleList _ruleList]):
(-[DOMCSSRuleList _initWithRuleList:]):
(-[DOMCSSRule dealloc]):
(-[DOMCSSRule finalize]):
(-[DOMCSSRule _rule]):
(-[DOMCSSRule _initWithRule:]):
(-[DOMCSSStyleRule _styleRule]):
(-[DOMCSSMediaRule _mediaRule]):
(-[DOMCSSFontFaceRule _fontFaceRule]):
(-[DOMCSSPageRule _pageRule]):
(-[DOMCSSImportRule _importRule]):
(-[DOMCSSCharsetRule _importRule]):
(-[DOMCSSStyleDeclaration dealloc]):
(-[DOMCSSStyleDeclaration finalize]):
(-[DOMCSSStyleDeclaration _initWithStyleDeclaration:]):
(-[DOMCSSStyleDeclaration _styleDeclaration]):
(-[DOMCSSValue dealloc]):
(-[DOMCSSValue finalize]):
(-[DOMCSSValue _value]):
(-[DOMCSSValue _initWithValue:]):
(-[DOMCSSPrimitiveValue _primitiveValue]):
(-[DOMCSSValueList _valueList]):
(getWrapperForRGB):
(setWrapperForRGB):
(removeWrapperForRGB):
(-[DOMRGBColor _initWithRGB:]):
(-[DOMRect dealloc]):
(-[DOMRect finalize]):
(-[DOMRect _rect]):
(-[DOMRect _initWithRect:]):
(-[DOMCounter dealloc]):
(-[DOMCounter _counter]):
(-[DOMCounter _initWithCounter:]):
(-[DOMObject sheet]):
* bindings/objc/DOMHTML.mm:
(-[DOMHTMLCollection dealloc]):
(-[DOMHTMLCollection finalize]):
(-[DOMHTMLCollection _collection]):
(-[DOMHTMLCollection _initWithCollection:]):
(-[DOMHTMLOptionsCollection dealloc]):
(-[DOMHTMLOptionsCollection finalize]):
(-[DOMHTMLOptionsCollection _initWithOptionsCollection:]):
(-[DOMHTMLOptionsCollection _optionsCollection]):
(+[DOMHTMLElement _elementWith:]):
(-[DOMHTMLElement _HTMLElement]):
(-[DOMHTMLDocument _HTMLDocument]):
(-[DOMHTMLHtmlElement _HTMLHtmlElement]):
(-[DOMHTMLHeadElement _headElement]):
(-[DOMHTMLLinkElement _linkElement]):
(-[DOMHTMLTitleElement _titleElement]):
(-[DOMHTMLMetaElement _metaElement]):
(-[DOMHTMLBaseElement _baseElement]):
(-[DOMHTMLStyleElement _styleElement]):
(-[DOMHTMLBodyElement _bodyElement]):
(-[DOMHTMLFormElement _formElement]):
(+[DOMHTMLFormElement _formElementWith:]):
(-[DOMHTMLIsIndexElement _isIndexElement]):
(-[DOMHTMLSelectElement _selectElement]):
(-[DOMHTMLOptGroupElement _optGroupElement]):
(-[DOMHTMLOptionElement _optionElement]):
(-[DOMHTMLInputElement _inputElement]):
(-[DOMHTMLTextAreaElement _textAreaElement]):
(-[DOMHTMLButtonElement _buttonElement]):
(-[DOMHTMLLabelElement _labelElement]):
(-[DOMHTMLLabelElement form]):
(-[DOMHTMLFieldSetElement _fieldSetElement]):
(-[DOMHTMLLegendElement _legendElement]):
(-[DOMHTMLUListElement _uListElement]):
(-[DOMHTMLOListElement _oListElement]):
(-[DOMHTMLDListElement _dListElement]):
(-[DOMHTMLDirectoryElement _directoryListElement]):
(-[DOMHTMLMenuElement _menuListElement]):
(-[DOMHTMLLIElement _liElement]):
(-[DOMHTMLQuoteElement _quoteElement]):
(-[DOMHTMLDivElement _divElement]):
(-[DOMHTMLParagraphElement _paragraphElement]):
(-[DOMHTMLHeadingElement _headingElement]):
(-[DOMHTMLPreElement _preElement]):
(-[DOMHTMLBRElement _BRElement]):
(-[DOMHTMLBaseFontElement _baseFontElement]):
(-[DOMHTMLFontElement _fontElement]):
(-[DOMHTMLHRElement _HRElement]):
(-[DOMHTMLModElement _modElement]):
(-[DOMHTMLAnchorElement _anchorElement]):
(-[DOMHTMLImageElement _imageElement]):
(-[DOMHTMLObjectElement _objectElement]):
(-[DOMHTMLParamElement _paramElement]):
(-[DOMHTMLMapElement _mapElement]):
(-[DOMHTMLAreaElement _areaElement]):
(-[DOMHTMLScriptElement _scriptElement]):
(+[DOMHTMLTableCaptionElement _tableCaptionElementWith:]):
(-[DOMHTMLTableCaptionElement _tableCaptionElement]):
(+[DOMHTMLTableSectionElement _tableSectionElementWith:]):
(-[DOMHTMLTableSectionElement _tableSectionElement]):
(-[DOMHTMLTableElement createTHead]):
(-[DOMHTMLTableElement createTFoot]):
(-[DOMHTMLTableElement createCaption]):
(-[DOMHTMLTableElement insertRow:]):
(+[DOMHTMLTableElement _tableElementWith:]):
(-[DOMHTMLTableElement _tableElement]):
(-[DOMHTMLTableColElement _tableColElement]):
(-[DOMHTMLTableRowElement _tableRowElement]):
(-[DOMHTMLTableRowElement insertCell:]):
(+[DOMHTMLTableCellElement _tableCellElementWith:]):
(-[DOMHTMLTableCellElement _tableCellElement]):
(-[DOMHTMLFrameSetElement _frameSetElement]):
(-[DOMHTMLFrameElement _frameElement]):
(-[DOMHTMLIFrameElement _IFrameElement]):
(-[DOMHTMLEmbedElement _embedElement]):
(viewForElement):
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::searchForLabelsAboveCell):
(WebCore::FrameMac::searchForLabelsBeforeElement):
(WebCore::FrameMac::createFrame):
(WebCore::FrameMac::passMouseDownEventToWidget):
(WebCore::FrameMac::passSubframeEventToSubframe):
(WebCore::FrameMac::passWheelEventToChildWidget):
(WebCore::FrameMac::fileWrapperForElement):
(WebCore::listParent):
(WebCore::FrameMac::attributedString):
(WebCore::FrameMac::shouldBeginEditing):
(WebCore::FrameMac::shouldEndEditing):
(WebCore::FrameMac::setMarkedTextRange):
* dom/Document.cpp:
* dom/xml_tokenizer.cpp:
* html/HTMLBaseElement.cpp: Added.
(WebCore::HTMLBaseElement::removedFromDocument):
(WebCore::HTMLBaseElement::process):
* html/HTMLBaseElement.h: Added.
* html/HTMLDocument.cpp:
* html/HTMLElementFactory.cpp:
* html/HTMLLinkElement.cpp: Added.
(WebCore::HTMLLinkElement::HTMLLinkElement):
(WebCore::HTMLLinkElement::process):
* html/HTMLLinkElement.h: Added.
* html/HTMLMetaElement.cpp: Added.
(WebCore::HTMLMetaElement::HTMLMetaElement):
(WebCore::HTMLMetaElement::parseMappedAttribute):
(WebCore::HTMLMetaElement::process):
(WebCore::HTMLMetaElement::setContent):
(WebCore::HTMLMetaElement::setHttpEquiv):
(WebCore::HTMLMetaElement::setName):
* html/HTMLMetaElement.h: Added.
* html/HTMLParser.cpp:
* html/HTMLScriptElement.cpp: Added.
(WebCore::HTMLScriptElement::HTMLScriptElement):
(WebCore::HTMLScriptElement::parseMappedAttribute):
(WebCore::HTMLScriptElement::evaluateScript):
* html/HTMLScriptElement.h: Added.
* html/HTMLStyleElement.cpp: Added.
(WebCore::HTMLStyleElement::HTMLStyleElement):
* html/HTMLStyleElement.h: Added.
* html/HTMLTitleElement.cpp: Added.
(WebCore::HTMLTitleElement::HTMLTitleElement):
(WebCore::HTMLTitleElement::text):
(WebCore::HTMLTitleElement::setText):
* html/HTMLTitleElement.h: Added.
* html/html_headimpl.cpp: Removed.
* html/html_headimpl.h: Removed.
* loader/CachedCSSStyleSheet.h:
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::updateFromElement):
* rendering/RenderTableCol.cpp:
(WebCore::RenderTableCol::updateFromElement):
2006-05-12 Eric Seidel <eseidel@apple.com>
Reviewed by beth.
Split out html_tableimpl.* into multiple files (one per class)
http://bugzilla.opendarwin.org/show_bug.cgi?id=8873
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLTableCaptionElement.cpp: Added.
(WebCore::HTMLTableCaptionElement::HTMLTableCaptionElement):
* html/HTMLTableCaptionElement.h: Added.
* html/HTMLTableCellElement.cpp: Added.
(WebCore::HTMLTableCellElement::HTMLTableCellElement):
* html/HTMLTableCellElement.h: Added.
* html/HTMLTableColElement.cpp: Added.
(WebCore::HTMLTableColElement::HTMLTableColElement):
(WebCore::HTMLTableColElement::endTagRequirement):
(WebCore::HTMLTableColElement::tagPriority):
(WebCore::HTMLTableColElement::checkDTD):
* html/HTMLTableColElement.h: Added.
* html/HTMLTableElement.cpp: Added.
(WebCore::HTMLTableElement::HTMLTableElement):
(WebCore::HTMLTableElement::setCaption):
(WebCore::HTMLTableElement::setTHead):
(WebCore::HTMLTableElement::setTFoot):
(WebCore::HTMLTableElement::setTBody):
(WebCore::HTMLTableElement::createTHead):
(WebCore::HTMLTableElement::deleteTHead):
(WebCore::HTMLTableElement::createTFoot):
(WebCore::HTMLTableElement::deleteTFoot):
(WebCore::HTMLTableElement::createCaption):
(WebCore::HTMLTableElement::deleteCaption):
(WebCore::HTMLTableElement::insertRow):
(WebCore::HTMLTableElement::deleteRow):
(WebCore::HTMLTableElement::addChild):
(WebCore::HTMLTableElement::parseMappedAttribute):
(WebCore::HTMLTableElement::attach):
* html/HTMLTableElement.h: Added.
* html/HTMLTablePartElement.cpp: Added.
(WebCore::HTMLTablePartElement::parseMappedAttribute):
* html/HTMLTablePartElement.h: Added.
* html/HTMLTableRowElement.cpp: Added.
(WebCore::HTMLTableRowElement::HTMLTableRowElement):
(WebCore::HTMLTableRowElement::rowIndex):
* html/HTMLTableRowElement.h: Added.
* html/HTMLTableSectionElement.cpp: Added.
(WebCore::HTMLTableSectionElement::insertRow):
* html/HTMLTableSectionElement.h: Added.
* html/html_tableimpl.cpp: Removed.
* html/html_tableimpl.h: Removed.
2006-05-10 Eric Seidel <eseidel@apple.com>
Reviewed by mjs & adele.
Split html_objectimpl.* into multiple files (one per class)
http://bugzilla.opendarwin.org/show_bug.cgi?id=8836
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/kjs_dom.cpp:
(KJS::DOMNamedNodeMap::lengthGetter):
(KJS::DOMNamedNodeMap::indexGetter):
(KJS::DOMNamedNodeMap::nameGetter):
(KJS::DOMNamedNodeMapProtoFunc::callAsFunction):
(KJS::getRuntimeObject):
* bindings/js/kjs_html.cpp:
* html/HTMLAppletElement.cpp: Added.
* html/HTMLAppletElement.h: Added.
* html/HTMLElementFactory.cpp:
* html/HTMLEmbedElement.cpp: Added.
(WebCore::HTMLEmbedElement::HTMLEmbedElement):
(WebCore::HTMLEmbedElement::getInstance):
(WebCore::HTMLEmbedElement::parseMappedAttribute):
* html/HTMLEmbedElement.h: Added.
* html/HTMLNameCollection.cpp:
(WebCore::HTMLNameCollection::traverseNextItem):
* html/HTMLObjectElement.cpp: Added.
(WebCore::HTMLObjectElement::getInstance):
(WebCore::HTMLObjectElement::form):
(WebCore::HTMLObjectElement::parseMappedAttribute):
(WebCore::HTMLObjectElement::updateDocNamedItem):
* html/HTMLObjectElement.h: Added.
* html/HTMLParamElement.cpp: Added.
* html/HTMLParamElement.h: Added.
* html/HTMLParser.cpp:
* html/HTMLPlugInElement.cpp: Added.
* html/HTMLPlugInElement.h: Added.
* html/html_objectimpl.cpp: Removed.
* html/html_objectimpl.h: Removed.
* page/Frame.cpp:
(WebCore::Frame::handleFallbackContent):
* rendering/RenderApplet.cpp:
* rendering/render_frames.cpp:
(WebCore::RenderPartObject::updateWidget):
2006-05-12 Darin Adler <darin@apple.com>
Reviewed by Adele.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8521
crash bringing up context menu with CSS generated content
* bridge/mac/FrameMac.mm: (WebCore::FrameMac::sendContextMenuEvent):
Added a null check.
* manual-tests/context-click-generated-content.html: Added.
2006-05-12 Darin Adler <darin@apple.com>
Reviewed by Adele.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8715
REGRESSION: Caret to the right of an image is a big black rectangle.
* rendering/RenderBox.cpp: (WebCore::RenderBox::caretRect): Move caret to the
right side of the rect when the offset is non-zero, rather than expanding it.
* manual-tests/caret-image.html: Added.
2006-05-12 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed and landed by Anders.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8866
REGRESSION: Incorrect caret position in RTL text
Test: fast/text/international/rtl-caret.html
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::positionForOffset): Added missing m_toAdd argument.
2006-05-12 David Hyatt <hyatt@apple.com>
Bug 8864. Lift WebCoreTextStyle up into the API (as TextStyle).
Reviewed by mjs
* platform/Font.cpp:
(WebCore::m_finalRoundingWidth):
(WebCore::WidthIterator::advance):
(WebCore::Font::width):
(WebCore::Font::drawSimpleText):
(WebCore::Font::drawText):
(WebCore::Font::floatWidth):
(WebCore::Font::floatWidthForSimpleText):
* platform/Font.h:
(WebCore::TextStyle::m_attemptFontSubstitution):
(WebCore::TextStyle::tabWidth):
(WebCore::TextStyle::xPos):
(WebCore::TextStyle::padding):
(WebCore::TextStyle::rtl):
(WebCore::TextStyle::ltr):
(WebCore::TextStyle::directionalOverride):
(WebCore::TextStyle::applyRunRounding):
(WebCore::TextStyle::applyWordRounding):
(WebCore::TextStyle::attemptFontSubstitution):
(WebCore::Font::operator==):
* platform/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawText):
(WebCore::GraphicsContext::drawHighlightForText):
* platform/GraphicsContext.h:
* platform/mac/FontMac.mm:
(WebCore::overrideLayoutOperation):
(WebCore::ATSULayoutParameters::initialize):
(WebCore::Font::selectionRectForText):
(WebCore::Font::drawComplexText):
(WebCore::Font::floatWidthForComplexText):
(WebCore::Font::offsetForPosition):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::selectionRect):
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::paintSelection):
(WebCore::InlineTextBox::paintMarkedTextBackground):
(WebCore::InlineTextBox::paintTextMatchMarker):
(WebCore::InlineTextBox::offsetForPosition):
(WebCore::InlineTextBox::positionForOffset):
* rendering/RenderText.cpp:
(WebCore::RenderText::widthFromCache):
(WebCore::RenderText::calcMinMaxWidth):
(WebCore::RenderText::width):
* rendering/RenderTextField.cpp:
(WebCore::RenderTextField::calcMinMaxWidth):
* rendering/render_line.cpp:
(WebCore::EllipsisBox::paint):
2006-05-11 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Darin.
- http://bugzilla.opendarwin.org/show_bug.cgi?id=8770
XMLHttpRequest should strip CR/LF characters from the URL
Test: fast/loader/url-strip-cr-lf-tab.html
* platform/KURL.cpp:
(appendEscapingBadChars): Strip CR, LF and TAB, as Firefox and IE do.
2006-05-11 David Hyatt <hyatt@apple.com>
Remove the misspelling drawing code from Font and FontData. Implement it
natively in GraphicContext instead.
Reviewed by maciej
* platform/FontData.h:
* platform/GraphicsContext.cpp:
* platform/GraphicsContext.h:
* platform/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::drawLineForMisspelling):
* platform/mac/FontData.mm:
* platform/mac/FontMac.mm:
* platform/mac/GraphicsContextMac.mm:
(WebCore::GraphicsContext::drawLineForMisspelling):
* platform/win/FontWin.cpp:
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintSpellingMarker):
2006-05-11 David Hyatt <hyatt@apple.com>
Remove drawLineForText from the Font API. Implement it natively in
the two GraphicsContexts (CG and Cairo) instead.
Reviewed by maciej
* platform/Font.h:
* platform/FontData.h:
* platform/GraphicsContext.cpp:
* platform/GraphicsContext.h:
* platform/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::drawLineForText):
* platform/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawLineForText):
* platform/mac/FontData.mm:
* platform/mac/FontMac.mm:
* platform/win/FontWin.cpp:
(WebCore::Font::drawLineForText):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
(WebCore::InlineTextBox::paintMarkedTextUnderline):
* rendering/render_line.cpp:
(WebCore::InlineFlowBox::paintDecorations):
2006-05-11 Steve Falkenburg <sfalken@apple.com>
Reviewed by eric.
Fix last fix.
* dom/QualifiedName.h:
(WebCore::QualifiedName::QualifiedName):
2006-05-11 Steve Falkenburg <sfalken@apple.com>
Reviewed by eric.
Fix crash on static constructors builds at exit due to qualified name default constructor not
initializing m_impl.
* dom/QualifiedName.cpp:
(WebCore::QualifiedName::deref):
2006-05-11 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by hyatt
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8851
REGRESSION: RTL text shifted to the right
Already covered by several tests in fast/text
* platform/Font.h:
(WebCore::TextRun::TextRun): Added length parameter.
* rendering/InlineTextBox.cpp: Pass the length to the TextRun constructor.
(WebCore::InlineTextBox::selectionRect):
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::paintSelection):
(WebCore::InlineTextBox::paintMarkedTextBackground):
(WebCore::InlineTextBox::paintTextMatchMarker):
(WebCore::InlineTextBox::offsetForPosition):
(WebCore::InlineTextBox::positionForOffset):
* rendering/RenderText.cpp:
(WebCore::RenderText::widthFromCache): Pass length and from instead of from and to
to the TextRun constructor.
(WebCore::RenderText::width): Ditto.
2006-05-11 David Hyatt <hyatt@apple.com>
Fix a regression from the TextRun landing. Delete the characters in
the adjustedRun, not the ones in the original run!
Reviewed by beth
* platform/mac/FontMac.mm:
(WebCore::Font::drawComplexText):
2006-05-10 Justin Garcia <justin.garcia@apple.com>
Reviewed by thatcher, levi
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::doApply):
Removed a use fragment.hasMoreThanOneBlock to decide if the paragraph containing the
position pasted into must be split to avoid block nesting. We now split unnecessarily
some times, but the end merge cleans up for us.
2006-05-11 David Hyatt <hyatt@apple.com>
This patch makes drawHighlightForText a completely cross-platform method
implemented by the GraphicsContext. The platform-specific implementations
of the method in the Font class have been eliminated.
Reviewed by andersca
* platform/Font.h:
* platform/FontData.h:
Remove the drawHighlight methods. Change the selectionRect method in
Font to return a FloatRect so that the GraphicsContext can do an accurate
fill.
* platform/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawHighlightForText):
Implement the drawHighlightFunction in terms of the cross-platform
Font selectionRect functions and a new float-based fillRect graphics context
function.
* platform/GraphicsContext.h:
* platform/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::fillRect):
* platform/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::fillRect):
Add the new float-based fillRect function for Cairo and CG.
* platform/mac/FontData.mm:
(WebCore::CG_draw):
(WebCore::ATSU_draw):
Removed the CG and ATSU drawHighlight methods. Remove the drawing of
the background from the deprecated draw methods (they'll be removed
soon).
* platform/mac/FontMac.mm:
(WebCore::Font::selectionRectForText):
* platform/win/FontWin.cpp:
(WebCore::Font::selectionRectForText):
Change selectionRectForText to return a FloatRect instead of an IntRect,
so that the GraphicsContext can do a precise fill.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::selectionRect):
(WebCore::InlineTextBox::positionForOffset):
Modify the callers who expect an int-based selection rect so that they call
enclosingIntRect.
2006-05-11 Darin Adler <darin@apple.com>
Reviewed by Adele.
- http://bugzilla.opendarwin.org/show_bug.cgi?id=8743
REGRESSION: focus() on input field selects all text within it
(was: cannot select cities on British Rail reservation site)
Test: fast/forms/double-focus.html
* html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::focus):
Changed to only call setFocusNode, select, and revealSelection
if the element is not already focused. Also changed to use return
a bit more rather than else.
2006-05-11 Darin Adler <darin@apple.com>
Reviewed by Tim Hatcher (earlier version).
- http://bugzilla.opendarwin.org/show_bug.cgi?id=8821
use the preprocessor for IDL files
* bindings/scripts/IDLParser.pm: Invoke the preprocessor via the "gcc"
driver script, passing "-E" so we only preprocess, "-P" so we don't get
"#line" directives, and "-x c++" so we handle both C and C++ comments.
Removed the code to eliminate comments since the preprocessor handles that.
* css/make-css-file-arrays.pl: This already invoked the preprocessor, but
updated it to do the same way as above.
2006-05-11 Anders Carlsson <acarlsson@apple.com>
Reviewed by Darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=7838
Add support for mozilla-style node constructors as properties of the window object
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
Add new generated files.
* bindings/js/JSCanvasRenderingContext2DBase.cpp:
(WebCore::JSCanvasRenderingContext2DBaseProtoFunc::callAsFunction):
* bindings/js/JSHTMLElementWrapperFactory.cpp:
(WebCore::createJSWrapper):
Specify the KJS namespace for JSHTMLElmement.
* bindings/js/kjs_dom.cpp:
(KJS::toJS):
Create a WebCore::JSHTMLDocument for document nodes. Also, create
JSDocumentFragments for document fragments (instead of plain node objects).
* bindings/js/kjs_html.cpp:
(KJS::JSHTMLDocumentProtoFunc::callAsFunction):
(KJS::JSHTMLDocument::JSHTMLDocument):
(KJS::JSHTMLDocument::getOwnPropertySlot):
Add a prototype for JSHTMLDocument and move all functions there.
(KJS::JSHTMLElement::JSHTMLElement):
(KJS::JSHTMLElement::getOwnPropertySlot):
Update since JSHTMLElement now inherits from WebCore::JSHTMLElement.
(KJS::JSHTMLElement::getValueProperty):
(KJS::JSHTMLElement::putValueProperty):
Remove title setter and getter. Those are autogenerated now.
* bindings/js/kjs_html.h:
(KJS::JSHTMLElement::):
Inherit from WebCore::JSHTMLElement. Clarify the inheritance chain.
* bindings/scripts/CodeGeneratorJS.pm:
Always generate a prototype object, regardless of whether the object has any functions or
constants.
Use the type of generator attributes to determine what constructor to use. This is useful for
the XMLDocument property in DOMWindow.idl, since that's just an alias for the Document constructor.
* dom/DocumentFragment.idl: Added.
* html/HTMLDocument.idl: Added.
* html/HTMLElement.idl: Added.
* page/DOMWindow.idl:
Add constructors for DocumentFragment, HTMLElement, HTMLDocument and XMLDocument. XMLDocument is just
an alias for the Document constructor.
2006-05-11 David Hyatt <hyatt@apple.com>
Bug 8845. Define a TextRun (similar to the old WebCoreTextRun) and
make it the new API for Font and GraphicsContext when drawing/measuring
text.
Reviewed by andersca
* platform/Font.cpp:
(WebCore::m_finalRoundingWidth):
(WebCore::WidthIterator::advance):
(WebCore::WidthIterator::normalizeVoicingMarks):
(WebCore::Font::width):
(WebCore::Font::canUseGlyphCache):
(WebCore::Font::drawSimpleText):
(WebCore::Font::drawText):
(WebCore::Font::floatWidth):
(WebCore::Font::floatWidthForSimpleText):
* platform/Font.h:
(WebCore::TextRun::m_to):
(WebCore::TextRun::operator[]):
(WebCore::TextRun::data):
(WebCore::TextRun::adjustFrom):
(WebCore::TextRun::adjustTo):
(WebCore::TextRun::characters):
(WebCore::TextRun::length):
(WebCore::TextRun::from):
(WebCore::TextRun::to):
* platform/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawText):
(WebCore::GraphicsContext::drawHighlightForText):
* platform/GraphicsContext.h:
* platform/mac/FontMac.mm:
(WebCore::addDirectionalOverride):
(WebCore::overrideLayoutOperation):
(WebCore::ATSULayoutParameters::initialize):
(WebCore::Font::selectionRectForText):
(WebCore::Font::drawComplexText):
(WebCore::Font::drawHighlightForText):
(WebCore::Font::floatWidthForComplexText):
(WebCore::Font::checkSelectionPoint):
* platform/win/FontWin.cpp:
(WebCore::hackishExtentForString):
(WebCore::Font::floatWidth):
(WebCore::Font::drawText):
(WebCore::Font::drawHighlightForText):
(WebCore::Font::selectionRectForText):
(WebCore::Font::checkSelectionPoint):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::selectionRect):
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::paintSelection):
(WebCore::InlineTextBox::paintMarkedTextBackground):
(WebCore::InlineTextBox::paintTextMatchMarker):
(WebCore::InlineTextBox::offsetForPosition):
(WebCore::InlineTextBox::positionForOffset):
* rendering/RenderBlock.cpp:
(WebCore::stripTrailingSpace):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutVerticalBox):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::imageChanged):
(WebCore::RenderImage::paint):
* rendering/RenderText.cpp:
(WebCore::RenderText::cacheWidths):
(WebCore::RenderText::widthFromCache):
(WebCore::RenderText::trimmedMinMaxWidth):
(WebCore::RenderText::calcMinMaxWidth):
(WebCore::RenderText::width):
* rendering/RenderTextField.cpp:
(WebCore::RenderTextField::calcMinMaxWidth):
* rendering/bidi.cpp:
(WebCore::RenderBlock::tabWidth):
(WebCore::RenderBlock::checkLinesForTextOverflow):
* rendering/render_line.cpp:
(WebCore::EllipsisBox::paint):
* rendering/render_list.cpp:
(WebCore::RenderListMarker::paint):
(WebCore::RenderListMarker::calcMinMaxWidth):
(WebCore::RenderListMarker::getRelativeMarkerRect):
2006-05-10 Justin Garcia <justin.garcia@apple.com>
Reviewed by darin
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::doApply):
Removed the code to find out if we must later add smart replace whitespace. We can
wait until we've done the insertion to figure it out, and the position sampled (startPos)
to make the decision about trailing whitespace was wrong.
Changed the order that work is done during a paste: 1) Insert everything 2) Do one of
the following: a) handle a trailing interchange newline, b) uncollapse the last incoming
br if it has been collapsed because of quirks mode, c) do an end merge 3) Add smart replace
whitespace (2 and 3 were reversed because the end merge must happen before we can know
whether or not we need to add a trailing space).
Don't do an end merge if the last node inserted was a br because the end merge will
clobber it.
(WebCore::ReplaceSelectionCommand::removeEndBRIfNeeded):
brs where [br, 0] is at the end of a block and not at the start of a paragraph
are the ones that are collapsed because of quirks mode.
2006-05-10 David Hyatt <hyatt@apple.com>
Rename isSpace to treatAsSpace. Move it and the rounding hack function into
Font and make them static methods (inlined in the header). Make the rounding
hack character table a static member as well. Remove the redundant space/rounding
functions from FontData.mm.
Reviewed by darin
* platform/Font.cpp:
(WebCore::):
(WebCore::m_finalRoundingWidth):
(WebCore::WidthIterator::advance):
* platform/Font.h:
(WebCore::Font::treatAsSpace):
(WebCore::Font::isRoundingHackCharacter):
* platform/mac/FontData.mm:
(WebCore::overrideLayoutOperation):
(WebCore::createATSULayoutParameters):
(WebCore::initializeWidthIterator):
(WebCore::advanceWidthIterator):
* platform/mac/FontMac.mm:
(WebCore::overrideLayoutOperation):
(WebCore::ATSULayoutParameters::initialize):
2006-05-10 Darin Adler <darin@apple.com>
* WebCore: Removed an extra WebCore subtree that somehow got checked in.
2006-05-10 David Carson <dacarson@gmail.com>
- Fix for bug 8833. Removed inline keyword from functions declared
in .mm and .cpp files. inline function code needs to reside in the
header file for the linker to find the code.
http://www.parashift.com/c++-faq-lite/inline-functions.html#faq-9.7
Reviewed by Darin, landed by Timothy.
* platform/Font.cpp:
(WebCore::isSpace):
* platform/mac/FontData.mm:
(WebCore::widthForGlyph):
(WebCore::isRoundingHackCharacter):
(WebCore::glyphForCharacter):
2006-05-10 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed and landed by Anders.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8830
REGRESSION: Words render on top of each other when fallback font is used
Already covered by several pixel tests in fast/text
* platform/Font.cpp:
(WebCore::Font::drawSimpleText):
2006-05-10 David Hyatt <hyatt@apple.com>
Fix for bug 8809, lift the Mac-specific WebTextRenderer code for
drawing and measuring of runs up into the Font class. The fast code
path is in Font.cpp and is designed to be mostly cross-platform. The
slow code path is in FontMac.cpp and is Mac-specific.
Reviewed by darin
* WebCore.xcodeproj/project.pbxproj:
* platform/Font.cpp:
(WebCore::isSpace):
(WebCore::):
(WebCore::isRoundingHackCharacter):
(WebCore::m_finalRoundingWidth):
(WebCore::WidthIterator::advance):
(WebCore::WidthIterator::normalizeVoicingMarks):
(WebCore::Font::primaryFont):
(WebCore::Font::setAlwaysUseComplexPath):
(WebCore::Font::canUseGlyphCache):
(WebCore::Font::drawSimpleText):
(WebCore::Font::drawText):
(WebCore::Font::floatWidth):
(WebCore::Font::floatWidthForSimpleText):
* platform/Font.h:
* platform/FontData.h:
(WebCore::FontData::platformData):
* platform/GlyphBuffer.h: Added.
(WebCore::GlyphBuffer::GlyphBuffer):
(WebCore::GlyphBuffer::isEmpty):
(WebCore::GlyphBuffer::size):
(WebCore::GlyphBuffer::glyphs):
(WebCore::GlyphBuffer::advances):
(WebCore::GlyphBuffer::fontDataAt):
(WebCore::GlyphBuffer::swap):
(WebCore::GlyphBuffer::glyphAt):
(WebCore::GlyphBuffer::advanceAt):
(WebCore::GlyphBuffer::add):
* platform/mac/FontData.mm:
(WebCore::isSpace):
(WebCore::isRoundingHackCharacter):
(WebCore::FontData::widthForGlyph):
(WebCore::m_ATSUMirrors):
(WebCore::FontData::xHeight):
(WebCore::FontData::smallCapsFontData):
(WebCore::findSubstituteFont):
(WebCore::rendererForAlternateFont):
(WebCore::findSubstituteRenderer):
(WebCore::FontData::findSubstituteFontData):
(WebCore::computeWidthForSpace):
(WebCore::FontData::updateGlyphMapEntry):
(WebCore::extendGlyphMap):
(WebCore::extendWidthMap):
(WebCore::createATSULayoutParameters):
(WebCore::FontData::glyphForCharacter):
(WebCore::advanceWidthIterator):
(WebCore::shouldUseATSU):
* platform/mac/FontMac.mm:
(WebCore::ATSULayoutParameters::m_padPerSpace):
(WebCore::addDirectionalOverride):
(WebCore::initializeATSUStyle):
(WebCore::overrideLayoutOperation):
(WebCore::ATSULayoutParameters::initialize):
(WebCore::disposeATSULayoutParameters):
(WebCore::Font::drawComplexText):
(WebCore::Font::floatWidthForComplexText):
(WebCore::Font::drawGlyphs):
* platform/mac/WebCoreTextRenderer.mm:
(WebCoreSetAlwaysUseATSU):
2006-05-10 Darin Adler <darin@apple.com>
- another try at fixing the Windows build
* platform/win/FontWin.cpp: (WebCore::getFontData): Use characters()
instead of unicode().
== Rolled over to ChangeLog-2006-05-10 ==