1 2008-03-22 Eric Seidel <eric@webkit.org>
5 Unify handling of NAMESPACE_ERR and fix Acid3 test 25
6 http://bugs.webkit.org/show_bug.cgi?id=16693
8 Test: fast/dom/DOMImplementation/createDocumentType-err.html
10 * dom/DOMImplementation.cpp:
11 (WebCore::DOMImplementation::createDocumentType):
12 (WebCore::DOMImplementation::createDocument):
13 * dom/DOMImplementation.idl:
15 (WebCore::Document::hasPrefixNamespaceMismatch):
16 (WebCore::Document::createElementNS):
17 (WebCore::Document::parseQualifiedName):
18 (WebCore::Document::createAttributeNS):
21 (WebCore::Element::setAttributeNS):
22 * editing/FormatBlockCommand.cpp:
23 (WebCore::FormatBlockCommand::doApply):
25 2008-03-22 Eric Seidel <eric@webkit.org>
29 Fix createElementNS to throw exceptions for invalid qualified names
30 Fixes Acid3 sub-test 23
31 http://bugs.webkit.org/show_bug.cgi?id=16833
33 Tests: fast/dom/Document/createAttributeNS-namespace-err.html
34 fast/dom/Document/createElementNS-namespace-err.html
37 (WebCore::Document::createElement):
38 (WebCore::hasNamespaceError):
39 (WebCore::Document::createElementNS):
40 (WebCore::Document::createAttributeNS):
43 2008-03-21 Cameron Zwarich <cwzwarich@uwaterloo.ca>
45 Reviewed by Oliver Hunt.
47 Bug 13693: REGRESSION (r13615): Acid2 Test Eyes render improperly after a page refresh
48 <http://bugs.webkit.org/show_bug.cgi?id=13693>
50 Do not create bogus history items for unloaded <object> elements, because they
51 cause fallback content to be ignored on reload.
53 * loader/FrameLoader.cpp:
54 (WebCore::FrameLoader::createHistoryItemTree):
56 2008-03-21 Dan Bernstein <mitz@apple.com>
58 Reviewed by Oliver Hunt.
60 - fix http://bugs.webkit.org/show_bug.cgi?id=17988
61 REGRESSION (r31114-31132): Crash in InlineBox::isDirty() opening chowhound.com
63 Test: fast/css-generated-content/empty-content-with-float-crash.html
66 (WebCore::RenderBlock::layoutInlineChildren): Added a null check for
67 the case where the block contains no in-flow elements but still lays
68 out as a line flow, which can happen as a result of empty generated
71 2008-03-21 Sam Weinig <sam@webkit.org>
73 Reviewed by Oliver Hunt.
75 Fix <rdar://problem/5788451>
76 toDataURL not implemented for Windows (need mapping of MIME type to UTI)
78 Hard code support for just PNG's on windows, the minimum the spec requires.
80 * platform/MIMETypeRegistry.cpp:
81 (WebCore::initializeSupportedImageMIMETypesForEncoding):
82 * platform/graphics/cg/ImageBufferCG.cpp:
83 (WebCore::utiFromMIMEType):
84 (WebCore::ImageBuffer::toDataURL):
86 2008-03-21 Matt Lilek <webkit@mattlilek.com>
88 Not reviewed, Mac build fix.
90 * bindings/objc/WebScriptObject.mm:
91 (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
92 * bridge/jni/jni_utility.cpp:
93 (KJS::Bindings::convertValueToJValue):
94 * bridge/objc/objc_runtime.mm:
95 (ObjcFallbackObjectImp::callAsFunction):
97 2008-03-21 Adam Roben <aroben@apple.com>
99 Attempt to fix the Mac build
101 * bindings/objc/DOMUtility.mm:
102 (KJS::createDOMWrapper):
104 2008-03-21 Adam Roben <aroben@apple.com>
106 Rename static info members to s_info
108 This avoids conflicts with custom "info" methods, such as the one that
109 will soon be added to Console.
111 Reviewed by Ada Chan and Sam Weinig.
113 2008-03-21 David Hyatt <hyatt@apple.com>
115 <rdar://problem/5808863> Zooming should not let non-zero border width become zero
117 Make sure zoomed values that begin >= 1 are not allowed to fall below 1.
121 * css/CSSPrimitiveValue.cpp:
122 (WebCore::CSSPrimitiveValue::computeLengthDouble):
123 * loader/CachedImage.cpp:
124 (WebCore::CachedImage::imageSize):
125 (WebCore::CachedImage::imageRect):
127 2008-03-21 Kevin McCullough <kmccullough@apple.com>
131 -<rdar://problem/5712804> XMLHttpRequests do not show response contents, preview images (14313)
132 -<rdar://problem/5712931> XMLHttpRequests should be shown separately and grouped (14315)
133 -<rdar://problem/5732836> XMLHttpRequest: Inspector should show network activity/XHR in Console (17233)
134 - Instrument the InspectorController to cache XHR resrouces since they are not cached by WebCore.
135 The resources will be kept in the same map as all other resources so they will have the exact
139 * page/InspectorController.cpp:
140 (WebCore::InspectorCachedXMLHttpRequestResource::type):
141 (WebCore::InspectorCachedXMLHttpRequestResource::setType):
142 (WebCore::InspectorCachedXMLHttpRequestResource::data):
143 (WebCore::InspectorCachedXMLHttpRequestResource::setData):
144 (WebCore::InspectorCachedXMLHttpRequestResource::encoding):
145 (WebCore::InspectorCachedXMLHttpRequestResource::setEncoding):
146 (WebCore::InspectorCachedXMLHttpRequestResource::create):
147 (WebCore::InspectorCachedXMLHttpRequestResource::InspectorCachedXMLHttpRequestResource):
148 * xml/XMLHttpRequest.cpp:
149 (WebCore::XMLHttpRequest::send):
151 2008-03-21 Rodney Dawes <dobey@wayofthemonkey.com>
155 http://bugs.webkit.org/show_bug.cgi?id=17981
157 Remove WebCore/ForwardingHeaders from cppflags as it is not needed,
158 and causes build problems with GTK+.
162 2008-03-21 Dan Bernstein <mitz@apple.com>
164 Reviewed by Adele Peterson.
166 - fix http://bugs.webkit.org/show_bug.cgi?id=17966
167 REGRESSION (r31114-r31132): Clearing via br behaves unpredictably
169 Test: fast/block/float/br-with-clear.html
171 * rendering/bidi.cpp:
172 (WebCore::RenderBlock::layoutInlineChildren): Fixed the logic for the
173 very special case of an all-lines-clean block that ends with a float-
174 clearing <br> by looking for the <br> at the end of the line rather
175 than at its beginning.
177 2008-03-21 Adam Roben <aroben@apple.com>
179 Don't allow any newly-scheduled plugin requests to be serviced when JS is paused
181 This is a followup to r31199.
183 Reviewed by Tim Hatcher.
185 * plugins/PluginView.cpp:
186 (WebCore::PluginView::requestTimerFired): Added an assertion that JS
188 (WebCore::PluginView::scheduleRequest): Don't start the request timer
189 if JS is paused. This is the bug fix.
190 (WebCore::PluginView::setJavaScriptPaused): Replaced the use of
191 m_requestTimerWasActive with a check to see if we have any pending
192 requests. m_requestTimerWasActive would not be accurate if a new
193 request had been scheduled while JS was paused.
194 (WebCore::PluginView::PluginView): Removed initialization of
195 m_requestTimerWasActive.
196 * plugins/PluginView.h: Removed m_requestTimerWasActive.
198 2008-03-20 Dan Bernstein <mitz@apple.com>
200 Reviewed by Anders Carlsson.
202 - fix an assertion failure due to a line being marked dirty during
203 computeVerticalPositionsForLine() due to temporary box destruction
205 Test: fast/inline/clean-after-removing-temp-boxes.html
207 * rendering/RenderText.cpp:
208 (WebCore::RenderText::setTextWithOffset): Added code to dirty lines
209 when this method is called on an empty text node, which has no line
211 * rendering/bidi.cpp:
212 (WebCore::RenderBlock::computeVerticalPositionsForLine): Mark the line
215 2008-03-20 Anders Carlsson <andersca@apple.com>
219 Make some member variables private.
221 * loader/ResourceLoader.cpp:
222 (WebCore::ResourceLoader::ResourceLoader):
223 * loader/ResourceLoader.h:
225 2008-03-20 Anders Carlsson <andersca@apple.com>
229 Get rid of m_originalURL in ResourceLoader.
231 * loader/ResourceLoader.cpp:
232 (WebCore::ResourceLoader::load):
233 Don't store m_originalURL.
235 * loader/ResourceLoader.h:
236 * loader/SubresourceLoader.cpp:
237 (WebCore::SubresourceLoader::willSendRequest):
238 Use the url of the current request instead of the original URL.
240 2008-03-20 Anders Carlsson <andersca@apple.com>
244 Small loader cleanups.
246 * loader/MainResourceLoader.cpp:
247 (WebCore::MainResourceLoader::willSendRequest):
248 No need to call setRequest here, ResourceLoader::willSendRequest takes care of that.
249 Also, there is no need to check that newRequest is null here, because we assert earlier that it is not.
251 * loader/ResourceLoader.h:
252 Get rid of setRequest, it is no longer needed.
254 2008-03-20 Anders Carlsson <andersca@apple.com>
256 Get rid of a couple of unnecessary class declarations.
258 * loader/SubresourceLoader.h:
260 2008-03-20 David Hyatt <hyatt@apple.com>
262 Add a new value to background-clip, "text", that allows backgrounds to be clipped to foreground text (and
263 associated text decorations like shadows and underlines).
268 (WebCore::CSSParser::parseBackgroundProperty):
269 * css/CSSPrimitiveValueMappings.h:
270 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
271 (WebCore::CSSPrimitiveValue::operator EBackgroundBox):
272 * platform/graphics/GraphicsContext.cpp:
273 (WebCore::GraphicsContext::clipToImageBuffer):
274 * platform/graphics/GraphicsContext.h:
275 * platform/graphics/cg/GraphicsContextCG.cpp:
276 (WebCore::GraphicsContext::clipToImageBuffer):
277 * rendering/InlineBox.cpp:
278 (WebCore::InlineBox::paint):
279 * rendering/InlineFlowBox.cpp:
280 (WebCore::InlineFlowBox::paintBackgrounds):
281 (WebCore::InlineFlowBox::paintBackground):
282 (WebCore::InlineFlowBox::paintBoxDecorations):
283 * rendering/InlineFlowBox.h:
284 * rendering/InlineTextBox.cpp:
285 (WebCore::InlineTextBox::paint):
286 * rendering/RenderBlock.cpp:
287 (WebCore::RenderBlock::paintColumns):
288 (WebCore::RenderBlock::paintObject):
289 (WebCore::RenderBlock::paintFloats):
290 * rendering/RenderBlock.h:
291 * rendering/RenderBox.cpp:
292 (WebCore::RenderBox::paintRootBoxDecorations):
293 (WebCore::RenderBox::paintBoxDecorations):
294 (WebCore::RenderBox::paintBackgrounds):
295 (WebCore::RenderBox::paintBackground):
296 (WebCore::RenderBox::paintBackgroundExtended):
297 * rendering/RenderBox.h:
298 * rendering/RenderFieldset.cpp:
299 (WebCore::RenderFieldset::paintBoxDecorations):
300 * rendering/RenderFlow.cpp:
301 (WebCore::RenderFlow::paintLines):
302 * rendering/RenderObject.h:
304 (WebCore::RenderObject::paintBackgroundExtended):
305 * rendering/RenderStyle.h:
307 * rendering/RenderTable.cpp:
308 (WebCore::RenderTable::paintBoxDecorations):
309 * rendering/RenderTableCell.cpp:
310 (WebCore::RenderTableCell::paintBackgroundsBehindCell):
312 2008-03-20 Adam Roben <aroben@apple.com>
314 Allow pausing/blocking of JS execution by plugins
316 Part of Bug 17133: Should support pausing JavaScript execution without
319 <http://bugs.webkit.org/show_bug.cgi?id=17133>
320 <rdar://problem/5719551>
322 This patch doesn't affect Mac, which doesn't use the shared PluginView
325 Note that this patch doesn't prevent plugins from executing JS via an
326 NPObject they've already gotten hold of. It just blocks obtaining new
327 NPObjects and pauses any requests to evaluate javascript: URIs. This
328 is probably good enough for now because most plugins seem to always
329 obtain the Window object each time they want to execute JS.
331 Reviewed by Tim Hatcher.
333 * plugins/PluginView.cpp:
334 (WebCore::PluginView::getValue): Return an error if JS is paused.
335 (WebCore::PluginView::setJavaScriptPaused): Stop the request timer if
336 we're pausing, and resume it if we're unpausing.
337 (WebCore::PluginView::PluginView): Initialize new members.
338 * plugins/PluginView.h:
340 2008-03-20 Adam Roben <aroben@apple.com>
342 Allow pausing of callOnMainThread callbacks
344 Part of Bug 17133: Should support pausing JavaScript execution without
347 <http://bugs.webkit.org/show_bug.cgi?id=17133>
348 <rdar://problem/5719551>
350 Reviewed by Tim Hatcher.
352 * platform/MainThread.cpp:
353 (WebCore::dispatchFunctionsFromMainThread): If callbacks are paused,
354 don't dispatch the functions.
355 (WebCore::setMainThreadCallbacksPaused): Added. If we're being
356 unpaused, call scheduleDispatchFunctionsOnMainThread so that any
357 queued callbacks will get dispatched in the near future.
358 * platform/MainThread.h:
360 2008-03-20 Adam Roben <aroben@apple.com>
362 Allow blocking of JS event handlers/javascript: URIs per-Frame
364 Part of Bug 17133: Should support pausing JavaScript execution without
367 <http://bugs.webkit.org/show_bug.cgi?id=17133>
368 <rdar://problem/5719551>
370 Two new methods are added to KJSProxy: setPaused and isPaused. When
371 setPaused(true) is called, JS event handlers are blocked and
372 javascript: URIs will not be evaluated.
374 Reviewed by Tim Hatcher.
376 * bindings/js/kjs_events.cpp:
377 (WebCore::JSAbstractEventListener::handleEvent):
378 - Removed some old KJS_DEBUGGER code
379 - Don't run the handler if the KJSProxy is paused.
380 * bindings/js/kjs_proxy.cpp:
381 (WebCore::KJSProxy::KJSProxy): Initialize new member.
382 * bindings/js/kjs_proxy.h: Added new methods.
383 * loader/FrameLoader.cpp:
384 (WebCore::FrameLoader::executeScript): Don't execute the script if the
387 2008-03-20 Jon Honeycutt <jhoneycutt@apple.com>
391 Fix Windows warning / leak: warning C4150: deletion of pointer to
392 incomplete type 'WebCore::PluginRequest'; no destructor called
394 * plugins/PluginView.cpp: Move PluginRequest class to PluginView.h so
395 Windows PluginView destructor can use WTF::deleteAllValues to clean up
397 * plugins/PluginView.h:
398 (WebCore::PluginRequest::PluginRequest):
399 (WebCore::PluginRequest::frameLoadRequest):
400 (WebCore::PluginRequest::notifyData):
401 (WebCore::PluginRequest::sendNotification):
402 (WebCore::PluginRequest::shouldAllowPopups):
404 2008-03-20 Mark Rowe <mrowe@apple.com>
406 Reviewed by Sam Weinig.
408 Ensure that the defines in FEATURE_DEFINES are sorted so that they will match the default settings of build-webkit.
409 This will prevent the world from being rebuilt if you happen to switch between building in Xcode and with build-webkit on the
412 * Configurations/WebCore.xcconfig:
414 2008-03-20 Jon Honeycutt <jhoneycutt@apple.com>
418 <rdar://problem/5809600> REGRESSION:
419 http/tests/plugins/cross-frame-object-access.html hangs Windows Layout
422 r30897 changed the way we conditionalize this feature.
424 * plugins/PluginView.cpp:
425 (WebCore::PluginView::getValue): Test ENABLE(NETSCAPE_PLUGIN_API)
426 instead of USE(NPOBJECT).
427 (WebCore::PluginView::bindingInstance): Same.
429 2008-03-20 Adam Roben <aroben@apple.com>
431 Highlight nodes when you hover over them in the Console
433 Part of Bug 16532: Inspector should highlight nodes in page when
434 hovering over nodes in Inspector's interface
436 <http://bugs.webkit.org/show_bug.cgi?id=16532>
437 <rdar://problem/5712896>
439 Reviewed by Tim Hatcher.
441 * page/inspector/ConsolePanel.js:
442 (WebInspector.ConsolePanel._formatnode): Add mouseover/mouseout event
443 listeners to highlight the node and clear the highlight.
445 2008-03-20 Adam Roben <aroben@apple.com>
447 Highlight nodes in the page when you hover over their DOM breadcrumbs
449 Part of Bug 16532: Inspector should highlight nodes in page when
450 hovering over nodes in Inspector's interface
452 <http://bugs.webkit.org/show_bug.cgi?id=16532>
453 <rdar://problem/5712896>
455 Reviewed by Tim Hatcher.
457 * page/inspector/DocumentPanel.js:
458 (WebInspector.DocumentPanel): Add an mouseout event listener to the
459 breadcrumbs element to clear the highlighted node.
460 (WebInspector.DocumentPanel.updateBreadcrumbs): Change the mouseover
461 event listener to highlight the node represented by the hovered
464 2008-03-20 Adam Roben <aroben@apple.com>
466 Highlight nodes in the page when you hover over them in the DOM tree
468 Part of Bug 16532: Inspector should highlight nodes in page when
469 hovering over nodes in Inspector's interface
471 <http://bugs.webkit.org/show_bug.cgi?id=16532>
472 <rdar://problem/5712896>
474 The inspected node is no longer highlighted (unless, of course, you
477 Reviewed by Tim Hatcher.
479 * page/inspector/DocumentPanel.js:
480 (WebInspector.DocumentPanel):
481 - Don't highlight the focused node when the DOM tree is shown
482 - Added mousemove/mouseout event listeners to set/clear the
483 highlighted node. These are added to the root of the DOM tree
484 instead of to each individual list item to avoid flashing as the
485 mouse moves between nodes.
486 (WebInspector.DocumentPanel.set focusedDOMNode): Don't highlight the
488 (WebInspector.DocumentPanel._onmousemove): Highlight the node under
491 2008-03-20 Adam Roben <aroben@apple.com>
493 Show nodes' content/padding/border/margin boxes in the node highlight
495 Part of Bug 17221: Node highlight should show node metrics
497 <http://bugs.webkit.org/show_bug.cgi?id=17221>
498 <rdar://problem/5732822>
501 1) We don't show padding/border/margins for inlines
502 2) We don't show any numeric metrics, we just draw the boxes
503 3) We'll probably want to tweak the look of the highlight some, at
504 least to make the boxes better distinguishable
506 Reviewed by Tim Hatcher.
508 * page/InspectorController.cpp:
509 (WebCore::drawOutlinedRect): Added. Just draws a single rect.
510 (WebCore::drawHighlightForBoxes): Added. Takes the rects we calculated
511 for the node and draws the highlight.
512 (WebCore::InspectorController::drawNodeHighlight): Calculates the
513 content/padding/border/margin boxes for blocks and passes them off to
514 drawHighlightForBoxes. The behavior for inlines is for now unchanged.
516 2008-03-20 Adam Roben <aroben@apple.com>
518 Fix RenderContainer's override of addLineBoxRects to match RenderObject's
520 RenderContainer::addLineBoxRects was never getting called because its
521 parameters didn't match those of RenderObject::addLineBoxRects.
523 Reviewed by Mitz Pettel.
527 * rendering/RenderContainer.cpp: Added an optional bool
528 useSelectionHeight parameter to match RenderObject's method.
529 * rendering/RenderContainer.h: Ditto.
531 2008-03-20 Marco Barisione <marco.barisione@collabora.co.uk>
533 Reviewed by Alp Toker.
535 http://bugs.webkit.org/show_bug.cgi?id=17946
536 [GTK] Widgets are not clipped
538 * platform/gtk/RenderThemeGtk.cpp:
539 (WebCore::paintMozWidget): pass the clipping rectangle to
540 moz_gtk_widget_paint() instead of just the widget rectangle.
542 2008-03-20 David Hyatt <hyatt@apple.com>
544 Fix for http://bugs.webkit.org/show_bug.cgi?id=9279
546 Make :hover work with the adjacent sibling selector. This fix makes all forms of dynamic changes
547 (class name changes, :hover, :focus, etc.) work properly when used with the + selector.
551 Added fast/css/dynamic-sibling-selector.html
554 (WebCore::Element::recalcStyle):
556 2008-03-20 Aaron Golden <aegolden@gmail.com>
558 Reviewed by Darin and David Kilzer.
560 Addresses <http://bugs.webkit.org/show_bug.cgi?id=15263>, which caused certain marquees to not display.
562 Test: fast/html/marquee-scroll.html
564 * html/HTMLMarqueeElement.cpp:
565 (WebCore::HTMLMarqueeElement::parseMappedAttribute):
567 2008-03-20 Adam Roben <aroben@apple.com>
569 Export InspectorController::drawNodeHighlight
571 Reviewed by Tim Hatcher.
573 * WebCore.base.exp: Also sorted this file.
575 2008-03-19 Stephanie Lewis <slewis@apple.com>
577 Rubber-stamped by Anders.
581 * platform/cf/SharedBufferCF.cpp:
582 (WebCore::SharedBuffer::createCFData):
584 2008-03-19 Stephanie Lewis <slewis@apple.com>
586 Rubber-stamped by Anders.
590 * platform/SharedBuffer.h:
592 2008-03-19 Justin Garcia <justin.garcia@apple.com>
596 <rdar://problem/5780697> Copying content with CSS property values that are percentages can cause fidelity issues
598 Elements with height: x%; overflow: visible; overlap what's below them when they are copied from
599 a document in quirksmode and pasted into to one in standards mode. This fix uses the computed
600 the value for a property if its value is a percentage.
602 * css/CSSMutableStyleDeclaration.cpp:
603 (WebCore::CSSMutableStyleDeclaration::addParsedProperty): Added so that we don't have to use
604 setProperty from appendStartMarkup. We already have a parsed property value, so we shouldn't
605 use setProperty, since it takes in a String. If we did, we would have to call CSSValue::cssText()
606 for a String only to re-parse it in setProperty. This wasn't extremely important now, but it will
607 be as we compute more properties to fix the rest of the copy/paste fidelity bugs.
608 * css/CSSMutableStyleDeclaration.h:
609 * editing/markup.cpp:
610 (WebCore::appendStartMarkup): Compute values for properties that have percentage values. We could
611 perhaps narrow this special case to only include properties that are effected by quirksmode.
613 2008-03-19 Sam Weinig <sam@webkit.org>
615 Reviewed by Anders Carlsson.
617 Fix for <rdar://problem/5785694>
618 Crash occurs at KJS::Collector::collect() when loading web clip widgets with a PAC file
620 Make the activeExecStates stack per JSGlobalObject instead of static to ensure
623 * bindings/objc/WebScriptObject.mm:
624 (+[WebScriptObject throwException:]): Change to throw an exception on the current
625 GlobalObject instead of the top of the static activeExecStates stack.
626 (-[WebScriptObject setException:]): Change to use the top of the rootObjects GlobalObject
627 instead of the top of the static activeExecStates stack.
629 * bridge/c/c_instance.cpp:
630 * bridge/c/c_instance.h:
631 * bridge/jni/jni_instance.cpp:
632 (JavaInstance::virtualBegin):
633 (JavaInstance::virtualEnd):
634 * bridge/jni/jni_instance.h:
635 * bridge/objc/objc_instance.h:
636 * bridge/objc/objc_instance.mm:
637 (ObjcInstance::~ObjcInstance):
638 (ObjcInstance::virtualBegin):
639 (ObjcInstance::virtualEnd):
640 * bridge/runtime.cpp:
641 (KJS::Bindings::Instance::setDidExecuteFunction):
642 (KJS::Bindings::Instance::didExecuteFunction):
643 (KJS::Bindings::Instance::setCurrentGlobalObject): Added.
644 (KJS::Bindings::Instance::currentGlobalObject): Added.
645 (KJS::Bindings::Instance::begin):
646 (KJS::Bindings::Instance::end):
648 (KJS::Bindings::Instance::virtualBegin): Renamed from begin().
649 (KJS::Bindings::Instance::virtualEnd): Renamed from end().
650 We now store the currently active globalObject everytime we cross the runtime
651 object boundary. To do this, we take advantage of the existing begin/end
652 methods that are called when crossing this boundary, making begin set the current
653 globalObject and then call the old begin, now called virtualBegin.
655 2008-03-19 Brady Eidson <beidson@apple.com>
659 Change SharedBuffer so the wrapping platform data aspect can be shared with all CoreFoundation platforms
660 (Mac and Windows instead of just Mac)
662 * WebCore.vcproj/WebCore.vcproj: Add SharedBufferCF.cpp
663 * WebCore.xcodeproj/project.pbxproj: Ditto
665 * platform/SharedBuffer.cpp:
666 * platform/SharedBuffer.h: Change the private c'tor from NSData to CFDataRef, other PLATFORM tweaks
668 * platform/cf/SharedBufferCF.cpp: Added.
669 (WebCore::SharedBuffer::SharedBuffer):
670 (WebCore::SharedBuffer::createCFData): Non-Mac version of createCFData
671 (WebCore::SharedBuffer::hasPlatformData):
672 (WebCore::SharedBuffer::platformData):
673 (WebCore::SharedBuffer::platformDataSize):
674 (WebCore::SharedBuffer::maybeTransferPlatformData):
675 (WebCore::SharedBuffer::clearPlatformData):
677 * platform/mac/SharedBufferMac.mm:
678 (WebCore::SharedBuffer::wrapNSData): Use the CFDataRef constructor via toll-free bridging
679 (WebCore::SharedBuffer::createCFData): Mac-specific version of createCFData
681 2008-03-19 Oliver Hunt <oliver@apple.com>
685 Bug 17954: Canvas arc() with radius of 0 throws exception
686 http://bugs.webkit.org/show_bug.cgi?id=17954
688 Simple fix -- use >= instead of > when validating the radius.
690 * html/CanvasRenderingContext2D.cpp:
691 (WebCore::CanvasRenderingContext2D::arc):
693 2008-03-19 Justin Garcia <justin.garcia@apple.com>
697 <rdar://problem/5794920> Acid3: Assertion failure in VisiblePosition::previous when clicking on results (17004)
699 The position inside an empty inline-block was a candidate, but upstream and downstream
700 would move across it without stopping. This confused canonicalPosition, since no more
701 than two candidates should have the same upstream/downstream (be visually equivalent).
703 Code was added intentionally in isCandidate to make VisiblePositions inside empty
704 inline-blocks, so we need to make upstream/downstream understand that.
707 (WebCore::endsOfNodeAreVisuallyDistinctPositions): upstream and downstream used to only
708 stop when entering or leaving a non-inline element (referred to as a "block"). We must also
709 avoid entering or leaving an empty inline-block. This will allow a VisiblePosition there, to
710 match up with what the code in isCandidate intended.
711 (WebCore::enclosingVisualBoundary): Removed enclosingBlock and replaced it with this.
712 (WebCore::Position::upstream): Added better comments, called the new functions.
713 (WebCore::Position::downstream): Ditto.
716 2008-03-19 Dan Bernstein <mitz@apple.com>
718 Rubber-stamped by John Sullivan.
720 - change CSS property and value keyword constants from all-caps with
721 underscores to intra-caps.
725 * All files using the constants
727 2008-03-19 Adam Roben <aroben@apple.com>
729 Make clicking anywhere in a row in the DOM tree select that row's node
731 We now have mousedown and dblclick event listeners on the root of the
732 tree that forward the event to the node on the row the mouse is over.
734 Reviewed by Tim Hatcher.
736 * page/inspector/DocumentPanel.js:
737 (WebInspector.DocumentPanel): Added a dblclick and mousedown event
738 listeners to the root of the tree.
739 (WebInspector.DocumentPanel._treeElementFromEvent): Added. Finds the
740 tree element for the row underneath the mouse.
741 (WebInspector.DocumentPanel._ondblclick): Added. Sends the dblclick
742 event on to the tree element in the current row.
743 (WebInspector.DocumentPanel._onmousedown): Added. Selects the tree
744 element in the current row.
745 * page/inspector/treeoutline.js:
746 (TreeOutline.treeElementFromPoint): Added.
747 (TreeElement.treeElementSelected): Changed to call
748 TreeElement.isEventWithinDisclosureTriangle, and added an early return.
749 (TreeElement.treeElementToggled): Ditto.
750 (TreeElement.isEventWithinDisclosureTriangle): Added.
751 * page/inspector/utilities.js:
752 (Node.enclosingNodeOrSelfWithNodeNameInArray): Added.
753 (Node.enclosingNodeOrSelfWithNodeName): Now just calls
754 enclosingNodeOrSelfWithNodeNameInArray.
755 (Elemnt.get totalOffsetLeft): Added.
756 (Elemnt.get totalOffsetTop): Added.
758 2008-03-19 Dan Bernstein <mitz@apple.com>
760 Reviewed by Sam Weinig.
762 - fix assertion failure in RenderBlock::determineStartPosition() at http://www.wired.com/techbiz/it/magazine/16-04/bz_apple
764 Test: fast/repaint/line-flow-with-floats-10.html
766 * rendering/bidi.cpp:
767 (WebCore::RenderBlock::determineStartPosition): Removed bogus assertion.
768 If the float's top margin has changed and it has not been repositioned
769 yet, we do not have its new y position.
771 2008-03-19 David Hyatt <hyatt@apple.com>
773 New implementation of full page zoom. Because of how much doesn't transform when zooming, and because
774 of the need to obey viewport constraints, I decided to take a completely different approach. Now CSS
775 lengths and intrinsic sizes are simply adjusted by the zoom factor. This approach works much better and
776 avoids pixel cracks more than the old approach. In addition widgets "just work", namely plugins zoom
777 and scrollbars do not.
779 This patch also implements the IE zoom CSS property. This property allows fine-grained control over
780 zooming at the element level. It takes values of normal | <number> | <percentage> to match WinIE. In
781 addition, in the vein of text-size-adjust for text zooming, I have extended the zoom property with an
782 extra value, reset. The reset keyword can be used to prevent a section of the page from scaling at all
783 when a zoom is applied.
787 * css/CSSComputedStyleDeclaration.cpp:
789 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
790 Support the new 'zoom' property for getComputedStyle.
793 (WebCore::CSSParser::parseValue):
794 Code that parses the 'zoom' property.
796 * css/CSSPrimitiveValue.cpp:
797 (WebCore::CSSPrimitiveValue::computeLengthInt):
798 (WebCore::CSSPrimitiveValue::computeLengthIntForLength):
799 (WebCore::CSSPrimitiveValue::computeLengthShort):
800 (WebCore::CSSPrimitiveValue::computeLengthFloat):
801 (WebCore::CSSPrimitiveValue::computeLengthDouble):
802 * css/CSSPrimitiveValue.h:
803 Extend all of the computeLength methods to take a multiplier so that lengths can be adjusted by the
806 * css/CSSPropertyNames.in:
807 Add the new zoom property to the list of properties we understand.
809 * css/CSSStyleSelector.cpp:
810 (WebCore::CSSStyleSelector::applyDeclarations):
811 (WebCore::CSSStyleSelector::applyProperty):
812 (WebCore::CSSStyleSelector::mapBackgroundSize):
813 (WebCore::CSSStyleSelector::mapBackgroundXPosition):
814 (WebCore::CSSStyleSelector::mapBackgroundYPosition):
815 (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
816 * css/CSSStyleSelector.h:
817 (WebCore::CSSStyleSelector::setStyle):
818 Pass in the zoom factor when computing all lengths in CSS.
820 * css/CSSValueKeywords.in:
821 Add support for the 'reset' keyword of the zoom property.
824 (WebCore::Document::recalcStyle):
825 Set the 'zoom' CSS property on the RenderView. This is how we implement full page zoom.
827 * html/CanvasRenderingContext2D.cpp:
829 Make sure the back end canvas size ignores zooming when rendering images.
831 * html/HTMLImageElement.cpp:
832 (WebCore::HTMLImageElement::width):
833 (WebCore::HTMLImageElement::height):
834 (WebCore::HTMLImageElement::naturalWidth):
835 (WebCore::HTMLImageElement::naturalHeight):
836 Use the unzoomed width/height if we have no style information in HTMLImageElement.cpp.
838 * loader/CachedImage.cpp:
839 (WebCore::CachedImage::ref):
840 (WebCore::CachedImage::imageSize):
841 (WebCore::CachedImage::imageRect):
842 * loader/CachedImage.h:
843 (WebCore::CachedImage::canRender):
844 Force access to the CachedImage metrics to take a multiplier so that people have to think about
845 the zoom factor. The "intrinsic size" of the image then takes that into account.
847 * loader/ImageDocument.cpp:
848 (WebCore::ImageTokenizer::finish):
849 (WebCore::ImageDocument::scale):
850 (WebCore::ImageDocument::resizeImageToFit):
851 (WebCore::ImageDocument::imageChanged):
852 (WebCore::ImageDocument::restoreImageSize):
853 (WebCore::ImageDocument::imageFitsInWindow):
854 Make sure image documents respect the zoom.
856 * page/AnimationController.cpp:
857 (WebCore::ImplicitAnimation::animate):
858 Make the 'zoom' CSS property work with CSS transitions.
861 (WebCore::Frame::pageZoomFactor):
862 (WebCore::Frame::textZoomFactor):
863 Add accessors for obtaining the pageZoom vs. textZoom.
865 * page/FrameView.cpp:
866 (WebCore::FrameView::adjustViewSize):
867 Remove the old zoom implementation that used transforms.
869 * page/mac/WebCoreAXObject.mm:
870 (-[WebCoreAXObject accessibilityIsIgnored]):
871 Pass in the zoom factor.
873 * rendering/InlineFlowBox.cpp:
874 (WebCore::InlineFlowBox::paintBackground):
875 (WebCore::InlineFlowBox::paintBoxDecorations):
876 Pass in the zoom factor when testing for size.
878 * rendering/RenderBox.cpp:
879 (WebCore::RenderBox::calculateBackgroundSize):
880 (WebCore::RenderBox::imageChanged):
881 (WebCore::RenderBox::paintBackgroundExtended):
882 (WebCore::RenderBox::calcHeight):
883 * rendering/RenderFrameSet.cpp:
884 (WebCore::RenderFrameSet::layout):
885 * rendering/RenderHTMLCanvas.cpp:
886 (WebCore::RenderHTMLCanvas::canvasSizeChanged):
887 * rendering/RenderHTMLCanvas.h:
888 (WebCore::RenderHTMLCanvas::renderName):
889 (WebCore::RenderHTMLCanvas::intrinsicSizeChanged):
890 * rendering/RenderImage.cpp:
891 (WebCore::RenderImage::setImageSizeForAltText):
892 (WebCore::RenderImage::imageChanged):
893 (WebCore::RenderImage::calcReplacedWidth):
894 (WebCore::RenderImage::calcReplacedHeight):
895 * rendering/RenderImage.h:
896 (WebCore::RenderImage::intrinsicSizeChanged):
897 * rendering/RenderListMarker.cpp:
898 (WebCore::RenderListMarker::layout):
899 (WebCore::RenderListMarker::imageChanged):
900 (WebCore::RenderListMarker::getRelativeMarkerRect):
901 * rendering/RenderObject.cpp:
902 (WebCore::RenderObject::mustRepaintBackgroundOrBorder):
903 (WebCore::RenderObject::paintBorder):
904 Pass in the zoom factor when testing for size.
906 * rendering/RenderReplaced.cpp:
907 (WebCore::RenderReplaced::RenderReplaced):
908 (WebCore::RenderReplaced::setStyle):
909 (WebCore::RenderReplaced::intrinsicSizeChanged):
910 * rendering/RenderReplaced.h:
911 Added a new call when the zoom factor changes, intrinsicSizeChanged(). Replaced element subclasses
912 respond to this via overrides.
914 * rendering/RenderStyle.cpp:
915 (WebCore::StyleVisualData::StyleVisualData):
916 (WebCore::StyleInheritedData::StyleInheritedData):
917 (WebCore::StyleInheritedData::operator==):
918 (WebCore::RenderStyle::diff):
919 * rendering/RenderStyle.h:
920 (WebCore::StyleVisualData::operator==):
921 (WebCore::RenderStyle::zoom):
922 (WebCore::RenderStyle::zoomInEffect):
923 (WebCore::RenderStyle::setZoom):
924 (WebCore::RenderStyle::setZoomInEffect):
925 (WebCore::RenderStyle::initialZoom):
926 Support for 'zoom' in the RenderStyle. "zoomInEffect" represents the computed zoom taking into account
927 all the zooms specified on ancestors.
929 * rendering/RenderTableCol.cpp:
930 (WebCore::RenderTableCol::imageChanged):
931 * rendering/RenderTableRow.cpp:
932 (WebCore::RenderTableRow::imageChanged):
933 * rendering/RenderTableSection.cpp:
934 (WebCore::RenderTableSection::imageChanged):
935 * rendering/RenderVideo.h:
936 (WebCore::RenderVideo::intrinsicSizeChanged):
937 Pass in the zoom factor.
939 * rendering/RenderView.cpp:
940 (WebCore::RenderView::calcHeight):
941 (WebCore::RenderView::calcWidth):
942 (WebCore::RenderView::layout):
943 (WebCore::RenderView::viewHeight):
944 (WebCore::RenderView::viewWidth):
945 * rendering/RenderView.h:
946 (WebCore::RenderView::zoomFactor):
947 Back out the old implementation.
949 2008-03-19 Adam Roben <aroben@apple.com>
951 Rename firstParent* methods to enclosingNode*
953 Rubberstamped by John Sullivan.
955 * page/inspector/ConsolePanel.js:
956 * page/inspector/DocumentPanel.js:
957 * page/inspector/NetworkPanel.js:
958 * page/inspector/inspector.js:
959 * page/inspector/utilities.js:
961 2008-03-19 Dan Bernstein <mitz@apple.com>
963 Reviewed by John Sullivan.
965 - fix <rdar://problem/5805070> CrashTracer: [USER] 33 crashes in Safari at com.apple.WebCore: WebCore::FrameView::layout + 431
967 Test: fast/dynamic/subtree-parent-static-y.html
969 * rendering/RenderObject.cpp:
970 (WebCore::RenderObject::markContainingBlocksForLayout): Avoid calling
971 this method on the parent if the parent is the new layout subtree root,
972 which would result in marking all the way to the top, when it should
975 2008-03-19 Mark Rowe <mrowe@apple.com>
977 Reviewed by Oliver Hunt.
979 Use WTF::Unicode abstraction rather than using ICU functions directly.
981 * html/PreloadScanner.cpp:
982 (WebCore::PreloadScanner::tokenize):
984 2008-03-19 Mark Rowe <mrowe@apple.com>
986 Attempt to fix the Gtk build.
988 * platform/network/curl/ResourceHandleCurl.cpp:
989 (WebCore::ResourceHandle::setHostAllowsAnyHTTPSCertificate):
991 2008-03-18 Darin Adler <darin@apple.com>
995 - Speed up JavaScript built-in properties by changing the
996 hash table to take advantage of the identifier objects
998 5% speedup for Acid3 test 26
1000 * bindings/js/JSDOMWindowBase.cpp:
1001 (WebCore::JSDOMWindowBase::getOwnPropertySlot): Update for change to HashTable.
1002 (WebCore::JSDOMWindowBase::put): Ditto.
1003 * bindings/js/JSDOMWindowCustom.cpp:
1004 (WebCore::JSDOMWindow::customGetOwnPropertySlot): Ditto.
1005 * bindings/js/JSHTMLInputElementBase.cpp:
1006 (WebCore::JSHTMLInputElementBase::getOwnPropertySlot): Ditto.
1007 * bindings/js/JSHistoryCustom.cpp:
1008 (WebCore::JSHistory::customGetOwnPropertySlot): Ditto.
1009 * bindings/js/JSLocation.cpp:
1010 (WebCore::JSLocation::customGetOwnPropertySlot): Ditto.
1011 (WebCore::JSLocation::put): Ditto.
1012 * bindings/js/kjs_binding.cpp:
1013 (WebCore::nonCachingStaticFunctionGetter): Ditto.
1015 * bindings/scripts/CodeGeneratorJS.pm: Same changes as in the
1016 create_hash_table script.
1018 2008-03-18 Matt Lilek <webkit@mattlilek.com>
1020 Fix the Gtk build for real this time.
1022 * platform/network/curl/AuthenticationChallenge.h:
1024 2008-03-18 Sam Weinig <sam@webkit.org>
1026 Reviewed by Anders Carlsson.
1028 Fix for http://bugs.webkit.org/show_bug.cgi?id=17057
1029 REGRESSION: Frequent random crashes in WebCore::JSNodeList::indexGetter
1030 <rdar://problem/5725058>
1032 Tests: fast/dom/NodeList/5725058-crash-scenario-1.html
1033 fast/dom/NodeList/5725058-crash-scenario-2.html
1034 fast/dom/NodeList/5725058-crash-scenario-3.html
1036 * dom/ChildNodeList.cpp:
1037 (WebCore::ChildNodeList::ChildNodeList):
1038 * dom/ChildNodeList.h:
1039 Remove rootNodeChildrenChanged() method and fix the constructor to not
1040 pass in a needsNotifications argument to DynamicNodeList, as it no longer
1043 * dom/ClassNodeList.cpp:
1044 (WebCore::ClassNodeList::ClassNodeList):
1045 Don't pass the needsNotifications argument to DynamicNodeList.
1047 * dom/ContainerNode.cpp:
1048 (WebCore::ContainerNode::childrenChanged):
1049 Rename call to hasNodeLists() to hasNodeListCaches().
1052 (WebCore::Document::Document):
1053 (WebCore::Document::~Document): Zero out the m_document variable to signify
1054 to destructors down the destruction chain that this is a Document type node
1055 being destructed, and thus, accessing document() is prohibited.
1057 (WebCore::Document::addNodeListCache): Renamed from addNodeList.
1058 (WebCore::Document::removeNodeListCache): Renamed from removeNodeList, adds assertion.
1059 (WebCore::Document::hasNodeListCaches): Renamed from hasNodeListCaches.
1060 Rename m_numNodeLists to m_numNodeListCaches.
1062 * dom/DynamicNodeList.cpp:
1063 (WebCore::DynamicNodeList::DynamicNodeList):
1064 (WebCore::DynamicNodeList::~DynamicNodeList):
1065 (WebCore::DynamicNodeList::invalidateCache):
1066 (WebCore::DynamicNodeList::Caches::Caches):
1067 * dom/DynamicNodeList.h:
1068 (WebCore::DynamicNodeList::hasOwnCaches):
1069 Remove the needsNotifications concept from DynamicNodeList, instead, manually
1070 invalidate the cache for lists that own their own cache.
1072 * dom/NameNodeList.cpp:
1073 (WebCore::NameNodeList::NameNodeList):
1074 * dom/NameNodeList.h:
1075 Remove rootNodeAttributeChanged() method and fix the constructor to not
1076 pass in a needsNotifications argument to DynamicNodeList, as it no longer
1080 (WebCore::Node::~Node): Decrement the document's nodeListCache count
1081 if we had a NodeListsNodeData cache and this is not the Document being
1082 destructor, as tagged by a null m_document.
1083 (WebCore::Node::childNodes): Increment the document's nodeListCache count
1084 if we need create the NodeListsNodeData.
1085 (WebCore::Node::registerDynamicNodeList): Increment the document's nodeListCache count
1086 if we need create the NodeListsNodeData. Change to invalidate all the caches, instead
1087 of just the ChildNodeList, if document has had no NodeListCaches.
1088 (WebCore::Node::unregisterDynamicNodeList): Change to remove the cache from the m_listsWithCaches
1089 set if it is owned by the NodeList and clear the m_nodeLists if it is empty.
1090 (WebCore::Node::notifyLocalNodeListsAttributeChanged): Move logic to
1091 NodeListsNodeData::invalidateAttributeCaches and clear the cache pointer if it is empty.
1092 (WebCore::Node::notifyLocalNodeListsChildrenChanged): Move logic to
1093 NodeListsNodeData::invalidateCaches and clear the cache pointer if it is empty.
1094 (WebCore::Node::notifyNodeListsChildrenChanged): Cleanup.
1095 (WebCore::Node::getElementsByName): Increment the document's nodeListCache count
1096 if we need create the NodeListsNodeData.
1097 (WebCore::Node::getElementsByClassName): Increment the document's nodeListCache count
1098 if we need create the NodeListsNodeData.
1100 (WebCore::NodeListsNodeData::invalidateCaches): Added.
1101 (WebCore::NodeListsNodeData::invalidateAttributeCaches): Added.
1102 (WebCore::NodeListsNodeData::isEmpty): Added.
1104 * dom/TagNodeList.cpp:
1105 (WebCore::TagNodeList::TagNodeList):
1106 Don't pass the needsNotifications argument to DynamicNodeList.
1108 2008-03-18 Matt Lilek <webkit@mattlilek.com>
1110 Not reviewed, build fix.
1112 * platform/network/curl/AuthenticationChallenge.h:
1114 2008-03-18 Brent Fulgham <bfulgham@gmail.com>
1116 Reviewed by Adam Roben.
1118 Provide some stub implementations for things that WebKit
1119 uses for performing authentication/challenge activities. This
1120 is in support of http://bugs.webkit.org/show_bug.cgi?id=17837
1122 * platform/network/ResourceHandle.h:
1123 * platform/network/curl/AuthenticationChallenge.h:
1124 (WebCore::AuthenticationChallenge::AuthenticationChallenge):
1125 (WebCore::AuthenticationChallenge::sourceHandle):
1127 2008-03-18 Eric Seidel <eric@webkit.org>
1131 Fix SVGImage crash seen once, and obvious via code inspection.
1133 I was not able to find a test case for this.
1135 * svg/graphics/SVGImage.cpp:
1136 (WebCore::SVGImage::setContainerSize):
1137 (WebCore::SVGImage::usesContainerSize):
1138 (WebCore::SVGImage::hasRelativeWidth):
1139 (WebCore::SVGImage::hasRelativeHeight):
1141 2008-03-18 Rodney Dawes <dobey@wayofthemonkey.com>
1143 Fix Qt build after r31123.
1145 Add PluginView methods to TemporaryLinkStubs.
1147 * platform/qt/TemporaryLinkStubs.cpp:
1149 2008-03-18 Sam Weinig <sam@webkit.org>
1151 Reviewed by Darin Adler.
1153 - Speed up JavaScript prototype and constructor object creation
1154 using a static Identifier in the self() methods to avoid the
1155 cost of creating one from a c-string each time.
1157 5% speedup for Acid3 test 26
1159 * bindings/scripts/CodeGeneratorJS.pm:
1161 2008-03-18 Antti Koivisto <antti@apple.com>
1163 Reviewed by Mark Rowe.
1165 Enable preloading for other platforms besides Mac.
1169 * WebCore.vcproj/WebCore.vcproj:
1170 * WebCoreSources.bkl:
1171 * html/HTMLTokenizer.cpp:
1172 * html/HTMLTokenizer.h:
1173 * html/PreloadScanner.cpp:
1174 (WebCore::PreloadScanner::tokenize):
1176 2008-03-18 Dan Bernstein <mitz@apple.com>
1178 Reviewed by Adele Peterson.
1180 - fix <rdar://problem/5805127> REGRESSION (r31116): Assertion failure (floatIndex < floats.size()) in RenderBlock::determineStartPosition() at digg.com
1182 Test: fast/dynamic/floating-to-positioned.html
1184 * rendering/RenderObject.cpp:
1185 (WebCore::RenderObject::setStyle): Added code to remove a float from
1186 object lists if its position property changes to something other than
1187 static, since then it ceases to be a float.
1189 2008-03-18 Adam Roben <aroben@apple.com>
1191 Windows build fix after r31123
1193 * plugins/win/PluginViewWin.cpp: Add back MozillaUserAgent.
1195 2008-03-18 Dan Bernstein <mitz@apple.com>
1197 Reviewed by Darin Adler.
1199 - eliminate RenderFlow::m_clear
1201 * rendering/RenderBlock.cpp:
1202 (WebCore::RenderBlock::layoutBlock): Removed code to set m_clear.
1203 (WebCore::RenderBlock::newLine): Added a 'clear' parameter.
1204 * rendering/RenderBlock.h:
1205 * rendering/RenderFlow.h:
1206 (WebCore::RenderFlow::RenderFlow): Removed initialization of m_clear.
1207 * rendering/bidi.cpp:
1208 (WebCore::RenderBlock::layoutInlineChildren): Added a local 'clear'
1209 variable, passing a pointer to it to findNextLineBreak() and its value
1211 (WebCore::RenderBlock::findNextLineBreak): Added a 'clear' parameter,
1212 which this method adjusts when it encounters a <br>.
1214 2008-03-18 Simon Hausmann <hausmann@webkit.org>
1218 Fix the Qt build and clean up the invoke mechanism for dispatching
1219 functions in the main thread by using QMetaObject::invokeMethod
1220 instead of posting a null event.
1222 * platform/qt/MainThreadQt.cpp:
1224 2008-03-18 Rodney Dawes <dobey@wayofthemonkey.com>
1226 Fix Mac build from commit of r31123.
1228 Add a typedef for NSView* to PlatformWidget, remove duplicate PluginMessageThrottlerWin definition.
1230 * platform/Widget.h:
1231 * WebCore.vcproj/WebCore.vcproj:
1233 2008-03-18 Rodney Dawes <dobey@wayofthemonkey.com>
1235 Reviewed by Jon Honeycutt.
1237 Add PluginView.cpp and npapi.cpp to build files.
1238 Copy win/PluginViewWin.cpp to PluginView.cpp for shared code.
1239 Split Windows specific code out of PluginView.cpp.
1240 Add #if USE(NPOBJECT) around dependant code.
1241 Use npruntime_internal.h instead of npapi.h.
1242 Add PlatformWidget typedef to Widget.h.
1243 Update WidgetGtk.cpp for the PlatformWidget usage.
1244 Add needed methods to TemporaryLinkStubs for GTK+ port.
1248 * WebCoreSources.bkl:
1249 * WebCore.vcproj/WebCore.vcproj:
1250 * plugins/win/PluginViewWin.cpp:
1251 * plugins/PluginView.cpp:
1252 * plugins/PluginView.h:
1253 * plugins/npapi.cpp:
1254 * platform/Widget.h:
1255 * platform/gtk/WidgetGtk.cpp:
1256 * platform/gtk/TemporaryLinkStubs.cpp:
1258 2008-03-17 Darin Adler <darin@apple.com>
1262 - speed up document property fetching (eliminate the AtomicString
1263 objects made during document property lookup)
1265 3% speedup for Acid3 test 26
1267 * bindings/js/JSDOMWindowBase.cpp:
1268 (WebCore::JSDOMWindowBase::getOwnPropertySlot): Use AtomicString::find to
1269 locate the AtomicString, only if already present. Also call the new faster
1270 versions of the hasNamedItem and hasElementWithId functions that don't
1271 ref/deref the AtomicStringImpl, get inlined, etc.
1272 * bindings/js/JSHTMLDocumentCustom.cpp:
1273 (WebCore::JSHTMLDocument::canGetItemsForName): Ditto.
1274 (WebCore::writeHelper): Use a Vector instead of a String to build up
1275 the string to avoid the bad performance of string append.
1277 * dom/Document.cpp: Tweaked code and comments a bit. Nothing substantive.
1278 * dom/Document.h: Added new hasElementWithId function that's faster than
1279 getElementById because it doesn't ref/deref the AtomicStringImpl*, gets
1280 inlined, doesn't have to handle the 0 case, and doesn't try to return the
1281 element pointer (just a boolean).
1283 * html/HTMLAppletElement.cpp:
1284 (WebCore::HTMLAppletElement::parseMappedAttribute): Use AtomicString
1285 consistently. Also renamed the data member for clarity.
1286 (WebCore::HTMLAppletElement::insertedIntoDocument): Ditto.
1287 (WebCore::HTMLAppletElement::removedFromDocument): Ditto.
1288 * html/HTMLAppletElement.h: Ditto.
1290 * html/HTMLDocument.cpp:
1291 (WebCore::addItemToMap): Use AtomicString instead of String.
1292 (WebCore::removeItemFromMap): Ditto.
1293 (WebCore::HTMLDocument::addNamedItem): Updated for member name change.
1294 (WebCore::HTMLDocument::removeNamedItem): Ditto.
1295 (WebCore::HTMLDocument::addExtraNamedItem): Ditto.
1296 (WebCore::HTMLDocument::removeExtraNamedItem): Ditto.
1297 (WebCore::HTMLDocument::clear): Added. Moved code here from the JavaScript
1298 bindings. If we're going to have an empty placeholder function, there's no
1299 reason to have it in the bindings instead of here.
1300 * html/HTMLDocument.h: Added clear. Changed the named item function
1301 arguments to AtomicString insted of String. Changed the NameCountMap to
1302 use AtomicStringImpl* instead of StringImpl*. Renamed the data members
1303 to add a m_ prefix and remove the needless doc prefix. Added hasNamedItem
1304 and hasExtraNamedItem functions that are inlined and faster than the old
1305 idiom because they doesn't ref/deref the AtomicStringImpl*, get inlined,
1306 and don't have to handle the 0 case.
1307 * html/HTMLDocument.idl: Removed the [Custom] attribute on clear and took
1308 it out of the JavaScript-specific section.
1310 * html/HTMLEmbedElement.cpp:
1311 (WebCore::HTMLEmbedElement::parseMappedAttribute): Use AtomicString
1312 consistently. Also renamed the data member for clarity.
1313 (WebCore::HTMLEmbedElement::insertedIntoDocument): Ditto.
1314 (WebCore::HTMLEmbedElement::removedFromDocument): Ditto.
1315 * html/HTMLFormElement.cpp:
1316 (WebCore::HTMLFormElement::insertedIntoDocument): Ditto.
1317 (WebCore::HTMLFormElement::removedFromDocument): Ditto.
1318 (WebCore::HTMLFormElement::parseMappedAttribute): Ditto.
1319 * html/HTMLFormElement.h: Ditto.
1321 * html/HTMLFrameElementBase.cpp:
1322 (WebCore::HTMLFrameElementBase::openURL): Renamed m_name to m_frameName for
1323 clarity, since the frame name is not the same as the name attribute.
1324 (WebCore::HTMLFrameElementBase::parseMappedAttribute): Ditto.
1325 (WebCore::HTMLFrameElementBase::setNameAndOpenURL): Ditto.
1326 * html/HTMLFrameElementBase.h: Ditto.
1328 * html/HTMLIFrameElement.cpp:
1329 (WebCore::HTMLIFrameElement::parseMappedAttribute): Use AtomicString
1330 consistently. Also renamed the data member for clarity.
1331 (WebCore::HTMLIFrameElement::insertedIntoDocument): Ditto.
1332 (WebCore::HTMLIFrameElement::removedFromDocument): Ditto.
1333 * html/HTMLIFrameElement.h: Ditto.
1334 * html/HTMLImageElement.cpp:
1335 (WebCore::HTMLImageElement::parseMappedAttribute): Ditto.
1336 (WebCore::HTMLImageElement::insertedIntoDocument): Ditto.
1337 (WebCore::HTMLImageElement::removedFromDocument): Ditto.
1338 * html/HTMLImageElement.h: Ditto.
1339 * html/HTMLObjectElement.cpp:
1340 (WebCore::HTMLObjectElement::parseMappedAttribute): Ditto.
1341 (WebCore::HTMLObjectElement::insertedIntoDocument): Ditto.
1342 (WebCore::HTMLObjectElement::removedFromDocument): Ditto.
1343 (WebCore::HTMLObjectElement::updateDocNamedItem): Ditto.
1344 * html/HTMLObjectElement.h: Ditto.
1346 * html/HTMLParamElement.cpp:
1347 (WebCore::HTMLParamElement::isURLAttribute): Use equalIgnoringCase instead
1348 of callling lower().
1350 * html/HTMLPlugInElement.h: Changed the type of m_name. The code that
1351 uses this is in HTMLAppletElement, HTMLEmbedElement, and HTMLObjectElement.
1353 * platform/text/AtomicString.cpp:
1354 (WebCore::equal): Moved to an inline so we can share this code between a
1355 few different functions. It could move to a header too if we want to use
1357 (WebCore::UCharBufferTranslator::equal): Change to use inline.
1358 (WebCore::HashAndCharactersTranslator::hash): Added.
1359 (WebCore::HashAndCharactersTranslator::equal): Added.
1360 (WebCore::HashAndCharactersTranslator::translate): Added.
1361 (WebCore::AtomicString::add): Improved the Identifier and UString overloads
1362 to use the already-computed hash code instead of rehashing the string.
1363 (WebCore::AtomicString::find): Added.
1364 * platform/text/AtomicString.h: Added a find function so we can avoid
1365 allocating memory just to look up a string in an atomic string set or map.
1367 * platform/text/StringImpl.h: Added declarations needed for the
1368 AtomicString changes.
1370 2008-03-17 Timothy Hatcher <timothy@apple.com>
1372 Reviewed by Mark Rowe.
1374 Bug 17908: Various bugs in the Console completion code
1375 http://bugs.webkit.org/show_bug.cgi?id=17908
1377 * page/inspector/ConsolePanel.js:
1378 (WebInspector.ConsolePanel.complete): Moved the code that checked for the caret being at the end
1379 of the prompt into the _caretAtEndOfPrompt helper function.
1380 (WebInspector.ConsolePanel.messagesSelectStart): Clear and redo the auto complete when the selection changes.
1381 (WebInspector.ConsolePanel._caretInsidePrompt): Fixed a logic error that always caused a false result.
1382 (WebInspector.ConsolePanel._caretAtEndOfPrompt): Added. Tests if the selection is a caret at the
1384 (WebInspector.ConsolePanel._moveCaretToEndOfPrompt): Changed the offset to use the childNodes length.
1385 This makes sure the caret is at the end when there are multiple text nodes in the prompt.
1387 2008-03-17 Dan Bernstein <mitz@apple.com>
1389 Rubber-stamped by Dave Hyatt.
1391 - FloatingObject cleanup
1393 Renamed FloatingObject's data members as follows: node -> m_renderer,
1394 startY -> m_top, endY -> m_bottom, left -> m_left, width -> m_width,
1395 and noPaint -> !m_shouldPaint, reversing the meaning of the flag.
1397 Also addressed the FIXME in RenderBlock::containsFloat().
1399 * rendering/RenderBlock.cpp:
1400 (WebCore::RenderBlock::repaintOverhangingFloats):
1401 (WebCore::RenderBlock::paintFloats):
1402 (WebCore::RenderBlock::insertFloatingObject):
1403 (WebCore::RenderBlock::removeFloatingObject):
1404 (WebCore::RenderBlock::positionNewFloats):
1405 (WebCore::RenderBlock::leftRelOffset):
1406 (WebCore::RenderBlock::rightRelOffset):
1407 (WebCore::RenderBlock::nextFloatBottomBelow):
1408 (WebCore::RenderBlock::floatBottom):
1409 (WebCore::RenderBlock::floatRect):
1410 (WebCore::RenderBlock::lowestPosition):
1411 (WebCore::RenderBlock::rightmostPosition):
1412 (WebCore::RenderBlock::leftmostPosition):
1413 (WebCore::RenderBlock::leftBottom):
1414 (WebCore::RenderBlock::rightBottom):
1415 (WebCore::RenderBlock::clearFloats):
1416 (WebCore::RenderBlock::addOverhangingFloats):
1417 (WebCore::RenderBlock::addIntrudingFloats):
1418 (WebCore::RenderBlock::containsFloat): Changed to return false if the
1419 floats lists exists but is empty, since line layout code no longer
1420 relies on the buggy behavior.
1421 (WebCore::RenderBlock::nodeAtPoint):
1422 (WebCore::RenderBlock::adjustForBorderFit):
1423 * rendering/RenderBlock.h:
1424 (WebCore::RenderBlock::containsFloats):
1425 (WebCore::RenderBlock::FloatingObject::FloatingObject):
1426 * rendering/bidi.cpp:
1427 (WebCore::RenderBlock::layoutInlineChildren):
1428 (WebCore::RenderBlock::matchedEndLine):
1430 2008-03-17 Dan Bernstein <mitz@apple.com>
1432 Reviewed by Dave Hyatt.
1434 - allow incremental relayout of blocks that contain floats
1436 Tests: fast/repaint/line-flow-with-floats-[1-9].html
1438 * rendering/RenderBlock.cpp:
1439 (WebCore::RenderBlock::clearFloatsIfNeeded): Cleaned up by moving most
1440 of the function body out of an if statement which was replaced with an
1442 (WebCore::RenderBlock::insertFloatingObject): Cleaned up by moving most
1443 of the function body out of an if statement and moving the ASSERT, which
1444 is a crash in release builds, to the beginning. Made this function set
1445 the m_isDescendant flag of floating objects it creates.
1446 (WebCore::RenderBlock::removeFloatingObject): Added a call to
1447 markLinesDirtyInVerticalRange() when removing a float from a block with
1449 (WebCore::RenderBlock::markLinesDirtyInVerticalRange): Added. Marks the
1450 lines in the given range as dirty.
1451 (WebCore::RenderBlock::clearFloats): Added code to detect changes to
1452 the geometry of floats intruding into this block from other blocks and
1453 mark any lines whose available width has changed as a result as dirty.
1455 * rendering/RenderBlock.h:
1456 (WebCore::RenderBlock::FloatWithRect::FloatWithRect): Added a structure
1457 to cache a float with its position and size.
1458 (WebCore::RenderBlock::FloatingObject::FloatingObject): Added an
1459 m_isDescendant flag, used by clearFloats() to distinguish between floats
1460 entering the block from outside and floats internal to the block.
1462 * rendering/RootInlineBox.h:
1463 (WebCore::RootInlineBox::floats): Added.
1464 (WebCore::RootInlineBox::floatsPtr): Added.
1465 (WebCore::RootInlineBox::Overflow::Overflow): Added a data member to
1466 hold the floats originating on the line.
1468 * rendering/bidi.cpp:
1469 (WebCore::RenderBlock::layoutInlineChildren): Made the existence of
1470 floats not force a full layout. Changed to cache the geometry of floats
1471 in the block and detect changes to it. If a float's size or position
1472 changes, all lines from that point on are treated as dirty. An exception
1473 is a change in the dimensions of a float on an otherwise-clean line,
1474 which only dirties lines potentially affected by the change (see
1475 determineStartPosition()). Added code to update each RootInlineBox's
1476 set of floats as lines are laid out. Added code to shift floats
1477 belonging to clean lines in the end along with the lines.
1478 (WebCore::RenderBlock::determineStartPosition): Made this function look
1479 for changes to floats' dimensions and mark lines as dirty accordingly.
1480 Also look for new floats and if found, cause a full layout. Added code
1481 to re-add floats belonging to clean lines.
1482 (WebCore::RenderBlock::matchedEndLine): Added checking that the clean
1483 lines in the end can be shifted vertically as needed, i.e. that the
1484 available width along the way is uniform.
1486 2008-03-17 Eric Seidel <eric@webkit.org>
1490 Fix _NPN_IntFromIdentifier (and export the symbol for use!)
1492 Test: plugins/netscape-identifier-conversion.html
1494 * WebCore.NPAPI.exp:
1495 * bridge/npruntime.cpp:
1496 (_NPN_IntFromIdentifier):
1498 2008-03-17 Sam Weinig <sam@webkit.org>
1500 Reviewed by Dan Bernstein.
1502 Add HTMLCollection constructor to the Window object. (Omission noticed by Harri Porten)
1504 * page/DOMWindow.idl:
1506 2008-03-17 Holger Hans Peter Freyther <zecke@selfish.org>
1508 Unreviewed Gtk+ build fix.
1510 * platform/gtk/ScrollViewGtk.cpp: remove const
1512 2008-03-17 Julien Chaffraix <julien.chaffraix@gmail.com>
1516 <http://bugs.webkit.org/show_bug.cgi?id=17754>
1518 - Implement ResourceHandle::loadResourceSynchronously to dispatch synchronous
1521 - Implement WebCoreSynchronousLoader, the ResourceHandleClient which holds
1522 the network data, response and error for us during the transfert.
1524 * platform/network/ResourceHandleInternal.h: Remove trailing white space.
1525 * platform/network/curl/ResourceHandleCurl.cpp: Add WebCoreSynchronousLoader
1526 (WebCore::WebCoreSynchronousLoader::resourceResponse):
1527 (WebCore::WebCoreSynchronousLoader::resourceError):
1528 (WebCore::WebCoreSynchronousLoader::data):
1529 (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader):
1530 (WebCore::WebCoreSynchronousLoader::didReceiveResponse):
1531 (WebCore::WebCoreSynchronousLoader::didReceiveData):
1532 (WebCore::WebCoreSynchronousLoader::didFinishLoading):
1533 (WebCore::WebCoreSynchronousLoader::didFail):
1534 (WebCore::ResourceHandle::loadResourceSynchronously): Implement method
1535 using WebCoreSynchronousLoader.
1537 * platform/network/curl/ResourceHandleManager.cpp:
1538 (WebCore::ResourceHandleManager::dispatchSynchronousJob):
1539 (WebCore::ResourceHandleManager::startJob):
1540 (WebCore::ResourceHandleManager::initializeHandle): Handle initialization
1541 method used both for synchronous and asynchronous job.
1543 * platform/network/curl/ResourceHandleManager.h:
1545 2008-03-17 Darin Adler <darin@apple.com>
1547 - try to fix GTK build
1549 * platform/ScrollView.h: Make setGtkAdjustments adjustment.
1550 And non-virtual (why was it virtual?).
1552 2008-03-17 Rodney Dawes <dobey@wayofthemonkey.com>
1554 Fix Bug 17898: Split PluginMessageThrottlerWin into its own files
1556 <http://bugs.webkit.org/show_bug.cgi?id=17898>
1558 Move the PluginMessageThrottlerWin class into its own files, in
1559 preparation for refactoring PluginView code to be shared.
1561 Reviewed and tweaked by Adam Roben.
1563 * WebCore.vcproj/WebCore.vcproj:
1564 * plugins/PluginView.h:
1565 * plugins/win/PluginMessageThrottlerWin.cpp: Added.
1566 * plugins/win/PluginMessageThrottlerWin.h: Added.
1567 * plugins/win/PluginViewWin.cpp:
1569 2008-03-17 Adam Roben <aroben@apple.com>
1571 More Windows build fixes after r31098
1573 * platform/ScrollView.h: Make some more methods public.
1575 2008-03-17 Adam Roben <aroben@apple.com>
1577 Windows and Qt build fixes after r31098
1579 * platform/ScrollView.h: Mark methods public that still need to be so.
1581 2008-03-16 Timothy Hatcher <timothy@apple.com>
1583 Reviewed by Darin Adler.
1585 Bug 17883: Console completion should support bracket notation
1586 http://bugs.webkit.org/show_bug.cgi?id=17883
1588 Also fixes a bug where the Inspector's window object was used instead of the
1589 inspected window object.
1591 * page/inspector/ConsolePanel.js:
1592 (WebInspector.ConsolePanel.complete): Add a comment about the _backwardsRange call.
1593 (WebInspector.ConsolePanel.completions): Add a comment about the _backwardsRange call.
1594 Check the last character of the expression for a dot or bracket. Fallback
1595 to the InspectorController.inspectedWindow() instead of window, this was a bad bug.
1596 If the expression caused an exception, just consider the prefix a window property.
1597 When bracket notation is used remember what quote was used and compared property names
1598 with that quote surrounding it. Also escape the property name for the quote and backslash.
1600 2008-03-17 Robert Blaut <webkit@blaut.biz>
1604 Fix for bug http://bugs.webkit.org/show_bug.cgi?id=17696
1605 Set default margin-bottom for form element in quirk mode
1606 and be compatible with Gecko.
1608 Tests: fast/css/margin-bottom-form-element-quirk.html
1609 fast/css/margin-bottom-form-element-strict.html
1614 2008-03-17 Antti Koivisto <antti@apple.com>
1618 Speculative fix for http://bugs.webkit.org/show_bug.cgi?id=17878
1619 Bug 17878: REGRESSION: Acid3 sometimes crashes Webkit under WebCore::Loader::Host::cancelRequests
1621 I can't reproduce the crash or make a test case for this one but I'm pretty sure this
1622 is the problem. Essentially the same bug as http://bugs.webkit.org/show_bug.cgi?id=17862
1623 except in didFail() instead of didFinishLoading().
1625 * loader/loader.cpp:
1626 (WebCore::Loader::Host::didFail):
1628 2008-03-17 Jan Michael Alonzo <jmalonzo@unpluggable.com>
1630 Reviewed and tweaked by Darin.
1632 http://bugs.webkit.org/show_bug.cgi?id=17172
1633 Refactor platform checks in ScrollView.h
1635 * platform/ScrollView.h: Change #ifs around.
1637 2008-03-17 Yuzhu Shen <yuzhu.shen@gmail.com>
1641 Fix the bug: http://bugs.webkit.org/show_bug.cgi?id=17760
1642 It is necessary to load the image even when src="".
1644 Test: fast/images/load-img-with-empty-src.html
1646 * html/HTMLImageLoader.cpp:
1647 (WebCore::HTMLImageLoader::updateFromElement): isNull rather than isEmpty.
1649 2008-03-17 Rodney Dawes <dobey@wayofthemonkey.com>
1651 Fix GTK+ build from r31094.
1653 * plugins/gtk/PluginDatabaseGtk.cpp:
1654 (PluginDatabase::getPluginsInPaths):
1656 2008-03-17 Adam Roben <aroben@apple.com>
1658 Fix Bug 17876: REGRESSION (r31060): Attempting to visit Ofcom page causes crash
1660 <http://bugs.webkit.org/show_bug.cgi?id=17876>
1664 Test: fast/dom/remove-named-attribute-crash.html
1666 * dom/NamedAttrMap.cpp:
1667 (WebCore::NamedAttrMap::removeAttribute): Store the Attribute we're
1668 going to remove from the m_attributes Vector in a RefPtr so it doesn't
1669 get deleted when it is removed from the Vector.
1671 2008-03-17 Rodney Dawes <dobey@wayofthemonkey.com>
1673 Reviewed by Adam Roben.
1675 Implement PluginDatabase for GTK+ with PluginDatabaseGtk.cpp.
1676 Remove implemented methods from TemporaryLinkStubs.
1680 * plugins/gtk/PluginDatabaseGtk.cpp:
1681 * platform/gtk/TemporaryLinkStubs.cpp:
1683 2008-03-17 Simon Hausmann <hausmann@webkit.org>
1687 * platform/text/qt/TextCodecQt.cpp:
1688 (WebCore::TextCodecQt::encode):
1689 * platform/text/qt/TextCodecQt.h:
1691 2008-03-16 Maciej Stachowiak <mjs@apple.com>
1693 Not reviewed, just fixing an incomplete comment from the last commit.
1696 (WebCore::Range::surroundContents):
1698 2008-03-16 Maciej Stachowiak <mjs@apple.com>
1702 - fixed "Acid3 expects different exceptions for surroundContents calls involving comment nodes (affects Acid3 test 11)"
1703 http://bugs.webkit.org/show_bug.cgi?id=17509
1705 This gets us to 92/100
1708 (WebCore::Range::surroundContents): Check for
1709 HIERARCHY_REQUEST_ERR before BAD_BOUNDARYPOINTS_ERR, since Acid3
1710 expects exceptional conditions to be tested in the order that the
1711 spec lists them. Also, adjust the HIERARCHY_REQUEST_ERR check. If
1712 the start point of the range is in a comment node, the node that
1713 would be the parent of a partial replacement is actually the
1714 comment node's parent (since comment nodes have character
1715 indices), so we should do the HIERARCHY_REQUEST_ERR check based on
1716 the parent of the comment node, as for text nodes, even though it
1717 will fail later with a different exception because it is not
1718 allowed to surround a partially selected non-text node.
1720 2008-03-16 Marvin Decker <marv.decker@gmail.com>
1724 Fix bug 15119: URL query characters that are unencodable in the
1725 request's character set should be converted to XML entities with
1726 non-alphanumeric characters escaped.
1728 Test: http/tests/uri/escaped-entity.html
1730 * html/FormDataList.cpp:
1731 (WebCore::FormDataList::appendString):
1732 * html/HTMLFormElement.cpp:
1733 (WebCore::HTMLFormElement::formData):
1734 * platform/KURL.cpp:
1735 (WebCore::encodeRelativeString):
1736 * platform/text/String.cpp:
1737 (WebCore::String::latin1):
1738 (WebCore::String::utf8):
1739 * platform/text/TextCodec.cpp:
1740 (WebCore::TextCodec::unencodableCharReplacement):
1741 * platform/text/TextCodec.h:
1743 * platform/text/TextCodecICU.cpp:
1744 (WebCore::urlEscapedEntityCallback):
1745 (WebCore::gbkUrlEscapedEntityCallack):
1746 (WebCore::TextCodecICU::encode):
1747 * platform/text/TextCodecICU.h:
1748 (WebCore::TextCodecICU::setNeedsGBKFallbacks):
1749 * platform/text/TextCodecLatin1.cpp:
1750 (WebCore::encodeComplexWindowsLatin1):
1751 (WebCore::TextCodecLatin1::encode):
1752 * platform/text/TextCodecLatin1.h:
1753 * platform/text/TextCodecUTF16.cpp:
1754 (WebCore::TextCodecUTF16::encode):
1755 * platform/text/TextCodecUTF16.h:
1756 * platform/text/TextCodecUserDefined.cpp:
1757 (WebCore::encodeComplexUserDefined):
1758 (WebCore::TextCodecUserDefined::encode):
1759 * platform/text/TextCodecUserDefined.h:
1760 * platform/text/TextEncoding.cpp:
1761 (WebCore::TextEncoding::encode):
1762 * platform/text/TextEncoding.h:
1763 * platform/text/mac/TextCodecMac.cpp:
1764 (WebCore::TextCodecMac::encode):
1765 * platform/text/mac/TextCodecMac.h:
1766 * xml/XMLHttpRequest.cpp:
1767 (WebCore::XMLHttpRequest::send):
1769 2008-03-16 Kevin Ollivier <kevino@theolliviers.com>
1771 Rubber stamped by Darin.
1773 Add set-webkit-configuration support for wx port, and centralize
1774 build dir location setting.
1776 http://bugs.webkit.org/show_bug.cgi?id=17790
1780 2008-03-16 Darin Adler <darin@apple.com>
1782 Reviewed by Mark Rowe.
1784 - http://bugs.webkit.org/show_bug.cgi?id=17881
1785 a little cleanup for HTMLTextAreaElement
1787 Tests: fast/forms/textarea-default-value-leading-newline.html
1788 fast/forms/textarea-linewrap-dynamic.html
1790 * html/HTMLTextAreaElement.cpp:
1791 (WebCore::HTMLTextAreaElement::HTMLTextAreaElement): Tweaked names/
1792 (WebCore::HTMLTextAreaElement::selectionStart): Ditto, also use early return
1793 and check for < 0 rather than -1 specifically.
1794 (WebCore::HTMLTextAreaElement::selectionEnd): Ditto.
1795 (WebCore::HTMLTextAreaElement::setSelectionStart): Early return.
1796 (WebCore::HTMLTextAreaElement::setSelectionEnd): Ditto.
1797 (WebCore::HTMLTextAreaElement::select): Ditto.
1798 (WebCore::HTMLTextAreaElement::setSelectionRange): Ditto.
1799 (WebCore::HTMLTextAreaElement::parseMappedAttribute): Changed value parsing
1800 to treat unknown values as meaning "default" rather than "leave value as-is".
1801 Only call setNeedsLayoutAndPrefWidthsRecalc when mode changed.
1802 (WebCore::HTMLTextAreaElement::createRenderer): Removed name of unused argument.
1803 (WebCore::HTMLTextAreaElement::appendFormData): Updated for name changes.
1804 (WebCore::HTMLTextAreaElement::isKeyboardFocusable): Got rid of unnneeded explicit
1805 class name in isFocusable call.
1806 (WebCore::HTMLTextAreaElement::isMouseFocusable): Ditto.
1807 (WebCore::HTMLTextAreaElement::updateFocusAppearance): Tweaked formatting.
1808 (WebCore::HTMLTextAreaElement::defaultEventHandler): Ditto.
1809 (WebCore::HTMLTextAreaElement::updateValue): Early return.
1810 (WebCore::HTMLTextAreaElement::setValue): Got rid of intermediate value to
1811 eliminate on small refcount churn.
1812 (WebCore::HTMLTextAreaElement::defaultValue): Got rid of unneeded redundant
1813 string length checks, since String already checks all indexing and returns 0.
1814 (WebCore::HTMLTextAreaElement::setDefaultValue): Added code to normalize
1815 line endings and add a leading line ending to fix cases where the first
1816 character is a newline.
1817 (WebCore::HTMLTextAreaElement::accessKeyAction): Removed name of unused arg.
1818 (WebCore::HTMLTextAreaElement::accessKey): Changed return value to avoid
1820 (WebCore::HTMLTextAreaElement::selection): Updated names and use < 0 instead
1823 * html/HTMLTextAreaElement.h: Replaced wrap function with more-specific
1824 shouldWrapText one. Changed return value of accessKey. Made WrapMethod enum
1825 provate and renamed the values. Renamed cachedSelStart and cachedSelEnd to
1826 m_cachedSelectionStart and m_cachedSelectionEnd.
1828 * rendering/RenderTextControl.cpp:
1829 (WebCore::RenderTextControl::createInnerTextStyle): Updated for change to
1830 HTMLTextAreaElement wrap function.
1832 2008-03-16 Antti Koivisto <antti@apple.com>
1836 Fix http/tests/security/frame-loading-via-document-write.html
1837 which was broken by the preload patch.
1839 Don't print error message when preload fails local file security check.
1840 Some minor refactoring.
1842 * html/PreloadScanner.cpp:
1843 (WebCore::PreloadScanner::emitTag):
1844 (WebCore::PreloadScanner::emitCSSRule):
1846 (WebCore::Cache::requestResource):
1848 * loader/DocLoader.cpp:
1849 (WebCore::DocLoader::requestResource):
1850 (WebCore::DocLoader::preload):
1851 (WebCore::DocLoader::printPreloadStats):
1852 * loader/DocLoader.h:
1854 2008-03-16 Antti Koivisto <antti@apple.com>
1858 Fix http://bugs.webkit.org/show_bug.cgi?id=17862
1859 REGRESSION (r31038): Reproducible crash under DocLoader::checkForReload() at marware.com
1861 This was a memory smasher introduced by the preloading patch.
1862 If a script resource was marked uncacheable, early deletion of the
1863 Request object would cause deletion of the CachedResource too if
1864 it was referred more than once in a single document.
1866 Test: http/tests/misc/uncacheable-script-repeated.html
1868 * loader/loader.cpp:
1869 (WebCore::Loader::Host::servePendingRequests):
1870 (WebCore::Loader::Host::didFinishLoading):
1872 2008-03-16 Yuzhu Shen <yuzhu.shen@gmail.com>
1876 Fix bug http://bugs.webkit.org/show_bug.cgi?id=17714
1877 <img href="#"> should go to top of the page.
1879 Test: fast/html/empty-fragment-id-goto-top.html
1881 * loader/FrameLoader.cpp:
1882 (WebCore::FrameLoader::gotoAnchor):
1884 2008-03-16 Thiago Macieira <thiago.macieira@trolltech.com>
1888 Don't use RefPtr in classes you haven't seen the implementation of.
1890 Forward-declaration and declaration of RefPtr<Foo> is ok. But you
1891 cannot *use* said objects until Foo is defined. This is true even for
1892 initialisation with a 0.
1894 Seems the HP aCC compiler is more strict here than gcc.
1896 * editing/SplitTextNodeCommand.h:
1898 * xml/XPathExpressionNode.h:
1900 2008-03-16 Darin Adler <darin@apple.com>
1904 - fix http://bugs.webkit.org/show_bug.cgi?id=14941
1905 <rdar://problem/5404093> textarea value from JavaScript includes extra newline
1907 Test: fast/forms/textarea-trailing-newline.html
1909 * rendering/RenderTextControl.cpp:
1910 (WebCore::RenderTextControl::finishText): Added code to strip the trailing
1911 newline. It's possible there are some obscure cases where this is not wanted,
1912 but I couldn't find any. If someone finds a case where this is bad, we can
1913 make the code conditional.
1915 2008-03-16 Darin Adler <darin@apple.com>
1919 - fix http://bugs.webkit.org/show_bug.cgi?id=17876
1920 Attempting to visit Ofcom page causes crash
1922 This is causing intermittent crashes on some existing test cases on the buildbot
1923 too; I don't have a 100% test case right now, but it should be easy to add one later
1924 and this does fix a crash in a test we already have.
1926 * dom/CharacterData.cpp:
1927 (WebCore::CharacterData::CharacterData): Initialize m_data to the empty string,
1928 not the null string. The class assumes the string can never being null.
1929 (WebCore::CharacterData::setData): If asked to set the data to the null string,
1930 set it to the empty string instead. This matches what the (non-empty) constructor
1933 2008-03-15 Timothy Hatcher <timothy@apple.com>
1935 Reviewed by Adam Roben.
1937 Bug 17870: Web Inspector console should feel more like a terminal
1938 http://bugs.webkit.org/show_bug.cgi?id=17870
1940 Bug 14390: Console input area should be more noticeable
1941 http://bugs.webkit.org/show_bug.cgi?id=14390
1944 Bug 17237: Inspector should tab-complete object properties in the Console
1945 http://bugs.webkit.org/show_bug.cgi?id=17237
1948 Adds tab completion, auto completion and a blended input prompt.
1949 The prompt is also focused when the console is shown.
1950 Implements a new look, that will be part of the UI refresh.
1952 * page/inspector/ConsolePanel.js:
1953 (WebInspector.ConsolePanel): Renamed a few properties.
1954 (WebInspector.ConsolePanel.get/set promptText): Property to set
1955 and get the current prompt text. Does not affect command history.
1956 (WebInspector.ConsolePanel.show): Make the prompt focus on show.
1957 (WebInspector.ConsolePanel.acceptAutoComplete): Accepts any
1958 pending auto complete text.
1959 (WebInspector.ConsolePanel.clearAutoComplete): Cancels any pending
1961 (WebInspector.ConsolePanel.autoCompleteSoon): Sets a timeout to auto
1962 complete in 250 ms, only if there isn't a pending auto complete.
1963 (WebInspector.ConsolePanel.complete):
1964 (WebInspector.ConsolePanel.completions): Generate a list of possible
1965 completions based on the prefix and the previous expression ranges.
1966 (WebInspector.ConsolePanel._backwardsRange): Helper to scan backwards
1967 from a node and offset to find a start node and offset of the first
1968 character found in the characters string.
1969 (WebInspector.ConsolePanel._evalInInspectedWindow): Helper to eval in the
1971 (WebInspector.ConsolePanel._caretInsidePrompt): Returns true if the selection
1972 is collapsed and is inside the prompt element.
1973 (WebInspector.ConsolePanel._moveCaretToEndOfPrompt): Moves the selection
1974 to the end of the prompt.
1975 (WebInspector.ConsolePanel._onTabPressed): Calls complete on
1977 (WebInspector.ConsolePanel._onEnterPressed): Call clearAutoComplete so the
1978 autocompletion text is not evaluated.
1980 * page/inspector/Images/errorIcon.png: New image.
1981 * page/inspector/Images/userInputIcon.png: Added.
1982 * page/inspector/Images/userInputPreviousIcon.png: Added.
1983 * page/inspector/Images/warningIcon.png: New image.
1984 * page/inspector/inspector.css: New refreshed UI.
1986 2008-03-15 Mark Mentovai <mark@moxienet.com>
1988 Reviewed and landed by Darin.
1990 - http://bugs.webkit.org/show_bug.cgi?id=17833
1991 use file extensions instead of explicit file types in WebCore's Xcode project
1993 * WebCore.xcodeproj/project.pbxproj: Remove unnecessary
1994 uses of explicitFileType, preferring lastKnownFileType ("File Type:
1995 Default for File" in Xcode's File Info's General tab). Files below
1996 that relied on an explicit file type setting other than what would
1997 be implied by their extensions have been renamed to have correct
1999 * bridge/jni/jni_jsobject.cpp: Removed.
2000 * bridge/jni/jni_jsobject.mm: Copied from bridge/jni/jni_jsobject.cpp.
2001 * loader/mac/LoaderNSURLExtras.m: Removed.
2002 * loader/mac/LoaderNSURLExtras.mm: Copied from loader/mac/LoaderNSURLExtras.m.
2003 * platform/mac/SharedTimerMac.cpp: Removed.
2004 * platform/mac/SharedTimerMac.mm: Copied from platform/mac/SharedTimerMac.cpp.
2006 2008-03-15 Darin Adler <darin@apple.com>
2010 - fix http://bugs.webkit.org/show_bug.cgi?id=11997
2011 Ranges are not fixed after mutation (affects Acid3 test 13)
2013 Test: fast/dom/Range/mutation.html
2015 * WebCore.xcodeproj/project.pbxproj: Added NodeWithIndex.h, NodeWithIndexAfter.h,
2016 and NodeWithIndexBefore.h.
2018 * dom/CharacterData.cpp:
2019 (WebCore::CharacterData::setData): Replaced call to Document::removeMarkers
2020 with call to Document::textRemoved.
2021 (WebCore::CharacterData::insertData): Replaced call to Document::shiftMarkers
2022 with call to Document::textInserted.
2023 (WebCore::CharacterData::deleteData): Replaced call to Document::removeMarkers
2024 and Document::shiftMarkers with call to Document::textRemoved.
2025 (WebCore::CharacterData::replaceData): Replaced call to Document::removeMarkers
2026 and Document::shiftMarkers with call to Document::textRemoved and
2027 Document::textInserted.
2028 (WebCore::CharacterData::containsOnlyWhitespace): Tweaked a bit.
2030 * dom/ContainerNode.cpp:
2031 (WebCore::ContainerNode::childrenChanged): Added a call to
2032 Document::nodeChildrenChanged when the nmber of children was changed (and not
2034 (WebCore::dispatchChildRemovalEvents): Updated for name change.
2037 (WebCore::Document::~Document): Assert that all ranges are gone.
2038 (WebCore::Document::nodeChildrenChanged): Added. Calls nodeChildrenChanged on
2040 (WebCore::Document::nodeWillBeRemoved): Renamed from notifyBeforeNodeRemoval.
2041 Added code to call nodeWillBeRemoved on all ranges.
2042 (WebCore::Document::textInserted): Added. Calls textInserted on all ranges and
2043 also calls shiftMarkers.
2044 (WebCore::Document::textRemoved): Added. Calls textRemoved on all ranges and also
2045 calls removeMarkers and shiftMarkers.
2046 (WebCore::Document::textNodesMerged): Added. Calls textNodesMerged on all ranges.
2047 (WebCore::Document::textNodeSplit): Added. Calls textNodeSplit on all ranges.
2048 (WebCore::Document::attachRange): Added. Adds range to the HashSet of all ranges
2050 (WebCore::Document::detachRange): Added. Removes range from the HashSet.
2051 * dom/Document.h: Added the new functions and the data member.
2054 (WebCore::Element::normalizeAttributes): Added. Contains the part of the
2055 normalize function that's specific to Element. Better encapsulation to have it
2056 here rather than in Node::normalize.
2057 * dom/Element.h: Added the new function.
2060 (WebCore::Node::normalize): Rewrote so it's no longer recursive. Also added
2061 a call to textNodesMerged after each pair of nodes is merged but before the
2062 second node is removed.
2063 (WebCore::Node::traverseNextNodePostOrder): Added. Helper function used by
2064 normalize, but also useful elsewhere.
2065 * dom/Node.h: Added the new function.
2067 * dom/NodeIterator.cpp:
2068 (WebCore::NodeIterator::nodeWillBeRemoved): Renamed from notifyBeforeNodeRemoval.
2069 * dom/NodeIterator.h: Ditto.
2071 * dom/ProcessingInstruction.cpp:
2072 (WebCore::ProcessingInstruction::setData): Call textRemoved.
2075 (WebCore::NodeWithIndex::index): Added. Computes and stores index.
2076 (WebCore::NodeWithIndexBefore::indexBefore): Added. Computes and stores index.
2077 (WebCore::NodeWithIndexAfter::indexAfter): Added. Computes and stores index.
2078 (WebCore::Range::Range): Call attachRange.
2079 (WebCore::Range::~Range): Call detachRange unless the range is already detached.
2080 (WebCore::Range::commonAncestorContainer): Removed check for WRONG_DOCUMENT_ERR.
2081 It's no longer possible to create a range where the two containers are non-zero
2082 and have no common ancestor.
2083 (WebCore::Range::isPointInRange): Rewrote expression to be more readable.
2084 (WebCore::Range::compareNode): Changed local variable to use int for consistency.
2085 (WebCore::Range::compareBoundaryPoints): Replaced ASSERT with ASSERT_NOT_REACHED.
2086 (WebCore::Range::deleteContents): Removed check for INVALID_STATE_ERR and
2087 initialization of ec to 0; both are now inside checkDeleteExtract.
2088 (WebCore::Range::intersectsNode): Changed local variable to use int for consistency.
2089 Also changed comparison to use < 0 and >= 0 rather than checking explicitly for 1
2091 (WebCore::Range::processContents): Changed code to not get the nodeType multiple
2092 times on the same node, and tweaked formatting. Removed code to update the range
2093 on deletion, because the normal delete logic will take care of that now.
2094 (WebCore::Range::extractContents): Removed check for INVALID_STATE_ERR and
2095 initialization of ec to 0; both are now inside checkDeleteExtract.
2096 (WebCore::Range::insertNode): Changed local variable to use int for consistency.
2097 (WebCore::Range::toString): Changed variable name to pastLast.
2098 (WebCore::Range::detach): Call detachRange.
2099 (WebCore::Range::checkDeleteExtract): Added check for detached range and code to
2100 set ec to 0; moved here from the two callers. Also changed variable name to pastLast.
2101 (WebCore::endpointNodeChildrenChanged): Added.
2102 (WebCore::Range::nodeChildrenChanged): Added.
2103 (WebCore::endpointNodeWillBeRemoved): Added.
2104 (WebCore::Range::nodeWillBeRemoved): Added.
2105 (WebCore::endpointTextInserted): Added.
2106 (WebCore::Range::textInserted): Added.
2107 (WebCore::endpointTextRemoved): Added.
2108 (WebCore::Range::textRemoved): Added.
2109 (WebCore::endpointTextNodesMerged): Added.
2110 (WebCore::Range::textNodesMerged): Added.
2111 (WebCore::endpointTextNodesSplit): Added.
2112 (WebCore::Range::textNodeSplit): Added.
2114 * dom/Range.h: Added new member functions.
2116 * dom/NodeWithIndex.h: Added. Makes it so we won't find the index for the same
2117 node more than once.
2118 * dom/NodeWithIndexAfter.h: Added. Similar to NodeWithIndex but gives the index after a
2119 node and treats a node pointer of 0 as meaning "before first node in parent container".
2120 * dom/NodeWithIndexBefore.h: Added. Similar to NodeWithIndex but treats a node pointer of 0
2121 as meaning "after last node in parent container".
2124 (WebCore::Text::splitText): Call textNodeSplit.
2126 * editing/ApplyStyleCommand.cpp:
2127 (WebCore::ApplyStyleCommand::applyInlineStyle): Changed variable name to pastLast.
2129 2008-03-15 Julien Chaffraix <julien.chaffraix@gmail.com>
2133 [CURL] Crash below ResourceHandleManager::setupPOST when job->request().httpBody() is NULL
2134 http://bugs.webkit.org/show_bug.cgi?id=16906
2136 Add null checks for httpBody() to match other ports.
2138 Test: http/tests/xmlhttprequest/xmlhttprequest-post-crash.html
2140 * platform/network/curl/ResourceHandleManager.cpp:
2141 (WebCore::readCallback): Add null check.
2142 (WebCore::ResourceHandleManager::setupPOST): Ditto.
2144 2008-03-14 Steve Falkenburg <sfalken@apple.com>
2148 * WebCore.vcproj/WebCore.vcproj:
2150 2008-03-14 Anders Carlsson <andersca@apple.com>
2154 <rdar://problem/5794989>
2155 https://bugs.webkit.org/show_bug.cgi?id=17792
2156 REGRESSION (Safari 3.0.4-3.1): Ordering tickets from Sweden's biggest train operator doesn't work
2158 Pass the frame loader that should be used for looking up the frame name to FrameLoader::createWindow
2159 so that somewindow.open calls where the active window and 'somewindow' differ return the correct frame.
2161 * bindings/js/JSDOMWindowBase.cpp:
2162 (WebCore::createWindow):
2163 * loader/FrameLoader.cpp:
2164 (WebCore::FrameLoader::createWindow):
2165 * loader/FrameLoader.h:
2167 2008-03-14 Dan Bernstein <mitz@apple.com>
2169 Reviewed by Mark Rowe.
2171 - fix <rdar://problem/5797836> shadow offsets are smaller than specified
2173 * platform/graphics/cg/GraphicsContextCG.cpp:
2174 (WebCore::GraphicsContext::setShadow): Made the workaround for
2175 <rdar://problem/5539388> unconditional.
2177 2008-03-14 Adam Roben <aroben@apple.com>
2179 Fix it right this time
2181 * platform/MainThread.cpp: Cast to unsigned so we can use %u in the
2183 * platform/mac/MainThreadMac.mm:
2185 2008-03-14 Adam Roben <aroben@apple.com>
2189 * platform/mac/MainThreadMac.mm: Corrected a typo.
2191 2008-03-14 Dan Bernstein <mitz@apple.com>
2193 Reviewed by Darin Adler.
2195 - fix http://bugs.webkit.org/show_bug.cgi?id=17834
2196 REGRESSION: floated first-letter does not work when included in table
2198 Test: fast/css/first-letter-float.html
2200 * rendering/RenderBlock.cpp:
2201 (WebCore::RenderBlock::updateFirstLetter): Changed the search for the
2202 first text node to stop at a float if that float is an existing first-
2205 2008-03-14 Sam Weinig <sam@webkit.org>
2209 * WebCore.xcodeproj/project.pbxproj:
2211 2008-03-13 Adam Roben <aroben@apple.com>
2213 Make most of callOnMainThread's implementation be cross-platform
2215 I took the non-platform-specific parts of MainThreadWin.cpp and moved
2216 them to a new MainThread.cpp. Each platform is now responsible for
2217 implementing one function, scheduleDispatchFunctionsOnMainThread,
2218 which is supposed to set things up so that
2219 dispatchFunctionsFromMainThread gets called from the main thread in
2224 * GNUmakefile.am: Added MainThread.cpp to the project.
2225 * WebCore.pro: Ditto.
2226 * WebCore.vcproj/WebCore.vcproj: Ditto.
2227 * WebCore.xcodeproj/project.pbxproj: Ditto.
2228 * WebCoreSources.bkl: Ditto.
2229 * platform/MainThread.cpp:
2230 - Copied from WebCore/platform/win/MainThreadWin.cpp.
2231 - Removed the Windows-specific parts.
2232 (WebCore::callOnMainThread): Changed to call
2233 scheduleDispatchFunctionsOnMainThread instead of PostMessage.
2234 * platform/gtk/MainThreadGtk.cpp:
2235 (WebCore::timeoutFired): Renamed from callFunctionOnMainThread. Now
2236 just calls dispatchFunctionsFromMainThread.
2237 (WebCore::scheduleDispatchFunctionsOnMainThread): Added. Calls through
2239 * platform/mac/MainThreadMac.mm: Renamed WebCoreFunctionWrapper to
2240 WebCoreMainThreadCaller.
2241 (-[WebCoreMainThreadCaller call]): Calls through to
2242 dispatchFunctionsFromMainThread.
2243 (WebCore::scheduleDispatchFunctionsOnMainThread): Makes a new
2244 WebCoreMainThreadCaller and calls performSelectorOnMainThread on it.
2245 * platform/qt/MainThreadQt.cpp: Removed PerformFunctionEvent.
2246 (WebCore::MainThreadInvoker::event): Chagned to call through to
2247 dispatchFunctionsFromMainThread.
2248 (WebCore::scheduleDispatchFunctionsOnMainThread): Sends an empty event
2249 to the MainThreadInvoker.
2250 * platform/win/MainThreadWin.cpp:
2251 - Removed the non-Windows-specific parts.
2252 - Removed some unnecessary initialization of static variables to 0.
2253 (WebCore::ThreadingWindowWndProc): Changed to call
2254 dispatchFunctionsFromMainThread.
2255 (WebCore::scheduleDispatchFunctionsOnMainThread): Calls through to
2257 * platform/wx/MainThreadWx.cpp:
2258 (WebCore::scheduleDispatchFunctionsOnMainThread): Added.
2260 2008-03-14 Beth Dakin <bdakin@apple.com>
2264 Fix for <rdar://problem/5728171> Potential PLT speedup: don't
2265 realloc every time inside NamedAttrMap::addAttribute
2267 The speed-up for this turned out to be so small that it is mostly
2268 imperceptible. It is likely that it is a tiny boost, though, and
2269 the new code is much cleaner.
2272 (WebCore::Element::setAttributeMap): attrs is now called
2274 * dom/NamedAttrMap.cpp: The array attrs is now the Vector of
2275 RefPtrs called m_attributes, and there is no longer any need for
2276 the len member variable.
2277 (WebCore::NamedAttrMap::NamedAttrMap):
2278 (WebCore::NamedAttrMap::item):
2279 (WebCore::NamedAttrMap::getAttributeItem):
2280 (WebCore::NamedAttrMap::clearAttributes):
2281 (WebCore::NamedAttrMap::operator=):
2282 (WebCore::NamedAttrMap::addAttribute):
2283 (WebCore::NamedAttrMap::removeAttribute):
2284 (WebCore::NamedAttrMap::mapsEquivalent):
2285 * dom/NamedAttrMap.h: Same.
2286 (WebCore::NamedAttrMap::length):
2287 (WebCore::NamedAttrMap::attributeItem):
2288 (WebCore::NamedAttrMap::shrinkToLength):
2289 (WebCore::NamedAttrMap::reserveCapacity):
2290 * html/HTMLTokenizer.cpp: One of the benefits of the old array was
2291 that it never took up more memory than it needed to. So the
2292 tokenizer utilizes new member functions on NamedAttrMap
2293 (shrinkToLength and reserveCapacity) to try to keep memory usage at
2295 (WebCore::Token::addAttribute):
2296 (WebCore::HTMLTokenizer::processToken):
2298 2008-03-14 David D. Kilzer <ddkilzer@apple.com>
2300 BUILD FIX when ENABLE(MAC_JAVA_BRIDGE) set to 0.
2302 * page/mac/FrameMac.mm: Move up #if ENABLE(MAC_JAVA_BRIDGE) guard
2303 to comment out unused code.
2305 2008-03-14 David D. Kilzer <ddkilzer@apple.com>
2307 Unify concept of enabling the Mac Java bridge.
2309 Reviewed by Darin and Anders.
2311 No test cases added since there is no change in functionality.
2313 * DerivedSources.make: Added check for ENABLE_MAC_JAVA_BRIDGE macro.
2314 If defined as "1", add WebCore.JNI.exp to WEBCORE_EXPORT_DEPENDENCIES.
2315 * WebCore.JNI.exp: Added.
2316 * WebCore.base.exp: Moved exported JNI methods to WebCore.JNI.exp.
2318 * bridge/jni/jni_class.cpp: Added #if ENABLE(MAC_JAVA_BRIDGE) guard.
2319 * bridge/jni/jni_class.h: Ditto.
2320 * bridge/jni/jni_instance.cpp: Ditto.
2321 * bridge/jni/jni_instance.h: Ditto.
2322 * bridge/jni/jni_jsobject.cpp: Ditto.
2323 * bridge/jni/jni_jsobject.h: Ditto.
2324 * bridge/jni/jni_objc.mm: Ditto.
2325 * bridge/jni/jni_runtime.cpp: Ditto.
2326 * bridge/jni/jni_runtime.h: Ditto.
2327 * bridge/jni/jni_utility.cpp: Ditto.
2328 * bridge/jni/jni_utility.h: Ditto.
2330 * bridge/runtime.cpp: Removed unused #include statements.
2332 (KJS::Bindings::Instance::BindingLanguage): Added #if ENABLE(MAC_JAVA_BRIDGE)
2333 guard for JavaLanguage enum. Also added #if PLATFORM(MAC) guard for
2334 ObjectiveCLanguage enum to match corresponding code in runtime.cpp.
2336 * config.h: Removed definition of HAVE_JNI.
2338 * loader/FrameLoaderClient.h:
2339 (WebCore::FrameLoaderClient::javaApplet): Added #if ENABLE(MAC_JAVA_BRIDGE) guard.
2341 (WebCore::Frame::Frame): Ditto.
2343 (WebCore::Frame::initJavaJSBindings): Ditto.
2344 * page/mac/FrameMac.mm:
2345 (WebCore::Frame::createScriptInstanceForWidget): Ditto.
2346 (WebCore::Frame::initJavaJSBindings): Ditto.
2348 2008-03-13 Darin Adler <darin@apple.com>
2350 * html/PreloadScanner.h: Corrected license.
2351 * html/PreloadScanner.cpp: Corrected license.
2353 2008-03-13 Mark Mentovai <mark@moxienet.com>
2355 Reviewed by darin. Landed by eseidel.
2357 * platform/FloatConversion.h: Include a header to get CoreGraphics
2358 types when using CoreGraphics types.
2360 2008-03-13 Mark Mentovai <mark@moxienet.com>
2362 Reviewed by eseidel. Landed by eseidel.
2364 * WebCore.xcodeproj/project.pbxproj:
2365 * css/CSSParser.cpp:
2367 Move CSSPropertyNames.c to CSSPropertyNames.cpp
2369 2008-03-13 Mark Mentovai <mark@moxienet.com>
2371 Reviewed by eseidel. Landed by eseidel.
2373 * platform/Arena.h: Use statement1;statement2 instead of
2374 (statement1,statement2) in CLEAR_UNUSED.
2376 2008-03-13 Tommi Komulainen <tommi.komulainen@iki.fi>
2378 Reviewed by Alp Toker.
2380 http://bugs.webkit.org/show_bug.cgi?id=17821
2381 [SOUP] POST requests are empty
2383 Send the HTTP request body as well.
2385 * platform/network/soup/ResourceHandleSoup.cpp:
2386 (WebCore::ResourceHandle::start):
2388 2008-03-13 Dan Bernstein <mitz@apple.com>
2390 Reviewed by Dave Hyatt.
2392 - fix http://bugs.webkit.org/show_bug.cgi?id=17819
2393 Border-collapse: collapse later cell wins on PC, earlier cell on Mac
2395 Test: fast/table/border-collapsing/equal-precedence-resolution.html
2397 * rendering/RenderTableCell.cpp:
2398 (WebCore::RenderTableCell::collapsedLeftBorder): When calling
2399 compareBorders() with borders that may have the same precedence, made
2400 sure to pass the border belonging to the earlier (in document order)
2401 element first, since compareBorders() prefers the first argument when
2403 (WebCore::RenderTableCell::collapsedRightBorder): Ditto.
2404 (WebCore::RenderTableCell::collapsedTopBorder): Ditto.
2406 2008-03-13 Adam Roben <aroben@apple.com>
2408 wx build fix and Windows leak fix after r31034
2410 * platform/graphics/wx/ImageWx.cpp:
2411 (WebCore::Image::loadPlatformResource): Use SharedBuffer::create.
2412 * platform/win/SharedBufferWin.cpp:
2413 (WebCore::SharedBuffer::createWithContentsOfFile): Ditto (we were
2414 leaking the SharedBuffer here before).
2416 2008-03-13 Antti Koivisto <antti@apple.com>
2420 Correct a few issues spotted by Mike Belshe.
2422 * html/PreloadScanner.cpp:
2423 (WebCore::PreloadScanner::tokenize):
2424 * loader/loader.cpp:
2425 (WebCore::Loader::cancelRequests):
2427 2008-03-13 Rodney Dawes <dobey@wayofthemonkey.com>
2429 Fix GTK+ build for SharedBuffer changes.
2431 * platform/graphics/gtk/ImageGtk.cpp:
2432 (Image::loadPlatformResource):
2434 2008-03-13 Steve Falkenburg <sfalken@apple.com>
2436 More PGO build fixes.
2438 * WebCorePrefix.cpp:
2440 2008-03-13 Antti Koivisto <antti@apple.com>
2444 Make page loads go fast.
2446 http://bugs.webkit.org/show_bug.cgi?id=17480
2448 - Implement speculative preloading. When a script load blocks the main parser, use a side
2449 parser to pick up more resources.
2450 - Implement per-host load queues, prioritize scripts and stylesheets over images.
2452 Depending on content and network latency this may speed things up quite a bit.
2454 * WebCore.xcodeproj/project.pbxproj:
2456 (WebCore::Document::implicitClose):
2457 Clear the preloads after laoding completes.
2459 * html/HTMLLinkElement.cpp:
2460 (WebCore::HTMLLinkElement::parseMappedAttribute):
2461 (WebCore::HTMLLinkElement::tokenizeRelAttribute):
2462 * html/HTMLLinkElement.h:
2463 Make tokenizeRelAttribute() public static so it can be used from elsewhere.
2464 Eliminate a pointless bitfield so I can get references.
2466 * html/HTMLTokenizer.cpp:
2467 (WebCore::HTMLTokenizer::scriptHandler):
2468 (WebCore::HTMLTokenizer::scriptExecution):
2469 (WebCore::HTMLTokenizer::write):
2470 * html/HTMLTokenizer.h:
2471 Spin up the preload scanner whenever a script load blocks the parser. One scanner tracks the end of
2472 the document while temporary ones are created as needed to scan document.write() output.
2474 * html/PreloadScanner.cpp: Added.
2475 (WebCore::PreloadScanner::PreloadScanner):
2476 (WebCore::PreloadScanner::~PreloadScanner):
2477 (WebCore::PreloadScanner::begin):
2478 (WebCore::PreloadScanner::end):
2479 (WebCore::PreloadScanner::reset):
2480 (WebCore::PreloadScanner::write):
2481 (WebCore::isWhitespace):
2482 (WebCore::PreloadScanner::clearLastCharacters):
2483 (WebCore::PreloadScanner::rememberCharacter):
2484 (WebCore::PreloadScanner::lastCharactersMatch):
2485 (WebCore::legalEntityFor):
2486 (WebCore::PreloadScanner::consumeEntity):
2487 (WebCore::PreloadScanner::tokenize):
2488 (WebCore::PreloadScanner::processAttribute):
2489 (WebCore::PreloadScanner::emitCharacter):
2490 (WebCore::PreloadScanner::tokenizeCSS):
2491 (WebCore::PreloadScanner::emitTag):
2492 (WebCore::PreloadScanner::emitCSSRule):
2493 * html/PreloadScanner.h: Added.
2494 (WebCore::PreloadScanner::inProgress):
2495 (WebCore::PreloadScanner::):
2496 HTML5 tokenization plus some glue code. Fake CSS parsing thrown in just for fun.
2499 (WebCore::Cache::pruneDeadResources):
2500 Preloads have zero refcount, avoid kicking them out too early.
2502 * loader/CachedResource.cpp:
2503 (WebCore::CachedResource::CachedResource):
2504 (WebCore::CachedResource::ref):
2505 * loader/CachedResource.h:
2506 (WebCore::CachedResource::):
2507 (WebCore::CachedResource::preloadResult):
2508 (WebCore::CachedResource::setRequestedFromNetworkingLayer):
2509 (WebCore::CachedResource::canDelete):
2510 (WebCore::CachedResource::isPreloaded):
2511 (WebCore::CachedResource::increasePreloadCount):
2512 (WebCore::CachedResource::decreasePreloadCount):
2513 Keep track which resources are preloads. Avoid deleting them. Track
2514 at which point of the loading preloads get utilized to enable some interesting
2517 * loader/DocLoader.cpp:
2518 (WebCore::DocLoader::~DocLoader):
2519 (WebCore::DocLoader::checkForReload):
2520 (WebCore::DocLoader::registerPreload):
2521 (WebCore::DocLoader::clearPreloads):
2522 (WebCore::DocLoader::printPreloadStats):
2523 * loader/DocLoader.h:
2524 Ensure we utilize preloaded resources during reloads.
2525 Keep a list of all preloads in the document. Clear the preloads after
2526 parsing is complete. Some debug statistics.
2528 * loader/DocumentLoader.cpp:
2529 (WebCore::DocumentLoader::isLoadingInAPISense):
2530 Avoid signaling that loading is complete too early.
2532 * loader/loader.cpp:
2533 (WebCore::Loader::Loader):
2534 (WebCore::Loader::~Loader):
2535 (WebCore::Loader::determinePriority):
2536 (WebCore::Loader::load):
2537 (WebCore::Loader::scheduleServePendingRequests):
2538 (WebCore::Loader::requestTimerFired):
2539 (WebCore::Loader::servePendingRequests):
2540 (WebCore::Loader::cancelRequests):
2541 (WebCore::Loader::Host::Host):
2542 (WebCore::Loader::Host::~Host):
2543 (WebCore::Loader::Host::addRequest):
2544 (WebCore::Loader::Host::hasRequests):
2545 (WebCore::Loader::Host::servePendingRequests):
2546 (WebCore::Loader::Host::didFinishLoading):
2547 (WebCore::Loader::Host::didFail):
2548 (WebCore::Loader::Host::didReceiveResponse):
2549 (WebCore::Loader::Host::didReceiveData):
2550 (WebCore::Loader::Host::cancelPendingRequests):
2551 (WebCore::Loader::Host::cancelRequests):
2553 (WebCore::Loader::):
2554 Distribute load requests to per-host priority queues. Limit the number of loads issued to the
2555 networking layer so we have better changes of getting important requests through first.
2556 Prioritize scripts > stylesheets > images.
2558 2008-03-13 David Hyatt <hyatt@apple.com>
2560 This patch makes full page zoom work pretty well. It fixes repainting so that it works when transforms
2561 are set on the RenderView. It also implements the "smart layout" behavior that other browsers support when
2562 zooming. The page will still try to constrain to the viewport size even when zoomed.
2567 (WebCore::Document::recalcStyle):
2568 Make sure to test for transform changes even when there is no zoom. This fixes repainting issues
2569 caused by jumping from a zoomed state back to the standard size.
2571 * page/FrameView.cpp:
2572 (WebCore::FrameView::adjustViewSize):
2573 Adjust for the zoom factor (the render tree is in unzoomed coordinates, but the scrollbars of the view
2574 need to handle zoomed coordinates).
2576 * rendering/RenderBox.cpp:
2577 (WebCore::RenderBox::calcHeight):
2578 Fix the body-sizing-to-the-view-height quirk so that it takes the zoom factor into account when
2579 stretching to fill the viewport.
2581 * rendering/RenderLayer.cpp:
2582 (WebCore::RenderLayer::updateLayerPositions):
2583 (WebCore::RenderLayer::setHasVisibleContent):
2584 Remove the FIXMEs now that absoluteClippedOverflowRect works with transforms on the RenderView.
2586 * rendering/RenderView.cpp:
2587 (WebCore::RenderView::calcHeight):
2588 (WebCore::RenderView::calcWidth):
2589 Make sure the calculated width/height take the zoom factor into account in order to get the "smart layout"
2592 (WebCore::RenderView::layout):
2593 When deciding whether children have to get a relayout, we need to check the zoomed width/height and not just
2596 (WebCore::RenderView::computeAbsoluteRepaintRect):
2597 Patched to take into account transforms set on the RenderView.
2599 (WebCore::RenderView::docHeight):
2600 (WebCore::RenderView::docWidth):
2601 Patched to just always use m_width and m_height initially, since those have already been adjusted for
2604 (WebCore::RenderView::zoomedHeight):
2605 (WebCore::RenderView::zoomedWidth):
2606 * rendering/RenderView.h:
2607 New helper methods for obtaining the adjusted width/height of the viewport taking into account the
2610 2008-03-13 Anders Carlsson <andersca@apple.com>
2616 2008-03-13 Anders Carlsson <andersca@apple.com>
2620 Get rid of actualRequest, it is not used anymore. Also, get rid of
2621 initialRequest and replace all uses with originalRequest because those are
2624 * loader/DocumentLoader.cpp:
2625 * loader/DocumentLoader.h:
2626 * loader/FrameLoader.cpp:
2627 (WebCore::FrameLoader::initialRequest):
2628 (WebCore::FrameLoader::originalRequestURL):
2630 2008-03-13 Brady Eidson <beidson@apple.com>
2634 Convert SharedBuffer to start with a refCount of 1
2636 * loader/ImageDocument.cpp:
2637 (WebCore::ImageTokenizer::finish):
2639 * loader/ResourceLoader.cpp:
2640 (WebCore::ResourceLoader::addData):
2641 (WebCore::ResourceLoader::willStopBufferingData):
2643 * loader/icon/IconDatabase.cpp:
2644 (WebCore::IconDatabase::defaultIcon):
2645 (WebCore::IconDatabase::getImageDataForIconURLFromSQLDatabase):
2647 * loader/loader.cpp:
2648 (WebCore::Loader::didReceiveData):
2650 * platform/SharedBuffer.h:
2651 (WebCore::SharedBuffer::create): Make all constructors private, add ::create() calls
2652 * platform/SharedBuffer.cpp:
2653 (WebCore::SharedBuffer::SharedBuffer): Revert to default RefCounted constructor to start with a ref count of 1
2654 (WebCore::SharedBuffer::copy):
2655 * platform/mac/SharedBufferMac.mm:
2656 (WebCore::SharedBuffer::wrapNSData):
2657 (WebCore::SharedBuffer::SharedBuffer): Revert to default RefCounted constructor to start with a ref count of 1
2659 2008-03-13 Steve Falkenburg <sfalken@apple.com>
2663 Disable PGO for normal release builds.
2664 Added work-in-progress Release_PGOInstrument/Release_PGOOptimize targets.
2666 * WebCore.vcproj/WebCore.vcproj:
2668 2008-03-13 Anders Carlsson <andersca@apple.com>
2672 Make a bunch of DocumentLoader setters/getters inline.
2674 * loader/DocumentLoader.cpp:
2675 * loader/DocumentLoader.h:
2676 (WebCore::DocumentLoader::isStopping):
2677 (WebCore::DocumentLoader::setCommitted):
2678 (WebCore::DocumentLoader::isCommitted):
2679 (WebCore::DocumentLoader::isLoading):
2680 (WebCore::DocumentLoader::setLoading):
2681 (WebCore::DocumentLoader::response):
2682 (WebCore::DocumentLoader::mainDocumentError):
2683 (WebCore::DocumentLoader::setResponse):
2684 (WebCore::DocumentLoader::isClientRedirect):
2685 (WebCore::DocumentLoader::setIsClientRedirect):
2686 (WebCore::DocumentLoader::overrideEncoding):
2687 (WebCore::DocumentLoader::responses):
2688 (WebCore::DocumentLoader::triggeringAction):
2689 (WebCore::DocumentLoader::setTriggeringAction):
2690 (WebCore::DocumentLoader::setOverrideEncoding):
2691 (WebCore::DocumentLoader::setLastCheckedRequest):
2692 (WebCore::DocumentLoader::lastCheckedRequest):
2693 (WebCore::DocumentLoader::title):
2694 (WebCore::DocumentLoader::setLoadingFromCachedPage):
2695 (WebCore::DocumentLoader::isLoadingFromCachedPage):
2697 2008-03-13 Rodney Dawes <dobey@wayofthemonkey.com>
2699 Fix builds without SVG enabled.
2702 (Frame::shouldApplyTextZoom):
2703 (Frame::shouldApplyPageZoom):
2705 2008-03-13 Simon Hausmann <hausmann@webkit.org>
2709 * bridge/qt/qt_instance.cpp:
2710 (KJS::Bindings::QtInstance::getQtInstance):
2711 (KJS::Bindings::QtInstance::getRuntimeObject):
2712 * bridge/qt/qt_instance.h:
2713 (KJS::Bindings::QtInstance::create):
2714 * bridge/qt/qt_runtime.cpp:
2715 (KJS::Bindings::convertQVariantToValue):
2716 (KJS::Bindings::QtConnectionObject::execute):
2717 * page/qt/FrameQt.cpp:
2718 (WebCore::Frame::createScriptInstanceForWidget):
2720 2008-03-12 Sam Weinig <sam@webkit.org>
2722 Reviewed by Darin Adler.
2724 Fix <rdar://problem/5784773>
2725 Crash loading QT movies @ apple.com/ipodtouch/features.html with a PAC file (WebKitThreadingException)
2727 Make bridged RuntimeObjects get collected on the main thread only. This is necessary
2728 because clients of the bridged objects are unlikely to prepared for a collection on
2729 non-main thread, which can happen with a PAC file.
2731 * bridge/runtime_object.cpp:
2732 (RuntimeObjectImp::RuntimeObjectImp):
2734 2008-03-12 Adam Roben <aroben@apple.com>
2736 Fix Bug 17815: Inspector's DOM tree should descend into subframes
2738 <http://bugs.webkit.org/show_bug.cgi?id=17815>
2742 * page/inspector/DocumentPanel.js:
2743 (WebInspector.DocumentPanel.revealNode): Changed to provide
2744 _isAncestorIncludingParentFramesWithinPanel and
2745 _parentNodeOrFrameElementWithinPanel for the isAncestor and getParent
2746 parameters to findTreeElement so that parent frames will be searched.
2747 (WebInspector.DocumentPanel.updateBreadcrumb):
2748 - Changed while loop to for loop
2749 - Use _parentNodeOrFrameElementWithinPanel instead of
2750 Node.parentNode to move to the next node
2751 - The loop now ends when we reach the DocumentPanel's document node
2752 - Traversal past other Document nodes is now allowed
2753 - We add the "start" class to the final crumb after the loop exits
2754 (WebInspector.DocumentPanel._getDocumentForNode): Added. Simple helper
2755 that returns the node itself if the node is a Document node, or the
2756 node's ownerDocument otherwise.
2757 (WebInspector.DocumentPanel._parentNodeOrFrameElementWithinPanel):
2758 Added. Returns the node's parent node or, in the case of a Document
2759 node, the node's window's owning frame element, but will not return a
2760 node that is in a parent frame of the DocumentPanel's Document.
2761 (WebInspector.DocumentPanel._isAncestorIncludingParentFramesWithinPanel):
2762 Added. Returns true if a is an ancestor of b if a is an ancestor of a
2763 frame element whose subframe(s) contain b.
2764 (WebInspector.DOMNodeTreeElement): We now consider ourselves to have
2765 children if we have a contentDocument.
2766 (WebInspector.DOMNodeTreeElement.onpopulate): Moved the appendChild
2767 loop into a function so that we can add both children of our
2768 contentDocument and children of our node to the tree.
2769 (WebInspector.DOMNodeTreeElement.ondblclick): Changed so that we get
2770 the rootDOMNode by traversing the tree outline hierarchy instead of
2771 the DOM hierarchy so that we can easily jump up to a parent frame.
2773 2008-03-12 Adam Roben <aroben@apple.com>
2775 Update the styles/metrics panes and breadcrumb after editing DOM
2780 * page/inspector/DocumentPanel.js:
2781 (WebInspector.DocumentPanel.set focusedDOMNode): Moved code to update
2782 the parts of the DocumentPanel other than the DOM tree into a new
2783 function, _focusedNodeChanged.
2784 (WebInspector.DocumentPanel._focusedNodeChanged): Added. The
2785 forceUpdate parameter specifies whether the update should occur even
2786 if the focused node hasn't changed since the last update.
2787 (WebInspector.DocumentPanel.updateBreadcrumb): Added a forceUpdate
2788 parameter. If forceUpdate is true, we always rebuild the breadcrumbs.
2789 (WebInspector.DocumentPanel.updateStyles): Added a forceUpdate
2790 parameter. If forceUpdate is true, we always rebuild the styles pane.
2791 (WebInspector.DOMNodeTreeElement._attributeEditingCommitted): Added a
2792 call to DocumentPanel._focusedNodeChanged. We have to force the update
2793 because we haven't changed the focused node (the attributes of the
2795 * page/inspector/StylesSidebarPane.js:
2796 (WebInspector.StylesSidebarPane.update): Added a forceUpdate
2797 parameter. If forceUpdate is true we always rebuild the styles.
2799 2008-03-12 Mark Rowe <mrowe@apple.com>
2801 Further Gtk and Qt build fixes.
2803 * bridge/runtime.cpp:
2804 (KJS::Bindings::Instance::createRuntimeObject): Adapt Qt-only code for change to PassRefPtr.
2805 * page/gtk/FrameGtk.cpp: Add missing include.
2807 2008-03-12 Mark Rowe <mrowe@apple.com>
2809 Fix Gtk and Qt builds.
2811 * page/gtk/FrameGtk.cpp:
2812 * page/qt/FrameQt.cpp:
2814 2008-03-12 Mark Rowe <mrowe@apple.com>
2818 * WebCore.base.exp: Remove symbol.
2820 2008-03-12 Steve Falkenburg <sfalken@apple.com>
2824 * page/win/FrameWin.cpp:
2826 2008-03-12 Steve Falkenburg <sfalken@apple.com>
2830 * plugins/win/PluginViewWin.cpp:
2831 (WebCore::PluginView::bindingInstance):
2833 2008-03-12 Darin Adler <darin@apple.com>
2837 - http://bugs.webkit.org/show_bug.cgi?id=17640
2838 eliminate WebCoreFrameBridge
2840 * WebCore.base.exp: Added more exports, needed by code moved from WebCoreFrameBridge
2841 to WebFrame in WebKit.
2842 * WebCore.xcodeproj/project.pbxproj: Added more headers, same reason. Also deleted
2843 WebCoreFrameBridge.h and WebCoreFrameBridge.mm.
2846 (WebCore::Frame::Frame): Added call to initJavaJSBindings(), formerly handled by
2847 the WebCoreFrameBridge.
2848 * page/Frame.h: Added initJavaJSBindings function.
2850 * page/mac/FrameMac.mm:
2851 (WebCore::updateRenderingForBindings): Moved here from WebCoreFrameBridge.
2852 (WebCore::Frame::initJavaJSBindings): Ditto; code was in the init function.
2854 * page/mac/WebCoreFrameBridge.h: Removed.
2855 * page/mac/WebCoreFrameBridge.mm: Removed.
2857 2008-03-12 Sam Weinig <sam@webkit.org>
2859 Reviewed by Anders Carlsson.
2861 Don't go through the Document just to get the frame Element.
2863 * page/DOMWindow.cpp:
2864 (WebCore::DOMWindow::frameElement):
2866 2008-03-12 Anders Carlsson <andersca@apple.com>
2868 Reviewed by Geoff and Sam.
2870 More Instance cleanup:
2872 * Make Instance inherit from RefCounted instead of doing its own refcounting.
2873 * Make all Instance subclasses private, add static create methods.
2874 * Have Instance start out with a refcount of 1.
2875 * Get rid of Instance::createBindingForLanguageInstance and call the individual
2876 instance constructor methods instead.
2877 * Fix many methods to take and return PassRefPtr<Instance> to ensure that the
2878 refcounting is done correctly.
2880 * bridge/c/c_instance.h:
2881 (KJS::Bindings::CInstance::create):
2882 * bridge/c/c_utility.cpp:
2883 (KJS::Bindings::convertNPVariantToValue):
2884 * bridge/jni/jni_instance.cpp:
2885 (JavaInstance::invokeMethod):
2886 * bridge/jni/jni_instance.h:
2887 (KJS::Bindings::JavaInstance::create):
2888 * bridge/jni/jni_jsobject.cpp:
2889 (JavaJSObject::convertJObjectToValue):
2890 * bridge/jni/jni_runtime.cpp:
2891 (JavaField::valueFromInstance):
2892 (JavaArray::valueAt):
2893 * bridge/objc/objc_instance.h:
2894 (KJS::Bindings::ObjcInstance::create):
2895 * bridge/objc/objc_utility.mm:
2896 (KJS::Bindings::convertObjcValueToValue):
2897 * bridge/qt/qt_instance.cpp:
2898 (KJS::Bindings::QtRuntimeObjectImp::QtRuntimeObjectImp):
2899 (KJS::Bindings::QtInstance::getQtInstance):
2900 (KJS::Bindings::QtInstance::getRuntimeObject):
2901 * bridge/qt/qt_instance.h:
2902 * bridge/runtime.cpp:
2903 (KJS::Bindings::Instance::Instance):
2904 (KJS::Bindings::Instance::createRuntimeObject):
2906 * bridge/runtime_object.cpp:
2907 (RuntimeObjectImp::RuntimeObjectImp):
2908 * bridge/runtime_object.h:
2910 * page/mac/FrameMac.mm:
2911 (WebCore::Frame::createScriptInstanceForWidget):
2912 * page/win/FrameWin.cpp:
2913 (WebCore::Frame::createScriptInstanceForWidget):
2914 * plugins/PluginView.h:
2915 * plugins/win/PluginViewWin.cpp:
2916 (WebCore::PluginView::bindingInstance):
2918 2008-03-12 Dan Bernstein <mitz@apple.com>
2920 Suggested by Darin Adler. Reviewed by Dave Hyatt.
2922 - speed up BidiIterator::direction()
2924 * rendering/bidi.cpp:
2925 (WebCore::BidiIterator::current): Made inline and corrected the
2926 out-of-bounds condition to work with 0-length text and offsets beyond
2927 the end of the text.
2928 (WebCore::BidiIterator::direction): Changed to call current() and not
2929 call the virtual method isListMarker() most of the time.
2930 (WebCore::addMidpoint): Removed unnecessary null-check of smidpoints.
2931 (WebCore::appendRunsForObject): Ditto.
2933 2008-03-12 Adam Roben <aroben@apple.com>
2935 Make URLs not be underlined while editing them in the DOM view
2939 * page/inspector/inspector.css:
2941 2008-03-12 Adam Roben <aroben@apple.com>
2943 Part of Bug 17224: DOM nodes/attributes should be editable
2945 <http://bugs.webkit.org/show_bug.cgi?id=17224>
2946 <rdar://problem/5732825>
2948 We now start editing if the user single-clicks on an attribute,
2949 attribute value, or text node while the parent element is selected.
2950 Previously, we started editing on double-click regardless of the
2951 selection state of the element.
2953 URLs in the DOM tree are now followed on Alt/Option-click, rather than
2958 * English.lproj/InspectorLocalizedStrings.js: Added four new localized
2960 * page/inspector/DocumentPanel.js:
2961 (WebInspector.DOMNodeTreeElement.onattach): Call new
2962 _makeURLSActivateOnModifiedClick.
2963 (WebInspector.DOMNodeTreeElement._makeURLsActivateOnModifiedClick):
2964 Added. Changes the tooltip of each link in this element to indicate
2965 that Alt/Option-click will follow the URL, and sets the
2966 followOnAltClick property on each link.
2967 (WebInspector.DOMNodeTreeElement.onselect): Mark that we're being
2969 (WebInspector.DOMNodeTreeElement.onmousedown): If we're not currently
2970 being selected, start editing.
2971 (WebInspector.DOMNodeTreeElement.ondblclick): We no longer start
2972 editing here. We block re-rooting of the tree if we're currently
2974 (WebInspector.DOMNodeTreeElement._startEditing):
2975 - Don't do anything if we're not focused
2976 - Pass the event down to _startEditingAttribute.
2977 (WebInspector.DOMNodeTreeElement._startEditingAttribute): Don't do
2978 anything if the event target is a URL and the Alt/Option key is
2979 pressed -- in this case we want to follow the link.
2980 (WebInspector.DOMNodeTreeElement._updateTitle): Call
2981 _makeURLsActivateOnClick again since the anchor elements have all been
2983 * page/inspector/inspector.js:
2984 (WebInspector.documentClick): If the anchor as a followOnAltClick
2985 property and the Alt/Option key is not pressed, do nothing.
2987 2008-03-12 Ada Chan <adachan@apple.com>
2989 Fixed the initial value of zoom factor.
2994 (WebCore::FramePrivate::FramePrivate):
2996 2008-03-12 David Hyatt <hyatt@apple.com>
2998 Make full page zoom vaguely work. This patch uses the CSS transform system to turn on full page zoom at the
2999 document level. There are many many bugs that I'm going to file to track all the issues (most of the issues
3000 are just bugs with transforms themselves).
3002 Reviewed by Adam Roben
3004 * css/CSSStyleSelector.cpp:
3005 (WebCore::CSSStyleSelector::applyProperty):
3006 (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
3008 (WebCore::Document::recalcStyle):
3010 (WebCore::Frame::shouldApplyTextZoom):
3011 (WebCore::Frame::shouldApplyPageZoom):
3013 * rendering/RenderLayer.cpp:
3014 (WebCore::RenderLayer::updateLayerPositions):
3015 (WebCore::RenderLayer::setHasVisibleContent):
3016 (WebCore::RenderLayer::paintLayer):
3017 (WebCore::RenderLayer::hitTestLayer):
3018 * rendering/RenderLayer.h:
3020 2008-03-12 David Hyatt <hyatt@apple.com>
3022 Make the zoom factor a float and not a percent.
3027 * css/CSSStyleSelector.cpp:
3028 (WebCore::CSSStyleSelector::applyProperty):
3029 (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
3031 (WebCore::Frame::zoomFactor):
3032 (WebCore::Frame::setZoomFactor):
3034 * page/FramePrivate.h:
3035 * svg/SVGSVGElement.cpp:
3036 (WebCore::SVGSVGElement::currentScale):
3037 (WebCore::SVGSVGElement::setCurrentScale):
3039 2008-03-12 David Hyatt <hyatt@apple.com>
3041 Eliminate setTextMultiplier from the bridge. Make Webkit just call setZoomFactor on the frame directly.
3046 * page/mac/WebCoreFrameBridge.h:
3047 * page/mac/WebCoreFrameBridge.mm:
3049 2008-03-12 Dan Bernstein <mitz@apple.com>
3051 Reviewed by Darin Adler and Sam Weinig.
3053 - <rdar://problem/4433248> use CoreText API instead of SPI on Leopard
3055 Use CTFontCopyGraphicsFont and CTFontGetPlatformFont on Leopard instead
3056 of wkGetCGFontFromNSFont and wkGetNSFontATSUFontId, relying on NSFont
3057 and CTFontRef being toll-free bridged.
3059 * WebCore.Tiger.exp:
3061 * platform/graphics/mac/FontMac.mm:
3062 (WebCore::Font::drawGlyphs): Changed to use the cgFont() accessor.
3063 * platform/graphics/mac/FontPlatformData.h:
3064 Made m_cgFont a RetainPtr on Leopard.
3065 (WebCore::toCTFontRef): Added a function that encapsulates the
3067 (WebCore::FontPlatformData::FontPlatformData):
3068 (WebCore::FontPlatformData::cgFont): Added this accessor method.
3069 * platform/graphics/mac/FontPlatformDataMac.mm:
3070 (WebCore::FontPlatformData::FontPlatformData): Changed to use
3071 CoreText API on Leopard.
3072 (WebCore::FontPlatformData::setFont): Ditto.
3073 * platform/graphics/mac/SimpleFontDataMac.mm:
3074 (WebCore::initFontData):
3075 (WebCore::pathFromFont):
3076 (WebCore::SimpleFontData::platformInit):
3077 (WebCore::SimpleFontData::platformWidthForGlyph):
3078 * platform/mac/WebCoreSystemInterface.mm:
3080 2008-03-12 David Harrison <harrison@apple.com>
3084 <rdar://problem/5607382> CrashTracer: [REGRESSION] 2290 crashes in Safari at com.apple.WebCore: -[WebCoreAXObject isWebArea] + 8
3086 The problem was that we lost track of the AX cache for a subframe when Frame::disconnectOwnerElement() was
3087 called, so we were unable to locate the AXObjects to de-register from AppKit's accessibility registry.
3088 Also saw that cache clearing was missing from Document::detach(), and fixed that.
3090 Also added a debug-only check that AXObjectCache::remove() not finding the AXObject is expected.
3092 Lastly, RenderWidget::destroy() now skips trying to remove the AXObject if accessibility has never been enabled.
3095 (WebCore::Document::attach):
3096 Assert that there is no AX cache (since there is no renderer).
3098 (WebCore::Document::detach):
3099 Destroy the AX cache installed on this document.
3101 (WebCore::Document::clearAXObjectCache):
3102 New. Destroy the AX cache associated with this document.
3104 (WebCore::Document::axObjectCache):
3105 Added some comments.
3108 Declare clearAXObjectCache().
3111 (WebCore::Frame::disconnectOwnerElement):
3112 Destroy the AX cache associated with this frame's document.
3114 * page/mac/AXObjectCacheMac.mm:
3115 (WebCore::AXObjectCache::remove):
3116 * page/mac/WebCoreAXObject.mm:
3117 (-[WebCoreAXObject initWithRenderer:]):
3118 (-[WebCoreAXObject detach]):
3119 * rendering/RenderObject.cpp:
3120 (WebCore::RenderObject::RenderObject):
3121 (WebCore::RenderObject::~RenderObject):
3122 * rendering/RenderObject.h:
3123 (WebCore::RenderObject::setHasAXObject):
3124 (WebCore::RenderObject::hasAXObject):
3125 Add debug-only check that AXObjectCache::remove() not finding the AXObject is expected.
3127 * rendering/RenderWidget.cpp:
3128 (WebCore::RenderWidget::destroy):
3129 Skip call to remove the AXObject if accessibility has never been enabled. A simple speed optimization in the
3130 very common case that the accessibility APIs are not being used. Same as in RenderObject::destroy().
3132 2008-03-12 Xan Lopez <xan@gnome.org>
3134 Reviewed by Alp Toker.
3136 http://bugs.webkit.org/show_bug.cgi?id=15229
3138 Add Pango font backend.
3140 Original patch by Sven Herzberg <sven@imendio.com>
3143 * platform/graphics/gtk/FontCacheGtk.cpp:
3144 (WebCore::FontCache::fontExists):
3145 * platform/graphics/gtk/FontCustomPlatformDataPango.cpp: Added.
3146 (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
3147 (WebCore::FontCustomPlatformData::fontPlatformData):
3148 (WebCore::releaseData):
3149 (WebCore::createFontCustomPlatformData):
3150 * platform/graphics/gtk/FontPlatformData.h:
3151 (WebCore::FontPlatformData::FontPlatformData):
3152 (WebCore::FontPlatformData::hash):
3153 * platform/graphics/gtk/FontPlatformDataPango.cpp: Added.
3154 (WebCore::FontPlatformData::FontPlatformData):
3155 (WebCore::FontPlatformData::init):
3156 (WebCore::FontPlatformData::~FontPlatformData):
3157 (WebCore::FontPlatformData::isFixedPitch):
3158 (WebCore::FontPlatformData::setFont):
3159 (WebCore::FontPlatformData::operator==):
3160 * platform/graphics/gtk/GlyphPageTreeNodePango.cpp: Added.
3161 (WebCore::pango_font_get_glyph):
3162 (WebCore::GlyphPage::fill):
3163 * platform/graphics/gtk/SimpleFontDataPango.cpp: Added.
3164 (WebCore::SimpleFontData::platformInit):
3165 (WebCore::SimpleFontData::platformDestroy):
3166 (WebCore::SimpleFontData::smallCapsFontData):
3167 (WebCore::SimpleFontData::containsCharacters):
3168 (WebCore::SimpleFontData::determinePitch):
3169 (WebCore::SimpleFontData::platformWidthForGlyph):
3170 (WebCore::SimpleFontData::setFont):
3172 2008-03-12 Justin Garcia <justin.garcia@apple.com>
3176 <rdar://problem/5770834> Crash at InsertTextCommand::prepareForTextInsertion() doing RemoveFormat in a certain list
3178 Fixes some (but not all) of the instances of:
3179 <rdar://problem/5659795> CrashTracer: [REGRESSION] 187 crashes in Safari at com.apple.WebCore: WebCore::InsertTextCommand::prepareForTextInsertion + 241
3180 <rdar://problem/5779631> CrashTracer: [USER] 25 crashes in Mail at WebCore::InsertTextCommand::prepareForTextInsertion
3182 * editing/InsertLineBreakCommand.cpp:
3183 (WebCore::InsertLineBreakCommand::doApply): applyStyle may have destroyed content that held
3184 the old endingSelection(), so we must recompute it. Added a FIXME. Added a few comments.
3185 * editing/RemoveFormatCommand.cpp:
3186 (WebCore::RemoveFormatCommand::doApply): Added a FIXME.
3188 2008-03-11 Alexey Proskuryakov <ap@webkit.org>
3192 <rdar://problem/5640615> REGRESSION (Safari 2-3): Changing subframe encoding rules broke
3195 Other browsers' behavior keeps changing; let's implement what Firefox and Opera do now:
3196 if the frame and subframe belong to the same site, then the encoding is inherited from parent
3197 frame to subframe. Otherwise, it is not.
3199 Always inheriting the encoding would cause a security problem.
3201 Tests: http/tests/misc/frame-default-enc-different-domain.html
3202 http/tests/misc/frame-default-enc-same-domain.html
3203 fast/encoding/frame-default-enc.html
3205 * loader/FrameLoader.cpp:
3206 (WebCore::FrameLoader::write): Also removed a check for m_frame->document() being non-null -
3207 this function also has code that uses it without checking, so it must be safe.
3209 2008-03-12 Mark Rowe <mrowe@apple.com>
3213 * page/Frame.h: Forward-declare FramePrivate.
3215 2008-03-11 Steve Falkenburg <sfalken@apple.com>
3217 Disable LTCG/PGO for all of WebCore for now.
3218 We'll re-enable this as part of follow-on PGO work.
3222 * WebCore.vcproj/WebCore.vcproj:
3224 2008-03-11 Darin Adler <darin@apple.com>
3228 - remove all bridge-related things from WebCore except the bridge itself
3230 * WebCore.base.exp: Removed the bridge and setBridge functions.
3232 * loader/FrameLoader.cpp:
3233 (WebCore::FrameLoader::detachFromParent): Removed call to the bridge's
3237 (WebCore::Frame::~Frame): Removed call to setBridge(0).
3238 (WebCore::FramePrivate::FramePrivate): Removed initialization of m_bridge.
3239 * page/Frame.h: Removed setBridge and bridge functions.
3240 * page/FramePrivate.h: Removed m_bridge pointer.
3241 * page/mac/FrameMac.mm: Removed setBridge and bridge functions.
3243 * page/mac/WebCoreFrameBridge.h: Added setWebCoreFrame: method.
3244 Removed bridgeForDOMDocument: and clearFrame methods.
3245 * page/mac/WebCoreFrameBridge.mm: Ditto.
3246 (-[WebCoreFrameBridge close]): Changed to set m_frame to 0 directly.
3247 (-[WebCoreFrameBridge setWebCoreFrame:]): Added.
3249 2008-03-11 Darin Adler <darin@apple.com>
3251 - restored some code I removed in the Range change; this code can't go
3252 until the rest of the Range fix is in
3255 (WebCore::Range::commonAncestorContainer): Added back the check for 0
3256 that I removed erroneously in the Range patch.
3257 (WebCore::Range::processContents): Left in assertions I used to debug
3260 2008-03-11 Darin Adler <darin@apple.com>
3264 * platform/mac/ScrollViewMac.mm:
3265 (WebCore::ScrollView::setContentsPos): Don't use NSMakePoint.
3267 2008-03-11 Darin Adler <darin@apple.com>
3271 - simplify Mac code for ScrollView, since it's used only for FrameView
3272 and not in two different modes like it was historically
3273 - remove code depending on the bridge to get from an NSView to a WebCore::Frame
3275 * bindings/objc/DOMHTML.mm:
3276 (-[DOMHTMLInputElement _rectOnScreen]): getDocumentView -> documentView.
3278 * bridge/jni/jni_jsobject.cpp:
3279 (createRootObject): Instead of using WebCoreViewFactory to find the frame given
3280 and NSView, use the WebCoreFrameView interface to do it.
3282 * editing/mac/EditorMac.mm:
3283 (WebCore::Editor::paste): getDocumentView -> documentView.
3284 * editing/mac/SelectionControllerMac.mm:
3285 (WebCore::SelectionController::notifyAccessibilityForSelectionChange): Ditto.
3287 * page/FrameView.h: Fixed comment.
3289 * page/InspectorController.cpp:
3290 (WebCore::InspectorController::drawNodeHighlight): Removed uneeded typecasts
3291 to ScrollView* since FrameView is derived from ScrollView.
3293 * page/mac/EventHandlerMac.mm:
3294 (WebCore::EventHandler::focusDocumentView): getDocumentView -> documentView.
3295 * page/mac/FrameMac.mm:
3296 (WebCore::Frame::imageFromRect): Ditto.
3297 * page/mac/WebCoreAXObject.mm:
3298 (-[WebCoreAXObject position]): Ditto.
3299 (-[WebCoreAXObject doAXTextMarkerForPosition:]): Ditto.
3300 (-[WebCoreAXObject rendererForView:]): Updated code that used to use
3301 WebCoreBridgeHolder to use WebCoreFrameView instead.
3303 * page/mac/WebCoreFrameBridge.mm:
3304 (-[WebCoreFrameBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]):
3305 getDocumentView -> documentView.
3307 * page/mac/WebCoreFrameView.h: Removed the WebCoreScrollbarMode type; we just
3308 use WebCore::ScrollbarMode directly. Renamed the WebCoreFrameView protocol to
3309 WebCoreFrameScrollView, since it's a protocol for the scroll view, not the
3310 frame view itself. Replaced WebCoreBridgeHolder protocol with WebCoreFrameView
3311 protocol, which returns a WebCore::Frame directly rather than a bridge.
3313 * page/mac/WebCoreViewFactory.h: Eliminated the bridgeForView method.
3315 * platform/ScrollView.h: Moved the constructor and destructor out of the
3316 class-specific #if blocks. Renamed Mac-specific function that gets the
3317 NSView for from getDocumentView to documentView and a scrollView function
3318 that returns an appropriately classed NSScrollView.
3320 * platform/graphics/MediaPlayer.h: Changed type of parentWidget to FrameView
3322 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3323 (WebCore::MediaPlayerPrivate::createQTMovieView): Removed unnecessary cast.
3325 * platform/mac/PopupMenuMac.mm:
3326 (WebCore::PopupMenu::show): getDocumentView -> documentView.
3327 * platform/mac/ScrollViewMac.mm:
3328 (WebCore::ScrollView::ScrollView): Added.
3329 (WebCore::ScrollView::~ScrollView): Added.
3330 (WebCore::ScrollView::scrollView): Added.
3331 (WebCore::ScrollView::visibleWidth): Removed unused non-NSScrollView case.
3332 (WebCore::ScrollView::visibleHeight): Ditto.
3333 (WebCore::ScrollView::visibleContentRect): Ditto.
3334 (WebCore::ScrollView::visibleContentRectConsideringExternalScrollers): Ditto.
3335 (WebCore::ScrollView::contentsWidth): Ditto.
3336 (WebCore::ScrollView::contentsHeight): Ditto.
3337 (WebCore::ScrollView::contentsX): Ditto.
3338 (WebCore::ScrollView::contentsY): Ditto.
3339 (WebCore::ScrollView::scrollOffset): Ditto.
3340 (WebCore::ScrollView::scrollRectIntoViewRecursively): Ditto.
3341 (WebCore::ScrollView::setContentsPos): Ditto.
3342 (WebCore::ScrollView::setVScrollbarMode): Ditto.
3343 (WebCore::ScrollView::setHScrollbarMode): Ditto.
3344 (WebCore::ScrollView::setScrollbarsMode): Ditto.
3345 (WebCore::ScrollView::vScrollbarMode): Ditto.
3346 (WebCore::ScrollView::hScrollbarMode): Ditto.
3347 (WebCore::ScrollView::suppressScrollbars): Ditto.
3348 (WebCore::ScrollView::addChild): Ditto.
3349 (WebCore::ScrollView::resizeContents): Ditto.
3350 (WebCore::ScrollView::updateContents): Ditto.
3351 (WebCore::ScrollView::contentsToWindow): Ditto.
3352 (WebCore::ScrollView::windowToContents): Ditto.
3353 (WebCore::ScrollView::setStaticBackground): Ditto.
3354 (WebCore::ScrollView::documentView): Renamed and removed unused case.
3355 (WebCore::ScrollView::scrollbarUnderMouse): Removed incorrect comment.
3357 * platform/mac/WidgetMac.mm:
3358 (WebCore::Widget::getOuterView): Update for protocol name change.
3360 * rendering/RenderThemeMac.mm:
3361 (WebCore::RenderThemeMac::paintCheckbox): getDocumentView -> documentView.
3362 (WebCore::RenderThemeMac::paintRadio): Ditto.
3363 (WebCore::RenderThemeMac::paintButton): Ditto.
3364 (WebCore::RenderThemeMac::paintMenuList): Ditto.
3365 (WebCore::RenderThemeMac::paintSliderThumb): Ditto.
3366 (WebCore::RenderThemeMac::paintSearchField): Ditto.
3367 (WebCore::RenderThemeMac::paintSearchFieldCancelButton): Ditto.
3368 (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration): Ditto.
3369 (WebCore::RenderThemeMac::paintSearchFieldResultsButton): Ditto.
3371 2008-03-11 Brent Fulgham <bfulgham@gmail.com>
3373 Reviewed by Adam Roben.
3375 Split CookieJarWin.cpp into CFNet and non-CFNet versions to
3376 reduce the massive amount of conditionalization in the file.
3377 (see http://bugs.webkit.org/show_bug.cgi?id=17788)
3379 * WebCore.vcproj/WebCore.vcproj:
3380 * platform/network/win/CookieJarCFNetWin.cpp: Copied from WebCore/platform/network/win/CookieJarWin.cpp.
3381 (WebCore::setCookies):
3383 (WebCore::cookiesEnabled):
3384 * platform/network/win/CookieJarWin.cpp:
3385 (WebCore::setCookies):
3387 (WebCore::cookiesEnabled):
3389 2008-03-11 Darin Adler <darin@apple.com>
3393 - eliminate the remaining parts of WebCoreBridge used for calls to WebKit from WebCore
3395 * page/ChromeClient.h: Added new client functions to replace calls up to WebKit
3396 that were formerly handled by the bridge.
3398 * page/Frame.h: Removed unneeded declarations. Moved declarations of script-specific
3399 functions to a ScriptController section. Removed willPopupMenu.
3401 * page/mac/ChromeMac.mm:
3402 (WebCore::Chrome::focusNSView): Changed to call firstResponder and makeFirstResponder
3403 via the client instead of the bridge.
3405 * page/mac/EventHandlerMac.mm:
3406 (WebCore::EventHandler::passMouseDownEventToWidget): Changed to call firstResponder
3407 and makeFirstResponder via the chrome client instead of the bridge.
3409 * page/mac/FrameMac.mm: Removed willPopupMenu.
3411 * page/mac/WebCoreFrameBridge.h: Removed WebCoreFrameBridge protocol and
3412 SubclassResponsibility category. Also removed some unneeded imports.
3414 * platform/mac/PopupMenuMac.mm:
3415 (WebCore::PopupMenu::show): Call willPopUpMenu on chrome client instead of frame.
3417 * platform/mac/WidgetMac.mm:
3418 (WebCore::Widget::setIsSelected): Call functions directly on the view rather than
3419 calling via the bridge.
3421 2008-03-11 Darin Adler <darin@apple.com>
3425 - make some Range improvements (preparation for Range support for DOM mutation)
3427 Made constructors private, added create functions.
3428 Made refcount start at 1 rather than starting at 0 and being incremented.
3429 Made Range use two Position objects for the start/end container/offset pairs.
3431 * WebCore.base.exp: Updated.
3434 (WebCore::Document::createRange): Changed to use Range::create.
3435 (WebCore::Document::removeMarkers): Updated for Range::first/pastLastNode name change.
3438 (WebCore::Position::formatForDebugger): Updated for member variable name change.
3439 (WebCore::Position::showTreeForThis): Ditto.
3440 (WebCore::startPosition): Changed to use Range::startPosition.
3441 (WebCore::endPosition): Changed to use Range::endPosition.
3443 * dom/Position.h: Made the data members public and renamed them to container
3444 and offset. But since offset() is already a function, temporarily used posOffset
3445 for the data member. Later we'll get rid of offset(). Made more functions inline.
3446 Removed the constructor that takes a PositionIterator.
3448 * dom/PositionIterator.cpp:
3449 (WebCore::PositionIterator::operator Position): Added. Replaces the constructor
3450 that used to be in Position.
3451 * dom/PositionIterator.h: Added conversion operator to produce a Position.
3452 Removed friend declaration for Position.
3455 (WebCore::Range::Range): Updated constructors for data member changes and made
3456 them use a refcount of 1.
3457 (WebCore::Range::create): Added.
3458 (WebCore::Range::startContainer): Updated to eliminate use of m_detached; detached
3459 is now indicated by m_start.container of 0. Also updated to use m_start instead
3460 of the old m_startContainer.
3461 (WebCore::Range::startOffset): Ditto.
3462 (WebCore::Range::endContainer): Ditto.
3463 (WebCore::Range::endOffset): Ditto.
3464 (WebCore::Range::commonAncestorContainer): Ditto.
3465 (WebCore::Range::collapsed): Ditto.
3466 (WebCore::Range::setStart): Ditto.
3467 (WebCore::Range::setEnd): Ditto.
3468 (WebCore::Range::collapse): Ditto.
3469 (WebCore::Range::isPointInRange): Ditto.
3470 (WebCore::Range::comparePoint): Ditto.
3471 (WebCore::Range::compareNode): Ditto.
3472 (WebCore::Range::compareBoundaryPoints): Ditto.
3473 (WebCore::Range::boundaryPointsValid): Ditto.
3474 (WebCore::Range::deleteContents): Ditto.
3475 (WebCore::Range::intersectsNode): Ditto.
3476 (WebCore::Range::processContents): Ditto.
3477 (WebCore::Range::extractContents): Ditto.
3478 (WebCore::Range::cloneContents): Ditto.
3479 (WebCore::Range::insertNode): Ditto.
3480 (WebCore::Range::toString): Ditto.
3481 (WebCore::Range::text): Ditto.
3482 (WebCore::Range::createContextualFragment): Ditto.
3483 (WebCore::Range::detach): Ditto.
3484 (WebCore::Range::checkNodeBA): Changed to use switch statements instead of
3485 multiple calls to the virtual nodeType() function.
3486 (WebCore::Range::cloneRange): Ditto.
3487 (WebCore::Range::setStartAfter): Ditto.
3488 (WebCore::Range::setEndBefore): Ditto.
3489 (WebCore::Range::setEndAfter): Ditto.
3490 (WebCore::Range::selectNode): Ditto.
3491 (WebCore::Range::selectNodeContents): Ditto.
3492 (WebCore::Range::surroundContents): Ditto.
3493 (WebCore::Range::setStartBefore): Ditto.
3494 (WebCore::Range::checkDeleteExtract): Ditto.
3495 (WebCore::Range::containedByReadOnly): Ditto.
3496 (WebCore::Range::firstNode): Ditto.
3497 (WebCore::Range::editingStartPosition): Ditto.
3498 (WebCore::Range::pastLastNode): Ditto.
3499 (WebCore::Range::addLineBoxRects): Ditto.
3500 (WebCore::Range::formatForDebugger): Ditto.
3501 (WebCore::operator==): Ditto.
3502 (WebCore::rangeOfContents): Ditto.
3503 (WebCore::Range::maxStartOffset): Ditto.
3504 (WebCore::Range::maxEndOffset): Ditto.
3506 * dom/Range.h: Made constructors private. Added create functions.
3507 Added getters for startContainer/Offset and endContainer/Offset that
3508 return 0 instead of an exception for detached ranges that are inline
3509 and don't require an ExceptionCode out parameter. Changed the parameters
3510 to setStart and setEnd to PassRefPtr. Removed isDetached function.
3511 Made ActionType and processContents private. Made startPosition and
3512 endPosition inlines and have then return const&. Renamed startNode and
3513 pastEndNode to firstNode and pastLastNode to reduce the chance of
3514 confusion with startContainer/endContainer. Used Position for m_start
3515 and m_end instead of separate container and offset members. Changed
3516 maxStartOffset and maxEndOffset into int to match other offsets.
3518 * editing/ApplyStyleCommand.cpp:
3519 (WebCore::ApplyStyleCommand::applyBlockStyle): Changed to use Range::create.
3520 (WebCore::ApplyStyleCommand::applyInlineStyle): Ditto.
3521 * editing/CompositeEditCommand.cpp:
3522 (WebCore::CompositeEditCommand::inputText): Ditto.
3523 (WebCore::CompositeEditCommand::moveParagraphs): Ditto.
3524 * editing/DeleteSelectionCommand.cpp:
3525 (WebCore::DeleteSelectionCommand::mergeParagraphs): Ditto.
3526 * editing/Editor.cpp:
3527 (WebCore::Editor::fontForSelection): Changed for pastLastNode name change.
3528 (WebCore::Editor::setComposition): Changed to use Range::create.
3529 (WebCore::paragraphAlignedRangeForRange): Ditto.
3530 (WebCore::markMisspellingsOrBadGrammar): Changed to get rid of check for
3531 isDetached and check for 0 from startContainer instead.
3532 (WebCore::Editor::compositionRange): Changed to use Range::create.
3533 * editing/EditorCommand.cpp:
3534 (WebCore::unionDOMRanges): Ditto.
3535 * editing/Selection.cpp:
3536 (WebCore::Selection::toRange): Ditto.
3537 * editing/TextIterator.cpp:
3538 (WebCore::TextIterator::TextIterator): Changed for firstNode and pastLastNode
3540 (WebCore::TextIterator::range): Changed to use Range::create.
3541 (WebCore::SimplifiedBackwardsTextIterator::range): Ditto.
3542 (WebCore::TextIterator::subrange): Ditto.
3543 * editing/VisiblePosition.cpp:
3544 (WebCore::makeRange): Ditto.
3545 * editing/VisiblePosition.h: Added now-needed include.
3546 * editing/htmlediting.cpp:
3547 (WebCore::indexForVisiblePosition): Changed to use Range::create.
3548 (WebCore::avoidIntersectionWithNode): Changed to get rid of check for
3549 isDetached and check for 0 instead and to use Range::create.
3550 * editing/markup.cpp:
3551 (WebCore::renderedText): Changed to use Range::create.
3552 (WebCore::createMarkup): Changed to no longer use isDetached and also
3553 for new firstNode/pastEndNode names.
3554 (WebCore::createFragmentFromText): Ditto.
3555 * editing/visible_units.cpp:
3556 (WebCore::previousBoundary): Changed to use Range::create.
3557 * page/mac/WebCoreFrameBridge.mm:
3558 (-[WebCoreFrameBridge convertToNSRange:]): Changed to no longer use
3560 * rendering/RenderTextControl.cpp:
3561 (WebCore::RenderTextControl::visiblePositionForIndex): Changed to use Range::create.
3562 (WebCore::RenderTextControl::indexForVisiblePosition): Ditto.
3564 2008-03-11 Daniel Zucker <zucker@wake3.com>
3566 Reviewed by Adam Roben.
3568 There are a handful of placed where the use of CFNetwork-specific
3569 calls are protected by PLATFORM(CF). Revise to use the more specific
3570 USE(CFNETWORK) macro. (See http://bugs.webkit.org/show_bug.cgi?id=17783)
3572 * platform/network/ProtectionSpace.cpp: Change PLATFORM(CF) to USE(CFNETWORK)
3573 * platform/network/ResourceHandle.cpp: Change PLATFORM(CF) to USE(CFNETWORK)
3574 * platform/network/win/CookieJarWin.cpp: Correct error in
3575 InternetGetCookie call. Conditionalize 'cookiesEnabled' the same
3576 as all other implementations in this file.
3578 2008-03-11 Xan Lopez <xan@gnome.org>
3580 Reviewed by Alp Toker.
3582 http://bugs.webkit.org/show_bug.cgi?id=16476
3584 Add libsoup HTTP backend.
3587 * platform/network/ResourceHandleInternal.h:
3588 (WebCore::ResourceHandleInternal::ResourceHandleInternal):
3589 * platform/network/soup/AuthenticationChallenge.h: Added.
3590 (WebCore::AuthenticationChallenge::AuthenticationChallenge):
3591 * platform/network/soup/ResourceError.h: Added.
3592 (WebCore::ResourceError::ResourceError):
3593 * platform/network/soup/ResourceHandleSoup.cpp: Added.
3594 (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
3595 (WebCore::ResourceHandle::~ResourceHandle):
3596 (WebCore::dataCallback):
3597 (WebCore::parseDataUrl):
3598 (WebCore::ResourceHandle::start):
3599 (WebCore::ResourceHandle::cancel):
3600 (WebCore::ResourceHandle::bufferedData):
3601 (WebCore::ResourceHandle::supportsBufferedData):
3602 (WebCore::ResourceHandle::setDefersLoading):
3603 (WebCore::ResourceHandle::loadsBlocked):
3604 (WebCore::ResourceHandle::willLoadFromCache):
3605 * platform/network/soup/ResourceRequest.h: Copied from WebCore/platform/network/curl/ResourceRequest.h.
3606 (WebCore::ResourceRequest::ResourceRequest):
3607 (WebCore::ResourceRequest::doUpdatePlatformRequest):
3608 * platform/network/soup/ResourceResponse.h: Added.
3609 (WebCore::ResourceResponse::ResourceResponse):
3610 (WebCore::ResourceResponse::setResponseFired):
3611 (WebCore::ResourceResponse::responseFired):
3612 (WebCore::ResourceResponse::doUpdateResourceResponse):
3614 2008-03-11 Rodney Dawes <dobey@wayofthemonkey.com>
3618 * plugins/qt/PluginDataQt.cpp:
3619 (PluginData::initPlugins)
3621 2008-03-11 Adam Roben <aroben@apple.com>
3623 Make attribute quoting in DOM view more consistent with source view
3625 Two changes which make the DOM view more consistent with source view:
3626 1) We now quote all attribute values, including URLs
3627 2) The quotes around the values are now purple, matching the left and
3628 right angle brackets that surround the tag
3630 One bug fixed by these changes:
3631 1) The entire URL is selected for editing when you double-click a URL
3632 that is an attribute value. Previously, the first and last
3633 characters were not included in the selection.
3637 * page/inspector/DocumentPanel.js:
3638 (WebInspector.DOMNodeTreeElement._startEditingAttribute): Don't need
3639 to account for the quotes around attribute values anymore because the
3640 quotes are now outside the webkit-html-attribute-value span.
3641 * page/inspector/utilities.js:
3642 (nodeTitleInfo): Quote all attribute values, including URLs, and place
3643 the quotes outside the webkit-html-attribute-value span.
3645 2008-03-11 Adam Roben <aroben@apple.com>
3647 Stop including pthread.h in WebCore on Windows
3651 * WebCore.vcproj/WebCore.vcproj:
3652 - Changed the include path to not contain pthreads/
3653 - Let VS remove a duplicate FileConfiguration element
3654 - Let VS have its way with the file ordering
3655 * WebCorePrefix.h: Made the #include of pthread.h be compiled out on
3657 * loader/FTPDirectoryDocument.cpp: Added a Windows-specific #define of
3658 localtime_r (pthread.h was providing a macro that substituted plain
3659 old localtime before, but localtime_s is "more secure", so I went with
3661 * loader/FTPDirectoryParser.cpp: Ditto for gmtime_r.
3663 2008-03-11 Adam Roben <aroben@apple.com>
3665 Roll out r30961 since it broke the default site icon on Windows
3667 * loader/icon/IconDatabase.cpp:
3668 (WebCore::IconDatabase::defaultIcon):
3670 2008-03-11 Dan Bernstein <mitz@apple.com>
3672 Reviewed by Darin Adler.
3674 - clean up line layout code
3676 * platform/graphics/GraphicsContext.cpp:
3677 (WebCore::TextRunIterator::increment): Removed the resolver parameter.
3678 (WebCore::GraphicsContext::drawBidiText): Adjusted for changes to
3679 createBidiRunsForLine(), which no longer takes a start parameter.
3680 * platform/text/BidiResolver.h:
3681 (WebCore::BidiResolver::): Made Noncopyable and removed the
3682 m_adjustEmbedding member variable.
3683 (WebCore::BidiResolver::position): Added. Returns the resolver's current
3685 (WebCore::BidiResolver::setPosition): Added. Sets the resolver's current
3686 position without changing any other state.
3687 (WebCore::BidiResolver::increment): Added. Advances the resolver to the
3688 next position, allowing the iterator to push and pop embedding.
3689 (WebCore::BidiResolver::appendRun): Removed the resolver parameter in
3690 the call to increment().
3691 (WebCore::BidiResolver::embed): Removed code to save, set and restore
3693 (WebCore::BidiResolver::createBidiRunsForLine): Changed to not take a
3694 'start' iterator. Instead, start at the current position. Removed code
3695 to set m_adjustEmbedding. Changed for noncopyability.
3696 * rendering/RenderBlock.h:
3697 * rendering/bidi.cpp:
3698 (WebCore::bidiNext): Made the resolver parameter optional. Changed to
3699 null-check the 'end of inline' pointer only twice.
3700 (WebCore::bidiFirst): Made the resolver parameter optional.
3701 (WebCore::BidiIterator::increment): Ditto.
3702 (WebCore::BidiState::increment): Added. Overrides the default
3703 BidiResolver::increment() method by passing the resolver to
3704 BidiIterator::increment().
3705 (WebCore::checkMidpoints): Removed the resolver parameter.
3706 (WebCore::BidiState::appendRun): Removed code to save, set and restore
3707 m_adjustEmbedding. Adjusted for change to increment().
3708 (WebCore::RenderBlock::bidiReorderLine): Removed the 'start' parameter
3709 and unreachable code.
3710 (WebCore::buildCompactRuns): Adjusted for changes to BidiResolver/
3711 (WebCore::RenderBlock::layoutInlineChildren): Moved code to initialize
3712 the resolver from this method to determineStartPosition(). Unified the
3713 resolver with the 'start' iterator. Removed unreachable code. Moved one
3714 statement from the beginning of the while loop to the end.
3715 (WebCore::RenderBlock::determineStartPosition): Moved code to initialize
3716 the resolver from layoutInlineChildren() into this method.
3717 (WebCore::RenderBlock::matchedEndLine): Adjusted for the resolver and
3718 the 'start' iterator being one object.
3719 (WebCore::skipNonBreakingSpace): Made the parameter const.
3720 (WebCore::requiresLineBox): Ditto.
3721 (WebCore::RenderBlock::generatesLineBoxesForInlineChild): Adjusted for
3722 the change to BidiIterator::increment().
3723 (WebCore::RenderBlock::skipWhitespace): Made two versions of this
3724 method, one for BidiIterator and one for BidiState.
3725 (WebCore::shouldSkipWhitespaceAfterStartObject): Removed the resolver
3727 (WebCore::RenderBlock::findNextLineBreak): Removed the resolver
3728 parameter. Removed calls to setAdjustEmbedding(). Removed the 'previous'
3729 variable and changed the 'last' variable to do its job.
3732 2008-03-10 Adam Roben <aroben@apple.com>
3734 Part of Bug 17224: DOM nodes/attributes should be editable
3736 <http://bugs.webkit.org/show_bug.cgi?id=17224>
3737 <rdar://problem/5732825>
3739 This patch makes text nodes editable via double-click.
3743 * page/inspector/DocumentPanel.js:
3744 (WebInspector.DOMNodeTreeElement._startEditing):
3745 - Moved most of this code to _startEditingAttribute
3746 - Calls _startEditingTextNode or _startEditingAttribute as
3748 (WebInspector.DOMNodeTreeElement._startEditingAttribute): Added. Code
3749 came from _startEditing.
3750 (WebInspector.DOMNodeTreeElement._startEditingTextNode): Added.
3751 (WebInspector.DOMNodeTreeElement._textNodeEditingCommitted): Added.
3752 (WebInspector.DOMNodeTreeElement._editingCancelled): Renamed from
3753 _attributeEditingCancelled.
3754 * page/inspector/utilities.js:
3755 (nodeTitleInfo): Wrap text nodes in a webkit-html-text-node span so
3756 that we can easily recognize/edit them.
3758 2008-03-11 Holger Hans Peter Freyther <zecke@selfish.org>
3762 r25512 inlined the urlIcon to improve the startup time of Safari on Mac. Inlining is
3763 not suitable for platforms where this icon is themable. E.g. the Qt platform is allowing
3764 to theme this icon and the Gtk+ platform will probably end up with themable icons
3767 Remove dead code from the windows port and move the urlIcon from the windows
3768 directory to the Resource directory to be used by Qt and other ports.
3770 Ifdef the usage of the built-in icon in IconDatabase.cpp and for Qt do not use
3771 it. Gtk+ currently has no proper implementation of Image::loadPlatformResource but
3772 once it does it wants to use this for getting the urlIcon as well.
3774 * Resources/urlIcon.png: Renamed from WebKit/win/WebKit.vcproj/urlIcon.png.
3775 * loader/icon/IconDatabase.cpp:
3776 (WebCore::IconDatabase::defaultIcon):
3778 2008-03-11 Tor Arne Vestbø <tavestbo@trolltech.com>
3782 Implemented HTML media element support for QtWebKit, using Phonon.
3784 http://bugs.webkit.org/show_bug.cgi?id=17766
3787 * platform/graphics/MediaPlayer.cpp:
3788 * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp: Added.
3790 (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
3791 (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
3792 (WebCore::MediaPlayerPrivate::getSupportedTypes):
3793 (WebCore::MediaPlayerPrivate::hasVideo):
3794 (WebCore::MediaPlayerPrivate::load):
3795 (WebCore::MediaPlayerPrivate::cancelLoad):
3796 (WebCore::MediaPlayerPrivate::play):
3797 (WebCore::MediaPlayerPrivate::pause):
3798 (WebCore::MediaPlayerPrivate::paused):
3799 (WebCore::MediaPlayerPrivate::seek):
3800 (WebCore::MediaPlayerPrivate::seeking):
3801 (WebCore::MediaPlayerPrivate::duration):
3802 (WebCore::MediaPlayerPrivate::currentTime):
3803 (WebCore::MediaPlayerPrivate::setEndTime):
3804 (WebCore::MediaPlayerPrivate::maxTimeBuffered):
3805 (WebCore::MediaPlayerPrivate::maxTimeSeekable):
3806 (WebCore::MediaPlayerPrivate::bytesLoaded):
3807 (WebCore::MediaPlayerPrivate::totalBytesKnown):
3808 (WebCore::MediaPlayerPrivate::totalBytes):
3809 (WebCore::MediaPlayerPrivate::setRate):
3810 (WebCore::MediaPlayerPrivate::setVolume):
3811 (WebCore::MediaPlayerPrivate::setMuted):
3812 (WebCore::MediaPlayerPrivate::dataRate):
3813 (WebCore::MediaPlayerPrivate::networkState):
3814 (WebCore::MediaPlayerPrivate::readyState):
3815 (WebCore::MediaPlayerPrivate::updateStates):
3816 (WebCore::MediaPlayerPrivate::setVisible):
3817 (WebCore::MediaPlayerPrivate::setRect):
3818 (WebCore::MediaPlayerPrivate::loadStateChanged):
3819 (WebCore::MediaPlayerPrivate::rateChanged):
3820 (WebCore::MediaPlayerPrivate::sizeChanged):
3821 (WebCore::MediaPlayerPrivate::timeChanged):
3822 (WebCore::MediaPlayerPrivate::volumeChanged):
3823 (WebCore::MediaPlayerPrivate::didEnd):
3824 (WebCore::MediaPlayerPrivate::loadingFailed):
3825 (WebCore::MediaPlayerPrivate::naturalSize):
3826 (WebCore::MediaPlayerPrivate::eventFilter):
3827 (WebCore::MediaPlayerPrivate::repaint):
3828 (WebCore::MediaPlayerPrivate::paint):
3829 (WebCore::MediaPlayerPrivate::stateChanged):
3830 (WebCore::MediaPlayerPrivate::tick):
3831 (WebCore::MediaPlayerPrivate::metaDataChanged):
3832 (WebCore::MediaPlayerPrivate::seekableChanged):
3833 (WebCore::MediaPlayerPrivate::hasVideoChanged):
3834 (WebCore::MediaPlayerPrivate::bufferStatus):
3835 (WebCore::MediaPlayerPrivate::finished):
3836 (WebCore::MediaPlayerPrivate::currentSourceChanged):
3837 (WebCore::MediaPlayerPrivate::aboutToFinish):
3838 (WebCore::MediaPlayerPrivate::prefinishMarkReached):
3839 (WebCore::MediaPlayerPrivate::totalTimeChanged):
3840 * platform/graphics/qt/MediaPlayerPrivatePhonon.h: Added.
3841 (WebCore::MediaPlayerPrivate::):
3842 (WebCore::MediaPlayerPrivate::isAvailable):
3844 2008-03-10 Sam Weinig <sam@webkit.org>
3846 Reviewed by Beth Dakin.
3848 Throw a SECURITY_ERR when accessing a tainted canvas
3849 by CanvasRenderingContext2D::getImageData() and
3850 HTMLCanvasElement::toDataURL().
3852 * html/CanvasRenderingContext2D.cpp:
3853 (WebCore::CanvasRenderingContext2D::getImageData):
3854 * html/CanvasRenderingContext2D.h:
3855 * html/CanvasRenderingContext2D.idl:
3856 * html/HTMLCanvasElement.cpp:
3857 (WebCore::HTMLCanvasElement::toDataURL):
3858 * html/HTMLCanvasElement.h:
3859 * html/HTMLCanvasElement.idl:
3861 2008-03-10 Justin Garcia <justin.garcia@apple.com>
3865 <rdar://problem/5779984> REGRESSION (r30391): GMail: Safari won't display the Edit Link dialog
3867 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3868 (WebCore::hasCSSPropertyNamePrefix): Fixed a typo. The code was only
3869 comparing the first character of the prefix to the first character
3870 of the property name.
3872 2008-03-10 Andre Boule <aboule@apple.com>
3876 Hold off on initializing the frame to avoid the RenderView getting
3877 a null FrameView. This could potentially cause problems.
3879 * svg/graphics/SVGImage.cpp:
3880 (WebCore::SVGImage::dataChanged):
3882 2008-03-10 Darin Adler <darin@apple.com>
3884 - try to fix Qt build
3886 * bridge/qt/qt_runtime.cpp:
3887 (KJS::Bindings::convertQVariantToValue): Change KJS::UChar to UChar.
3889 2008-03-10 Darin Adler <darin@apple.com>
3893 - fix <rdar://problem/3059610> VIP: links opened in new frame, window, or tab
3894 should be redrawn as visited immediately
3895 - fix <rdar://problem/4382809> Going "back" a page doesn't change the color of
3896 the visited URL at directory.umi
3897 - fix http://bugs.webkit.org/show_bug.cgi?id=4941
3898 Visited links should be marked as visited
3899 - fix http://bugs.webkit.org/show_bug.cgi?id=7960
3900 REGRESSION: Visited link color doesn't displayed after loading page from cache
3902 We now mark all links on a page as "changed" at the appropriate times.
3904 * WebCore.base.exp: Update since I made completeURL be a const member function.
3906 * css/CSSStyleSelector.cpp: Got rid of some unneeded globals that could be turned
3907 into locals. Also changed some static data members to file-scoped globals with
3908 internal linkage. Renamed the globals to get rid of the m_ prefix. Changed the
3909 prefix on m_styleNotYetAvailable to s_styleNotYetAvailable.
3910 (WebCore::CSSStyleSelector::CSSStyleSelector): Updated for name changes.
3911 (WebCore::parseUASheet): Tweak the comment.
3912 (WebCore::CSSStyleSelector::loadDefaultStyle): Updated for name changes and to
3913 use local variables instead of globals where possible.
3914 (WebCore::CSSStyleSelector::checkPseudoState): Made this a member function so
3915 it can store the link in a hash. Also changed it to have a return value instead
3916 of having it modify a global variable. Added code to put the hash into a set so
3917 we can tell later if this is one of the links that affects this page.
3918 (WebCore::CSSStyleSelector::canShareStyleWithElement): Updated for the change to
3920 (WebCore::CSSStyleSelector::matchUARules): Updated for name changes.
3921 (WebCore::CSSStyleSelector::styleForElement): Ditto.
3922 (WebCore::CSSStyleSelector::adjustRenderStyle): Ditto.
3923 (WebCore::CSSStyleSelector::pseudoStyleRulesForElement): Changed code to read
3924 the SVG style sheet to use a boolean global and put it right here in the function
3925 since this is the only code that needs to know about it.
3926 (WebCore::CSSStyleSelector::checkOneSelector): Updated for name changes.
3927 (WebCore::colorForCSSValue): Moved code inside the function that is not needed
3929 (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Updaed for the change
3930 to checkPseudoState.
3931 (WebCore::CSSStyleSelector::allVisitedStateChanged): Added. Calls setChanged on
3932 all links if there were any in the set.
3933 (WebCore::CSSStyleSelector::visitedStateChanged): Added. Calls setChanged on all
3934 links if the one that changed is in the set.
3936 * css/CSSStyleSelector.h: Removed unused StyleSelector class and State enum. Made
3937 CSSStyleSelector derive from Noncopyable. Made lots of member functions private that
3938 didn't need to be public, and removed others that could be made into non-member
3939 functions. Changed pseudoStyleRulesForElement to take a const String& instead of
3940 a StringImpl*. Added new allVisitedStateChanged and visitedStateChanged functions.
3941 Got rid of unneeded friend declarations.
3944 (WebCore::Document::completeURL): Made const.
3945 (WebCore::findSlashDotDotSlash): Moved here from PageGroup.
3946 (WebCore::findSlashSlash): Ditto.
3947 (WebCore::findSlashDotSlash): Ditto.
3948 (WebCore::containsColonSlashSlash):
3949 (WebCore::cleanPath): Ditto.
3950 (WebCore::matchLetter): Ditto.
3951 (WebCore::needsTrailingSlash): Ditto.
3952 (WebCore::Document::visitedLinkHash): Moved this here from PageGroup. This is
3953 the poor-man's completeURL function. The idea of putting it here is that this
3954 way it can be alongside the real completeURL function. Later we should figure out
3955 a way to make this function share more code with the real thing and match behavior.
3957 * dom/Document.h: Marked completeURL function const. Added visitedLinkHash function.
3959 * page/DOMWindow.cpp:
3960 (WebCore::DOMWindow::getMatchedCSSRules): Updated for change to CSSStyleSelector.
3963 (WebCore::Page::allVisitedStateChanged): Added. Calls allVisitedStateChanged on all
3965 (WebCore::Page::visitedStateChanged): Ditto.
3966 * page/Page.h: Added the above functions.
3968 * page/PageGroup.cpp:
3969 (WebCore::PageGroup::isLinkVisited): Changed to take a visitedLinkHash parameter.
3970 The CSSStyleSelector now handles actually computing the hash, and it does so by
3971 calling code in Document.
3972 (WebCore::PageGroup::addVisitedLink): Refactored so the two overloaded copies share
3973 a bit more code. Added code that calls visitedStateChanged if a new link was added.
3974 (WebCore::PageGroup::removeVisitedLinks): Added code to call allVisitedStateChanged
3975 if any visited links are removed.
3976 * page/PageGroup.h: Include StringHash.h instead of having the AlreadyHashed struct
3979 * platform/text/StringHash.h:
3980 (WebCore::CaseFoldingHash::hash): Tweaked to make this a bit more consistent with
3981 the StringImpl::computeHash function, using the same technique for avoiding 0.
3982 (WebCore::AlreadyHashed::hash): Added. Was formerly in PageGroup.h.
3983 (WebCore::AlreadyHashed::avoidDeletedValue): Added. Was formerly in PageGroup.cpp.
3985 * rendering/RenderStyle.cpp:
3986 (WebCore::RenderStyle::isStyleAvailable): Changed to use an inline function instead
3987 of getting directly at a data member so the data member could be made private.
3989 * loader/FrameLoader.cpp:
3990 (WebCore::FrameLoader::scrollToAnchor): Added call to updateHistoryForAnchorScroll.
3991 (WebCore::FrameLoader::updateHistoryForAnchorScroll): Added.
3992 * loader/FrameLoader.h: Added updateHistoryForAnchorScroll.
3994 2008-03-10 Adam Roben <aroben@apple.com>
3996 Part of Bug 17224: DOM nodes/attributes should be editable
3998 <http://bugs.webkit.org/show_bug.cgi?id=17224>
3999 <rdar://problem/5732825>
4001 This patch makes DOM attributes editable via double-click.
4005 * page/inspector/DocumentPanel.js:
4006 (WebInspector.DOMNodeTreeElement.onmousedown): Don't do anything if
4007 we're being edited, since we want default editing behaviors to work.
4008 (WebInspector.DOMNodeTreeElement.ondblclick): Try to start editing
4009 before doing anything else.
4010 (WebInspector.DOMNodeTreeElement._startEditing): Added. Currently only
4011 lets you edit attributes.
4012 (WebInspector.DOMNodeTreeElement._attributeEditingCommitted): Added.
4013 Uses a scratch element to get the new attribute(s) parsed, then sets
4014 the attribute(s) on the node in the inspected document.
4015 (WebInspector.DOMNodeTreeElement._attributeEditingCancelled): Added.
4016 (WebInspector.DOMNodeTreeElement._updateTitle): Added. Refreshes the
4017 representation of the node in the Inspector's DOM tree to reflect
4018 the node's current state.
4019 * page/inspector/inspector.css: Made the .editing class apply
4021 * page/inspector/utilities.js:
4022 (nodeTitleInfo): Changed to surround attribute name/value pairs in a
4023 webkit-html-attribute span so that we can easily edit the pair as a
4026 2008-03-10 David Kilzer <ddkilzer@apple.com>
4030 Reviewed by Stephanie.
4032 WebCore.exp only gets generated once for both 32-bit and 64-bit builds,
4033 so we must exclude the _NPN symbols when creating WebCore.LP64.exp.
4035 * WebCore.xcodeproj/project.pbxproj: Reverted build phase shell code to
4036 r30826 to remove _NPN symbols from 64-bit builds in WebCore.LP64.exp.
4038 2008-03-10 Eric Seidel <eric@webkit.org>
4042 Remove KJS::UChar, use ::UChar instead
4043 http://bugs.webkit.org/show_bug.cgi?id=17017
4045 To functional changes, thus no tests.
4047 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
4048 (WebCore::hasCSSPropertyNamePrefix):
4049 (WebCore::cssPropertyName):
4050 * bindings/js/JSDOMWindowBase.cpp:
4051 (WebCore::windowProtoFuncAToB):
4052 (WebCore::windowProtoFuncBToA):
4053 * bindings/js/JSSVGPODTypeWrapper.h:
4054 * bindings/js/kjs_proxy.cpp:
4055 (WebCore::KJSProxy::evaluate):
4056 * bridge/objc/objc_utility.mm:
4057 (KJS::Bindings::throwError):
4059 (WebCore::Document::parseQualifiedName):
4060 * platform/text/AtomicString.cpp:
4061 (WebCore::AtomicString::add):
4062 * platform/text/String.cpp:
4063 (WebCore::String::String):
4064 (WebCore::String::operator Identifier):
4065 (WebCore::String::operator UString):
4066 * platform/text/TextCodecICU.cpp:
4067 (WebCore::TextCodecICU::decode):
4068 * svg/SVGAnimatedTemplate.h:
4070 2008-03-10 Darin Adler <darin@apple.com>
4074 - eliminate keyboard UI mode method from WebCoreFrameBridge
4076 * page/ChromeClient.h: Added keyboardUIMode function.
4077 (WebCore::ChromeClient::keyboardUIMode): Ditto.
4078 * page/mac/EventHandlerMac.mm:
4079 (WebCore::EventHandler::tabsToAllControls): Call chrome client function instead
4081 * page/mac/WebCoreFrameBridge.h: Removed keyboardUIMode method, and other unused
4084 * WebCore.xcodeproj/project.pbxproj: Allowed Xcode to change the project.
4085 Do not try to fight the Xcode.
4087 2008-03-10 Darin Adler <darin@apple.com>
4089 - oops, forgot to save last couple changes from the editor
4091 * bindings/js/JSDOMWindowCustom.cpp:
4092 (WebCore::markDOMObjectWrapper): Tweaked a tiny bit.
4093 (WebCore::JSDOMWindow::mark): Sorted alphabetically.
4095 2008-03-10 Darin Adler <darin@apple.com>
4099 - fix failing regression test (window.navigator is getting garbage
4100 collected and thus losing its custom properties)
4102 * bindings/js/JSDOMWindowCustom.cpp:
4103 (WebCore::markDOMObject): Added helper function.
4104 (WebCore::JSDOMWindow::mark): Added. Marks the wrappers for all the objects that hang
4105 off the window object.
4108 (WebCore::DOMWindow::optionalScreen): Added so we can get the Screen object without
4109 creating it if it's already there.
4110 (WebCore::DOMWindow::optionalSelection): Ditto.
4111 (WebCore::DOMWindow::optionalHistory): Ditto.
4112 (WebCore::DOMWindow::optionalLocationbar): Ditto.
4113 (WebCore::DOMWindow::optionalMenubar): Ditto.
4114 (WebCore::DOMWindow::optionalPersonalbar): Ditto.
4115 (WebCore::DOMWindow::optionalScrollbars): Ditto.
4116 (WebCore::DOMWindow::optionalStatusbar): Ditto.
4117 (WebCore::DOMWindow::optionalToolbar): Ditto.
4118 (WebCore::DOMWindow::optionalConsole): Ditto.
4119 (WebCore::DOMWindow::optionalNavigator): Ditto.
4121 * page/DOMWindow.idl: Added the CustomMarkFunction flag. Sorted the flags in
4122 alphabetical order since there are a lot of them.
4124 2008-03-10 Darin Adler <darin@apple.com>
4128 - eliminate Java applet methods from WebCoreFrameBridge
4130 * loader/FrameLoaderClient.h: Added a javaApplet function.
4131 * page/mac/FrameMac.mm:
4132 (WebCore::Frame::createScriptInstanceForWidget): Streamlined the code.
4133 Use the loader client instead of the bridge to get the applet.
4134 * page/mac/WebCoreFrameBridge.h: Removed the getAppletInView and
4135 pollForAppletInView methods. Also removed other unused things.
4137 2008-03-10 Marc-Antoine Ruel <maruel@gmail.com>
4139 Reviewed by Eric, landed by Darin.
4141 http://bugs.webkit.org/show_bug.cgi?id=16095
4142 Move GraphicsContextPrivate to its own header file.
4144 Moves GraphicsContextState and GraphicsContextPrivate to its
4147 * WebCore.vcproj/WebCore.vcproj:
4148 * platform/graphics/GraphicsContext.cpp:
4149 * platform/graphics/GraphicsContextPrivate.h: Added.
4150 (WebCore::GraphicsContextState::GraphicsContextState):