1 2006-08-02 Mitz Pettel <opendarwin.org@mitzpettel.com>
5 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=3438
6 incorrect display of transparent 1x1 PNGs
8 Test: fast/replaced/image-solid-color-with-alpha.html
10 * platform/mac/ImageMac.mm:
11 (WebCore::Image::checkForSolidColor): Changed to divide each color component
12 by the alpha component. You need to do that since the bitmap context has
13 premultiplied alpha but m_solidColor should be non-premultiplied.
15 2006-08-02 Adam Roben <aroben@apple.com>
19 - Remove redundant #include
23 2006-07-31 Sam Weinig <sam.weinig@gmail.com>
27 - patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=9955
28 Colors scaled from [0, 1] range to [0, 255] incorrectly
30 Fixes scaling issue and fixes Color to follow style guidelines.
32 * css/cssstyleselector.cpp:
33 (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
36 (WebCore::makeRGBAFromHSLA):
37 (WebCore::Color::Color):
38 (WebCore::Color::name):
39 (WebCore::Color::setNamedColor):
40 (WebCore::Color::light):
41 (WebCore::Color::dark):
44 (WebCore::Color::Color):
45 (WebCore::Color::isValid):
46 (WebCore::Color::red):
47 (WebCore::Color::green):
48 (WebCore::Color::blue):
49 (WebCore::Color::alpha):
50 (WebCore::Color::rgb):
51 (WebCore::Color::setRGB):
52 (WebCore::operator==):
53 (WebCore::operator!=):
54 * rendering/RenderObject.cpp:
55 (WebCore::RenderObject::drawBorder):
57 2006-07-31 Mitz Pettel <opendarwin.org@mitzpettel.com>
59 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10158
60 REGRESSION: Selection highlight is dark and opaque when solid-color images are used
64 Pixel test: fast/backgrounds/solid-color-context-restore.html
66 * platform/mac/ImageMac.mm:
67 (WebCore::Image::draw): Added calls to preserve the graphics context
68 around the painting of a solid color image.
69 (WebCore::Image::drawTiled): Ditto.
71 2006-07-31 Maciej Stachowiak <mjs@apple.com>
73 Rubber-stamped by Tim Hatcher.
75 - renamed TransferJob to ResourceLoader
77 * Projects/gdk/webcore-gdk.bkl:
78 * WebCore.vcproj/WebCore/WebCore.vcproj:
79 * WebCore.xcodeproj/project.pbxproj:
81 * bridge/mac/FrameMac.mm:
82 * bridge/mac/WebCoreResourceLoaderImp.h:
83 * bridge/mac/WebCoreResourceLoaderImp.mm:
84 (-[WebCoreResourceLoaderImp redirectedToURL:]):
85 (-[WebCoreResourceLoaderImp addData:]):
86 (-[WebCoreResourceLoaderImp finishJobAndHandle:]):
87 * bridge/win/FrameWin.cpp:
88 * dom/XMLTokenizer.cpp:
91 * loader/LoaderFunctions.h:
93 (WebCore::Loader::servePendingRequests):
94 (WebCore::Loader::receivedAllData):
95 (WebCore::Loader::receivedResponse):
96 (WebCore::Loader::receivedData):
97 (WebCore::Loader::cancelRequests):
98 (WebCore::Loader::jobForRequest):
100 * loader/mac/LoaderFunctionsMac.mm:
101 (WebCore::ServeSynchronousRequest):
102 * platform/ResourceLoader.cpp: Added.
103 (WebCore::ResourceLoader::ResourceLoader):
104 (WebCore::ResourceLoader::isErrorPage):
105 (WebCore::ResourceLoader::error):
106 (WebCore::ResourceLoader::setError):
107 (WebCore::ResourceLoader::queryMetaData):
108 (WebCore::ResourceLoader::addMetaData):
109 (WebCore::ResourceLoader::kill):
110 (WebCore::ResourceLoader::url):
111 (WebCore::ResourceLoader::postData):
112 (WebCore::ResourceLoader::method):
113 (WebCore::ResourceLoader::client):
114 * platform/ResourceLoader.h: Added.
115 (WebCore::ResourceLoader::getInternal):
116 * platform/ResourceLoaderClient.h: Added.
117 (WebCore::ResourceLoaderClient::~ResourceLoaderClient):
118 (WebCore::ResourceLoaderClient::receivedRedirect):
119 (WebCore::ResourceLoaderClient::receivedResponse):
120 (WebCore::ResourceLoaderClient::receivedData):
121 (WebCore::ResourceLoaderClient::receivedAllData):
122 * platform/ResourceLoaderInternal.h: Added.
123 (WebCore::ResourceLoaderInternal::ResourceLoaderInternal):
124 * platform/TransferJob.cpp: Removed.
125 * platform/TransferJob.h: Removed.
126 * platform/TransferJobClient.h: Removed.
127 * platform/TransferJobInternal.h: Removed.
128 * platform/gdk/FrameGdk.cpp:
129 (WebCore::FrameGdk::openURL):
130 (WebCore::FrameGdk::urlSelected):
131 (WebCore::FrameGdk::receivedData):
132 (WebCore::FrameGdk::receivedAllData):
133 * platform/gdk/FrameGdk.h:
134 * platform/gdk/ResourceLoaderCurl.cpp: Added.
135 (WebCore::ResourceLoaderInternal::~ResourceLoaderInternal):
136 (WebCore::ResourceLoader::~ResourceLoader):
137 (WebCore::ResourceLoader::start):
138 (WebCore::ResourceLoader::cancel):
139 * platform/gdk/ResourceLoaderManager.cpp: Added.
140 (WebCore::ResourceLoaderManager::ResourceLoaderManager):
141 (WebCore::ResourceLoaderManager::get):
142 (WebCore::ResourceLoaderManager::useSimpleTransfer):
143 (WebCore::writeCallback):
144 (WebCore::ResourceLoaderManager::downloadTimerCallback):
145 (WebCore::ResourceLoaderManager::remove):
146 (WebCore::ResourceLoaderManager::add):
147 (WebCore::ResourceLoaderManager::cancel):
148 * platform/gdk/ResourceLoaderManager.h: Added.
149 * platform/gdk/TemporaryLinkStubs.cpp:
150 (WebCore::ServeSynchronousRequest):
151 (WebCore::ResourceLoader::assembleResponseHeaders):
152 (WebCore::ResourceLoader::retrieveCharset):
153 * platform/gdk/TransferJobCurl.cpp: Removed.
154 * platform/gdk/TransferJobManager.cpp: Removed.
155 * platform/gdk/TransferJobManager.h: Removed.
156 * platform/mac/ResourceLoaderMac.mm: Added.
157 (WebCore::ResourceLoaderInternal::~ResourceLoaderInternal):
158 (WebCore::ResourceLoader::~ResourceLoader):
159 (WebCore::ResourceLoader::start):
160 (WebCore::ResourceLoader::assembleResponseHeaders):
161 (WebCore::ResourceLoader::retrieveCharset):
162 (WebCore::ResourceLoader::setLoader):
163 (WebCore::ResourceLoader::receivedResponse):
164 (WebCore::ResourceLoader::cancel):
165 * platform/mac/TransferJobMac.mm: Removed.
166 * platform/win/ResourceLoaderWin.cpp: Added.
167 (WebCore::addToOutstandingJobs):
168 (WebCore::lookupResourceLoader):
169 (WebCore::ResourceLoaderWndProc):
170 (WebCore::initializeOffScreenResourceLoaderWindow):
171 (WebCore::ResourceLoaderInternal::~ResourceLoaderInternal):
172 (WebCore::ResourceLoader::~ResourceLoader):
173 (WebCore::ResourceLoader::start):
174 (WebCore::ResourceLoader::fileLoadTimer):
175 (WebCore::ResourceLoader::cancel):
176 * platform/win/ResourceLoaderWin.h: Added.
177 * platform/win/TemporaryLinkStubs.cpp:
178 (WebCore::ServeSynchronousRequest):
179 (WebCore::ResourceLoader::assembleResponseHeaders):
180 (WebCore::ResourceLoader::retrieveCharset):
181 * platform/win/TransferJobWin.cpp: Removed.
182 * platform/win/TransferJobWin.h: Removed.
183 * xml/XSLTProcessor.cpp:
184 (WebCore::docLoaderFunc):
185 * xml/xmlhttprequest.cpp:
186 (WebCore::XMLHttpRequest::send):
187 (WebCore::XMLHttpRequest::receivedAllData):
188 (WebCore::XMLHttpRequest::receivedRedirect):
189 (WebCore::XMLHttpRequest::receivedData):
190 * xml/xmlhttprequest.h:
192 2006-07-31 Darin Adler <darin@apple.com>
196 - removed obsolete cell margin hack
198 * rendering/RenderBox.cpp: (WebCore::RenderBox::calcVerticalMargins):
199 Set top and bottom margins to 0 for table cells instead of -16384.
200 No effect on layout (including layout tests).
202 * css/CSSComputedStyleDeclaration.cpp:
203 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
204 Added a few comments about differences between this class and the
205 what the CSS specification says about computed style.
207 2006-07-31 Mark Rowe <opendarwin.org@bdash.net.nz>
211 http://bugzilla.opendarwin.org/show_bug.cgi?id=9738
212 Bug 9738: Unqualified :hover selector ignored in strict parsing mode
214 * css/cssstyleselector.cpp:
215 (WebCore::CSSStyleSelector::checkSelector): Restrict the :hover and :active
216 exclusion based on onlyHoverActive to quirks mode.
218 2006-07-31 David Hyatt <hyatt@apple.com>
220 Fix for bug 10179, digg.com scrolls slowly. Improve fixed positioning
221 and fixed backgrounds so that a count of them is kept on the FrameView.
222 This allows us to switch slow scrolling on and off as these objects come
225 * css/cssstyleselector.cpp:
226 (WebCore::CSSStyleSelector::adjustRenderStyle):
227 (WebCore::CSSStyleSelector::applyProperty):
228 * page/FrameView.cpp:
229 (WebCore::FrameViewPrivate::reset):
230 (WebCore::FrameView::layout):
231 (WebCore::FrameView::useSlowRepaints):
232 (WebCore::FrameView::setUseSlowRepaints):
233 (WebCore::FrameView::addSlowRepaintObject):
234 (WebCore::FrameView::removeSlowRepaintObject):
236 * rendering/RenderBox.cpp:
237 (WebCore::RenderBox::paintBackgroundExtended):
238 * rendering/RenderObject.cpp:
239 (WebCore::RenderObject::setStyle):
240 * rendering/RenderView.cpp:
241 (WebCore::RenderView::paintBoxDecorations):
243 2006-07-31 David Hyatt <hyatt@apple.com>
245 Begin disentangling of scrollbar logic in preparation for engine-implemented
246 scrollbars. Split ScrollBar into two classes, an abstract base (still named
247 ScrollBar) and a new PlatformScrollBar subclass. This subclass is used only
248 by platforms that want to continue to use a platform scrollbar (rather than
253 * WebCore.xcodeproj/project.pbxproj:
254 * html/HTMLCanvasElement.h:
256 * platform/PlatformScrollBar.h: Added.
257 (WebCore::PlatformScrollBar::isWidget):
258 * platform/ScrollBar.h:
259 (WebCore::ScrollBarClient::~ScrollBarClient):
260 (WebCore::ScrollBar::~ScrollBar):
261 (WebCore::ScrollBar::orientation):
262 (WebCore::ScrollBar::value):
263 (WebCore::ScrollBar::client):
264 * platform/mac/PlatformScrollBarMac.mm: Added.
265 (-[WebCoreScrollBar initWithPlatformScrollBar:]):
266 (-[WebCoreScrollBar detachPlatformScrollBar]):
267 (-[WebCoreScrollBar scroll:]):
268 (-[WebCoreScrollBar widget]):
269 (-[WebCoreScrollBar mouseDown:]):
270 (WebCore::PlatformScrollBar::PlatformScrollBar):
271 (WebCore::PlatformScrollBar::~PlatformScrollBar):
272 (WebCore::PlatformScrollBar::setScrollBarValue):
273 (WebCore::PlatformScrollBar::setKnobProportion):
274 (WebCore::PlatformScrollBar::scrollbarHit):
275 (WebCore::PlatformScrollBar::width):
276 (WebCore::PlatformScrollBar::height):
277 (WebCore::PlatformScrollBar::setRect):
278 (WebCore::PlatformScrollBar::setEnabled):
279 (WebCore::PlatformScrollBar::paint):
280 * platform/mac/ScrollBarMac.mm: Removed.
281 * platform/mac/WebCoreTextArea.mm:
282 * rendering/RenderBlock.cpp:
283 (WebCore::RenderBlock::isPointInScrollbar):
284 * rendering/RenderFormElement.cpp:
285 * rendering/RenderLayer.cpp:
286 (WebCore::RenderLayer::horizontalScrollbarWidget):
287 (WebCore::RenderLayer::verticalScrollbarWidget):
288 (WebCore::RenderLayer::valueChanged):
289 (WebCore::RenderLayer::setHasHorizontalScrollbar):
290 (WebCore::RenderLayer::setHasVerticalScrollbar):
291 (WebCore::RenderLayer::positionScrollbars):
292 * rendering/RenderLayer.h:
293 * rendering/RenderWidget.h:
295 2006-07-31 Adele Peterson <adele@apple.com>
297 Reviewed by John and Anders.
299 - Fix for <rdar://problem/4380576> onChange does not get called when field changed by return key
301 Test: fast/forms/onchange-enter-submit.html
303 Blur (which will fire onChange appropriately) before submitting a form when pressing Enter.
304 This matches the sequence of events fired in WinIE.
306 * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler):
307 * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::defaultEventHandler):
309 2006-07-31 Geoffrey Garen <ggaren@apple.com>
313 Moved string debug function outside of the WebCore namespace so that it's
314 easier to call in the debugger. I will never doubt Darin again (x100).
316 * platform/String.cpp:
319 2006-07-31 David Hyatt <hyatt@apple.com>
321 Partial fix for 5453. Improve overflow so that when it changes
322 dynamically from scroll/auto to hidden that we properly hide the
323 scrollbars. Also refine the dirty dashboard region updating so that
324 it only happens if the scrollbars genuinely come and go.
326 Also eliminate the extra repaint of the entire block. This should not be
327 necessary, since the scrollbars repaint themselves already and children
328 will repaint already if they move.
332 Adding test case from bug into fast/overflow/dynamic-hidden.html
334 * rendering/RenderLayer.cpp:
335 (WebCore::RenderLayer::setHasHorizontalScrollbar):
336 (WebCore::RenderLayer::setHasVerticalScrollbar):
337 (WebCore::RenderLayer::updateScrollInfoAfterLayout):
339 2006-07-31 Graham Dennis <graham.dennis@gmail.com>
343 <http://bugzilla.opendarwin.org/show_bug.cgi?id=9507>
344 Empty style spans created in applyInlineStyle
346 Improves paste fidelity because some of these empty font/style spans had a non-zero
347 size and were messing up the layout of pasted content:
348 <rdar://problem/4515463>
349 REGRESSION: Blot and Mail both do a very poor job of pasting the main www.apple.com page
351 * editing/ApplyStyleCommand.cpp:
352 (WebCore::ApplyStyleCommand::applyInlineStyle): Use the adjusted start node instead
353 of start.node(). Don't do any application if the endpoints are swapped. Adjust
354 endNode if the start node is a descendant of it, so that the pre-order traversal will
357 2006-07-31 Geoffrey Garen <ggaren@apple.com>
361 * platform/String.cpp:
362 (WebCore::string): Added a debugging function to create a String from a
365 2006-07-31 Anders Carlsson <acarlsson@apple.com>
367 * css/CSSPrimitiveValue.cpp:
370 2006-07-31 Geoffrey Garen <ggaren@apple.com>
372 Reinstating my last change. Everything builds now.
374 2006-07-31 Geoffrey Garen <ggaren@apple.com>
376 Backing out my last change because it causes a build failure in some
377 configurations. This seems to be the cleanest way to get svn to cooperate.
379 2006-07-31 Geoffrey Garen <ggaren@apple.com>
383 Moved files around to make WebCore's structure clearer
384 and easier to explain.
386 DerivedSources/JS* -> bindings/js/DerivedSources/ (so JS* files
387 show up when you search inside bindings/js/, but are marked, at
388 the same time, as files that you should not edit manually)
390 WebCore+SVG/DOMList.h -> ksvg2/svg/ (only files inside ksvg2/svg/
395 I tested that everything still builds.
397 2006-07-30 Darin Adler <darin@apple.com>
399 Reviewed by Tim Hatcher.
401 - some improvements for the benefit of the style pane of the inspector
403 * css/CSSComputedStyleDeclaration.cpp: Removed background-position
404 and border-spacing from the list of properties that show up in
405 computed style, because of background-position-x, background-position-y,
406 -webkit-border-horizontal-spacing and -webkit-border-vertical-spacing.
407 (WebCore::valueForLength): Added handling for undefinedLength, intrinsic,
409 (WebCore::primitiveValueFromLength): Removed code that would add a
410 space to the string for no good reason.
411 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Added a
412 special case for a line clamp of -1, which should come back as "none"
413 rather than an actual "-1".
414 (WebCore::CSSComputedStyleDeclaration::length): Return 0 if the
415 declaration has no corresponding node or no renderer.
416 (WebCore::CSSComputedStyleDeclaration::item): Check against length()
417 so that the two stay consistent rather than using a constant.
419 * css/CSSPrimitiveValue.cpp:
420 (WebCore::isCSSTokenizerIdentifier): Added.
421 (WebCore::isCSSTokenizerURL): Added.
422 (WebCore::quoteString): Added.
423 (WebCore::quoteStringIfNeeded): Changed to quote strings in many more
424 cases -- any cases where they would not parse in the CSS parser otherwise.
425 The main case this affects is font names with spaces in them.
426 (WebCore::quoteURLIfNeeded): Added.
427 (WebCore::CSSPrimitiveValue::cssText): Use quoteURLIfNeeded in the case
428 where we're making the text form of a URI.
430 * css/tokenizer.flex: Whitespace tweaks to line things up better.
432 2006-07-30 Eric Seidel <eric@eseidel.com>
436 Remove some unused SVG code.
438 * ksvg2/ecma/Ecma.cpp: Removed.
439 * ksvg2/ecma/Ecma.h: Removed.
440 * ksvg2/ecma/GlobalObject.cpp: remove a couple dead functions.
441 * ksvg2/ecma/GlobalObject.h: add a comment about this dead code.
442 * ksvg2/ecma/SVGLookup.h: Removed.
444 2006-07-29 Darin Adler <darin@apple.com>
446 - Removed tabs from these source files that still had them.
447 We don't use them; that way source files look fine in editors
448 that have tabs set to 8 spaces or to 4 spaces.
449 - Removed allow-tabs Subversion property from the files too.
451 * bindings/objc/WebScriptObject.h:
452 * bindings/objc/WebScriptObject.mm:
453 * platform/FontData.cpp:
455 2006-07-29 Sam Weinig <sam.weinig@gmail.com>
459 - patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10080
460 Adopt pedantic changes from the Unity project to improve
461 cross-compiler compatibility
464 * Removing trailing semicolon from namespace braces.
465 * Removing trailing comma from last enum declaration.
466 * Updating to match style guidelines.
467 * Adding missing newline to the end of the file.
468 * Turning on gcc warning for missing newline at the end of a source file
469 (GCC_WARN_ABOUT_MISSING_NEWLINE in Xcode, -Wnewline in gcc).
470 * Alphabetical sorting of Xcode source list files.
471 * Use abs() function from <math.h> instead of ABS() macro.
472 * Use C-style comments instead of C++ comments in files that might
473 be included by either C or C++ files.
474 * Use -numeric_limits<double>::infinity() instead of -HUGE_VAL.
476 * WebCore+SVG/DOMList.h:
477 * WebCore.xcodeproj/project.pbxproj:
479 * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
480 * bindings/js/JSXSLTProcessor.h:
481 * bindings/js/kjs_domnode.h:
483 * bindings/objc/DOMCSS.h:
484 (-[DOMCSSValue enum]):
485 * bindings/objc/DOMCore.h:
486 (-[DOMImplementation createDocument:::]):
487 * bindings/objc/DOMEvents.h:
488 (-[DOMOverflowEvent enum]):
489 * bindings/objc/DOMRange.h:
490 * bindings/objc/DOMTraversal.h:
491 * bindings/objc/DOMXPath.h:
492 (-[DOMXPathNSResolver lookupNamespaceURI:]):
493 * bridge/mac/WebCoreFrameBridge.h:
494 * bridge/mac/WebCoreKeyboardAccess.h:
497 * dom/ChildNodeList.h:
500 (WebCore::Document::):
501 * dom/DocumentMarker.h:
502 (WebCore::DocumentMarker::):
503 (WebCore::DocumentMarker::operator==):
504 (WebCore::DocumentMarker::operator!=):
505 * dom/EventTargetNode.h:
506 * dom/KeyboardEvent.h:
507 (WebCore::KeyboardEvent::):
508 * dom/NameNodeList.h:
509 (WebCore::NameNodeList::rootNodeChildrenChanged):
510 * dom/QualifiedName.cpp:
511 * editing/TypingCommand.h:
512 (WebCore::TypingCommand::):
513 * editing/UnlinkCommand.h:
514 (WebCore::UnlinkCommand::editingAction):
515 * html/FormDataList.h:
516 (WebCore::FormDataListItem::FormDataListItem):
517 (WebCore::FormDataList::appendData):
518 * html/HTMLBlockquoteElement.h:
519 * html/HTMLDivElement.h:
520 * html/HTMLFormElement.h:
521 * html/HTMLHRElement.h:
522 * html/HTMLHeadingElement.h:
523 * html/HTMLMarqueeElement.h:
524 * html/HTMLParagraphElement.h:
525 * html/HTMLPlugInElement.h:
526 * html/HTMLPreElement.h:
527 * html/HTMLTokenizer.h:
528 (WebCore::HTMLTokenizer::State::):
529 * icon/IconDatabase.cpp:
530 * icon/SQLStatement.cpp:
531 * kcanvas/KCanvasFilters.h:
533 (WebCore::KCanvasPoint3F::KCanvasPoint3F):
534 (WebCore::KCanvasFilter::KCanvasFilter):
535 (WebCore::KCanvasFilter::~KCanvasFilter):
536 (WebCore::KCanvasFilterEffect::~KCanvasFilterEffect):
537 (WebCore::KCComponentTransferFunction::KCComponentTransferFunction):
538 (WebCore::KCanvasFEConvolveMatrix::KCanvasFEConvolveMatrix):
539 (WebCore::KCLightSource::KCLightSource):
540 (WebCore::KCDistantLightSource::KCDistantLightSource):
541 (WebCore::KCPointLightSource::KCPointLightSource):
542 (WebCore::KCSpotLightSource::KCSpotLightSource):
543 (WebCore::KCanvasFEDiffuseLighting::KCanvasFEDiffuseLighting):
544 (WebCore::KCanvasFEDisplacementMap::KCanvasFEDisplacementMap):
545 (WebCore::KCanvasFEImage::KCanvasFEImage):
546 (WebCore::KCanvasFESpecularLighting::KCanvasFESpecularLighting):
547 * kcanvas/RenderSVGImage.h:
548 * kcanvas/device/quartz/KRenderingDeviceQuartz.h:
549 * ksvg2/css/SVGRenderStyle.h:
550 (WebCore::SVGRenderStyle::InheritedFlags::):
551 (WebCore::SVGRenderStyle::NonInheritedFlags::):
552 * ksvg2/css/SVGRenderStyleDefs.h:
554 * ksvg2/events/SVGZoomEvent.h:
557 * ksvg2/misc/KCanvasRenderingStyle.h:
558 * ksvg2/misc/SVGImageLoader.h:
559 * ksvg2/scripts/make_names.pl:
560 * ksvg2/svg/SVGAElement.h:
561 * ksvg2/svg/SVGAngle.h:
562 * ksvg2/svg/SVGAnimateColorElement.h:
563 * ksvg2/svg/SVGAnimateElement.h:
564 * ksvg2/svg/SVGAnimateTransformElement.h:
565 * ksvg2/svg/SVGAnimatedAngle.h:
566 * ksvg2/svg/SVGAnimatedBoolean.h:
567 * ksvg2/svg/SVGAnimatedColor.h:
568 * ksvg2/svg/SVGAnimatedEnumeration.h:
569 * ksvg2/svg/SVGAnimatedInteger.h:
570 * ksvg2/svg/SVGAnimatedLength.h:
571 * ksvg2/svg/SVGAnimatedLengthList.h:
572 * ksvg2/svg/SVGAnimatedNumber.h:
573 * ksvg2/svg/SVGAnimatedNumberList.h:
574 * ksvg2/svg/SVGAnimatedPathData.h:
575 * ksvg2/svg/SVGAnimatedPoints.h:
576 * ksvg2/svg/SVGAnimatedPreserveAspectRatio.h:
577 * ksvg2/svg/SVGAnimatedRect.h:
578 * ksvg2/svg/SVGAnimatedString.h:
579 * ksvg2/svg/SVGAnimatedTemplate.h:
580 * ksvg2/svg/SVGAnimatedTransformList.h:
581 * ksvg2/svg/SVGAnimationElement.cpp:
582 (SVGAnimationElement::calculateCurrentValueItem):
583 (SVGAnimationElement::calculateRelativeTimePercentage):
584 * ksvg2/svg/SVGAnimationElement.h:
586 * ksvg2/svg/SVGCircleElement.h:
587 * ksvg2/svg/SVGClipPathElement.h:
588 * ksvg2/svg/SVGColor.h:
589 * ksvg2/svg/SVGComponentTransferFunctionElement.h:
590 * ksvg2/svg/SVGCursorElement.h:
591 * ksvg2/svg/SVGDOMImplementation.h:
592 * ksvg2/svg/SVGDefsElement.h:
593 * ksvg2/svg/SVGDescElement.h:
594 * ksvg2/svg/SVGDocument.h:
595 * ksvg2/svg/SVGElement.h:
596 (WebCore::SVGElement::rendererIsNeeded):
597 (WebCore::svg_dynamic_cast):
598 * ksvg2/svg/SVGElementInstance.h:
599 * ksvg2/svg/SVGElementInstanceList.h:
600 * ksvg2/svg/SVGEllipseElement.h:
601 * ksvg2/svg/SVGExternalResourcesRequired.h:
602 * ksvg2/svg/SVGFEBlendElement.h:
603 * ksvg2/svg/SVGFEColorMatrixElement.h:
604 * ksvg2/svg/SVGFEComponentTransferElement.h:
605 * ksvg2/svg/SVGFECompositeElement.h:
606 * ksvg2/svg/SVGFEDiffuseLightingElement.h:
607 * ksvg2/svg/SVGFEDisplacementMapElement.h:
608 * ksvg2/svg/SVGFEDistantLightElement.h:
609 * ksvg2/svg/SVGFEFloodElement.h:
610 * ksvg2/svg/SVGFEFuncAElement.h:
611 * ksvg2/svg/SVGFEFuncBElement.h:
612 * ksvg2/svg/SVGFEFuncGElement.h:
613 * ksvg2/svg/SVGFEFuncRElement.h:
614 * ksvg2/svg/SVGFEGaussianBlurElement.h:
615 * ksvg2/svg/SVGFEImageElement.h:
616 * ksvg2/svg/SVGFELightElement.h:
617 * ksvg2/svg/SVGFEMergeElement.h:
618 * ksvg2/svg/SVGFEMergeNodeElement.h:
619 * ksvg2/svg/SVGFEOffsetElement.h:
620 * ksvg2/svg/SVGFEPointLightElement.h:
621 * ksvg2/svg/SVGFESpecularLightingElement.h:
622 * ksvg2/svg/SVGFESpotLightElement.h:
623 * ksvg2/svg/SVGFETileElement.h:
624 * ksvg2/svg/SVGFETurbulenceElement.h:
625 * ksvg2/svg/SVGFilterElement.h:
626 * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.h:
627 * ksvg2/svg/SVGFitToViewBox.h:
628 * ksvg2/svg/SVGForeignObjectElement.cpp:
629 * ksvg2/svg/SVGForeignObjectElement.h:
630 * ksvg2/svg/SVGGElement.h:
631 * ksvg2/svg/SVGGradientElement.h:
632 * ksvg2/svg/SVGHelper.h:
634 * ksvg2/svg/SVGImageElement.h:
635 * ksvg2/svg/SVGLangSpace.h:
636 * ksvg2/svg/SVGLength.h:
637 * ksvg2/svg/SVGLengthList.h:
638 * ksvg2/svg/SVGLineElement.h:
639 * ksvg2/svg/SVGLinearGradientElement.h:
640 * ksvg2/svg/SVGList.h:
641 * ksvg2/svg/SVGLocatable.h:
642 * ksvg2/svg/SVGMarkerElement.h:
643 * ksvg2/svg/SVGMaskElement.h:
644 * ksvg2/svg/SVGMatrix.h:
645 * ksvg2/svg/SVGNumber.h:
646 * ksvg2/svg/SVGNumberList.h:
647 * ksvg2/svg/SVGPaint.h:
648 * ksvg2/svg/SVGPathElement.h:
649 * ksvg2/svg/SVGPathSeg.h:
650 * ksvg2/svg/SVGPathSegArc.h:
651 * ksvg2/svg/SVGPathSegClosePath.h:
652 * ksvg2/svg/SVGPathSegCurvetoCubic.h:
653 * ksvg2/svg/SVGPathSegCurvetoCubicSmooth.h:
654 * ksvg2/svg/SVGPathSegCurvetoQuadratic.h:
655 * ksvg2/svg/SVGPathSegCurvetoQuadraticSmooth.h:
656 * ksvg2/svg/SVGPathSegLineto.h:
657 * ksvg2/svg/SVGPathSegLinetoHorizontal.h:
658 * ksvg2/svg/SVGPathSegLinetoVertical.h:
659 * ksvg2/svg/SVGPathSegList.h:
660 * ksvg2/svg/SVGPathSegMoveto.h:
661 * ksvg2/svg/SVGPatternElement.h:
662 * ksvg2/svg/SVGPoint.h:
663 * ksvg2/svg/SVGPointList.h:
664 * ksvg2/svg/SVGPolyElement.h:
665 * ksvg2/svg/SVGPolygonElement.h:
666 * ksvg2/svg/SVGPolylineElement.h:
667 * ksvg2/svg/SVGPreserveAspectRatio.h:
668 * ksvg2/svg/SVGRadialGradientElement.h:
669 * ksvg2/svg/SVGRect.h:
670 * ksvg2/svg/SVGRectElement.h:
671 * ksvg2/svg/SVGSVGElement.h:
672 * ksvg2/svg/SVGScriptElement.h:
673 * ksvg2/svg/SVGSetElement.h:
674 * ksvg2/svg/SVGStopElement.h:
675 * ksvg2/svg/SVGStringList.h:
676 * ksvg2/svg/SVGStylable.h:
677 * ksvg2/svg/SVGStyleElement.h:
678 * ksvg2/svg/SVGStyledElement.h:
679 (WebCore::SVGStyledElement::rendererIsNeeded):
680 (WebCore::SVGStyledElement::canvasResource):
681 * ksvg2/svg/SVGStyledLocatableElement.h:
682 * ksvg2/svg/SVGStyledTransformableElement.h:
683 * ksvg2/svg/SVGSwitchElement.h:
684 * ksvg2/svg/SVGSymbolElement.h:
685 * ksvg2/svg/SVGTRefElement.h:
686 * ksvg2/svg/SVGTSpanElement.h:
687 * ksvg2/svg/SVGTests.h:
688 * ksvg2/svg/SVGTextContentElement.h:
689 * ksvg2/svg/SVGTextElement.h:
690 * ksvg2/svg/SVGTextPositioningElement.h:
691 * ksvg2/svg/SVGTitleElement.h:
692 * ksvg2/svg/SVGTransform.h:
693 * ksvg2/svg/SVGTransformList.h:
694 * ksvg2/svg/SVGTransformable.h:
695 * ksvg2/svg/SVGURIReference.h:
696 * ksvg2/svg/SVGUseElement.h:
697 * ksvg2/svg/SVGViewElement.h:
698 * ksvg2/svg/SVGZoomAndPan.h:
699 * ksvg2/svg/svgpathparser.h:
702 * platform/AffineTransform.h:
703 * platform/FontCache.cpp:
704 (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
705 * platform/FontData.cpp:
706 (WebCore::FontData::FontData):
707 * platform/FontData.h:
708 * platform/TextBox.h:
709 (WebCore::TextBox::):
710 * platform/Timer.cpp:
711 (WebCore::TimerBase::heapPop):
712 * platform/mac/FontCacheMac.mm:
713 * platform/mac/GlyphMapMac.cpp:
714 * platform/mac/WebFontCache.mm:
716 * rendering/DeprecatedRenderSelect.cpp:
717 (WebCore::DeprecatedRenderSelect::setWidgetWritingDirection):
718 * rendering/EllipsisBox.h:
719 * rendering/RenderBR.h:
720 (WebCore::RenderBR::renderName):
721 (WebCore::RenderBR::width):
722 * rendering/RenderBlock.h:
724 * rendering/RenderFlexibleBox.h:
725 * rendering/RenderFlow.h:
726 (WebCore::RenderFlow::RenderFlow):
727 * rendering/RenderFrame.cpp:
729 * rendering/break_lines.cpp:
731 2006-07-29 Rob Buis <buis@kde.org>
735 http://bugzilla.opendarwin.org/show_bug.cgi?id=10151
736 ghostmap XHTML + SVG fails due to javascript undefined exception
738 Make sure document.URL works when called from a non-HTML document.
740 * bindings/js/kjs_html.cpp:
741 (KJS::JSHTMLDocument::getValueProperty):
742 * bindings/js/kjs_html.h:
743 (KJS::JSHTMLDocument::):
746 2006-07-29 Mike Emmel <mike.emmel@gmail.com>
748 Reviewed and tweaked by Darin.
750 - fixes for Linux build
751 (still might not compile, since Darin tweaked but was unable to test).
753 * WebCoreSources.bkl: Added some new sources, removed some obsolete ones.
754 * Projects/gdk/webcore-gdk.bkl: Added RenderPopupMenuGdk.cpp
756 * html/HTMLPlugInElement.h: Removed incorrect syntax with class name
759 * platform/gdk/FrameGdk.h:
760 * platform/gdk/FrameGdk.cpp: Updated parameters of constructor. Moved a couple stubs
762 * platform/gdk/RenderPopupMenuGdk.h: Added.
763 * platform/gdk/RenderPopupMenuGdk.cpp: Added. Just a file full of empty stubs.
764 * platform/gdk/RenderThemeGdk.h:
765 * platform/gdk/RenderThemeGdk.cpp: (WebCore::RenderThemeGdk::createPopupMenu): Added.
767 * platform/gdk/TemporaryLinkStubs.cpp: Add some new stubs.
769 2006-07-29 Mark Rowe <opendarwin.org@bdash.net.nz>
773 http://bugzilla.opendarwin.org/show_bug.cgi?id=10022
774 Bug 10022: REGRESSION: Crash in WebCore::XMLTokenizer::characters
776 * dom/XMLTokenizer.cpp:
777 (WebCore::XMLTokenizer::resumeParsing): If the write() call resulted in new callbacks being
778 added, don't call through to end() just yet.
780 2006-07-29 Mitz Pettel <opendarwin.org@mitzpettel.com>
782 Reviewed by John Sullivan.
784 - manual test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9984
785 ASSERTION FAILURE: _private->mouseDownEvent != nil
786 (WebKit/WebView/WebHTMLView.m:4863 -[WebHTMLView(WebInternal) _delegateDragSourceActionMask])
788 * manual-tests/subview-click-assertion.html: Added.
790 2006-07-29 Andrew Wellington <proton@wiretapped.net>
794 Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8587 / <rdar://problem/4631844>
795 REGRESSION: {display:list-item} items outside an ol or ul element don't number correctly
797 * rendering/RenderListItem.cpp:
798 (WebCore::enclosingList): If no real list element is found, use parent instead.
799 (WebCore::previousListItem): Check list elements to see if they are list items -- the
800 old code assumed that a list would never be a list item but this is entirely possible
801 with CSS and especially with the new rule that means any DOM element could act as a list.
803 2006-07-29 Alexey Proskuryakov <ap@nypop.com>
807 Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10147
808 REGRESSION: custom attribute values set via javascript are not persistent
810 Test: fast/dom/Element/setAttribute-case-insensitivity.html
813 (WebCore::Element::setAttribute): Use the lowercased localName for retrieving the old value, too.
815 2006-07-28 Timothy Hatcher <timothy@apple.com>
819 Moving the implementation of isContentEditable to the
820 the WebPrivate category.
822 * bindings/objc/DOM.mm:
823 (-[DOMNode isContentEditable]):
825 2006-07-28 Justin Garcia <justin.garcia@apple.com>
830 <rdar://problem/4515463>
831 REGRESSION: Blot and Mail both do a very poor job of pasting the main www.apple.com page
833 Migrate to isBlock and enclosingBlock.
834 Changed RendereringInfo::isBlock and ReplacementFragment::isBlock
835 to wasBlock so that they don't conflict with isBlock and because
836 it's more descriptive.
838 * editing/ReplaceSelectionCommand.cpp:
839 (WebCore::ReplacementFragment::mergeStartNode):
840 (WebCore::ReplacementFragment::wasBlock):
841 (WebCore::ReplacementFragment::saveRenderingInfo):
842 (WebCore::ReplacementFragment::renderedBlocks):
843 (WebCore::RenderingInfo::RenderingInfo):
844 (WebCore::ReplaceSelectionCommand::shouldMergeStart):
845 (WebCore::ReplaceSelectionCommand::doApply):
846 * editing/ReplaceSelectionCommand.h:
847 (WebCore::RenderingInfo::wasBlock):
849 2006-07-27 Justin Garcia <justin.garcia@apple.com>
854 <rdar://problem/4242293>
855 Poor paste fidelity of http://www.google.com/
857 * editing/markup.cpp:
858 (WebCore::needInterchangeNewlineAfter): Added.
859 (WebCore::createMarkup):
860 Only add an interchangeNewline if we're annotating for interchange. Can't test
861 this until we expose createMarkup in non-annotate mode (I'd expose Range::toHTML).
862 Remove the FIXME about prepending the interchangeNewline before creating the rest
863 of the markup. Its correct to surround the interchangeNewline in ancestors of the
865 Fixed the check to see if an interchangeNewline is needed (!inSameBlock). This would
866 add an interchangeNewline for a selection that started before a table.
867 Removed the workaround for the bug where markup for a table was not included when
868 selecting the contents of a table, since this change fixes the general problem of
869 markup for ancestors of the startNode being left out.
870 Don't leave out ancestors of the startNode as we leave their subtrees. Execute the
871 code to include them even if we closed ancestors in the ancestorsToClose list.
873 2006-07-28 Timothy Hatcher <timothy@apple.com>
877 Adding isContentEditable to DOMNode's private category.
879 * bindings/objc/DOMPrivate.h:
881 2006-07-28 Alexey Proskuryakov <ap@nypop.com>
883 Rolling out http://bugzilla.opendarwin.org/show_bug.cgi?id=6010 because of failing layout tests.
884 Add better SVGLoad event support.
886 * dom/EventTargetNode.cpp:
887 (WebCore::EventTargetNode::dispatchGenericEvent):
888 * html/HTMLImageLoader.cpp:
889 (WebCore::HTMLImageLoader::dispatchLoadEvent):
890 * html/HTMLImageLoader.h:
891 * ksvg2/misc/SVGImageLoader.cpp:
892 (WebCore::SVGImageLoader::SVGImageLoader):
893 * ksvg2/misc/SVGImageLoader.h:
894 * ksvg2/svg/SVGAElement.cpp:
895 (WebCore::SVGAElement::parseMappedAttribute):
896 * ksvg2/svg/SVGAnimatedBoolean.h:
897 * ksvg2/svg/SVGElement.cpp:
898 (WebCore::SVGElement::SVGElement):
899 (WebCore::SVGElement::parseMappedAttribute):
900 * ksvg2/svg/SVGElement.h:
901 (WebCore::SVGElement::adjustViewportClipping):
902 (WebCore::SVGElement::closeRenderer):
903 (WebCore::SVGElement::rendererIsNeeded):
904 (WebCore::SVGElement::isClosed):
905 (WebCore::svg_dynamic_cast):
906 * ksvg2/svg/SVGExternalResourcesRequired.h:
907 * ksvg2/svg/SVGImageElement.cpp:
908 (SVGImageElement::SVGImageElement):
909 * ksvg2/svg/SVGImageElement.h:
910 * ksvg2/svg/SVGSVGElement.cpp:
911 (WebCore::SVGSVGElement::parseMappedAttribute):
912 * ksvg2/svg/SVGScriptElement.cpp:
913 (SVGScriptElement::SVGScriptElement):
914 (SVGScriptElement::parseMappedAttribute):
915 (SVGScriptElement::executeScript):
916 * xml/xmlhttprequest.cpp:
917 (WebCore::XMLHttpRequest::callReadyStateChangeListener):
919 2006-07-28 Adele Peterson <adele@apple.com>
921 Rolling out http://bugzilla.opendarwin.org/show_bug.cgi?id=9753 because of failing layout tests.
922 SVG with width and height 100% leaves room for scrollbar on the right.
924 * kcanvas/RenderPath.cpp:
925 * kcanvas/RenderPath.h:
926 * kcanvas/RenderSVGContainer.cpp:
927 (WebCore::RenderSVGContainer::layout):
928 * ksvg2/svg/SVGCircleElement.cpp:
929 * ksvg2/svg/SVGCircleElement.h:
930 * ksvg2/svg/SVGEllipseElement.cpp:
931 * ksvg2/svg/SVGEllipseElement.h:
932 * ksvg2/svg/SVGLineElement.cpp:
933 * ksvg2/svg/SVGLineElement.h:
934 * ksvg2/svg/SVGRectElement.cpp:
935 * ksvg2/svg/SVGRectElement.h:
936 * ksvg2/svg/SVGStyledElement.h:
938 2006-07-27 Eric Seidel <eric@eseidel.com>
942 Add better SVGLoad event support.
943 http://bugzilla.opendarwin.org/show_bug.cgi?id=6010
944 There will still need to be additional support added for <link> and <script> elements.
945 Not all of the error -> loaded -> error transition cases work yet.
947 * dom/EventTargetNode.cpp:
948 (WebCore::EventTargetNode::dispatchGenericEvent):
949 * html/HTMLImageLoader.cpp:
950 (WebCore::HTMLImageLoader::dispatchLoadEvent):
951 * html/HTMLImageLoader.h:
952 (WebCore::HTMLImageLoader::haveFiredLoadEvent):
953 (WebCore::HTMLImageLoader::setHaveFiredLoadEvent):
954 * ksvg2/misc/SVGImageLoader.cpp:
955 (WebCore::SVGImageLoader::SVGImageLoader):
956 (WebCore::SVGImageLoader::dispatchLoadEvent):
957 * ksvg2/misc/SVGImageLoader.h:
958 * ksvg2/svg/SVGAElement.cpp:
959 (WebCore::SVGAElement::parseMappedAttribute):
960 * ksvg2/svg/SVGAnimatedBoolean.h:
961 * ksvg2/svg/SVGElement.cpp:
962 (WebCore::SVGElement::SVGElement):
963 (WebCore::SVGElement::parseMappedAttribute):
964 (WebCore::SVGElement::haveLoadedRequiredResources):
965 (WebCore::SVGElement::sendSVGLoadEventIfPossible):
966 (WebCore::SVGElement::closeRenderer):
967 * ksvg2/svg/SVGElement.h:
968 (WebCore::SVGElement::rendererIsNeeded):
969 (WebCore::svg_dynamic_cast):
970 * ksvg2/svg/SVGExternalResourcesRequired.h:
971 * ksvg2/svg/SVGImageElement.cpp:
972 (SVGImageElement::SVGImageElement):
973 (SVGImageElement::haveLoadedRequiredResources):
974 * ksvg2/svg/SVGImageElement.h:
975 * ksvg2/svg/SVGSVGElement.cpp:
976 (WebCore::SVGSVGElement::parseMappedAttribute):
977 * ksvg2/svg/SVGScriptElement.cpp:
978 (WebCore::SVGScriptElement::SVGScriptElement):
979 (WebCore::SVGScriptElement::parseMappedAttribute):
980 (WebCore::SVGScriptElement::executeScript):
981 * xml/xmlhttprequest.cpp:
982 (WebCore::XMLHttpRequest::callReadyStateChangeListener): use new Event() instead of createEvent
984 2006-07-27 Mitz Pettel <opendarwin.org@mitzpettel.com>
988 - http://bugzilla.opendarwin.org/show_bug.cgi?id=10135
989 Cleanup: remove useless parameters from RenderObject::position()
991 No test possible (no functionality change)
993 * rendering/RenderBox.cpp:
994 (WebCore::RenderBox::position):
995 * rendering/RenderBox.h:
996 * rendering/RenderObject.h:
997 (WebCore::RenderObject::position):
998 * rendering/RenderTableRow.h:
999 (WebCore::RenderTableRow::position):
1000 * rendering/RenderTableSection.h:
1001 (WebCore::RenderTableSection::position):
1002 * rendering/RenderText.cpp:
1003 (WebCore::RenderText::position):
1004 * rendering/RenderText.h:
1005 * rendering/bidi.cpp:
1006 (WebCore::RenderBlock::constructLine):
1007 (WebCore::RenderBlock::computeVerticalPositionsForLine):
1009 2006-07-27 Rob Buis <buis@kde.org>
1013 http://bugzilla.opendarwin.org/show_bug.cgi?id=9753
1014 SVG with width and height 100% leaves room for scrollbar on the right.
1016 Relayout children of svg containers, except svg shapes that do not depend on percentages.
1018 * kcanvas/RenderPath.cpp: (WebCore::RenderPath::hasPercentageValues):
1019 * kcanvas/RenderPath.h:
1020 * kcanvas/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::layout):
1021 * ksvg2/svg/SVGCircleElement.cpp: (SVGCircleElement::hasPercentageValues):
1022 * ksvg2/svg/SVGCircleElement.h:
1023 * ksvg2/svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::hasPercentageValues):
1024 * ksvg2/svg/SVGEllipseElement.h:
1025 * ksvg2/svg/SVGLineElement.cpp: (SVGLineElement::hasPercentageValues):
1026 * ksvg2/svg/SVGLineElement.h:
1027 * ksvg2/svg/SVGRectElement.cpp: (WebCore::SVGRectElement::hasPercentageValues):
1028 * ksvg2/svg/SVGRectElement.h:
1029 * ksvg2/svg/SVGStyledElement.h: (WebCore::SVGStyledElement::hasPercentageValues):
1031 2006-07-27 Justin Garcia <justin.garcia@apple.com>
1035 <rdar://problem/4242293>
1036 Poor paste fidelity of http://www.google.com/
1038 * editing/ApplyStyleCommand.cpp:
1039 (WebCore::ApplyStyleCommand::applyInlineStyle): Fixed crasher with nil-check.
1040 * editing/markup.cpp:
1041 (WebCore::startMarkup): Style information wasn't added to an element if it had
1042 attributes but no style attribute.
1044 2006-07-27 Alexander Kellett <lypanov@kde.org>
1048 - fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9867
1049 REGRESSION: code that modifies form element in Firefox modifies form attribute in WebKit
1051 * bindings/scripts/CodeGeneratorJS.pm: add new attribute - HasOverridingNameGetter
1052 * html/HTMLFormElement.idl:
1054 2006-07-27 Rob Buis <buis@kde.org>
1058 http://bugzilla.opendarwin.org/show_bug.cgi?id=8992
1059 Some HTML DOM attributes have incorrect types
1061 Adjust idl and dom source code for HTMLImageElement and
1062 HTMLBaseFontElement to choose correct type for
1063 HTMLImageElement::border and HTMLBaseFontElement::size
1066 * html/HTMLBaseFontElement.cpp:
1067 (WebCore::HTMLBaseFontElement::size):
1068 (WebCore::HTMLBaseFontElement::setSize):
1069 * html/HTMLBaseFontElement.h:
1070 * html/HTMLBaseFontElement.idl:
1071 * html/HTMLImageElement.cpp:
1072 (WebCore::HTMLImageElement::border):
1073 (WebCore::HTMLImageElement::setBorder):
1074 * html/HTMLImageElement.h:
1075 * html/HTMLImageElement.idl:
1077 2006-07-27 Justin Garcia <justin.garcia@apple.com>
1081 <rdar://problem/4628409>
1082 Safari crashes in CompositeEditCommand::removeBlockPlaceholder entering text in a web page form
1084 * editing/CompositeEditCommand.cpp:
1085 (WebCore::CompositeEditCommand::removeBlockPlaceholder):
1086 A script on the page shrinks the textarea down to zero rows just
1087 before insertion. That gives the shadow div a zero height, removing
1088 [div, 0] as a candidate for a VisiblePosition. Then
1089 InsertTextCommand::input() tries to create a VisiblePosition from
1090 [div, 0] and fails. A nil check is a quick fix. Another might
1091 be to make positions where there is a caret selection candidates.
1092 Another might be to make any [div, 0] where div is a shadow div inside
1093 a form element a candidate.
1095 2006-07-27 Graham Dennis <graham.dennis@gmail.com>
1099 - fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=10094
1100 Japanese characters improperly rendering in TOT
1102 Test: fast/encoding/denormalised-voiced-japanese-chars.html
1104 * platform/Font.cpp:
1105 (WebCore::WidthIterator::advance): pass currentCharacter to normalizeVoicingMarks
1106 (WebCore::WidthIterator::normalizeVoicingMarks): turn the currentCharacter variable
1107 into an argument as WidthIterator::advance doesn't update m_currentCharacter while
1110 2006-07-27 Eric Seidel <eric@eseidel.com>
1114 Complex entities seem to fail on TOT
1115 http://bugzilla.opendarwin.org/show_bug.cgi?id=6390
1116 Use an alternative work-around to an XML Entity parsing bug.
1118 * dom/XMLTokenizer.cpp:
1119 (WebCore::XMLTokenizer::write):
1120 (WebCore::hackAroundLibXMLEntityBug): added.
1121 (WebCore::startElementNsHandler):
1122 (WebCore::endElementNsHandler):
1123 (WebCore::charactersHandler):
1124 (WebCore::processingInstructionHandler):
1125 (WebCore::cdataBlockHandler):
1126 (WebCore::commentHandler):
1127 (WebCore::getEntityHandler):
1129 2006-07-27 Rob Buis <buis@kde.org>
1133 http://bugzilla.opendarwin.org/show_bug.cgi?id=9938
1134 Fix viewBox issues in Hixie's test
1136 Do a more accurate and quicker job of parsing the viewBox
1137 attribute. Handle properly on negative width/height and
1138 invalid syntax in general.
1140 * ksvg2/svg/SVGFitToViewBox.cpp:
1141 (SVGFitToViewBox::parseViewBox):
1143 2006-07-27 Eric Seidel <eric@eseidel.com>
1147 Enables getSVGDocument() support for HTMLObjectElement and HTMLEmbedElement
1148 http://bugzilla.opendarwin.org/show_bug.cgi?id=9237
1149 This patch does not try to autogenerate anything, but enables the SVG functionality.
1150 Also fix HTMLObjectElement vspace and hspace to be numbers instead of strings to match IE & Firefox.
1152 * bindings/js/kjs_dom.cpp:
1154 * bindings/js/kjs_html.cpp:
1155 (KJS::JSHTMLElement::objectGetter):
1156 (KJS::HTMLElementFunction::callAsFunction):
1157 (KJS::JSHTMLElement::objectSetter):
1158 * bindings/js/kjs_html.h:
1159 (KJS::JSHTMLElement::):
1161 (WebCore::Document::isSVGDocument):
1162 * html/HTMLEmbedElement.cpp:
1163 (WebCore::HTMLEmbedElement::contentDocument):
1164 (WebCore::HTMLEmbedElement::getSVGDocument):
1165 * html/HTMLEmbedElement.h:
1166 * html/HTMLObjectElement.cpp:
1167 (WebCore::HTMLObjectElement::HTMLObjectElement):
1168 (WebCore::HTMLObjectElement::getInstance):
1169 (WebCore::HTMLObjectElement::parseMappedAttribute):
1170 (WebCore::HTMLObjectElement::contentDocument):
1171 (WebCore::HTMLObjectElement::rendererIsNeeded):
1172 (WebCore::HTMLObjectElement::createRenderer):
1173 (WebCore::HTMLObjectElement::setCode):
1174 (WebCore::HTMLObjectElement::setArchive):
1175 (WebCore::HTMLObjectElement::setBorder):
1176 (WebCore::HTMLObjectElement::setCodeBase):
1177 (WebCore::HTMLObjectElement::setCodeType):
1178 (WebCore::HTMLObjectElement::setData):
1179 (WebCore::HTMLObjectElement::hspace):
1180 (WebCore::HTMLObjectElement::setHspace):
1181 (WebCore::HTMLObjectElement::setStandby):
1182 (WebCore::HTMLObjectElement::setType):
1183 (WebCore::HTMLObjectElement::setUseMap):
1184 (WebCore::HTMLObjectElement::vspace):
1185 (WebCore::HTMLObjectElement::setVspace):
1186 (WebCore::HTMLObjectElement::getSVGDocument):
1187 * html/HTMLObjectElement.h:
1188 * ksvg2/svg/SVGDocument.h:
1189 (WebCore::SVGDocument::isSVGDocument):
1190 * rendering/RenderWidget.h:
1191 (WebCore::RenderWidget::frameView):
1193 2006-07-26 Alexey Proskuryakov <ap@nypop.com>
1197 Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9901
1198 XSLTProcessor cannot parse text nodes for INPUT ELEMENTS in an XSLT stylesheet
1200 Test: fast/js/xhtml-serialize.html
1202 * editing/markup.cpp:
1203 (WebCore::endMarkup): If the element has child nodes, write a closing tag even if it
1204 is not permitted in HTML, to make it valid XML.
1206 2006-07-26 Alice Liu <alice.liu@apple.com>
1208 Reviewed by John Sullivan (and Kevin and Timo).
1210 landing this patch for John et al.
1211 Fixed <rdar://problem/4651380> REGRESSION (9A232->9A234): existing web clips don't render if you restart Dashboard
1213 * page/FrameView.cpp:
1214 (WebCore::FrameView::layout):
1215 moved the call to didFirstLayout to above the check for needsLayout
1216 because we need to call didFirstLayout for every webview, not just
1217 ones we think need layout.
1219 2006-07-26 Justin Garcia <justin.garcia@apple.com>
1223 <rdar://problem/4652788>
1224 REGRESSION: Can't change size or style of any text in message body
1227 (WebCore::Node::isContentRichlyEditable): Mimic Node::isContentEditable.
1228 * html/HTMLElement.cpp:
1229 (WebCore::HTMLElement::isContentRichlyEditable): First check
1230 the frame for editability, then userModify, like what
1231 HTMLElement::isContentEditable() does.
1232 * html/HTMLElement.h:
1234 2006-07-26 Mitz Pettel <opendarwin.org@mitzpettel.com>
1238 - fix debug-only information() string for table cells
1240 * rendering/RenderObject.cpp:
1241 (WebCore::RenderObject::information):
1243 2006-07-25 David Harrison <harrison@apple.com>
1245 Reviewed by timo and Darin.
1247 <rdar://problem/4618584> "Paste and Match Style" is not working in Mail (add SPI)
1249 * WebCore.xcodeproj/project.pbxproj:
1250 * bridge/mac/WebCoreFrameBridge.h:
1251 * bridge/mac/WebCoreFrameBridge.mm:
1252 (-[WebCoreFrameBridge replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]):
1253 Add matchStyle parameter for use by WebKit.
1255 2006-07-25 Justin Garcia <justin.garcia@apple.com>
1259 <rdar://problem/4649560>
1260 REGRESSION: Can't Select All when the body is contentEditable="true"
1262 * editing/VisiblePosition.cpp:
1263 (WebCore::VisiblePosition::canonicalPosition): Allow descent from a non-editable html
1264 element into an editable body as a convenience.
1266 2006-07-25 Justin Garcia <justin.garcia@apple.com>
1270 <rdar://problem/4468458> Incoming HTML message is editable <body contenteditable="true">
1273 (WebCore::Document::inDesignMode): Removed some spaces.
1275 (WebCore::Frame::applyEditingStyleToElement): Just add CSS properties needed for editing.
1276 (WebCore::Frame::removeEditingStyleFromElement): Made this a no-op, we'll remove
1279 2006-07-25 David Kilzer <ddkilzer@kilzer.net>
1283 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9717
1284 Replace IDL ConvertUndefinedToTrue parameter attribute with Optional attribute
1286 No test added because there is no change in functionality.
1288 * bindings/js/kjs_binding.cpp: Removed valueToBooleanTreatUndefinedAsTrue() method.
1289 * bindings/js/kjs_binding.h: Ditto.
1290 * bindings/scripts/CodeGeneratorJS.pm: Removed support for ConvertUndefinedToTrue parameter attribute.
1291 * dom/Element.h: Set default value to true for scrollIntoView() and scrollIntoViewIfNeeded() arguments.
1292 * dom/Element.idl: Replaced ConvertUndefinedToTrue attribute with Optional attribute.
1293 Fixed name of scrollIntoViewIfNeeded() argument to match implementation.
1294 * page/DOMWindow.idl: Replaced ConvertUndefinedToTrue attribute with Optional attribute.
1296 2006-07-24 Dan Waylonis <waylonis@google.com>
1298 Reviewed and tweaked a bunch by Darin.
1300 Test: plugins/bindings-test.html
1302 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9902
1303 jsNull and NSNull not properly converted between JS and ObjC
1305 * bindings/objc/WebScriptObject.mm:
1306 (+[WebScriptObject _convertValueToObjcValue:originExecutionContext:executionContext:]):
1307 Added case that converts jsNull to NSNull.
1309 2006-07-24 Darin Adler <darin@apple.com>
1311 Reviewed by Adele and Justin.
1313 - fix <rdar://problem/4613616> REGRESSION: some spaces typed in <textarea> are posted as non-breaking spaces (9630)
1314 http://bugzilla.opendarwin.org/show_bug.cgi?id=9630
1315 - also fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=9939
1316 REGRESSION: Pasting text into native text area with newline at end does not preserve newline
1317 - removed some uses of DeprecatedPtrList in the markup code
1319 Test: fast/forms/textarea-type-spaces.html
1320 Test: fast/forms/textarea-paste-newline.html
1322 * bindings/objc/DOMHTML.mm: (-[DOMHTMLDocument createDocumentFragmentWithText:]):
1323 Updated call to pass a range -- in this case it is the range of the entire document,
1324 so this will not handle the whitespace properly.
1326 * bridge/mac/WebCoreFrameBridge.h: Added range context parameter to the
1327 documentFragmentWithText: method, so we can handle whitespace properly.
1328 * bridge/mac/WebCoreFrameBridge.mm:
1329 (-[WebCoreFrameBridge nodesFromList:]): Changed from DeprecatedPtrList to Vector.
1330 (-[WebCoreFrameBridge markupStringFromNode:nodes:]): Ditto.
1331 (-[WebCoreFrameBridge markupStringFromRange:nodes:]): Ditto.
1332 (-[WebCoreFrameBridge documentFragmentWithText:inContext:]): Added range context
1333 parameter -- pass it on to createFragmentFromText.
1334 (-[WebCoreFrameBridge documentFragmentWithNodesAsParagraphs:]): Changed from
1335 DeprecatedPtrList to Vector.
1336 (-[WebCoreFrameBridge replaceSelectionWithText:selectReplacement:smartReplace:]):
1337 Pass the range of the current selection as context when creating the fragment.
1339 * dom/Position.cpp: (WebCore::Position::inRenderedText): Replace range check with
1340 a call to the new containsCaretOffset function -- helps make the caret work right when
1341 it is past the end of the last line in a textarea.
1343 * editing/CompositeEditCommand.cpp:
1344 (WebCore::CompositeEditCommand::rebalanceWhitespaceAt): Don't do anything if the
1345 style does not call for collapsing whitespace.
1346 (WebCore::CompositeEditCommand::rebalanceWhitespace): Call replaceWhitespaceAt
1347 to share code, including the new logic mentioned above.
1349 * editing/InsertLineBreakCommand.cpp: (WebCore::InsertLineBreakCommand::doApply):
1350 Use a text node instead of a break element when inserting and the style is preserveNewline.
1352 * editing/JSEditor.cpp: (WebCore::execRemoveFormat): Pass the selection range
1353 to createFragmentFromText.
1355 * editing/RebalanceWhitespaceCommand.cpp: (WebCore::RebalanceWhitespaceCommand::doApply):
1356 Assert that we're in a style that collapses whitespace. It's the caller's responsibility
1357 not to call otherwise.
1359 * editing/ReplaceSelectionCommand.h: Removed unused destructor, type, isSingleTextNode,
1360 isTreeFragment, m_type, and added a context parameter to inertFragmentForTestRendering.
1361 Also changed the constructor to take a selection rather than a pointer to the root
1362 editable element, replaced removeEndBRIfNeeded with shouldRemoveEndBR and removed an
1363 unused parameter from shouldMergeEnd.
1364 * editing/ReplaceSelectionCommand.cpp:
1365 (WebCore::ReplacementFragment::ReplacementFragment): Removed code to set up m_type.
1366 Compute root editable element from passed-in selection. Used the start of the selection
1367 as a base node for style purposes for the test rendering. Removed the special case
1368 "single text node" alternative to createFragmentFromText in the plain text case, since
1369 createFragmentFromText now handles that correctly.
1370 (WebCore::ReplacementFragment::insertFragmentForTestRendering): Copy the whitespace
1371 property from the source location when creating a temporary element for test rendering.
1372 (WebCore::ReplacementFragment::shouldMergeEnd): Removed unneeded boolean
1373 parameter fragmentHadInterchangeNewlineAtEnd, which is always false.
1374 (WebCore::ReplaceSelectionCommand::doApply): Update for ReplacementFragment changes,
1375 change code to not remove end BR when it can be re-used instead, don't call the
1376 paragraph separator insertion when the position is at the start of a paragraph already,
1377 removed redundant computation of identical "next" value, removed unneeded boolean
1378 parameter to shouldMergeEnd, add case for merging when all we need to do is to delete
1379 a newline character, removed unneeded code to set insertionPos after all code that uses
1380 it, and use spaces instead of non-breaking spaces when doing smart paste if the
1381 context is one where we do not collapse white space.
1382 (WebCore::ReplaceSelectionCommand::shouldRemoveEndBR): Renamed and changed to return
1383 a boolean instead of doing the removal.
1385 * editing/markup.h: Use Vector instead of DeprecatedPtrList. Change the
1386 createFragmentFromText function to take a range for context instead of a document.
1387 * editing/markup.cpp:
1388 (WebCore::markup): Use Vector instead of DeprecatedPtrList.
1389 (WebCore::createMarkup): Ditto.
1390 (WebCore::createParagraphContentsFromString): Remove unneeded document parameter
1391 and changed a couple places to use isEmpty instead of comparing with "".
1392 (WebCore::createFragmentFromText): Given the new context parameter, if the context
1393 is one that preserves newlines, then use "\n" instead of <br> elements.
1394 (WebCore::createFragmentFromNodes): Use Vector instead of DeprecatedPtrList.
1396 * html/HTMLElement.cpp: (WebCore::HTMLElement::setInnerText): Do not use <br>
1397 elements if the context of this node is one where we preserve newlines.
1399 * rendering/InlineTextBox.h:
1400 * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::containsCaretOffset):
1401 Added. Implements the appropriate rule for determining if a caret position is
1402 in this line or not. Returns true for both one line and the next in cases where
1403 affinity must be considered to determine which line the caret is on.
1405 * rendering/RenderText.h: Make atLineWrap no longer be a member function.
1406 * rendering/RenderText.cpp:
1407 (WebCore::atLineWrap): Remove special rule about preserveNewline and isLineBreak,
1408 which will no longer apply due to the new containsCaretOffset function logic.
1409 (WebCore::RenderText::caretRect): Use containsCaretOffset.
1410 (WebCore::RenderText::inlineBox): Ditto.
1412 * rendering/RenderTextControl.cpp:
1413 (WebCore::RenderTextControl::updateFromElement): Make a placeholder <br> element
1414 after calling setInnerText so that the last newline in the string has the effect
1415 we expect outside the HTML world (an additional line).
1416 (WebCore::RenderTextControl::setSelectionRange): Set granularity of the selection
1417 too. The layout tests caught this problem, which needs a better solution long term.
1418 (WebCore::RenderTextControl::text): Call textContent with the parameter false
1419 so it will not include newlines for <br> elements. Now the only <br> element
1420 that will ever be in the shadow DOM tree is the one to prevent collapsing, and
1421 that one should not show up in the text value.
1423 * rendering/bidi.cpp: (WebCore::RenderBlock::findNextLineBreak): Took a rule
1424 that specifically called out the pre whitespace mode and made it work for all
1425 the modes that preserve newlines. This makes sure we get a last line box for
1426 text after the last "\n" even in cases where there is no <br> afterward.
1428 * editing/DeleteSelectionCommand.cpp:
1429 (WebCore::DeleteSelectionCommand::fixupWhitespace):
1430 * editing/InsertParagraphSeparatorCommand.cpp:
1431 (WebCore::InsertParagraphSeparatorCommand::doApply):
1432 Added assertions to make sure we don't do anything when we're not collapsing
1435 * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::setDefaultValue):
1436 Changed to use Vector instead of DeprecatedPtrList.
1438 * editing/HTMLInterchange.cpp: Removed obsolete comment.
1440 * loader/Cache.h: Removed a stray include.
1442 2006-07-24 Adele Peterson <adele@apple.com>
1446 - Fix for <rdar://problem/4632132> Changing style of content with mixed editability fails
1448 Test: * editing/style/apple-style-editable-mix.html
1450 * dom/Node.cpp: (WebCore::Node::isContentRichlyEditable): Doesn't need to check the editable root. It now just
1451 checks the user modify property of its own renderer, since that is inherited.
1452 * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyInlineStyle): If the end position is in a table,
1453 Adjust the end node to the last descendant of the table, so we don't skip over any runs.
1455 2006-07-24 Darin Adler <darin@apple.com>
1459 - implement String::createCFString
1461 * WebCore.xcodeproj/project.pbxproj: Added StringImplMac.mm and StringMac.mm.
1463 * bindings/objc/DOMInternal.mm: Moved NSString conversion functions out of here.
1465 * platform/mac/StringImplMac.mm: Added. Moved NSString conversion members here
1466 and added the CFStringRef ones.
1467 * platform/mac/StringMac.mm: Added. Ditto.
1469 2006-07-24 David Hyatt <hyatt@apple.com>
1473 (1) Make sure to mark positioned objects that depend on line position to
1474 mark themselves as needing layout when their line box placeholder gets
1477 * rendering/RenderBox.cpp:
1478 (WebCore::RenderBox::position):
1480 (2) Improve highlighting to factor the inflation into overflow so that
1481 invalidation and repainting will work properly.
1483 * rendering/RootInlineBox.cpp:
1484 (WebCore::RootInlineBox::addHighlightOverflow):
1485 * rendering/RootInlineBox.h:
1486 * rendering/bidi.cpp:
1487 (WebCore::RenderBlock::layoutInlineChildren):
1489 2006-07-24 Anders Carlsson <acarlsson@apple.com>
1493 <rdar://problem/4641824> REGRESSION: Wikipedia widget fails to complete a search after pressing return key
1495 * html/HTMLInputElement.cpp:
1496 (WebCore::HTMLInputElement::defaultEventHandler):
1497 Don't eat enter events for search fields that have no enclosing form; they need to be passed to AppKit so
1498 that onsearch can be invoked.
1500 * manual-tests/onsearch-enter.html: Added.
1502 2006-07-24 Dave MacLachlan <dmaclach@mac.com>
1504 Reviewed by Darin and Alexey.
1506 Fix for: <http://bugzilla.opendarwin.org/show_bug.cgi?id=8425>
1507 and <http://bugzilla.opendarwin.org/show_bug.cgi?id=6947>
1509 Test: svg/custom/non-opaque-filters.svg
1511 * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
1512 (WebCore::KCanvasFilterQuartz::prepareFilter):
1513 We create an autorelease pool so we can control the deallocation of the
1514 CIContext that we're creating. The CIContext retains the CGContext that
1515 you pass it internally so when the CIContext is released, the
1516 CGContext is released as well.
1517 This is all fine and dandy unless you wrap the creation of the CIFilter
1518 with a pair of CGBegin/EndTransparencyLayer calls which swap the context
1519 out from underneath you. So if you start with context A,
1520 CGBeginTransparencyLayer swaps it out and gives you B. You create a CIFilter
1521 with it and add a reference to B. CGEndTransparencyLayer swaps out B and
1522 gives you back A. Autorelease pool comes and cleans up the Filter, and calls
1523 release on A, but A never got the refcount in the first place. B did. BOOM!
1524 So we create a pool, then do a retain, then release the pool so that we
1525 don't have to worry about the pool releasing it at a later time.
1526 See <rdar://problem/4647735> for reduction of CGEndTransparencyLayer case
1528 2006-07-24 Mitz Pettel <opendarwin.org@mitzpettel.com>
1532 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9669
1533 Incomplete repaint when changing an inline's border
1535 Test: fast/repaint/line-overflow.html
1537 * rendering/RenderBlock.h:
1538 * rendering/bidi.cpp:
1539 (WebCore::RenderBlock::layoutInlineChildren): Added repaintTop and repaintBottom
1540 variables to track the vertical edges of the area that changed, accounting for
1541 lines that were deleted, inserted or moved. Removed unnecessary updating of
1543 (WebCore::RenderBlock::determineStartPosition): Removed unnecessary updating of
1545 (WebCore::RenderBlock::determineEndPosition):
1546 (WebCore::RenderBlock::matchedEndLine): Added repaintTop and repaintBottom
1547 arguments, which this method updates to account for deleted lines.
1548 (WebCore::RenderBlock::checkLinesForOverflow): Removed outdated FIXME.
1550 2006-07-24 Mitz Pettel <opendarwin.org@mitzpettel.com>
1554 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10075
1555 REGRESSION: Reversed pop-up text in visually-ordered Hebrew pages
1557 Test: fast/forms/select-visual-hebrew.html
1559 * css/html4.css: Set "-webkit-rtl-ordering: logical" on select elements.
1561 2006-07-24 Alexey Proskuryakov <ap@nypop.com>
1565 Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10009
1566 REGRESSION: Schubert-IT PDF Plug-in not working for full page (works in frames)
1569 (WebCore::Frame::begin): Give PDF plugins a chance to handle frame content, before ImageDocument
1572 2006-07-24 Mitz Pettel <opendarwin.org@mitzpettel.com>
1576 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10083
1577 REGRESSION (r15584): editing/selection/select-from-textfield-outwards failing
1579 * rendering/RenderBlock.cpp:
1580 (WebCore::RenderBlock::positionForCoordinates): Added back change from the fix
1581 for bug 9312: For coordinates outside a replaced object, return the position
1582 just before (after) the element if the coordinates are above or to the left (below
1585 2006-07-23 Mark Rowe <opendarwin.org@bdash.net.nz>
1589 Bug 9686: [Drosera] Need the ability to break into Drosera on Javascript exceptions
1590 http://bugzilla.opendarwin.org/show_bug.cgi?id=9686
1592 WebCore portion of the fix.
1594 * bridge/mac/WebCoreScriptDebugger.h:
1595 (-[WebScriptDebugger exceptionRaised:sourceId:line::]): Add delegate method.
1596 * bridge/mac/WebCoreScriptDebugger.mm:
1597 (WebCoreScriptDebuggerImp::exception): Call delegate method when an exception is raised.
1599 2006-07-23 Alice Liu <alice.liu@apple.com>
1602 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).
1604 * editing/visible_units.cpp:
1605 (WebCore::previousLinePosition):
1606 When setting selection endpoints, don't traverse down into nodes where editing would ignore its contents. Use the parent node instead.
1607 (WebCore::nextLinePosition):
1610 2006-07-23 David Harrison <harrison@apple.com>
1614 <rdar://problem/4646759> Mail crash editing To Do - WebCore::InsertTextCommand::prepareForTextInsertion
1616 * Test: editing/deleting/delete-mixed-editable-content-001.html
1618 * editing/visible_units.cpp:
1619 (WebCore::startOfParagraph):
1620 Respect editable boundary the same way endOfParagraph does.
1622 2006-07-23 Beth Dakin <bdakin@apple.com>
1624 Reviewed by Maciej. (Patch by me, Maciej, and Harrison.)
1626 Fix for <rdar://problem/4529398> WebCore crashes when pasting rich
1627 text - WebCore::InlineBox::root()
1629 The initial rendering crash was due to a render object having a
1630 stale reference to an inline box that had already been deleted and
1631 then recreated in the exact same location in memory. (Crazy, I
1632 know.) The situation seemed pretty specific to list markers
1633 according to Hyatt according to Maciej, so that is what I patched
1634 specifically. Fixing this crash unearthed a separate editing crash
1635 where we were trying to insert a block into itself. I worked on
1636 that with Maciej and Harrison, and Harrison came up with a fix.
1638 * editing/CompositeEditCommand.cpp:
1639 (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): This is the fix for the editing crash. If paragraphStart is an atomic
1640 node, insert the new block into the parent instead.
1641 * rendering/InlineBox.cpp:
1642 (WebCore::InlineBox::isChildOfParent): This function is for
1643 posterity. It will help keep the linebox tree in check.
1644 * rendering/InlineBox.h:
1645 * rendering/InlineFlowBox.cpp:
1646 (WebCore::InlineFlowBox::addToLine): Added assert.
1647 (WebCore::InlineFlowBox::deleteLine): Added assert.
1648 * rendering/ListMarkerBox.cpp:
1649 (WebCore::ListMarkerBox::destroy): If this has a parent, call
1650 removeChild on this.
1651 (WebCore::ListMarkerBox::operator delete):
1652 * rendering/ListMarkerBox.h:
1654 2006-07-23 Alice Liu <alice.liu@apple.com>
1658 fixed <rdar://problem/4617841> REGRESSION (NativeTextField): You can move keyboard focus to a field without getting insertion point
1660 * rendering/RenderBlock.cpp:
1661 (WebCore::RenderBlock::positionForCoordinates):
1662 removed some unnecessary vertical position checks and added a fudge factor to be more forgiving for clicks near lines.
1663 * rendering/RenderTextControl.cpp:
1664 (WebCore::RenderTextControl::nodeAtPoint):
1665 added implementation
1666 * rendering/RenderTextControl.h:
1667 added function protocol
1669 2006-07-23 Adele Peterson <adele@apple.com>
1673 Updating fix from last checkin.
1675 * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutVerticalBox):
1676 Only tell the view about this flexbox if there isn't another flexbox already cached.
1678 2006-07-23 Adele Peterson <adele@apple.com>
1682 - Fix for <rdar://problem/4644614> REGRESSION: Typing, pasting or dragging in new text areas causes unnecessary scrolling
1684 * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): Don't updateScrollInfoAfterLayout if an ancestor flexible box is just on
1686 * rendering/RenderFlexibleBox.cpp:
1687 (WebCore::RenderFlexibleBox::layoutBlock): ditto.
1688 (WebCore::RenderFlexibleBox::layoutVerticalBox): Let the view know if this flex box is doing its first pass at layout.
1690 * rendering/RenderView.cpp: (WebCore::RenderView::RenderView): Caches a flexible box that's doing its first layout.
1691 * rendering/RenderView.h:
1692 (WebCore::RenderView::setFlexBoxInFirstLayout):
1693 (WebCore::RenderView::flexBoxInFirstLayout):
1695 2006-07-22 Alexey Proskuryakov <ap@nypop.com>
1699 Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10038
1700 REGRESSION: Length of navigator.mimeTypes collection returns number of installed plugins, not number
1701 of registered mime types
1703 * bindings/js/kjs_navigator.cpp:
1704 (KJS::MimeTypes::getValueProperty): Return the length of the mime types vector, not the plugins one.
1705 (KJS::MimeTypes::getOwnPropertySlot): Fixed another typo, which prevented MimeTypes::getValueProperty()
1706 from even being called.
1708 2006-07-21 Maciej Stachowiak <mjs@apple.com>
1710 Reviewed by Adele and Tim Omernick.
1712 <rdar://problem/4641004> 9A224: Safari crashes in WebCore::RenderMenuList::showPopup when changing a input select field to input text field
1714 Couldn't figure out how to make layout test, here's a manual test:
1715 * manual-tests/remove-select-onchange.html: Added.
1717 * rendering/RenderMenuList.cpp:
1718 (WebCore::RenderMenuList::showPopup): Don't add the RenderPopupMenu to the render
1719 tree so it doesn't get destroyed if we do.
1721 The remaining changes are to let the RenderPopupMenu know its menu list w/o having
1722 to be in the render tree:
1724 * rendering/RenderPopupMenu.cpp:
1725 (WebCore::RenderPopupMenu::RenderPopupMenu):
1726 * rendering/RenderPopupMenu.h:
1727 (WebCore::RenderPopupMenu::menuList):
1728 * rendering/RenderPopupMenuMac.h:
1729 * rendering/RenderPopupMenuMac.mm:
1730 (WebCore::RenderPopupMenuMac::RenderPopupMenuMac):
1731 * rendering/RenderPopupMenuWin.h:
1732 (WebCore::RenderPopupMenuWin::RenderPopupMenuWin):
1733 * rendering/RenderTheme.h:
1734 * rendering/RenderThemeMac.h:
1735 * rendering/RenderThemeMac.mm:
1736 (WebCore::RenderThemeMac::createPopupMenu):
1737 * rendering/RenderThemeWin.cpp:
1738 (WebCore::RenderThemeWin::createPopupMenu):
1739 * rendering/RenderThemeWin.h:
1741 2006-07-21 Adele Peterson <adele@apple.com>
1745 Fix for: <rdar://problem/4643238> REGRESSION: Can't set insertion point at the end of a line of text
1747 Test: fast/forms/textarea-scrolled-endline-caret.html
1749 * rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionForCoordinates):
1750 When looking for the closest line box, take the scroll offset into account.
1752 2006-07-21 Tim Omernick <timo@apple.com>
1754 Reviewed by Geoff & Maciej.
1756 <rdar://problem/4632505> REGRESSION: Crash at WebCore::Widget::getView() const + 6
1758 Geoff is working on a layout test for this.
1760 * bridge/mac/FrameMac.mm:
1761 (WebCore::FrameMac::focusWindow):
1762 (WebCore::FrameMac::unfocusWindow):
1763 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
1764 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
1767 2006-07-21 Maciej Stachowiak <mjs@apple.com>
1771 <rdar://problem/4523976> REGRESSION (NativeTextField): Crash occurs when choosing "Undo Typing" after typing and setting the value
1773 * rendering/RenderTextControl.cpp:
1774 (WebCore::RenderTextControl::updateFromElement): Clear the undo
1775 chain when the text control contents have been set
1777 * bridge/mac/FrameMac.mm:
1778 (WebCore::FrameMac::clearUndoRedoOperations): Before clearing undo
1779 stack, close all open undo groups and then open an equal number,
1780 since otherwise NSUndoManager ends up in an inconsistent state
1781 leading to uncaught ObjC exceptions.
1783 2006-07-21 Beth Dakin <bdakin@apple.com>
1787 Just moving this assertion down a couple of lines. It was hitting
1788 every time you try to print a page because we put it too early in
1791 * bridge/mac/WebCoreFrameBridge.mm:
1792 (-[WebCoreFrameBridge drawRect:]):
1794 2006-07-21 Justin Garcia <justin.garcia@apple.com>
1798 <rdar://problem/4548238>
1799 REGRESSION: Can't remove the first OL/UL list item in a Mail's compose window
1801 * editing/CompositeEditCommand.cpp:
1802 (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
1803 Moved from InsertParagraphSeparator. Does its own typing style restoration.
1804 * editing/CompositeEditCommand.h:
1805 * editing/InsertParagraphSeparatorCommand.cpp:
1806 (WebCore::InsertParagraphSeparatorCommand::doApply): Call breakOutOfEmptyListItem.
1807 * editing/TypingCommand.cpp:
1808 (WebCore::TypingCommand::deleteKeyPressed): Call breakOutOfEmptyListItem if
1809 the endingSelection is at the start of an editable region.
1810 * editing/htmlediting.cpp:
1811 (WebCore::embeddedSublist): Moved from InsertParagraphSeparator.
1812 (WebCore::appendedSublist): Ditto.
1813 (WebCore::enclosingEmptyListItem): Ditto.
1814 * editing/htmlediting.h:
1816 === Safari-521.20 ===
1818 2006-07-21 Tim Omernick <timo@apple.com>
1820 Reviewed by Beth Dakin & John Sullivan.
1822 <rdar://problem/4633717> 9A218: Reproducible crash in -[NSScroller mouseDown:]
1824 Beth is in the middle of making a layout test for this; she will land it soon.
1826 * platform/mac/ScrollBarMac.mm:
1827 (ScrollBar::~ScrollBar):
1828 Call Widget::removeFromSuperview() rather than -removeFromSuperview directly on the scroll bar view.
1829 Widget::removeFromSuperview() obeys the "mustStayInWindow" flag, which is set while tracking the mouse
1830 in view-based widgets to prevent their destruction while the tracking is in progress.
1831 I searched around WebCore and this is the only Widget subclass that directly removes its view rather
1832 than using removeFromSuperview().
1834 2006-07-21 Mitz Pettel <opendarwin.org@mitzpettel.com>
1838 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9312
1839 REGRESSION: Selection bug in new text fields when selecting past the first letter
1841 Test: editing/selection/select-from-textfield-outwards.html
1843 * editing/Selection.cpp:
1844 (WebCore::Selection::adjustForEditableContent): Added code to handle the case
1845 where the selection starts (resp. ends) in the last (resp. first) visual position
1846 inside an editable root.
1847 * editing/htmlediting.cpp:
1848 (WebCore::comparePositions): Fixed the case of comparing a position inside a shadow
1849 tree with a position in the shadow ancestor.
1850 * rendering/RenderBlock.cpp:
1851 (WebCore::RenderBlock::positionForCoordinates): For coordinates outside a replaced
1852 object, return the position just before (after) the element if the coordinates are above or
1853 to the left (below or to the right).
1854 * rendering/RenderObject.cpp:
1855 (WebCore::RenderObject::caretMaxOffset): Changed to return 1 for replaced objects.
1856 * rendering/RenderText.cpp:
1857 (WebCore::RenderText::positionForCoordinates): Changed to return the last position
1858 in the lowest text box if the y coordinate is below all text boxes.
1860 2006-07-21 Geoffrey Garen <ggaren@apple.com>
1864 - Fixed <rdar://problem/4507265> REGRESSION: overlays don't work on
1865 HousingMaps.com (Google Maps-based site)
1867 - Made style.filter undetectable, like document.all.
1869 Unfortunately, the SVG spec-makers invented a CSS attribute named 'filter',
1870 which conflicts with IE's custom CSS attribute by the same name. Web programs
1871 like the Google maps API test for style.filter, and assume it's the IE
1872 style.filter if they find it, so we need to make style.filter undetectable
1873 to avoid breaking them.
1875 An alternative solution would be to hotwire a delorean, go back in time,
1876 and beg the web standards makers to make standards that work on the web.
1878 * bindings/js/kjs_css.cpp:
1879 (KJS::DOMCSSStyleDeclaration::cssPropertyGetter):
1881 2006-07-20 Justin Garcia <justin.garcia@apple.com>
1885 <rdar://problem/4641033>
1886 REGRESSION: Pasting from web pages into Mail (or Blot) often loses most of the content
1888 * editing/markup.cpp:
1889 (WebCore::createMarkup): We surround the currently accumulated markup with markup
1890 for ancestors of the startNode when the pre-order traversal leaves the trees rooted
1891 at those ancestors. We assumed that any ancestors of the current node not in the
1892 ancestorsToClose list were those kind of ancestors. But we don't add renderer-less
1893 containers to the ancestorsToClose list. So, we were incorrectly surrounding the
1894 currently accumulated markup with markup for render-less containers. Most of the
1895 content at apple.com was being put inside an <optgroup> inside a <select> element.
1896 Then on Paste createContextualFragment would drop it.
1898 2006-07-21 Anders Carlsson <acarlsson@apple.com>
1903 (WebCore::Document::):
1904 * dom/EventTargetNode.cpp:
1905 (WebCore::EventTargetNode::addEventListener):
1906 * page/FrameView.cpp:
1907 (WebCore::FrameView::layout):
1908 * rendering/RenderLayer.cpp:
1909 (WebCore::RenderLayer::updateScrollInfoAfterLayout):
1910 Only dispatch overflowchanged events if overflowchanged event listeners have been registered on the document.
1912 2006-07-20 Anders Carlsson <acarlsson@apple.com>
1916 <rdar://problem/4637807> REGRESSION: "Features & Options" page at volvocars.us fails
1918 * xml/XSLTProcessor.cpp:
1919 (WebCore::xsltParamArrayFromParameterMap):
1920 Turns out parameters never worked. String parameters need to be escaped so we create a transform context,
1921 add the parameters to it quoted and then use xsltApplyStylesheetUser which lets us pass the transform context to it.
1922 This also works around a bug in libxslt where a hash table isn't allocated.
1924 2006-07-20 Alice Liu <alice.liu@apple.com>
1926 Reviewed by Tim Omernick.
1928 Fixed <rdar://problem/4621649> repro crash: Upload link causes crash on pages.google.com in Frame::nodeForWidget
1929 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.
1931 * manual-tests/remove-input-file-onchange.html: Added.
1932 * platform/mac/FileButtonMac.mm:
1933 (-[WebFileChooserButton chooseFilename:]):
1934 swapped the calls to changeFilename and bridgeForWidget because changeFilename will destroy the widget that is accessed in bridgeForWidget
1936 2006-07-20 Alice Liu <alice.liu@apple.com>
1940 Fixed <rdar://problem/4532113> REGRESSION (NativeTextField): Crash occurs after modifying field then reloading page -[FormDelegate frameLayoutHasChanged:]
1941 added a manual test because of the need to use AutoFill.
1944 (WebCore::Node::aboutToUnload):
1945 added virtual function prototype
1946 * html/HTMLInputElement.cpp:
1947 (WebCore::HTMLInputElement::aboutToUnload):
1948 added implementation that sends textFieldDidEndEditing notification
1949 * html/HTMLInputElement.h:
1950 added virtual function prototype
1951 * manual-tests/input-type-file-autocomplete-frame-1.html: Added.
1952 * manual-tests/input-type-file-autocomplete-frame-2.html: Added.
1953 * manual-tests/input-type-file-autocomplete-refresh.html: Added.
1955 (WebCore::Frame::stopLoading):
1956 before unloading, call aboutToUnload on the current focused node
1958 2006-07-20 Brady Eidson <beidson@apple.com>
1962 fixed <rdar://problem/4611303> REGRESSION: repro crash in WebCore::EventTargetNode::dispatchWindowEvent at aeropostale.com
1963 There was an attempt to deref an EventListener that got cleaned up in GC. Changing Document's EventListener list from
1964 vanilla ptrs to refptrs to prevent GC, following EventTargetNode's proven example.
1967 (WebCore::Document::Document):
1968 (WebCore::Document::clear):
1969 (WebCore::Document::handleWindowEvent):
1970 (WebCore::Document::getHTMLWindowEventListener):
1971 (WebCore::Document::removeHTMLWindowEventListener):
1972 (WebCore::Document::removeWindowEventListener):
1973 (WebCore::Document::hasWindowEventListener):
1974 Changed all of the list iterators to work with RefPtrs instead of vanilla ptrs
1977 Changed the EventListener list to be a vanilla pointer list to a refptr list
1979 2006-07-20 John Sullivan <sullivan@apple.com>
1983 - WebCore part of fix for:
1984 <rdar://problem/4557386> REGRESSION (419.3-521.19): repro Safari world leak involving
1985 closing tabs after clicking in a web page
1987 * bridge/mac/WebCoreFrameBridge.h:
1988 (-[WebCoreFrameBridge textViewWasFirstResponderAtMouseDownTime:])
1989 renamed to be more specific (formerly wasFirstResponderAtMouseDownTime:)
1990 * bridge/mac/FrameMac.mm:
1991 (WebCore::FrameMac::passMouseDownEventToWidget):
1992 updated for name change
1994 2006-07-19 Alexey Proskuryakov <ap@nypop.com>
1998 Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8272
1999 Use of window.open & window.close can cause crash
2001 * platform/PlatformMouseEvent.h:
2002 (WebCore::PlatformMouseEvent::PlatformMouseEvent):
2003 * platform/mac/PlatformMouseEventMac.mm:
2004 (WebCore::PlatformMouseEvent::PlatformMouseEvent):
2005 The default constructor now creates a "zero" event, and a new one was added to create the "current" one.
2007 * bridge/mac/FrameMac.mm:
2008 (WebCore::FrameMac::handleMouseMoveEvent):
2009 * rendering/RenderFormElement.cpp:
2010 (WebCore::RenderFormElement::clicked):
2011 Updated for the above changes.
2013 * platform/gdk/MouseEventGdk.cpp:
2014 * platform/gdk/TemporaryLinkStubs.cpp:
2015 (PlatformMouseEvent::PlatformMouseEvent):
2016 * platform/win/MouseEventWin.cpp:
2017 * platform/win/TemporaryLinkStubs.cpp:
2018 (PlatformMouseEvent::PlatformMouseEvent):
2019 Trying not to break other platforms.
2021 * manual-tests/invalid-mouse-event.html: Added.
2023 2006-07-20 Maciej Stachowiak <mjs@apple.com>
2027 - delete line that I only commented in the last patch - meant to do this before landing
2029 * html/HTMLFrameElement.cpp:
2030 (WebCore::HTMLFrameElement::close):
2032 2006-07-19 Maciej Stachowiak <mjs@apple.com>
2036 - fixed <rdar://problem/4634484> REGRESSION: Project Change Request form should have vertical scroll bar, but doesn't
2038 I couldn't figure out how to make an automated test case for this,
2039 or even a manual one. It seems to be timing-related in some way.
2041 * html/HTMLFrameElement.cpp:
2042 (WebCore::HTMLFrameElement::close): detach the child frame from
2043 its element, not the frame containing this element.
2045 2006-07-20 Anders Carlsson <acarlsson@apple.com>
2049 * bridge/mac/FrameMac.mm:
2050 (WebCore::FrameMac::nextKeyViewInFrame):
2051 Hold a ref to the node in case it gets destroyed by an event handler.
2053 2006-07-19 Mark Rowe <opendarwin.org@bdash.net.nz>
2057 http://bugzilla.opendarwin.org/show_bug.cgi?id=10021
2058 Bug 10021: REGRESSION: Stack overflow due to infinite recursion in
2059 Image::checkForSolidColor
2061 * platform/Image.cpp:
2062 (WebCore::Image::cacheFrame): Don't call checkForSolidColor unless
2063 the frame was decoded successfully.
2065 2006-07-19 Adele Peterson <adele@apple.com>
2070 <rdar://problem/4422657> REGRESSION: member name field or password field should have focus after loading webmail.mac.com (7405)
2071 http://bugzilla.opendarwin.org/show_bug.cgi?id=7405
2073 <rdar://problem/4614181> REGRESSION: Crash in WebCore::RenderTextField::text() when quoting post at the Ars Technica forum (9707)
2074 http://bugzilla.opendarwin.org/show_bug.cgi?id=9707
2076 Needs an http test. (http://bugzilla.opendarwin.org/show_bug.cgi?id=10020)
2078 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.
2079 Now, we detect this case and let setFocusNode be called. And when the stylesheet finishes loading, and the element attaches, a timer will fire,
2080 which will cause the correct selection & scrolling behavior to occur.
2082 This fix removes selection and scrolling behavior from the focus method. This code is now in a new method, updateFocusAppearance.
2083 updateFocusAppearance can now be called directly from focus(), but it can also be called when a timer fires. This timer gets set
2084 up when an element attaches, and its already been focused by the focus method. We have to use a timer, because updateFocusAppearance can cause
2085 a layout to happen, and we don't want that to happen in the middle of attach().
2087 * bindings/objc/DOM.mm: (-[DOMElement isFocused]): Added SPI for autofill.
2088 * bindings/objc/DOMPrivate.h:
2091 (WebCore::Element::Element): Initializes timer and needFocusAppearanceUpdate bool.
2092 (WebCore::Element::attach): Checks needsFocusAppearanceUpdate, and if the node is focused, then starts the timer.
2093 (WebCore::Element::focus): Updated to check supportsFocus before calling setFocusNode,
2094 and only requiring the element to be focusable now before updating focus appearance.
2095 (WebCore::Element::updateFocusAppearance): Added. Separates the selection, and the scrolling from focusing the node.
2096 (WebCore::Element::updateFocusAppearanceTimerFired): Stops the timer, and if the element is focusable, calls updateFocusAppearance.
2097 (WebCore::Element::stopUpdateFocusAppearanceTimer): Cancels timer, and setsNeedsFocusAppearanceUpdate(false).
2098 (WebCore::Element::detach): Calls stopUpdateFocusAppearanceTimer.
2099 (WebCore::Element::blur): ditto.
2101 (WebCore::Element::needsFocusAppearanceUpdate): Added so the timer only fires when focus() methods have caused an element to be focused.
2102 (WebCore::Element::setNeedsFocusAppearanceUpdate): Added so focus methods can set this flag.
2104 * dom/Node.h: (WebCore::Node::supportsFocus): Added. Base class just calls isFocusable.
2105 * html/HTMLAnchorElement.h: Added supportsFocus.
2106 * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::supportsFocus): Added. Checks for the case where stylesheets haven't loaded yet,
2107 so we can still focus the node without a renderer, and when it gets a renderer, we'll update the focus appearance.
2108 * html/HTMLGenericFormElement.h: (WebCore::HTMLGenericFormElement::supportsFocus): ditto.
2109 * html/HTMLGenericFormElement.cpp: Removed include of Document.h since this is now in the header.
2111 * html/HTMLInputElement.cpp:
2112 (WebCore::HTMLInputElement::focus): Updated to check supportsFocus before calling setFocusNode,
2113 and only requiring the element to be focusable now before updating focus appearance.
2114 (WebCore::HTMLInputElement::updateFocusAppearance): Added. Separates the selection, and the scrolling from focusing the node.
2115 * html/HTMLInputElement.h:
2117 * html/HTMLTextAreaElement.cpp:
2118 (WebCore::HTMLTextAreaElement::focus): Updated to check supportsFocus before calling setFocusNode,
2119 and only requiring the element to be focusable now before updating focus appearance.
2120 (WebCore::HTMLTextAreaElement::updateFocusAppearance): Added. Separates the selection, and the scrolling from focusing the node.
2121 * html/HTMLTextAreaElement.h:
2123 2006-07-19 Justin Garcia <justin.garcia@apple.com>
2127 <rdar://problem/4631972>
2128 REGRESSION: Mail crashes when pasting entire contents of http://www.apple.com/support/ into a new mail message
2131 (WebCore::Position::upstream): Deployed isBlock and enclosingBlock.
2132 (WebCore::Position::downstream): Ditto.
2133 * editing/CompositeEditCommand.cpp:
2134 (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): Ditto.
2135 * editing/htmlediting.cpp:
2136 (WebCore::canHaveChildrenForEditing): Added !iframe.
2137 (WebCore::isBlock): Added, returns !node->renderer()->isInline()
2138 (WebCore::enclosingBlock): Added.
2139 * editing/htmlediting.h:
2141 2006-07-19 Anders Carlsson <acarlsson@apple.com>
2145 <rdar://problem/4631272> REGRESSION: Crash tabbing out of hostname field at autorestore.apple.com
2147 * bridge/mac/FrameMac.mm:
2148 (WebCore::FrameMac::nextKeyViewInFrame):
2149 Take into account that focus handlers can cause a node's renderer to be destroyed.
2151 2006-07-19 David Hyatt <hyatt@apple.com>
2153 Fix for 4638376. The 1x1 solid color image optimization was broken when
2154 I re-architected image. This patch restores the optimization for CG. Cairo
2155 will still need the optimization.
2159 WARNING: NO TEST CASES ADDED OR CHANGED (need test cases still)
2161 * platform/Image.cpp:
2162 (WebCore::Image::Image):
2163 (WebCore::Image::invalidateData):
2164 (WebCore::Image::cacheFrame):
2166 (WebCore::Image::setIsPDF):
2167 * platform/cairo/ImageCairo.cpp:
2168 (WebCore::Image::checkForSolidColor):
2169 * platform/mac/ImageMac.mm:
2170 (WebCore::Image::initNativeData):
2171 (WebCore::Image::invalidateNativeData):
2172 (WebCore::Image::checkForSolidColor):
2173 (WebCore::Image::draw):
2174 (WebCore::Image::drawTiled):
2176 2006-07-19 Justin Garcia <justin.garcia@apple.com>
2180 <rdar://problem/4613519>
2181 REGRESSION: Pasting text in native text area inserts text one character before it should (9527)
2183 * editing/InsertParagraphSeparatorCommand.cpp:
2184 (WebCore::InsertParagraphSeparatorCommand::doApply): Turn into an InsertLineBreakCommand instead of bailing
2185 if the enclosingBlockFlowElement doesn't have a parent.
2187 2006-07-19 David Harrison <harrison@apple.com>
2189 Reviewed by Tim Hatcher.
2191 <rdar://problem/4629307> -[DOMRange markupString] does not include the initial table element if it is at the beginning of the range
2192 <rdar://problem/4062218> pasting in contents of web.apple.com strips off the <table> element from the first table
2194 Better patch than previous checkin.
2196 * test: editing/pasteboard/paste-table-003.html
2198 * editing/markup.cpp:
2199 (WebCore::createMarkup):
2200 Make sure to include the table when including a tbody.
2202 === Safari-521.19 ===
2204 2006-07-19 David Harrison <harrison@apple.com>
2206 Reviewed by Tim Hatcher.
2208 <rdar://problem/4629307> -[DOMRange markupString] does not include the initial table element if it is at the beginning of the range
2210 No test case as this can only be reproduced through ObjC APIs.
2212 * editing/markup.cpp:
2213 (WebCore::createMarkup):
2214 Adjust the range for ancestor markup handling when main loop skips first node.
2216 2006-07-18 David Hyatt <hyatt@apple.com>
2218 Fix for radar 4611287, make resizable text fields opt-in rather than
2219 opt-out. Open source users will need to write the pref into their defaults
2220 to see the resizers on textareas now.
2222 Reviewed by mjs and adele
2224 * WebCore.xcodeproj/project.pbxproj:
2225 * bridge/mac/WebCoreSettings.mm:
2226 (-[WebCoreSettings setTextAreasAreResizable:]):
2227 * css/cssparser.cpp:
2228 (WebCore::CSSParser::parseValue):
2229 * css/cssstyleselector.cpp:
2230 (WebCore::CSSStyleSelector::applyProperty):
2233 2006-07-18 Anders Carlsson <acarlsson@apple.com>
2237 http://bugzilla.opendarwin.org/show_bug.cgi?id=9959
2238 REGRESSION: iframes stop rendering after 200th one on successive reloads
2240 * html/HTMLFrameElement.cpp:
2241 (WebCore::HTMLFrameElement::attach):
2242 (WebCore::HTMLFrameElement::close):
2243 * html/HTMLIFrameElement.cpp:
2244 (WebCore::HTMLIFrameElement::insertedIntoDocument):
2245 (WebCore::HTMLIFrameElement::willRemove):
2246 Remove calls to incrementFrameCount and decrementFrameCount.
2249 (WebCore::Frame::Frame):
2250 Call incrementFrameCount here.
2252 (WebCore::Frame::~Frame):
2253 Call disconnectOwnerElement.
2255 (WebCore::Frame::disconnectOwnerElement):
2256 Call decrementFrameCount here.
2258 2006-07-18 Alexey Proskuryakov <ap@nypop.com>
2262 Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9013
2263 Let correct CSS custom cursor declarations parse
2265 * css/cssparser.cpp:
2266 (WebCore::CSSParser::parseValue): Ignore any values following a custom CSS cursor URI, instead of
2267 requiring that it is the only one in the list (which is actually illegal, according to the spec).
2268 This is only a temporary hack, with a real implementation to follow in bug 6001/6002.
2270 * manual-tests/custom-cursors.html: Added a test for this issue.
2271 * manual-tests/resources/helpCursor.tiff: A cursor image used in the test.
2273 2006-07-18 Timothy Hatcher <timothy@apple.com>
2277 <rdar://problem/4636216> NetNewsWire fails to launch on 9A224 - missing symbols
2279 WebCore needs to add -sub_library libobjc to maintain
2280 backwards compatibility with binaries linked with WebKit
2281 before JavaScriptCore moved out of WebKit.
2283 * WebCore.xcodeproj/project.pbxproj:
2285 2006-07-18 Mitz Pettel <opendarwin.org@mitzpettel.com>
2289 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9978
2290 REGRESSION (r12949-r12988): Clicking the first letter on a line places the caret at the end of the previous line
2292 Test: editing/selection/click-start-of-line.html
2294 * rendering/RenderText.cpp:
2295 (WebCore::RenderText::positionForCoordinates): Changed to return downstream
2296 affinity if the x coordinate is to the left of the middle of the first character
2299 2006-07-18 Anders Carlsson <acarlsson@apple.com>
2303 http://bugzilla.opendarwin.org/show_bug.cgi?id=9695
2304 <rdar://problem/4614085>
2305 TOT REGRESSION: NativeTextArea: Text area does not respond to Cmd-UpArrow/Cmd-DownArrow (9695)
2307 * editing/SelectionController.cpp:
2308 (WebCore::SelectionController::modifyExtendingRightForward):
2309 (WebCore::SelectionController::modifyMovingRightForward):
2310 (WebCore::SelectionController::modifyExtendingLeftBackward):
2311 (WebCore::SelectionController::modifyMovingLeftBackward):
2312 If the caret is inside an editable region, the beginning/end of the document should actually be the
2313 beginning/end of the editable region.
2315 2006-07-17 Tim Omernick <timo@apple.com>
2319 <rdar://problem/4612079> need a way to prevent pages from scrolling to reveal elements that are focused
2322 * bridge/mac/WebCoreFrameBridge.h:
2323 * bridge/mac/WebCoreFrameBridge.mm:
2324 (-[WebCoreFrameBridge setProhibitsScrolling:]):
2326 (WebCore::Frame::prohibitsScrolling):
2327 (WebCore::Frame::setProhibitsScrolling):
2329 * page/FramePrivate.h:
2330 (WebCore::FramePrivate::FramePrivate):
2331 * page/FrameView.cpp:
2332 (WebCore::FrameView::scrollPointRecursively):
2333 (WebCore::FrameView::setContentsPos):
2335 * platform/ScrollView.h:
2337 2006-07-17 Maciej Stachowiak <mjs@apple.com>
2339 Reviewed by Dave Harrison.
2341 - fixed <rdar://problem/4618089> Blot crashes when I paste in all the contents of http://www.apple.com/startpage/
2343 * editing/htmlediting.cpp:
2344 (WebCore::editingIgnoresContent):
2346 2006-07-17 Justin Garcia <justin.garcia@apple.com>
2350 <rdar://problem/4621728>
2351 REGRESSION: Selecting by dragging down creates selection in wrong direction, with certain steps
2352 <rdar://problem/4604932>
2353 REGRESSION: Dragging too far left on a line will select all lines above it.
2355 No layout test because of 9980.
2357 * rendering/RenderBlock.cpp:
2358 (WebCore::RenderBlock::positionForCoordinates): Don't return positions inside editable roots
2359 for coordinates outside those roots, except for coordinates outside a document that is entirely
2362 2006-07-17 Timothy Hatcher <timothy@apple.com>
2366 <rdar://problem/4635281> JSCanvasRenderingContext2D::drawImage needs to initialize the exception code to zero
2368 * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2369 (WebCore::JSCanvasRenderingContext2D::drawImage): initialize ec to zero
2370 * html/CanvasRenderingContext2D.cpp:
2371 (WebCore::CanvasRenderingContext2D::drawImage): initialize ec before earlier return
2373 2006-07-17 Timothy Hatcher <timothy@apple.com>
2377 <rdar://problem/4634874> WebScriptObject and WebUndefined are no longer defined by WebKit
2379 Moves WebScriptObject and WebUndefined to WebCore.
2382 * WebCore.xcodeproj/project.pbxproj:
2383 * bindings/objc/DOM.mm:
2384 * bindings/objc/DOMCore.h:
2385 * bindings/objc/DOMInternal.mm:
2386 * bindings/objc/DOMUtility.mm:
2387 * bindings/objc/WebScriptObject.mm: Added.
2388 (+[WebUndefined allocWithZone:]):
2389 (-[WebUndefined initWithCoder:]):
2390 (-[WebUndefined encodeWithCoder:]):
2391 (-[WebUndefined copyWithZone:]):
2392 * bindings/objc/WebScriptObjectPrivate.h: Added.
2393 * bridge/mac/FrameMac.mm:
2394 * bridge/mac/WebCoreScriptDebugger.mm:
2396 2006-07-17 David Hyatt <hyatt@apple.com>
2398 Back out the fix for 5564, since it turns out font:x-small; is a pretty
2399 prominent IE-specific CSS hack. Because Web sites rely on IE's incorrect
2400 font parsing as a means of also correcting IE's incorrect font size rules.
2402 This fixes Yahoo.com.
2406 * css/cssparser.cpp:
2407 (WebCore::CSSParser::parseFont):
2409 2006-07-17 Justin Garcia <justin.garcia@apple.com>
2413 <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
2416 (WebCore::Document::updateSelection):
2418 2006-07-17 Maciej Stachowiak <mjs@apple.com>
2422 <rdar://problem/4604946> REGRESSION: 'checkboxRef.checked = true' fires onchange event in Leopard
2424 * html/HTMLInputElement.cpp:
2425 (WebCore::HTMLInputElement::setChecked):
2426 (WebCore::HTMLInputElement::preDispatchEventHandler):
2427 * html/HTMLInputElement.h:
2429 2006-07-16 David Kilzer <ddkilzer@kilzer.net>
2433 - fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9954
2434 REGRESSION: document.dir should return empty string in <head>
2436 Test: fast/dom/document-dir-property.html
2438 * bindings/js/kjs_html.cpp:
2439 (KJS::JSHTMLDocument::getValueProperty): Return an empty string instead of an
2440 undefined value for an unset document.dir property.
2442 2006-07-16 David Kilzer <ddkilzer@kilzer.net>
2446 * dom/NodeFilter.idl:
2447 Removed "No newline at end of file" that snuck in as part of the "apply patch" process.
2448 * manual-tests/input-empty-on-focus.html:
2449 Removed "Property changes" that snuck in as part of the "apply patch" process.
2451 2006-07-16 Darin Adler <darin@apple.com>
2453 Reviewed by John Sullivan.
2455 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9943
2456 <rdar://problem/4590613>
2457 REGRESSION (Tiger-TOT): menus are offset to the right at http://movies.aol.com/movie-photo-bts/superman-returns
2459 The problem turns out to be the fact that body.offsetLeft is returning a non-zero value.
2460 I have no idea why the menus worked in Tiger Safari, because body.offsetLeft behavior has not changed.
2461 Presumably some other bug that we fixed had been compensating.
2463 Test: fast/html/body-offset-properties.html
2465 * rendering/RenderObject.cpp:
2466 (WebCore::RenderObject::offsetLeft): Always return 0 for any object without an offsetParent.
2467 (WebCore::RenderObject::offsetTop): Ditto.
2468 (WebCore::RenderObject::offsetParent): Return 0 for the body (treat as a special case).
2470 2006-07-16 Beth Dakin <bdakin@apple.com>
2474 Fix for <rdar://problem/4616595> REGRESSION: Problems with world
2475 clock widget clock hand motion on 9A211 + 4604574
2477 The second hand on the widget was jiggling because the rotation was
2478 messing up the use of the affine transformation matrix while
2479 rounding to pixel boundaries in device space. We are mainly
2480 concerned with rounding to pixel boundaries with the scale in mind,
2481 so this patch extracts the scale to device space from the matrix,
2482 and rounds to pixel boundaries using only the scale. This doesn't
2483 seem like it is a perfect solution, but it definitely solves the
2484 immediate problem. We will probably need to re-address what should
2485 happen to avoid pixel cracks with rotations at non-integral scale
2488 * platform/cg/GraphicsContextCG.cpp:
2489 (WebCore::GraphicsContext::roundToDevicePixels):
2491 2006-07-15 Darin Adler <darin@apple.com>
2493 - fix mistake from fix for 8952 that was breaking layout tests
2495 * editing/SelectionController.cpp: (WebCore::SelectionController::nodeWillBeRemoved):
2496 Justin was right! I changed the behavior of the function by accident. Changed it
2497 back so that it doesn't blow away the selection on the DOM side in the case where
2500 I will write 100 times on the blackboard: "When Justin says something about editing,
2501 assume he is right."
2503 2006-07-15 Darin Adler <darin@apple.com>
2505 - try to fix Windows build
2507 * WebCore.vcproj/WebCore/WebCore.vcproj: Added StreamingTextDecoderICU.cpp/h.
2509 2006-07-15 Darin Adler <darin@apple.com>
2511 Reviewed by John Sullivan.
2513 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8952
2514 <rdar://problem/4575185>
2515 REGRESSION: crash on drag of highlighted Google custom home page modules
2517 Test: fast/dynamic/move-node-with-selection.html
2519 * editing/SelectionController.cpp: (WebCore::SelectionController::nodeWillBeRemoved):
2520 Call updateRendering before calling clearSelection(), since it's important to do any
2521 work beforehand, and there are calls inside clearSelection that will indirectly do an
2522 updateRendering. Also change code to make fewer assumptions about object lifetime.
2524 2006-07-15 Darin Adler <darin@apple.com>
2526 Reviewed by John Sullivan.
2528 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8587
2529 <rdar://problem/4631844>
2530 REGRESSION: {display:list-item} on items outside an ol or ul element no longer causes incremental numbering
2532 Test: fast/lists/numeric-markers-outside-list.html
2534 * rendering/RenderListItem.cpp: (WebCore::previousListItem):
2535 Look for list items, even when we're outside any list.
2537 2006-07-15 Adele Peterson <adele@apple.com>
2541 - Fix for <rdar://problem/4593970> REGRESSION (NativeTextField): autofill menu disappears after typing a 2nd character
2543 This was caused by composite editing commands, (like typing or pasting) that include a DeleteCommand, being
2544 interpreted by the form delegate as an actual delete. This fix doesn't notify the form delegate if the deletion is
2545 part of an editing command to replace the selected text.
2547 * editing/DeleteSelectionCommand.h: Added m_replace to keep track of whether this deletion is
2548 part of a composite command to replace the text being deleted.
2549 * editing/DeleteSelectionCommand.cpp:
2550 (WebCore::DeleteSelectionCommand::DeleteSelectionCommand): Initialize m_replace.
2551 (WebCore::DeleteSelectionCommand::doApply): Only notify the form delegate of the deletion if the text is not being replaced.
2552 * editing/CompositeEditCommand.h:
2553 * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::deleteSelection):
2554 Added replace argument to construct DeleteSelectionCommand.
2556 * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::input): Call deleteSelection with replace argument.
2557 * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply): ditto.
2559 2006-07-15 Geoffrey Garen <ggaren@apple.com>
2561 Reviewed by Maciej, tweaked to match Darin's patch.
2563 - Fixed <rdar://problem/4631837> REGRESSION: Reproducible crash on
2564 FCKeditor demo (9911)
2566 * WebCore.xcodeproj/project.pbxproj:
2567 * bindings/js/kjs_html.cpp:
2568 (KJS::JSHTMLDocument::putValueProperty): Check for a null body element before
2569 forwarding the put request to it. I confirmed that no other parts of the
2570 file use 'body' or 'bodyElement' without checking for null.
2572 Also, use 'body' rather than 'bodyElement' because dir can bet set on
2573 any element, not just HTMLBodyElement.
2575 2006-07-15 Darin Adler <darin@apple.com>
2579 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8871
2580 <rdar://problem/4575417>
2581 REGRESSION: Pressing Enter/Return in a text input removes the selected text
2583 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9743
2584 <rdar://problem/4614228>
2585 REGRESSION: crash dispatching JavaScript-created keyboard event to input element
2587 * bridge/mac/FrameMac.mm: (WebCore::FrameMac::doTextFieldCommandFromEvent):
2588 Add a null check to fix the crash, and a FIXME explaining why this is not necessarily
2589 enough for the future.
2591 * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler):
2592 Consume Enter key keypress events even if the element is not in a form.
2594 * platform/mac/KeyEventMac.mm: (WebCore::keyIdentifierForKeyEvent): Added \n to the
2595 characters that turn into "Enter". Actual keyboard events always are \r or \003 on
2596 the Macintosh, but in layout tests we can use \n, and everything other than the
2597 code path here works, so worth fixing.
2599 2006-07-15 Darin Adler <darin@apple.com>
2601 Reviewed by John Sullivan.
2603 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9883
2604 <rdar://problem/4631821>
2605 REGRESSION: NativePopups don't work correctly in some forum software
2607 Test: fast/forms/select-selected.html
2609 * rendering/RenderMenuList.h:
2610 * rendering/RenderMenuList.cpp:
2611 (WebCore::RenderMenuList::updateFromElement): Added code to map the selected option
2612 index to a list index before using it to index into the list.
2613 (WebCore::RenderMenuList::showPopup): Added code to map the selection option index
2614 to a list index before passing it to the menu renderer.
2615 (WebCore::RenderMenuList::valueChanged): Added code to map the list index back to a
2616 option index before calling setSelectedIndex (that function takes an option index).
2618 2006-07-15 Darin Adler <darin@apple.com>
2620 Reviewed by John Sullivan.
2622 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9928
2623 REGRESSION: Text Encoding menu inoperative (after gcc protocol build fix)
2625 * bindings/objc/DOM.mm:
2626 (-[DOMNode addEventListener:::]): Moved into DOMEventTarget category.
2627 (-[DOMNode removeEventListener:::]): Ditto.
2628 (-[DOMNode dispatchEvent:]): Ditto.
2630 * WebCore.xcodeproj/project.pbxproj: Allow Xcode to do its thing.
2632 2006-07-15 Maciej Stachowiak <mjs@apple.com>
2636 <rdar://problem/4632144> REGRESSION: table column tests failing as a result of very recent fix
2638 * rendering/RenderTable.cpp:
2639 (WebCore::RenderTable::addChild): columns and colgroups are valid children of a table too, not
2640 just table sections!
2642 2006-07-15 Anders Carlsson <acarlsson@apple.com>
2646 http://bugzilla.opendarwin.org/show_bug.cgi?id=9866
2647 <rdar://problem/4631561>
2648 REGRESSION: Repro crash from mangleme using iframe, only from server.
2650 * html/HTMLIFrameElement.cpp:
2651 (WebCore::HTMLIFrameElement::attach):
2652 Add null check for contentFrame() since content frames won't be created for invalid URLs.
2654 2006-07-14 Alexey Proskuryakov <ap@nypop.com>
2658 Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=4195
2659 REGRESSION: KOI8-U encoding no longer supported.
2662 * http/tests/misc/BOM-override.pl
2663 * http/tests/misc/BOM-override-script.html
2664 * fast/encoding/charset-koi8-u.html
2665 * fast/encoding/charset-x-nextstep.html
2667 Restored a TEC code path for encodings that are not supported by ICU (but which currently
2668 passes all layout tests even by itself with ICU disabled). A lot of refactoring is
2669 still needed - most importantly, round-tripping encoding names via CFStringEncoding
2670 makes little sense now.
2673 * bridge/mac/WebCoreTextDecoder.h: Removed.
2674 * bridge/mac/WebCoreTextDecoder.mm: Removed.
2675 WebCoreTextDecoder was not used anywhere since WebTextView was moved into WebCore.
2677 * loader/Decoder.cpp:
2679 (Decoder::setEncodingName):
2681 Use StreamingTextDecoder::create().
2683 * platform/StreamingTextDecoder.cpp:
2684 (WebCore::StreamingTextDecoder::create):
2685 (WebCore::StreamingTextDecoder::~StreamingTextDecoder):
2686 * platform/StreamingTextDecoder.h:
2687 StreamingTextDecoder is just an abstract interface to implementations now.
2689 * platform/StreamingTextDecoderICU.cpp: Added.
2690 (WebCore::StreamingTextDecoderICU::StreamingTextDecoderICU):
2691 (WebCore::StreamingTextDecoderICU::~StreamingTextDecoderICU):
2692 (WebCore::StreamingTextDecoderICU::releaseICUConverter):
2693 (WebCore::StreamingTextDecoderICU::textEncodingSupported):
2694 (WebCore::StreamingTextDecoderICU::convertUTF16):
2695 (WebCore::StreamingTextDecoderICU::convertIfASCII):
2696 (WebCore::StreamingTextDecoderICU::createICUConverter):
2697 (WebCore::StreamingTextDecoderICU::appendOmittingBOM):
2698 (WebCore::StreamingTextDecoderICU::convertUsingICU):
2699 (WebCore::StreamingTextDecoderICU::convert):
2700 (WebCore::StreamingTextDecoderICU::toUnicode):
2701 (WebCore::StreamingTextDecoderICU::fromUnicode):
2702 * platform/StreamingTextDecoderICU.h: Added.
2703 Renamed from StreamingTextDecoder; added a way to tell whether the encoding is actually
2704 supported by the decoder; minor cleanup.
2706 * platform/TextEncoding.cpp:
2707 (WebCore::TextEncoding::effectiveEncoding): Moved from StreamingTextDecoder.
2708 (WebCore::TextEncoding::toUnicode): Use StreamingTextDecoder::create().
2709 (WebCore::TextEncoding::fromUnicode): Moved to StreamingTextDecoderICU.
2711 * platform/TextEncoding.h: Changed __APPLE__ to PLATFORM(MAC); added effectiveEncoding().
2713 * platform/mac/StreamingTextDecoderMac.cpp: Added.
2714 (WebCore::StreamingTextDecoderMac::StreamingTextDecoderMac):
2715 (WebCore::StreamingTextDecoderMac::~StreamingTextDecoderMac):
2716 (WebCore::StreamingTextDecoderMac::releaseTECConverter):
2717 (WebCore::StreamingTextDecoderMac::textEncodingSupported):
2718 (WebCore::StreamingTextDecoderMac::convertUTF16):
2719 (WebCore::StreamingTextDecoderMac::convertIfASCII):
2720 (WebCore::StreamingTextDecoderMac::createTECConverter):
2721 (WebCore::StreamingTextDecoderMac::appendOmittingBOM):
2722 (WebCore::StreamingTextDecoderMac::convertOneChunkUsingTEC):
2723 (WebCore::StreamingTextDecoderMac::convertUsingTEC):
2724 (WebCore::StreamingTextDecoderMac::convert):
2725 (WebCore::StreamingTextDecoderMac::toUnicode):
2726 (WebCore::StreamingTextDecoderMac::fromUnicode):
2727 * platform/mac/StreamingTextDecoderMac.h: Added.
2728 (WebCore::StreamingTextDecoderMac::convert):
2729 This is a TEC+CFString code path for decoding, basically restored from a year-old revision.
2731 * platform/mac/TextEncodingMac.cpp: Removed. Code moved to StreamingTextDecoderMac.
2733 * WebCore.xcodeproj/project.pbxproj:
2735 === Safari-521.17 ===
2737 2006-07-14 Timothy Hatcher <timothy@apple.com>
2739 <rdar://problem/4623957> SWB: gcc-5412 (new?) objc warning causes WebCore project failure
2741 Made a DOMNode category in DOMEvents.h that lets DOMNode conform to the
2742 DOMEventTarget protocol that works with GCC 5412.
2744 Removed forward declarations of WebCoreWidgetHolder and imported WebCoreWidgetHolder.h.
2746 Removed all <Cocoa/Cocoa.h> and <Foundation/Foundation.h> imports in other headers,
2747 we import <Cocoa/Cocoa.h> in the prefix header for ObjC.
2749 * WebCore.xcodeproj/project.pbxproj:
2750 * bindings/objc/DOMCore.h:
2751 * bindings/objc/DOMEvents.h:
2752 * bridge/mac/FormDataMac.h:
2753 * bridge/mac/WebCoreAXObject.h:
2754 * bridge/mac/WebCoreCache.h:
2755 * bridge/mac/WebCoreEncodings.h:
2756 * bridge/mac/WebCoreFrameBridge.h:
2757 * bridge/mac/WebCoreFrameNamespaces.h:
2758 * bridge/mac/WebCoreJavaScript.h:
2759 * bridge/mac/WebCorePageBridge.h:
2760 * bridge/mac/WebCorePageState.h:
2761 * bridge/mac/WebCoreResourceLoader.h:
2762 * bridge/mac/WebCoreScriptDebugger.h:
2763 * bridge/mac/WebCoreSettings.h:
2764 * bridge/mac/WebCoreStringTruncator.h:
2765 * bridge/mac/WebCoreStringTruncator.mm:
2766 * bridge/mac/WebCoreTextDecoder.h:
2767 * bridge/mac/WebDashboardRegion.h:
2768 * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
2769 * platform/mac/CookieJar.mm:
2770 * platform/mac/DeprecatedStringMac.mm:
2771 * platform/mac/FontDataMac.mm:
2772 * platform/mac/FoundationExtras.h:
2773 * platform/mac/TextBoundaries.mm:
2774 * platform/mac/WebCoreHistory.h:
2775 * platform/mac/WebCoreHistory.m:
2776 * platform/mac/WebCoreKeyGenerator.h:
2777 * platform/mac/WebCoreTextArea.h:
2778 * platform/mac/WebCoreTextField.h:
2779 * platform/mac/WebCoreTextRenderer.h:
2780 * platform/mac/WebCoreView.h:
2781 * platform/mac/WebCoreWidgetHolder.h:
2783 2006-07-14 Geoffrey Garen <ggaren@apple.com>
2787 - Updated ScriptInterpreter to work with Interpreter ref-counting in
2790 (KJS::ScriptInterpreter::~ScriptInterpreter): Now protected to catch
2793 2006-07-14 Anders Carlsson <acarlsson@apple.com>
2795 Reviewed by Adele and Justin.
2797 http://bugzilla.opendarwin.org/show_bug.cgi?id=9658
2798 <rdar://problem/4613948>
2799 REGRESSION: Check Spelling does not work in textarea elements
2801 * bridge/mac/FrameMac.mm:
2802 (WebCore::FrameMac::advanceToNextMisspelling):
2803 Don't use setStartBefore or setEndAfter on the search range because for shadow trees, there
2804 is no notion of before and after. Instead, use setStart and setEnd and pass in the start and end
2805 indices respectively.
2808 (WebCore::Range::checkNodeBA):
2809 Allow range operations on shadow trees.
2811 * manual-tests/form-element-spelling.html: Added.
2813 2006-07-14 Beth Dakin <bdakin@apple.com>
2817 Fix for <rdar://problem/4621660> REGRESSION: Safari crashing in
2818 WebCore::FrameView::updateOverflowStatus
2820 m_viewportRenderer is never initialized for framesets, and it
2821 shouldn't be. So we just need to nil-check for it in
2822 updateOverflowStatus() and return early.
2824 * page/FrameView.cpp:
2825 (WebCore::FrameView::updateOverflowStatus): Nil check.
2827 2006-07-14 Adele Peterson <adele@apple.com>
2831 Backing out fix for <rdar://problem/4604703>
2832 REGRESSION (NativeTextField): Focus is not removed from password field after I ctrl-click into a different field
2834 Darin had a better fix in WebKit for this.
2836 * bridge/mac/FrameMac.mm: (WebCore::FrameMac::sendContextMenuEvent):
2838 2006-07-14 Adele Peterson <adele@apple.com>
2842 - Fix for <rdar://problem/4614054> REGRESSION: Safari submits forms when the Return key is hit to complete inline inputs
2844 * page/Frame.h: (WebCore::Frame::inputManagerHasMarkedText): Added.
2845 * bridge/mac/FrameMac.h: ditto.
2846 * bridge/mac/FrameMac.mm: (WebCore::FrameMac::inputManagerHasMarkedText): Added. Asks the input manager if there's marked text.
2847 * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler): For text fields, don't submit the form on Enter
2848 if the input manager says there's marked text. I added this code for all text field paths. For widgets, WebCoreTextField.mm
2849 has code to deal with this case. But as we convert search, password, and isindex, they will need to do this check too.
2851 2006-07-14 Mitz Pettel <opendarwin.org@mitzpettel.com>
2855 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9907
2856 REGRESSION (r15418): editing/pasteboard/paste-table-001 fails in pixel mode
2858 * rendering/RenderText.cpp:
2859 (WebCore::RenderText::caretRect): Fixed the calculation of the max/min allowed caret
2862 2006-07-14 Mitz Pettel <opendarwin.org@mitzpettel.com>
2866 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9905
2867 REGRESSION (r15404-r15415): Repro crash when pressing delete in an empty editable div
2869 Test: editing/deleting/delete-at-start-or-end.html
2871 * editing/TypingCommand.cpp:
2872 (WebCore::TypingCommand::deleteKeyPressed): Added null check.
2873 (WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto.
2875 2006-07-14 David Kilzer <ddkilzer@kilzer.net>
2877 Reviewed by Geoffrey.
2879 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9903
2880 Simplify logic in JSHTMLOptionsCollection::setLength() by using no-arg getNumber()
2882 No test cases since there is no change in functionality.
2884 * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
2885 (WebCore::JSHTMLOptionsCollection::setLength): Simplified logic by using the
2886 no-argument getNumber() method.
2888 2006-07-14 Geoffrey Garen <ggaren@apple.com>
2892 - Build fix: don't need BLOCK_OBJC_EXCEPTIONS because we already have
2893 one surrounding this function, and the nested one makes the compiler
2894 think our local variable is volatile (seems like a compiler bug to me).
2896 * bridge/mac/FrameMac.mm:
2897 (WebCore::FrameMac::sendContextMenuEvent):
2899 2006-07-14 Timothy Hatcher <timothy@apple.com>
2903 Make JavaScriptCore a public framework. Adjusted the paths.
2905 * WebCore.xcodeproj/project.pbxproj:
2907 2006-07-14 Maciej Stachowiak <mjs@apple.com>
2911 - fixed <rdar://problem/4567031> REGRESSION: Crash at WebCore::RenderBlock::createLineBoxes (seems to be a security hole?)
2913 I also fixed all the similar crash / assertion failure cases I could think of.
2916 (WebCore::Node::nextRendererWithSameParent): Helper function for some of the above.
2918 * rendering/RenderTable.cpp:
2919 (WebCore::RenderTable::addChild): Don't allow inserting forms when not in
2920 an HTML document, since we don't need that quirk and because parsing won't
2921 do certain render tree fixups. Also watch out for case when inserting before
2922 the renderer of a misnested child.
2923 * rendering/RenderTableRow.cpp:
2924 (WebCore::RenderTableRow::addChild): ditto
2925 * rendering/RenderTableSection.cpp:
2926 (WebCore::RenderTableSection::addChild): ditto
2928 2006-07-13 Adele Peterson <adele@apple.com>
2932 - Fix for <rdar://problem/4604703>
2933 REGRESSION (NativeTextField): Focus is not removed from password field after I ctrl-click into a different field
2936 * manual-tests/password-ctrl-click-lose-focus.html: Added.
2938 * bridge/mac/FrameMac.mm: (WebCore::FrameMac::sendContextMenuEvent):
2939 If we're about to set a selection in the current view, make sure its the first responder.
2940 In this case, this will cause the password field to resign first responder at the right time.
2942 2006-07-13 Mitz Pettel <opendarwin.org@mitzpettel.com>
2946 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9670
2947 REGRESSION: RTL white-space:pre-wrap text is offset to the right
2949 Test: fast/text/international/rtl-white-space-pre-wrap.html
2951 * rendering/RenderText.cpp:
2952 (WebCore::RenderText::caretRect): Fixed LTR case and added the RTL case
2953 of clipping the caret position to the text box when the caret is after
2954 the trailing space of an autowrapped line.
2955 * rendering/bidi.cpp:
2956 (WebCore::RenderBlock::computeHorizontalPositionsForLine): Changed to truncate-
2957 to-fit the logically last text box if it contains the trailing spaces of an
2959 (WebCore::RenderBlock::bidiReorderLine): Remember the logically last text run.
2960 In the case of autowrapped text with white space that overflows beyond the line,
2961 the last text run is the one containing the overflowing white space.
2962 (WebCore::RenderBlock::findNextLineBreak): Split overflowing white space on a
2963 line that autowraps only after white space into a separate text run.
2965 2006-07-13 David Harrison <harrison@apple.com>
2967 Reviewed by Dave Hyatt.
2969 <rdar://problem/4624203> -webkit-highlight should be behind images
2971 * rendering/RenderImage.cpp:
2972 (WebCore::RenderImage::paint):
2973 * rendering/RenderListMarker.cpp:
2974 (WebCore::RenderListMarker::paint):
2975 * rendering/RenderWidget.cpp:
2976 (WebCore::RenderWidget::paint):
2977 Call custom highlighter before painting the image, marker, or widget.
2979 2006-07-13 David Harrison <harrison@apple.com>
2981 Reviewed by Justin and Levi.
2983 <rdar://problem/4620743> REGRESSION: Option-Delete doesn't delete words during typing
2986 editing/deleting/delete-by-word-001.html
2987 editing/deleting/delete-by-word-002.html
2989 * editing/TypingCommand.cpp:
2990 (WebCore::TypingCommand::deleteKeyPressed):
2991 (WebCore::TypingCommand::forwardDeleteKeyPressed):
2992 (WebCore::TypingCommand::doApply):
2993 * editing/TypingCommand.h:
2994 Delete and forward delete to use specified granularity.
2995 Undo of delete and forward delete to select what had been deleted (non-char granularity only).
2998 (WebCore::Frame::setSelection):
2999 Close typing and end style even if selection is not changing.
3001 Remove unused setSelection parameter keepTypingStyle.
3003 2006-07-12 Levi Weintraub <lweintraub@apple.com>
3007 <rdar://problem/4622763> Deleting from beginning of paragraph following a table deletes rather than selects the table
3009 * editing/DeleteSelectionCommand.cpp:
3010 (WebCore::DeleteSelectionCommand::initializeStartEnd): Added selection expansion for HRs.
3011 (WebCore::DeleteSelectionCommand::initializePositionData): Now uses enclosingBlockFlowOrTableElement
3012 instead of enclosingBlockFlowElement.
3013 (WebCore::DeleteSelectionCommand::removeNode): Use to identify that we need a placeholder
3014 when the start or end block is removed.
3015 (WebCore::DeleteSelectionCommand::handleGeneralDelete): Added check for canHaveChildrenForEditing
3016 to keep things like HRs from being given children.
3017 (WebCore::DeleteSelectionCommand::doApply): Switched to use member variable for needPlaceholder.
3018 * editing/DeleteSelectionCommand.h: Made needPlaceholder a member variable.
3019 * editing/TypingCommand.cpp:
3020 (WebCore::TypingCommand::deleteKeyPressed): Fixed selection bug for tables and open typing commands.
3021 (WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto.
3022 * editing/htmlediting.cpp:
3023 (WebCore::editingIgnoresContent): Added check for HRs, since it's not considered a widget.
3024 * editing/visible_units.cpp:
3025 (WebCore::startOfParagraph): Fix for HRs and tables.
3026 (WebCore::endOfParagraph): Ditto.
3028 2006-07-13 Alexey Proskuryakov <ap@nypop.com>
3032 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9880
3033 Memory leaks running DOM-Hanoi
3035 No change in behavior, thus no test included.
3037 * bridge/mac/FrameMac.mm:
3038 (WebCore::FrameMac::setStatusBarText): Use a local autorelease pool to release the temporaries -
3039 the test runs non-stop, and the enclosing pool doesn't get a chance to be drained.
3041 2006-07-12 Mitz Pettel <opendarwin.org@mitzpettel.com>
3045 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9862
3046 REGRESSION: GMail: Crash in RenderView::repaintViewRectangle when spoofing as FF
3047 - see also <rdar://problem/4622407>
3049 Test: fast/frames/repaint-display-none-crash.html
3051 * rendering/RenderView.cpp:
3052 (WebCore::RenderView::repaintViewRectangle): Added null checking of the owner element's
3053 renderer, which can be null if the iframe is set to display:none.
3055 2006-07-12 Justin Garcia <justin.garcia@apple.com>
3059 <rdar://problem/4509393>
3060 selected DOM range starts with <object>, 0 offset but selection should include the <object>
3062 * editing/ReplaceSelectionCommand.cpp:
3063 (WebCore::ReplaceSelectionCommand::shouldMergeStart):
3064 Don't pull content out of a table cell.
3065 * editing/htmlediting.cpp:
3066 (WebCore::editingIgnoresContent): Added <select> nodes.
3067 (WebCore::rangeCompliantEquivalent): Convert [node, 0] positions to positionBeforeNode(node)
3068 for more types of nodes.
3069 * rendering/RenderContainer.cpp:
3070 (WebCore::RenderContainer::positionForCoordinates):
3071 Fix a crasher when right clicking on an anonymous table.
3073 2006-07-12 John Sullivan <sullivan@apple.com>
3075 Reviewed by Brady Eidson
3077 - fixed <rdar://problem/4611164> REGRESSION: Crash occurs when undoing a series of
3078 misspelled words (WebCore::RenderObject::repaint(bool)
3081 (WebCore::Document::removeMarkers):
3082 put (it - markers.begin()) in a local variable before altering markers, in every case where this was
3083 happening. One of the cases like this was fixed a while back, but other cases were
3084 either missed at that time or crept in since.
3086 2006-07-13 Anders Carlsson <acarlsson@apple.com>
3090 http://bugzilla.opendarwin.org/show_bug.cgi?id=9663
3091 REGRESSION (r14948-r14956): Selection in text field remains highlighted when the text field loses focus
3094 (WebCore::Document::updateSelection):
3095 Don't return early if the selection is empty.
3097 2006-07-12 Anders Carlsson <acarlsson@apple.com>
3101 <rdar://problem/4614656> REGRESSION: onpaste() handlers don't run for textarea elements
3103 * bridge/mac/FrameMac.mm:
3104 (WebCore::FrameMac::dispatchCPPEvent):
3105 If the element is a shadow node, dispatch the event to its real parent.
3107 * manual-tests/textarea-onpaste.html: Added.
3109 2006-07-12 Beth Dakin <bdakin@apple.com>
3113 Fix for layout test regressions after my check-in last night. Just
3114 a silly mistake where I should have asked if we were NOT printing
3115 instead of if we were in the listbox code.
3117 * WebCore.xcodeproj/project.pbxproj: Project file wars. Back to
3119 * platform/mac/ListBoxMac.mm:
3120 (itemTextRenderer): Inverted check.
3121 (groupLabelTextRenderer): Inverted check.
3123 2006-07-12 Darin Adler <darin@apple.com>
3127 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9806
3128 <rdar://problem/4622622>
3129 REGRESSION: Large rowspan causes WebKit to call abort()
3131 Test: fast/table/large-rowspan-crash.html
3133 * rendering/RenderTableSection.cpp:
3134 (WebCore::RenderTableSection::ensureRows):
3135 Use sizeof(RowStruct) instead of sizeof(int).
3136 Clearly we'll need something better to solve this completely.
3137 I expect another smaller, but still huge, value will still cause a problem.
3139 2006-07-12 Anders Carlsson <acarlsson@apple.com>
3143 <rdar://problem/4586665> REGRESSION: autorestore.apple.com: Crashes Safari in WebCore::Widget::client() const
3145 * bridge/mac/FrameMac.h:
3146 Add focusCallResultedInViewBeingCreated argument.
3148 * bridge/mac/FrameMac.mm:
3149 (WebCore::FrameMac::nextKeyViewInFrame):
3150 If the call to focus() caused the node to get a native widget, set focusCallResultedInViewBeingCreated to true.
3152 (WebCore::FrameMac::nextKeyViewInFrameHierarchy):
3153 Don't reset the focus node if focusCallResultedInViewBeingCreated is true. Also, add magic to prevent setting
3154 a text field as the first responder if its field editor already is the current first responder.
3156 * page/FrameView.cpp:
3157 (WebCore::FrameView::handleMousePressEvent):
3158 In some cases, get the event target node again after dispatching the mouse event.
3160 2006-07-12 Beth Dakin <bdakin@apple.com>
3164 Fix for <rdar://problem/4615765> Input[type='search' fields
3165 initially render too large in Widgets
3167 Fundamentally, the problem here is that we were miscalculating
3168 things because [NSGraphicsContext currentContextDrawingToScreen]
3169 was evaluating to false when widgets first load. We only ever used
3170 this check, however, to determine if we were printing or not, so it
3171 should not have evaluated to false for loading in Dashbaord.
3172 Instead, if we query the RenderView about whether or not we are
3173 printing, we will get the right answer.
3175 No test case added since this appears only to affect Dashboard.
3177 * bridge/mac/WebCoreFrameBridge.mm:
3178 (-[WebCoreFrameBridge drawRect:]): Ask the RenderView if we are
3179 printing instead. This is not part of the actual bug fix, but it
3180 seems wise to get rid of all calls to [NSGraphicsContext
3181 currentContextDrawingToScreen] when we are just trying to determine
3182 if we are printing or not.
3183 * platform/mac/ListBoxMac.mm:
3184 (itemTextRenderer):This function now takes a boolean, isPrinting.
3185 (groupLabelTextRenderer): Same as above.
3186 (ListBox::sizeForNumberOfLines): Ask the RenderView if we are
3188 (-[WebCoreTableView drawRow:clipRect:]): Same as above.
3189 * platform/mac/PopUpButtonMac.mm:
3190 (PopUpButton::sizeHint): Same as above.
3191 * platform/mac/TextFieldMac.mm:
3192 (-[NSSearchFieldCell _addStringToRecentSearches:]):
3193 * rendering/RenderLineEdit.cpp: Same as above.
3195 2006-07-12 Adele Peterson <adele@apple.com>
3199 Fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=9813
3200 OPTION text can paint over select element's scrollbar
3202 Test: fast/forms/option-text-clip.html
3204 * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::paintObject):
3205 When calculating the clip to apply to the button text, also consider padding.
3206 In the future, we may have separate renderers for the text part, and the arrow part
3207 of the control, and then the separation should be natural. For now, we use padding.
3209 2006-07-11 David Kilzer <ddkilzer@kilzer.net>
3211 Windows build fix. Reviewed by NOBODY.
3213 * WebCore.vcproj/WebCore/WebCore.vcproj: Added JSHTMLOptionsCollection.cpp/h
3214 and JSHTMLOptionsCollectionCuston.cpp. VC++ Express realphabetized the file list.
3216 2006-07-11 Darin Adler <darin@apple.com>
3220 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9809
3221 <rdar://problem/4619515>
3222 focus ring fails to appear on select element after choosing item from popup
3224 - includes http://bugzilla.opendarwin.org/show_bug.cgi?id=9853
3225 improvements to select element, including some storage leak fixes
3227 * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::index): Use a const
3228 reference for the list items, so we don't have to copy a vector.
3229 * html/HTMLSelectElement.cpp:
3230 (WebCore::HTMLSelectElement::selectedIndex): Ditto.
3231 (WebCore::HTMLSelectElement::setSelectedIndex): Ditto.
3232 (WebCore::HTMLSelectElement::length): Ditto.
3233 (WebCore::HTMLSelectElement::remove): Ditto.
3234 (WebCore::HTMLSelectElement::value): Ditto.
3235 (WebCore::HTMLSelectElement::setValue): Ditto.
3236 (WebCore::HTMLSelectElement::stateValue): Ditto.
3237 (WebCore::HTMLSelectElement::restoreState): Ditto.
3238 (WebCore::HTMLSelectElement::appendFormData): Ditto.
3239 (WebCore::HTMLSelectElement::optionToListIndex): Ditto.
3240 (WebCore::HTMLSelectElement::listToOptionIndex): Ditto.
3241 (WebCore::HTMLSelectElement::recalcListItems): Made const, with the appropriate
3243 (WebCore::HTMLSelectElement::reset): Use a const reference for
3244 the list items, so we don't have to copy the vector. Remove the call to
3245 setSelectionChanged for the RenderMenuList case.
3246 (WebCore::HTMLSelectElement::notifyOptionSelected): Ditto, on both counts.
3247 (WebCore::HTMLSelectElement::defaultEventHandler): Call focus() before showing
3249 * html/HTMLSelectElement.h: The RenderMenuList class is no longer a friend.
3250 Changed the listItems function to return a const reference to the vector so
3251 it no longer copies the vector. Removed the const_cast to the call to
3252 recalcListItems and changed it to a const member function. Made m_recalcListItems
3254 * rendering/DeprecatedRenderSelect.cpp:
3255 (WebCore::DeprecatedRenderSelect::updateFromElement): Removed an unnecessary call
3256 to recalcListItems, which is called automatically. Use a const reference for the
3257 list items so we don't have to copy a vector.
3258 (WebCore::DeprecatedRenderSelect::layout): Ditto.
3259 (WebCore::DeprecatedRenderSelect::selectionChanged): Ditto.
3260 (WebCore::DeprecatedRenderSelect::updateSelection): Ditto.
3261 * rendering/RenderMenuList.cpp:
3262 (WebCore::RenderMenuList::RenderMenuList): Updated for renamed data members.
3263 (WebCore::RenderMenuList::createInnerBlock): Ditto.
3264 (WebCore::RenderMenuList::addChild): Ditto.
3265 (WebCore::RenderMenuList::removeChild): Ditto.
3266 (WebCore::RenderMenuList::setStyle): Ditto. Also removed code to set the style
3267 on the pop-up menu, because it's created with the correct style and destroyed
3268 before it a style change could occur.
3269 (WebCore::RenderMenuList::updateFromElement): Rearranged code to compute the
3270 maximum width in a simpler fashion, and to not bother trying to maintain
3271 the "selected" flags on the elements, since the HTMLSelectElement class
3272 takes care of that. Store the width as an int. Call setText to set the text
3273 based on the selected element's option text.
3274 (WebCore::RenderMenuList::paintObject): Don't check m_inner when setting
3275 up the clip -- always set up the clip.
3276 (WebCore::RenderMenuList::calcMinMaxWidth): Use m_optionsWidth directly
3277 instead of calling ceilf on m_longestWidth.
3278 (WebCore::RenderMenuList::showPopup): Don't use m_popupMenu to store the
3279 menu -- instead keep the pointer in a local variable. Get the selected
3280 index from the HTMLSelectElement.
3281 (WebCore::RenderMenuList::valueChanged): Call HTMLSelectElement::setSelectedIndex
3282 to do most of the work.
3283 * rendering/RenderMenuList.h: Renamed m_inner to m_innerBlock. Removed
3284 m_popupMenu, m_size, m_selectionChanged, and m_selectedIndex. Renamed
3285 m_longestWidth to m_optionsWidth and changed it to be an int. Removed
3286 unneeded override of removeLeftoverAnonymousBoxes function. Removed
3287 unneeded selectionChanged, setSelectionChanged, updateSelection, and
3288 hasPopupMenu functions. Removed extra includes.
3289 * rendering/RenderPopupMenu.cpp: (WebCore::RenderPopupMenu::populate):
3290 Change to iterate the list items instead of iterating all children
3292 * rendering/RenderPopupMenu.h: Renamed getRenderMenuList to menuList.
3293 * rendering/RenderPopupMenuMac.mm:
3294 (WebCore::RenderPopupMenuMac::populate): Moved code to clear and create
3295 the pop-up here from the caller. Removed an extra retain that would cause
3296 the NSPopUpButtonCell to leak.
3297 (WebCore::RenderPopupMenuMac::showPopup): Removed unnecessary code to
3298 create the pop-up, which is now in populate, and also the call to the
3299 clear function, for the same reason. Reorganized code to make it a bit
3300 more readable. Removed an unnecessary if to check if frame is nil.
3301 Used a RefPtr to make sure we don't make a call on a frame after it's
3302 deleted. As part of the reorganization fixed a problem where we'd retain
3303 the event and then return early without releasing it in one case.
3304 (WebCore::RenderPopupMenuMac::addSeparator): Tweaked a little.
3305 (WebCore::RenderPopupMenuMac::addGroupLabel): Grouped all the code to
3306 manage the NSMenu at the bottom of the function.
3307 (WebCore::RenderPopupMenuMac::addOption): Ditto.
3309 2006-07-11 Justin Garcia <justin.garcia@apple.com>
3313 <rdar://problem/4620686>
3314 REGRESSION: Mispelling markers are still displayed when using the delete key to place caret into a misspelled word
3316 * bridge/mac/FrameMac.mm:
3317 (WebCore::FrameMac::respondToChangedSelection): Remove markers from newAdjacentWords
3318 even if oldAdjacentWords is equal to newAdjacentWords. This happens during a deletion.
3321 2006-07-11 Tim Omernick <timo@apple.com>
3323 Reviewed by NOBODY (build fix)
3325 * bindings/objc/DOMPrivate.h:
3326 Don't @class NPObject; that breaks files that actually #import <JavaScriptCore/npruntime.h>, since the NPObject
3327 there is of a different type.
3328 Also clarified a highly misleading comment from my last commit. I meant to clarify the comment
3331 2006-07-12 Anders Carlsson <acarlsson@apple.com>
3335 http://bugzilla.opendarwin.org/show_bug.cgi?id=9635
3336 REGRESSION: Crash when adding to cart at <http://www.yemeksepeti.com/>
3338 * html/HTMLTokenizer.cpp:
3339 (WebCore::HTMLTokenizer::scriptHandler):
3340 Don't load external scripts if the parser is stopped.
3342 * manual-tests/open-close-tokenizer-crash.html: Added.
3343 * manual-tests/resources/empty-file.js: Added.
3344 * manual-tests/resources/open-close-tokenizer-crash.html: Added.
3347 2006-07-11 John Sullivan <sullivan@apple.com>
3349 Reviewed by Kevin, Timo O, Brady, Darin, and Hyatt (whee!)
3351 - added support for creating a selection image with white text
3353 * rendering/RenderObject.h:
3355 add PaintRestriction enum
3356 (WebCore::RenderObject::PaintInfo::PaintInfo):
3357 add forceWhiteText boolean to PaintInfo struct
3359 * page/FramePrivate.h:
3360 (WebCore::FramePrivate::FramePrivate):
3361 replaced m_selectionOnly bool with m_paintRestriction, which also handles forcing the
3365 (WebCore::Frame::paint):
3366 updated to use & pass m_paintRestriction where it used to use & pass just m_selectionOnly
3368 * bridge/mac/FrameMac.h:
3369 * bridge/mac/FrameMac.mm:
3370 (WebCore::FrameMac::selectionImage):
3371 now takes forceWhiteText parameter, stored in FramePrivate as part of PaintRestriction
3373 * bridge/mac/WebCoreFrameBridge.h:
3374 * bridge/mac/WebCoreFrameBridge.mm:
3375 (-[WebCoreFrameBridge selectionImageForcingWhiteText:]):
3376 renamed from selectionImage, now takes forceWhiteText parameter, which is passed
3379 * rendering/RenderLayer.h:
3380 * rendering/RenderLayer.cpp:
3381 (WebCore::RenderLayer::paint):
3382 use a PaintRestriction value where we used to use a selectionOnly bool
3383 (WebCore::RenderLayer::paintLayer):
3384 ditto; also stores forceWhiteText in PaintInfo struct
3386 * kcanvas/KCanvasResources.cpp:
3387 (WebCore::KCanvasMarker::draw):
3388 updated for changed signature of PaintInfo constructor
3390 * ksvg2/svg/SVGMaskElement.cpp:
3391 (WebCore::SVGMaskElement::drawMaskerContent):
3394 * ksvg2/svg/SVGPatternElement.cpp:
3395 (WebCore::SVGPatternElement::drawPatternContentIntoTile):
3398 * rendering/InlineTextBox.cpp:
3399 (WebCore::InlineTextBox::paint):
3400 paint with white text color if forceWhiteText is set in PaintInfo struct
3402 2006-07-11 Tim Omernick <timo@apple.com>
3406 <http://bugzilla.opendarwin.org/show_bug.cgi?id=9843>:
3407 Give Netscape plug-ins access to their own DOM element
3409 * html/HTMLPlugInElement.h:
3410 Just import JSC headers on Mac. The NPObject and Bindings::Instance stuff is only used on Mac anyway.
3411 Changed __APPLE__ to PLATFORM(MAC).
3412 Added m_NPObject ivar.
3413 * html/HTMLPlugInElement.cpp:
3414 (WebCore::HTMLPlugInElement::HTMLPlugInElement):
3415 Initialize the NPObject.
3416 (WebCore::HTMLPlugInElement::~HTMLPlugInElement):
3417 Release the NPObject when the element is destroyed.
3418 (WebCore::HTMLPlugInElement::createNPObject):
3419 Creates an NPObject for the element.
3420 (WebCore::HTMLPlugInElement::getNPObject):
3421 Returns the NPObject for the element, creating and caching it if necessary.
3423 * html/HTMLAppletElement.h:
3424 Changed __APPLE__ to PLATFORM(MAC).
3425 * html/HTMLAppletElement.cpp:
3427 * html/HTMLEmbedElement.h:
3429 * html/HTMLEmbedElement.cpp:
3431 * html/HTMLObjectElement.h:
3433 * html/HTMLObjectElement.cpp:
3436 * bindings/objc/DOMPrivate.h:
3437 Added -[DOMElement _NPObject].
3439 * bindings/objc/DOM.mm:
3440 (-[DOMElement _NPObject]):
3441 Returns the NPObject for the element. Since this is only needed by the Netscape plug-in API, you can only get
3442 the NPObject for applet, embed, and object elements.
3444 2006-07-11 Adele Peterson <adele@apple.com>
3448 - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9861
3449 REGRESSION: Can't dynamically change list box to popup
3451 and updated fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9859
3452 REGRESSION: Can't dynamically change popup to list box
3454 The original fix for 9859 was in the renderer, and I think we can catch the change
3455 earlier in the element to detach and reattach.
3457 I also did some cleanup to remove the PopupButton code path from DeprecatedRenderSelect
3459 Test: fast/forms/select-change-listbox-to-popup.html
3461 * html/HTMLSelectElement.cpp:
3462 (WebCore::HTMLSelectElement::parseMappedAttribute): If the new attribute value is going to require us to change from listbox to popup or vice versa,
3463 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
3465 (WebCore::HTMLSelectElement::recalcStyle): Updated shouldUseMenuList since it no longer takes a RenderStyle.
3466 (WebCore::HTMLSelectElement::isKeyboardFocusable): ditto.
3467 (WebCore::HTMLSelectElement::isMouseFocusable): ditto.
3468 (WebCore::HTMLSelectElement::createRenderer): ditto.
3469 (WebCore::HTMLSelectElement::setRecalcListItems): ditto.
3470 (WebCore::HTMLSelectElement::reset): ditto.
3471 (WebCore::HTMLSelectElement::notifyOptionSelected): ditto.
3472 (WebCore::HTMLSelectElement::defaultEventHandler): ditto.
3474 * html/HTMLSelectElement.h: (WebCore::HTMLSelectElement::shouldUseMenuList):
3475 This method no longer takes a RenderStyle. That was leftover from when we used to use the appearance
3476 to determine whether or not to use the new menu list implementation.
3478 * rendering/DeprecatedRenderSelect.h: Removed PopupButton code path.
3479 * rendering/DeprecatedRenderSelect.cpp:
3480 (WebCore::DeprecatedRenderSelect::DeprecatedRenderSelect):
3481 (WebCore::DeprecatedRenderSelect::setWidgetWritingDirection):
3482 (WebCore::DeprecatedRenderSelect::updateFromElement):
3483 (WebCore::DeprecatedRenderSelect::baselinePosition):
3484 (WebCore::DeprecatedRenderSelect::layout):
3485 (WebCore::DeprecatedRenderSelect::updateSelection):
3487 * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::updateFromElement):
3488 Backed out previous fix since this is now done in HTMLSelectElement.
3490 2006-07-11 Adele Peterson <adele@apple.com>
3494 Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9859
3495 REGRESSION: Can't dynamically change popup to list box
3497 Test: fast/forms/select-change-popup-to-listbox.html
3499 * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::updateFromElement):
3500 If the select element has the multiple property set, or has a size > 1, then it
3501 really should be a list box, so we detach and attach the element so it creates the
3502 correct type of renderer.
3504 2006-07-11 John Sullivan <sullivan@apple.com>
3506 Reviewed by Beth Dakin and Tim Omernick
3508 - fixed <rdar://problem/4622794> HiDPI: dragging the selection in Safari can show pixel cracks
3509 at non-integral scale factors