1 2008-12-29 Sam Weinig <sam@webkit.org>
5 Add some basic memory statistic logging for Node.
8 (WebCore::Node::dumpStatistics):
10 (WebCore::Node::~Node):
11 (WebCore::Node::setDocument):
14 2008-12-29 Sam Weinig <sam@webkit.org>
16 Reviewed by Anders Carlsson.
18 Remove one use of DeprecatedPtrList.
20 * css/CSSRuleList.cpp:
21 (WebCore::CSSRuleList::~CSSRuleList):
22 (WebCore::CSSRuleList::length):
23 (WebCore::CSSRuleList::item):
24 (WebCore::CSSRuleList::deleteRule):
25 (WebCore::CSSRuleList::append):
26 (WebCore::CSSRuleList::insertRule):
27 * css/CSSRuleList.h: Change m_lstCSSRules from using DeprecatedPtrList to a Vector.
28 I measured no performance change and was comforted by the fact that we use a Vector
29 for StyleList, which serves the exact same purpose.
31 2008-12-29 Adele Peterson <adele@apple.com>
33 Reviewed by Brady Eidson.
35 Fix for https://bugs.webkit.org/show_bug.cgi?id=21797
36 <rdar://problem/6310682> REGRESSION: Crash in CFHTTPCookieStorageCopy beneath WebCore::cookies() when
37 running fast/dom/document-attribute-js-null.html and http/tests/security/cookies/create-document.html
39 Return early if the document is trying to get or set a cookie with an empty cookie url.
42 (WebCore::Document::cookie):
43 (WebCore::Document::setCookie):
45 2008-12-28 Cameron Zwarich <cwzwarich@uwaterloo.ca>
47 Reviewed by Sam Weinig.
49 Bug 23016: JavaScriptDebugServer::recompileAllJSFunctions() should not execute JS while reparsing all functions
50 <https://bugs.webkit.org/show_bug.cgi?id=23016>
51 <rdar://problem/6425077>
53 JavaScriptDebugServer::recompileAllJSFunctions() calls sourceParsed() while
54 reparsing all JS functions, which will execute JS in the inspector. Depending
55 on the order in which functions are recompiled, a function could have a new
56 body but other functions that have not been recompiled could have an optimized
57 (in the sense of inline caching) call to it, bypassing the check of whether or
58 not there is generated bytecode. This leads to a crash caused by accessing
59 indices off of a null pointer.
61 To fix the problem, simply delay calling sourceParsed() until after all functions
62 have been reparsed. The crash isn't 100% reproducible, but on the one test case
63 I have, this makes it impossible to reproduce after a large number of attempts,
64 when it used to happen every few attempts.
66 * inspector/JavaScriptDebugServer.cpp:
67 (WebCore::JavaScriptDebugServer::recompileAllJSFunctions):
69 2008-12-28 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
71 Rubber-stamped by Antti Koivisto.
72 Oops, remove some last minute ASSERTS that are obviously wrong.
74 * rendering/RenderTextControlMultiLine.cpp:
75 (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
76 * rendering/RenderTextControlSingleLine.cpp:
77 (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
79 2008-12-28 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
81 Reviewed by Antti Koivisto.
83 Fixes: https://bugs.webkit.org/show_bug.cgi?id=23015
85 Don't rely on HTMLFormControlElement in RenderTextControl.
87 Introduce an abstract FormControlElement class, containing the
88 valueMatchesRenderer/setValueMatchesRenderer, the only HTMLFormControlElement
89 specific methods that RenderTextControl relies on.
91 This makes it possible for WML to reuse RenderTextControl.
92 RenderTextControlSingleLine still relies on HTMLInputElement,
93 this will change if WMLInputElement is introduced.
96 * WebCore.vcproj/WebCore.vcproj:
97 * WebCore.xcodeproj/project.pbxproj:
98 * dom/FormControlElement.h: Added.
99 (WebCore::FormControlElement::~FormControlElement):
100 (WebCore::FormControlElement::FormControlElement):
101 * html/HTMLFormControlElement.h:
102 (WebCore::HTMLFormControlElement::valueMatchesRenderer):
103 (WebCore::HTMLFormControlElement::setValueMatchesRenderer):
104 * html/HTMLTextAreaElement.cpp:
105 (WebCore::HTMLTextAreaElement::updateValue):
106 * rendering/RenderTextControl.cpp:
107 (WebCore::RenderTextControl::adjustInnerTextStyle):
108 (WebCore::RenderTextControl::updateFromElement):
109 (WebCore::RenderTextControl::setInnerTextValue):
110 (WebCore::RenderTextControl::selectionChanged):
111 (WebCore::RenderTextControl::formControlElement):
112 * rendering/RenderTextControl.h:
113 * rendering/RenderTextControlMultiLine.cpp:
114 (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
115 (WebCore::RenderTextControlMultiLine::subtreeHasChanged):
116 * rendering/RenderTextControlSingleLine.cpp:
117 (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
118 (WebCore::RenderTextControlSingleLine::updateFromElement):
120 2008-12-28 Cameron Zwarich <cwzwarich@uwaterloo.ca>
122 Reviewed by Darin Adler.
124 Bug 23006: Many Loader::Host member functions are not safe to use reentrantly
125 <https://bugs.webkit.org/show_bug.cgi?id=23006>
126 <rdar://problem/6216106>
128 Many Loader::Host member functions set m_processingResource to true when they
129 begin processing a resource and set it to false when they are done. Thanks to
130 JavaScript and the web inspector, almost anything can happen during the
131 processing of a resource, including these functions being called reentrantly,
132 which is unsafe due to this way of using m_processingResource.
134 This can theoretically cause a Loader::Host to be used after it is freed,
135 because when Loader::servedPendingRequests() is called, it will free Hosts
136 that have m_processingResource set to false.
138 To fix this, we replace m_processingResource with m_numResourcesProcessing,
139 which is incremented and decremented using a helper object, ProcessingResource.
141 There are no occurrences of crashes caused by this bug that are reproducible
142 by multiple people, but this fixes the problem of m_processingResource being
143 set to false while a Host is still alive.
146 (WebCore::Loader::Host::Host):
147 (WebCore::Loader::Host::didFinishLoading): Change to use ProcessingResource
148 instead of manually setting m_processingResource.
149 (WebCore::Loader::Host::didFail): Ditto.
150 (WebCore::Loader::Host::didReceiveData): Ditto.
152 (WebCore::Loader::Host::ProcessingResource::ProcessingResource): Added.
153 (WebCore::Loader::Host::ProcessingResource::~ProcessingResource): Added.
154 (WebCore::Loader::Host::processingResource): Change to use m_numResourcesProcessing
155 instead of just getting m_processingResource.
157 2008-12-28 Alexey Proskuryakov <ap@webkit.org>
159 Reviewed by Darin Adler.
161 https://bugs.webkit.org/show_bug.cgi?id=23007
162 REGRESSION: Timer-related crash when closing Web Inspector
164 Test: fast/dom/Window/remove-timeout-crash.html
166 * bindings/js/DOMTimer.cpp: (WebCore::DOMTimer::fired): Besides deleting the timer, make
167 sure to remove it from a Document map.
169 2008-12-28 Alexey Proskuryakov <ap@webkit.org>
171 Reviewed by Anders Carlsson.
173 https://bugs.webkit.org/show_bug.cgi?id=23012
174 Bring application cache manifest parsing up to date
176 Test: http/tests/appcache/manifest-parsing.html
178 * loader/appcache/ManifestParser.cpp:
179 (WebCore::Mode): Added a constant for unknown sections, which are ignored when parsing. This
180 is necessary for future extensions.
181 (WebCore::parseManifest): Parse unknown sections correctly. Ignore trailing tokens in
184 2008-12-28 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
186 Reviewed by Darin Adler.
188 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22996
190 RenderTextControl heavily depends on HTMLInputElement & HTMLTextAreaElement.
191 It handles multi & single line text control rendering in one class. Split up
192 in two new classes: RenderTextControlSingleLine & RenderTextControlMultiLine.
194 This has several benefits - code is more readable now, the memory usage
195 for RenderTextControlMultiLine is reduced, as all stuff related to search fields
196 lives in RenderTextControlSingleLine, and it's easier to introduce an
197 abstraction for input/textarea-like elements for other HTML flavours like WML.
203 * WebCore.vcproj/WebCore.vcproj:
204 * WebCore.xcodeproj/project.pbxproj:
205 * WebCoreSources.bkl:
206 * html/HTMLInputElement.cpp:
207 (WebCore::HTMLInputElement::createRenderer):
208 (WebCore::HTMLInputElement::defaultEventHandler):
209 (WebCore::HTMLInputElement::updatePlaceholderVisibility):
210 (WebCore::HTMLInputElement::addSearchResult):
211 (WebCore::HTMLInputElement::onSearch):
212 * html/HTMLTextAreaElement.cpp:
213 (WebCore::HTMLTextAreaElement::createRenderer):
214 (WebCore::HTMLTextAreaElement::defaultEventHandler):
215 * rendering/RenderTextControl.cpp:
216 (WebCore::RenderTextControl::RenderTextControl):
217 (WebCore::RenderTextControl::~RenderTextControl):
218 (WebCore::RenderTextControl::styleDidChange):
219 (WebCore::RenderTextControl::adjustInnerTextStyle):
220 (WebCore::RenderTextControl::createSubtreeIfNeeded):
221 (WebCore::RenderTextControl::textBlockHeight):
222 (WebCore::RenderTextControl::textBlockWidth):
223 (WebCore::RenderTextControl::updateFromElement):
224 (WebCore::RenderTextControl::setInnerTextValue):
225 (WebCore::RenderTextControl::setSelectionRange):
226 (WebCore::RenderTextControl::visiblePositionForIndex):
227 (WebCore::RenderTextControl::indexForVisiblePosition):
228 (WebCore::RenderTextControl::subtreeHasChanged):
229 (WebCore::RenderTextControl::scrollbarThickness):
230 (WebCore::RenderTextControl::calcHeight):
231 (WebCore::RenderTextControl::hitInnerTextBlock):
232 (WebCore::RenderTextControl::forwardEvent):
233 (WebCore::RenderTextControl::calcPrefWidths):
234 (WebCore::RenderTextControl::selectionChanged):
235 (WebCore::RenderTextControl::innerTextElement):
236 * rendering/RenderTextControl.h:
237 (WebCore::RenderTextControl::hasControlClip):
238 (WebCore::RenderTextControl::canHaveChildren):
239 (WebCore::RenderTextControl::avoidsFloats):
240 (WebCore::RenderTextControl::isEdited):
241 (WebCore::RenderTextControl::setEdited):
242 * rendering/RenderTextControlMultiLine.cpp: Added.
243 (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
244 (WebCore::RenderTextControlMultiLine::~RenderTextControlMultiLine):
245 (WebCore::RenderTextControlMultiLine::subtreeHasChanged):
246 (WebCore::RenderTextControlMultiLine::layout):
247 (WebCore::RenderTextControlMultiLine::nodeAtPoint):
248 (WebCore::RenderTextControlMultiLine::forwardEvent):
249 (WebCore::RenderTextControlMultiLine::preferredContentWidth):
250 (WebCore::RenderTextControlMultiLine::adjustControlHeightBasedOnLineHeight):
251 (WebCore::RenderTextControlMultiLine::baselinePosition):
252 (WebCore::RenderTextControlMultiLine::updateFromElement):
253 (WebCore::RenderTextControlMultiLine::cacheSelection):
254 (WebCore::RenderTextControlMultiLine::createInnerTextStyle):
255 * rendering/RenderTextControlMultiLine.h: Added.
256 (WebCore::RenderTextControlMultiLine::isTextArea):
257 * rendering/RenderTextControlSingleLine.cpp: Added.
258 (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
259 (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine):
260 (WebCore::RenderTextControlSingleLine::placeholderShouldBeVisible):
261 (WebCore::RenderTextControlSingleLine::updatePlaceholderVisibility):
262 (WebCore::RenderTextControlSingleLine::addSearchResult):
263 (WebCore::RenderTextControlSingleLine::stopSearchEventTimer):
264 (WebCore::RenderTextControlSingleLine::showPopup):
265 (WebCore::RenderTextControlSingleLine::hidePopup):
266 (WebCore::RenderTextControlSingleLine::subtreeHasChanged):
267 (WebCore::RenderTextControlSingleLine::paint):
268 (WebCore::RenderTextControlSingleLine::layout):
269 (WebCore::RenderTextControlSingleLine::nodeAtPoint):
270 (WebCore::RenderTextControlSingleLine::forwardEvent):
271 (WebCore::RenderTextControlSingleLine::styleDidChange):
272 (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged):
273 (WebCore::RenderTextControlSingleLine::textBlockWidth):
274 (WebCore::RenderTextControlSingleLine::preferredContentWidth):
275 (WebCore::RenderTextControlSingleLine::adjustControlHeightBasedOnLineHeight):
276 (WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded):
277 (WebCore::RenderTextControlSingleLine::updateFromElement):
278 (WebCore::RenderTextControlSingleLine::cacheSelection):
279 (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
280 (WebCore::RenderTextControlSingleLine::createInnerBlockStyle):
281 (WebCore::RenderTextControlSingleLine::createResultsButtonStyle):
282 (WebCore::RenderTextControlSingleLine::createCancelButtonStyle):
283 (WebCore::RenderTextControlSingleLine::updateCancelButtonVisibility):
284 (WebCore::RenderTextControlSingleLine::autosaveName):
285 (WebCore::RenderTextControlSingleLine::startSearchEventTimer):
286 (WebCore::RenderTextControlSingleLine::searchEventTimerFired):
287 (WebCore::RenderTextControlSingleLine::valueChanged):
288 (WebCore::RenderTextControlSingleLine::itemText):
289 (WebCore::RenderTextControlSingleLine::itemIsEnabled):
290 (WebCore::RenderTextControlSingleLine::itemStyle):
291 (WebCore::RenderTextControlSingleLine::menuStyle):
292 (WebCore::RenderTextControlSingleLine::clientInsetLeft):
293 (WebCore::RenderTextControlSingleLine::clientInsetRight):
294 (WebCore::RenderTextControlSingleLine::clientPaddingLeft):
295 (WebCore::RenderTextControlSingleLine::clientPaddingRight):
296 (WebCore::RenderTextControlSingleLine::listSize):
297 (WebCore::RenderTextControlSingleLine::selectedIndex):
298 (WebCore::RenderTextControlSingleLine::itemIsSeparator):
299 (WebCore::RenderTextControlSingleLine::itemIsLabel):
300 (WebCore::RenderTextControlSingleLine::itemIsSelected):
301 (WebCore::RenderTextControlSingleLine::setTextFromItem):
302 (WebCore::RenderTextControlSingleLine::fontSelector):
303 (WebCore::RenderTextControlSingleLine::hostWindow):
304 (WebCore::RenderTextControlSingleLine::createScrollbar):
305 * rendering/RenderTextControlSingleLine.h: Added.
306 (WebCore::RenderTextControlSingleLine::hasControlClip):
307 (WebCore::RenderTextControlSingleLine::isTextField):
308 (WebCore::RenderTextControlSingleLine::placeholderIsVisible):
309 (WebCore::RenderTextControlSingleLine::popupIsVisible):
310 (WebCore::RenderTextControlSingleLine::shouldPopOver):
311 (WebCore::RenderTextControlSingleLine::valueShouldChangeOnHotTrack):
312 * rendering/TextControlInnerElements.cpp:
313 (WebCore::RenderTextControlInnerBlock::nodeAtPoint):
314 (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
316 2008-12-28 Dmitry Titov <dimich@chromium.org>
318 Reviewed by Darin Adler.
320 https://bugs.webkit.org/show_bug.cgi?id=22755
321 Prepare to add create/remove timeout methods to JSWorkerContext by moving
322 timer-specific code from JSDOMWindowBase to DOMTimer.
323 Moved everything JS-related from DOMTimer to ScheduledAction.
324 Now ScheduledAction is what it wanted to be all the time: a JS engine-specific
325 container for timer callback that knows how to invoke it.
326 DOMTimer is not anymore JS-specific.
328 This is mostly moving the code around. No intended functional changes.
330 * bindings/js/DOMTimer.cpp:
331 (WebCore::DOMTimer::DOMTimer):
332 (WebCore::DOMTimer::~DOMTimer):
333 (WebCore::DOMTimer::install):
334 (WebCore::DOMTimer::removeById):
335 (WebCore::DOMTimer::fired):
336 (WebCore::DOMTimer::stop):
337 * bindings/js/DOMTimer.h:
338 * bindings/js/JSDOMWindowBase.cpp:
339 (WebCore::JSDOMWindowBase::installTimeout):
340 (WebCore::JSDOMWindowBase::removeTimeout):
341 * bindings/js/JSDOMWindowBase.h:
342 * bindings/js/ScheduledAction.cpp:
343 (WebCore::ScheduledAction::execute):
344 * bindings/js/ScheduledAction.h:
346 (WebCore::Document::addTimeout):
348 2008-12-26 Zalan Bujtas <zbujtas@gmail.com>
350 Reviewed by Darin Adler.
352 https://bugs.webkit.org/show_bug.cgi?id=22999
353 Check if database thread exists.
355 * storage/Database.cpp:
356 (WebCore::Database::openAndVerifyVersion):
357 (WebCore::Database::markAsDeletedAndClose):
358 (WebCore::Database::tableNames):
360 2008-12-26 Alexey Proskuryakov <ap@webkit.org>
362 Reviewed by Darin Adler.
364 https://bugs.webkit.org/show_bug.cgi?id=23001
365 A call to applicationCache.update() from a cached event listener should be ignored
367 Test: http/tests/appcache/idempotent-update.html
369 * loader/appcache/ApplicationCacheGroup.cpp:
370 (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete): Only reset m_status after
373 2008-12-26 Alexey Proskuryakov <ap@webkit.org>
375 Reviewed by Darin Adler.
377 https://bugs.webkit.org/show_bug.cgi?id=22997
378 ASSERTION FAILED: !m_resources.contains(url) in ApplicationCache::addResource()
380 Tests: http/tests/appcache/top-frame-1.html
381 http/tests/appcache/top-frame-2.html
382 http/tests/appcache/top-frame-3.html
383 http/tests/appcache/top-frame-4.html
385 * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::cacheForMainRequest):
386 Fixed one more instance of top level frame being used for caching purposes.
388 2008-12-26 Dmitry Titov <dimich@chromium.org>
390 Reviewed by Darin Adler.
392 https://bugs.webkit.org/show_bug.cgi?id=22987
393 Fix for broken test editing/execCommand/5763082.html
395 * editing/CompositeEditCommand.cpp:
396 (WebCore::CompositeEditCommand::mergeIdenticalElements): Used local RefPtr to hold onto
397 function parameter across multiple calls.
399 2008-12-25 Alexey Proskuryakov <ap@webkit.org>
401 Reviewed by Darin Adler.
403 https://bugs.webkit.org/show_bug.cgi?id=22993
404 Application cache shouldn't be inherited by subframes
406 <rdar://problem/6284708> AppCache crashes in ApplicationCacheResource::addType()
407 This crash happened because main resource for subframe was looked up in top frame's
408 appcache. If not for the spec change, it could have been fixed by preventing the load
411 Test: http/tests/appcache/foreign-iframe-main.html
412 I intend to write additional tests for the behavior change.
414 * loader/DocumentLoader.cpp:
415 (WebCore::DocumentLoader::shouldLoadResourceFromApplicationCache):
416 * loader/DocumentLoader.h:
417 (WebCore::DocumentLoader::applicationCache):
418 * loader/MainResourceLoader.cpp:
419 (WebCore::MainResourceLoader::load):
420 * loader/appcache/DOMApplicationCache.cpp:
421 (WebCore::DOMApplicationCache::associatedCache):
422 Removed DocumentLoader::topLevelApplicationCache(), and changed callers accordingly.
424 * loader/appcache/ApplicationCacheGroup.cpp:
425 (WebCore::ApplicationCacheGroup::selectCache):
426 (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
427 Removed checks for the frame being top-level one, now that subframes are cached independently.
429 2008-12-25 Antti Koivisto <antti@apple.com>
431 Reviewed by Oliver Hunt.
433 <rdar://problem/6465669> Frequent !isPurgeable() assertion in WebCore::CachedResource::addClient
435 Disallow turning resources that are being revalidated to purgable state.
437 No test, the condition is difficult to produce in DRT.
439 * loader/CachedCSSStyleSheet.cpp:
440 (WebCore::CachedCSSStyleSheet::allClientsRemoved):
441 * loader/CachedImage.cpp:
442 (WebCore::CachedImage::destroyDecodedData):
443 * loader/CachedResource.cpp:
444 (WebCore::CachedResource::isSafeToMakePurgeable):
445 (WebCore::CachedResource::makePurgeable):
446 * loader/CachedResource.h:
447 * loader/CachedScript.cpp:
448 (WebCore::CachedScript::destroyDecodedData):
450 2008-12-25 Alexey Proskuryakov <ap@webkit.org>
454 * WebCore.pro: Added ThreadGlobalData.cpp.
456 2008-12-24 Mark Rowe <mrowe@apple.com>
460 * WebCore.base.exp: Remove a symbol from the export file now that it is no longer generated.
462 2008-12-24 Holger Hans Peter Freyther <zecke@selfish.org>
464 Unreviewed build fix to find addSubresourceURL
466 This is needed to compile on WebKit/Gtk+
468 * css/CSSFontFaceSrcValue.cpp:
470 2008-12-23 Alexey Proskuryakov <ap@webkit.org>
472 Reviewed by Darin Adler.
474 https://bugs.webkit.org/show_bug.cgi?id=22980
475 WebCore uses more thread specific keys than it really needs
477 Consolidated ThreadSpecific data into a single ThreadGlobalData structure.
482 * WebCore.vcproj/WebCore.vcproj:
483 * WebCore.xcodeproj/project.pbxproj:
484 * WebCoreSources.bkl:
485 * dom/EventNames.cpp:
487 (WebCore::eventNames):
489 (WebCore::Frame::Frame):
490 * platform/ThreadGlobalData.cpp: Added.
491 (WebCore::threadGlobalData):
492 (WebCore::ThreadGlobalData::ThreadGlobalData):
493 (WebCore::ThreadGlobalData::~ThreadGlobalData):
494 * platform/ThreadGlobalData.h: Added.
495 (WebCore::ThreadGlobalData::eventNames):
496 (WebCore::ThreadGlobalData::emptyString):
497 (WebCore::ThreadGlobalData::atomicStringTable):
498 (WebCore::ThreadGlobalData::cachedConverterICU):
499 (WebCore::ThreadGlobalData::cachedConverterTEC):
500 * platform/text/AtomicString.cpp:
501 (WebCore::stringTable):
502 (WebCore::AtomicString::add):
503 (WebCore::AtomicString::remove):
504 (WebCore::AtomicString::find):
505 (WebCore::AtomicString::init):
506 * platform/text/StringImpl.cpp:
507 (WebCore::StringImpl::empty):
508 * platform/text/StringImpl.h:
509 * platform/text/TextCodecICU.cpp:
510 (WebCore::ICUConverterWrapper::~ICUConverterWrapper):
511 (WebCore::cachedConverterICU):
512 * platform/text/TextCodecICU.h:
513 (WebCore::ICUConverterWrapper::ICUConverterWrapper):
514 * platform/text/mac/TextCodecMac.cpp:
515 (WebCore::cachedConverterTEC):
516 * platform/text/mac/TextCodecMac.h:
517 (WebCore::TECConverterWrapper::TECConverterWrapper):
518 (WebCore::TECConverterWrapper::~TECConverterWrapper):
520 2008-12-23 Mark Rowe <mrowe@apple.com>
524 * WebCore.xcodeproj/project.pbxproj: CSSPropertyNames.h is a generated file so it needs to be explicitly copied
525 into the PrivateHeaders directory, rather than relying on the automatic copying of headers which runs before the
526 derived sources are generated.
528 2008-12-23 Simon Fraser <simon.fraser@apple.com>
530 Reviewed by Dan Bernstein
532 https://bugs.webkit.org/show_bug.cgi?id=22941
534 If the document element has opacity, we need to erase the view background to
535 white before painting.
537 Test: fast/backgrounds/opacity-on-document-element.html
539 * rendering/RenderView.cpp:
540 (WebCore::rendererObscuresBackground):
542 2008-12-23 Simon Fraser <simon.fraser@apple.com>
544 Reviewed by Dan Bernstein
546 https://bugs.webkit.org/show_bug.cgi?id=21910
548 Fix SVGImage painting by ensuring that the SVGImage resizes its FrameView correctly.
549 Otherwise the FrameView is left at 0x0, and nothing paints.
551 * svg/graphics/SVGImage.cpp:
552 (WebCore::SVGImage::draw):
554 2008-12-23 Darin Adler <darin@apple.com>
556 Reviewed by John Sullivan.
558 - improve robustness of undo/redo in HTML editing to fix the following bugs
559 <https://bugs.webkit.org/show_bug.cgi?id=19703> Crash in WebCore::InsertNodeBeforeCommand::doUnapply()
560 <rdar://problem/4059423> DOM operations performed on editable HTML can cause a crash later during Undo
562 Major categories of improvements:
564 1) Added null checks.
565 2) Eliminated type casts without corresponding type checks.
566 3) Avoided possible infinite loops by building up lists of nodes to operate on
567 before starting to make DOM changes.
570 No test at this time, but test cases should follow in separate patches.
572 * WebCore.xcodeproj/project.pbxproj: Set the role of CSSPropertyNames.h to Private so it
573 can be used in other Private headers, specifically editing ones.
575 * css/CSSStyleSelector.cpp:
576 (WebCore::CSSStyleSelector::locateCousinList): Adopt parentElement.
577 (WebCore::CSSStyleSelector::locateSharedStyle): Ditto.
578 (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Ditto.
580 * dom/Element.cpp: (WebCore::Element::cloneElement): Added.
581 * dom/Element.h: Added cloneElement and an implementation of parentElement.
582 * dom/Node.h: Moved parentElement from here to Element.h and changed its
583 implementation so it will return 0 when the parent is not an element
584 (document, document fragment, etc.).
586 * editing/AppendNodeCommand.cpp:
587 (WebCore::AppendNodeCommand::AppendNodeCommand): Made parent be an Element.
588 Moved assertions from doApply in here.
589 (WebCore::AppendNodeCommand::doApply): Simplified to just a single unchecked
591 (WebCore::AppendNodeCommand::doUnapply): Simplified to just a single remove call.
592 * editing/AppendNodeCommand.h: Updated.
594 * editing/ApplyStyleCommand.cpp:
595 (WebCore::createStyleSpanElement): Eliminate casting by creating an element in a more
596 direct way with new instead of createElementNS.
597 (WebCore::ApplyStyleCommand::ApplyStyleCommand): Use PassRefPtr.
598 (WebCore::ApplyStyleCommand::removeCSSStyle): Use CSSPropertyID.
599 (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded): Use cloneElement.
600 * editing/ApplyStyleCommand.h:
602 * editing/BreakBlockquoteCommand.cpp:
603 (WebCore::BreakBlockquoteCommand::doApply): Use Element* and cloneElement.
605 * editing/CompositeEditCommand.cpp:
606 (WebCore::CompositeEditCommand::applyStyledElement): Use PassRefPtr and unsigned.
607 (WebCore::CompositeEditCommand::removeStyledElement): Ditto.
608 (WebCore::CompositeEditCommand::insertNodeBefore): Ditto.
609 (WebCore::CompositeEditCommand::insertNodeAfter): Ditto.
610 (WebCore::CompositeEditCommand::insertNodeAt): Ditto.
611 (WebCore::CompositeEditCommand::appendNode): Ditto.
612 (WebCore::CompositeEditCommand::removeChildrenInRange): Ditto. Also use a vector to
613 make the list of children in case removing them has side effects.
614 (WebCore::CompositeEditCommand::removeNode): Ditto.
615 (WebCore::CompositeEditCommand::removeNodePreservingChildren): Ditto.
616 (WebCore::CompositeEditCommand::removeNodeAndPruneAncestors): Ditto.
617 (WebCore::CompositeEditCommand::splitTextNode): Ditto.
618 (WebCore::CompositeEditCommand::splitElement): Ditto.
619 (WebCore::CompositeEditCommand::mergeIdenticalElements): Ditto.
620 (WebCore::CompositeEditCommand::wrapContentsInDummySpan): Ditto.
621 (WebCore::CompositeEditCommand::splitTextNodeContainingElement): Ditto.
622 (WebCore::CompositeEditCommand::joinTextNodes): Ditto.
623 (WebCore::CompositeEditCommand::inputText): Ditto.
624 (WebCore::CompositeEditCommand::insertTextIntoNode): Ditto.
625 (WebCore::CompositeEditCommand::deleteTextFromNode): Ditto.
626 (WebCore::CompositeEditCommand::replaceTextInNode): Ditto.
627 (WebCore::CompositeEditCommand::insertNodeAtTabSpanPosition): Ditto.
628 (WebCore::CompositeEditCommand::removeCSSProperty): Ditto.
629 (WebCore::CompositeEditCommand::removeNodeAttribute): Ditto. Implement by calling
630 setNodeAttribute instead of with its own SimpleEditCommand.
631 (WebCore::CompositeEditCommand::setNodeAttribute): Ditto.
632 (WebCore::CompositeEditCommand::deleteInsignificantText): Ditto.
633 (WebCore::CompositeEditCommand::appendBlockPlaceholder): Ditto.
634 (WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded): Ditto.
635 (WebCore::CompositeEditCommand::insertNewDefaultParagraphElementAt): Ditto. Don't
636 bother using an undoable operation to put the break element into the paragraph
637 element because there's no need to split them and redo this when doing undo/redo.
638 (WebCore::CompositeEditCommand::moveParagraphs): Ditto.
639 (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): Ditto.
640 * editing/CompositeEditCommand.h: Ditto.
642 * editing/DeleteFromTextNodeCommand.cpp:
643 (WebCore::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand): Use unsigned.
644 (WebCore::DeleteFromTextNodeCommand::doApply): Eliminated inappropriate assertions.
645 (WebCore::DeleteFromTextNodeCommand::doUnapply): Ditto.
646 * editing/DeleteFromTextNodeCommand.h:
648 * editing/DeleteSelectionCommand.cpp:
649 (WebCore::DeleteSelectionCommand::removeNode): Use PassRefPtr.
650 (WebCore::DeleteSelectionCommand::deleteTextFromNode): Ditto.
651 * editing/DeleteSelectionCommand.h:
653 * editing/FormatBlockCommand.cpp:
654 (WebCore::FormatBlockCommand::FormatBlockCommand): Use AtomicString.
655 (WebCore::FormatBlockCommand::doApply): Use Element.
656 * editing/FormatBlockCommand.h:
658 * editing/IndentOutdentCommand.cpp:
659 (WebCore::createIndentBlockquoteElement): Use new to create the element
660 instead of calling a function so we have a more specific type.
661 (WebCore::IndentOutdentCommand::prepareBlockquoteLevelForInsertion):
662 Use RefPtr and Element.
663 (WebCore::IndentOutdentCommand::indentRegion): Ditto.
664 (WebCore::IndentOutdentCommand::outdentParagraph): Ditto.
665 * editing/IndentOutdentCommand.h:
667 * editing/InsertIntoTextNodeCommand.cpp:
668 (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand):
669 Use unsigned. Added an assertion.
670 (WebCore::InsertIntoTextNodeCommand::doApply): Eliminated inappropriate assertions.
671 (WebCore::InsertIntoTextNodeCommand::doUnapply): Ditto.
672 * editing/InsertIntoTextNodeCommand.h:
674 * editing/InsertLineBreakCommand.cpp:
675 (WebCore::InsertLineBreakCommand::insertNodeAfterPosition): Use Element.
676 (WebCore::InsertLineBreakCommand::insertNodeBeforePosition): Ditto.
678 * editing/InsertListCommand.cpp:
679 (WebCore::InsertListCommand::doApply): Use Element.
681 * editing/InsertNodeBeforeCommand.cpp:
682 (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand): Moved assertions
684 (WebCore::InsertNodeBeforeCommand::doApply): Eliminated inappropriate assertions.
686 (WebCore::InsertNodeBeforeCommand::doUnapply): Simplified to just a single remove call.
688 * editing/InsertParagraphSeparatorCommand.cpp:
689 (WebCore::InsertParagraphSeparatorCommand::doApply): Use Element and cloneElement.
691 * editing/JoinTextNodesCommand.cpp:
692 (WebCore::JoinTextNodesCommand::doApply): Eliminated inappropriate assertions.
693 Added some runtime checks. Don't store anything in m_offset.
694 (WebCore::JoinTextNodesCommand::doUnapply): Ditto.
695 * editing/JoinTextNodesCommand.h:
697 * editing/MergeIdenticalElementsCommand.cpp:
698 (WebCore::MergeIdenticalElementsCommand::MergeIdenticalElementsCommand): Moved
699 an assertion here from doApply.
700 (WebCore::MergeIdenticalElementsCommand::doApply): Eliminated inappropriate assertions.
701 Added a null check. Changed implementation to use remove to avoid null parent issue.
702 Use a vector of nodes to avoid possible infinite loop if mutation happens while iterating.
703 (WebCore::MergeIdenticalElementsCommand::doUnapply): Ditto.
705 * editing/ModifySelectionListLevel.cpp:
706 (WebCore::ModifySelectionListLevelCommand::appendSiblingNodeRange): Use Element*.
707 (WebCore::IncreaseSelectionListLevelCommand::doApply): Ditto.
708 * editing/ModifySelectionListLevel.h:
710 * editing/RemoveCSSPropertyCommand.cpp:
711 (WebCore::RemoveCSSPropertyCommand::RemoveCSSPropertyCommand): Use PassRefPtr and
712 CSSPropertyID. Also renamed m_decl to m_style.
713 (WebCore::RemoveCSSPropertyCommand::doApply): Eliminated inappropriate assertions.
714 (WebCore::RemoveCSSPropertyCommand::doUnapply): Ditto.
716 * editing/RemoveNodeAttributeCommand.cpp: Removed contents of this file. To be deleted.
717 Use SetNodeAttributeCommand instead.
718 * editing/RemoveNodeAttributeCommand.h: Ditto.
720 * editing/RemoveNodeCommand.cpp:
721 (WebCore::RemoveNodeCommand::RemoveNodeCommand): Moved assertions here from doApply.
722 Don't initialize m_refChild here; rather do it in doApply.
723 (WebCore::RemoveNodeCommand::doApply): Eliminated inappropriate assertions. Added
724 checks and streamlined implementation.
725 (WebCore::RemoveNodeCommand::doUnapply): Ditto.
726 * editing/RemoveNodeCommand.h:
728 * editing/RemoveNodePreservingChildrenCommand.cpp:
729 (WebCore::RemoveNodePreservingChildrenCommand::doApply): Use a vector.
731 * editing/ReplaceSelectionCommand.cpp:
732 (WebCore::ReplacementFragment::insertFragmentForTestRendering): Removed now-unneeded cast.
734 * editing/SetNodeAttributeCommand.cpp:
735 (WebCore::SetNodeAttributeCommand::SetNodeAttributeCommand): Use AtomicString.
736 Removed assertion that prevents us from using this to remove an attribute.
737 (WebCore::SetNodeAttributeCommand::doApply): Eliminated inappropriate assertions.
738 (WebCore::SetNodeAttributeCommand::doUnapply): Ditto.
739 * editing/SetNodeAttributeCommand.h:
741 * editing/SplitElementCommand.cpp:
742 (WebCore::SplitElementCommand::SplitElementCommand): Moved assertion here from doApply.
743 (WebCore::SplitElementCommand::doApply): Check some more invariants and use a vector
744 to avoid possible infinite loops.
745 (WebCore::SplitElementCommand::doUnapply): Ditto.
747 * editing/SplitTextNodeCommand.cpp:
748 (WebCore::SplitTextNodeCommand::SplitTextNodeCommand): Moved assertions and comment
750 (WebCore::SplitTextNodeCommand::doApply): Check for null and failures when applying.
751 (WebCore::SplitTextNodeCommand::doUnapply): Ditto.
753 * editing/SplitTextNodeContainingElementCommand.cpp:
754 (WebCore::SplitTextNodeContainingElementCommand::doApply): Use Element.
756 * editing/WrapContentsInDummySpanCommand.cpp:
757 (WebCore::WrapContentsInDummySpanCommand::doApply): Check for null and ignore failures.
758 Don't reuse the dummy span. Simplified logic.
759 (WebCore::WrapContentsInDummySpanCommand::doUnapply): Ditto.
761 * editing/htmlediting.cpp:
762 (WebCore::isBlock): Make sure this returns true only for elements.
763 (WebCore::enclosingBlock): Return an Element*.
764 (WebCore::enclosingTableCell): Ditto.
765 (WebCore::enclosingList): Return an HTMLElement*.
766 (WebCore::outermostEnclosingList): Return an HTMLElement*.
767 (WebCore::createDefaultParagraphElement): Return an HTMLElement*.
768 (WebCore::createBreakElement): Return an HTMLElement*.
769 (WebCore::createOrderedListElement): Return an HTMLElement*.
770 (WebCore::createUnorderedListElement): Return an HTMLElement*.
771 (WebCore::createListItemElement): Return an HTMLElement*.
772 (WebCore::createHTMLElement): Return an HTMLElement*.
773 * editing/htmlediting.h:
775 * editing/markup.cpp:
776 (WebCore::createFragmentFromText): Use createBreakElement and use Element*.
778 * page/MouseEventWithHitTestResults.cpp:
779 (WebCore::MouseEventWithHitTestResults::targetNode): Use parentElement.
781 2008-12-23 Darin Adler <darin@apple.com>
783 Reviewed by Dan Bernstein.
785 * dom/Node.h: Tweak comments and order of bits that Sam moved
787 * dom/Node.cpp: Ditto.
789 2008-12-22 Julien Chaffraix <jchaffraix@webkit.org>
791 Reviewed by Darin Adler.
793 Bug 11106: Some XMLHttpRequest URI resolving tests fail
794 https://bugs.webkit.org/show_bug.cgi?id=11106
796 Use the ScriptExecutionContext to resolve the URI when calling open in JavaScript.
797 The previous code was using the containing DOMWindow to do so which would fail for
798 XMLHttpRequest object being passed between iframe.
800 Tests: http/tests/xmlhttprequest/uri-resolution-opera-open-004.html
801 http/tests/xmlhttprequest/uri-resolution-opera-open-005.html
802 http/tests/xmlhttprequest/uri-resolution-opera-open-006.html
803 http/tests/xmlhttprequest/uri-resolution-opera-open-007.html
804 http/tests/xmlhttprequest/uri-resolution-opera-open-008.html
805 http/tests/xmlhttprequest/uri-resolution-opera-open-009.html
806 http/tests/xmlhttprequest/uri-resolution-opera-open-010.html
808 * bindings/js/JSXMLHttpRequestCustom.cpp:
809 (WebCore::JSXMLHttpRequest::open): Use the ScriptExecutionContext
813 (WebCore::Document::virtualCompleteURL): Virtual method added to
814 avoid performance hit on completeURL call.
817 * dom/ScriptExecutionContext.h:
818 (WebCore::ScriptExecutionContext::completeURL): Non-virtual method
819 that wrap the call to the virtual call.
820 * dom/WorkerContext.cpp:
821 (WebCore::WorkerContext::virtualCompleteURL): Pure virtual method.
822 * dom/WorkerContext.h:
824 2008-12-23 Darin Adler <darin@apple.com>
826 Reviewed by Dan Bernstein.
828 - https://bugs.webkit.org/show_bug.cgi?id=22978
829 a couple tweaks to the new strokeBoundingRect functions
831 * platform/graphics/cairo/PathCairo.cpp:
832 (WebCore::Path::strokeBoundingRect): Only create a GraphicsContext
833 if the applier is non-null.
835 * platform/graphics/cg/PathCG.cpp:
836 (WebCore::putBytesNowhere): Added.
837 (WebCore::createScratchContext): Changed to use a "/dev/null" type
838 function to discard bytes rather than using a data object. This
839 eliminates the possibility that memory will be used if someone draws
840 into the scratch context by accident. Also moved to the top of the
841 file; it was in a slightly strange place before.
842 (WebCore::Path::strokeBoundingRect): Only create a GraphicsContext
843 if the applier is non-null. Simplify the empty path special case.
845 2008-12-22 Sam Weinig <sam@webkit.org>
847 Reviewed by Mark Rowe.
849 Save a word in all Elements by moving the 5 loose bits to Node,
850 where we had 16 spare.
853 (WebCore::Element::Element):
856 (WebCore::Node::Node):
859 2008-12-22 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
861 Reviewed by George Staikos.
863 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22972
865 Add WML <meta> element support. All needed functionality is present
866 in Document::processHttpEquiv, already covered by tests.
870 * WebCore.vcproj/WebCore.vcproj:
871 * WebCore.xcodeproj/project.pbxproj:
872 * wml/WMLMetaElement.cpp: Added.
873 (WebCore::WMLMetaElement::WMLMetaElement):
874 (WebCore::WMLMetaElement::parseMappedAttribute):
875 (WebCore::WMLMetaElement::insertedIntoDocument):
876 * wml/WMLMetaElement.h: Added.
877 * wml/WMLTagNames.in:
879 2008-12-22 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
881 Rubber-stamped by Darin Adler.
883 Don't reference specific layout tests in comments.
885 * html/HTMLFormElement.cpp:
886 (WebCore::HTMLFormElement::createFormData):
888 2008-12-22 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
890 Reviewed by George Staikos.
892 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22965
894 Add WML <head> element support. Doesn't require a WMLHeadElement.
895 No functional behaviour, as we already created a WMLElement for headTag, by default.
896 It's just cleaner to list <head> in WMLTagNames, forwarding to a WMLElement constructor.
898 * wml/WMLTagNames.in:
900 2008-12-22 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
902 Reviewed by George Staikos.
904 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22971
906 Fix regression caused by the HTMLFormElement refactorization.
907 File form elements without a name have to be included in multipart/form-data
908 submission. Cover this behaviour with a new test case.
910 Test: http/tests/misc/empty-file-formdata.html
912 * html/HTMLFormElement.cpp:
913 (WebCore::HTMLFormElement::createFormData):
914 * wml/WMLTagNames.in:
916 2008-12-22 David Kilzer <ddkilzer@apple.com>
918 <rdar://problem/6438298> Bump schema version for app cache
920 Reviewed by Alexey Proskuryakov.
922 * loader/appcache/ApplicationCacheStorage.cpp: Increment
923 SchemaVersion from 2 to 3.
925 2008-12-22 David Kilzer <ddkilzer@apple.com>
927 Use Deque in CSSStyleSheet::addSubresourceStyleURLs()
929 Reviewed by Darin Adler.
931 * css/CSSStyleSheet.cpp:
932 (WebCore::CSSStyleSheet::addSubresourceStyleURLs): Replaced
933 use of ListHashSet with more efficient Deque.
935 2008-12-22 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
937 Reviewed by Sam Weinig.
939 Fix obvious crash fix for WML enabled builds.
941 * css/CSSStyleSelector.cpp:
942 (WebCore::CSSStyleSelector::adjustRenderStyle):
944 2008-12-22 David Kilzer <ddkilzer@apple.com>
946 Bug 11850: Webarchive fails to save images referenced in CSS
948 <https://bugs.webkit.org/show_bug.cgi?id=11850>
950 Reviewed by Darin Adler.
952 This entry contains two parts since the tests for adding a
953 completeURL() method to StyleSheet and CSSStyleSheet (part 1) depend
954 on Bug 11850 being fixed (part 2).
958 Tests: http/tests/webarchive/test-css-url-encoding-shift-jis.html
959 http/tests/webarchive/test-css-url-encoding-utf-8.html
960 http/tests/webarchive/test-css-url-encoding.html
962 Added completeURL() methods to StyleSheet and CSSStyleSheet that
963 match the behavior of Document::completeURL(). Most notably,
964 CSSStyleSheet::completeURL() uses the charset of the stylesheet
965 (if it exists) to construct URLs, just like Document::completeURL().
968 (WebCore::CSSParser::parseValue): Use CSSStyleSheet::completeURL().
969 (WebCore::CSSParser::parseContent): Ditto.
970 (WebCore::CSSParser::parseFillImage): Ditto.
971 (WebCore::CSSParser::parseFontFaceSrc): Ditto.
972 (WebCore::CSSParser::parseBorderImage): Ditto.
974 * css/CSSStyleSheet.cpp:
975 (WebCore::CSSStyleSheet::completeURL): Added.
976 * css/CSSStyleSheet.h:
977 (WebCore::CSSStyleSheet::completeURL): Added declaration.
979 * css/StyleSheet.cpp:
980 (WebCore::StyleSheet::completeURL): Added.
982 (WebCore::StyleSheet::completeURL): Added declaration.
985 (WebCore::Document::completeURL): Added comment referring to the new
986 completeURL() methods in StyleSheet and CSSStyleSheet.
990 Tests: webarchive/test-css-url-resources-in-stylesheets.html
991 webarchive/test-css-url-resources-inline-styles.html
993 Walk stylesheets and inline style attributes for url() references
994 when building a list of URLs to include in a webarchive. Note that
995 not all URLs found this way will be included in the webarchive if
996 they were not used (and thus not downloaded) when laying out the
999 The key method for CSS stylesheets is
1000 CSSStyleSheet::addSubresourceStyleURLs() which iterates over all
1001 CSSStyleSheet objects recursively referenced from its own stylesheet
1002 through @import rules. Starting with the CSSRule objects in each
1003 sheet and continuing down through the CSSMutableStyleDeclaration and
1004 CSSValue objects, addSubresourceStyleURLs() methods are called to
1007 For inline style attributes in HTML DOM elements,
1008 StyledElement::addSubresourceAttributeURLs() calls
1009 CSSMutableStyleDeclaration::addSubresourceStyleURLs() to gather URLs
1010 from each element, hence the need to call
1011 addSubresourceAttributeURLs() on superclasses when the method is
1012 implemented on the element class itself.
1014 * css/CSSBorderImageValue.cpp:
1015 (WebCore::CSSBorderImageValue::addSubresourceStyleURLs): Added.
1016 * css/CSSBorderImageValue.h:
1017 (WebCore::CSSBorderImageValue::addSubresourceStyleURLs): Added
1020 * css/CSSFontFaceRule.cpp:
1021 (WebCore::CSSFontFaceRule::addSubresourceStyleURLs): Added.
1022 * css/CSSFontFaceRule.h:
1023 (WebCore::CSSFontFaceRule::addSubresourceStyleURLs): Added
1026 * css/CSSFontFaceSrcValue.cpp:
1027 (WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs): Added.
1028 * css/CSSFontFaceSrcValue.h:
1029 (WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs): Added
1032 * css/CSSImportRule.cpp:
1033 (WebCore::CSSImportRule::addSubresourceStyleURLs): Added.
1034 * css/CSSImportRule.h:
1035 (WebCore::CSSImportRule::addSubresourceStyleURLs): Added
1038 * css/CSSMutableStyleDeclaration.cpp:
1039 (WebCore::CSSMutableStyleDeclaration::addSubresourceStyleURLs): Added.
1040 Iterates over m_properties vector of CSSProperty objects calling
1041 addSubresourceStyleURLs() on each property's CSSValue object.
1042 * css/CSSMutableStyleDeclaration.h:
1043 (WebCore::CSSMutableStyleDeclaration::addSubresourceStyleURLs): Added
1046 * css/CSSPrimitiveValue.cpp:
1047 (WebCore::CSSPrimitiveValue::addSubresourceStyleURLs): Added.
1048 * css/CSSPrimitiveValue.h:
1049 (WebCore::CSSPrimitiveValue::addSubresourceStyleURLs): Added
1052 * css/CSSReflectValue.cpp:
1053 (WebCore::CSSReflectValue::addSubresourceStyleURLs): Added.
1054 * css/CSSReflectValue.h:
1055 (WebCore::CSSReflectValue::addSubresourceStyleURLs): Added
1059 (WebCore::CSSRule::addSubresourceStyleURLs): Added. Virtual
1060 method with empty implementation that's overridden by subclasses
1063 * css/CSSStyleRule.cpp:
1064 (WebCore::CSSStyleRule::addSubresourceStyleURLs): Added.
1065 * css/CSSStyleRule.h:
1066 (WebCore::CSSStyleRule::addSubresourceStyleURLs): Added
1069 * css/CSSStyleSheet.cpp:
1070 (WebCore::CSSStyleSheet::addSubresourceStyleURLs): Updated to
1071 call CSSRule::addSubresourceStyleURLs on each rule to extract
1072 URLs. Removed unneeded baseURL parameter now that the
1073 completeURL() method exists.
1074 * css/CSSStyleSheet.h:
1075 (WebCore::CSSStyleSheet::addSubresourceStyleURLs): Updated
1079 (WebCore::CSSValue::addSubresourceStyleURLs): Added. Virtual
1080 method with empty implementation that's overridden by subclasses
1083 * css/CSSValueList.cpp:
1084 (WebCore::CSSValueList::addSubresourceStyleURLs): Added.
1085 Iterates over m_values vector of CSSValue objects calling
1086 addSubresourceStyleURLs() on each.
1087 * css/CSSValueList.h:
1088 (WebCore::CSSValueList::addSubresourceStyleURLs): Added
1092 (WebCore::StyleSheet::addSubresourceStyleURLs): Updated
1093 declaration to remove unneeded baseURL parameter.
1095 * dom/ProcessingInstruction.cpp:
1096 (WebCore::ProcessingInstruction::addSubresourceAttributeURLs):
1097 Fixed to use the StyleBase::baseURL() method to get the
1098 stylesheet's URL instead of calling Document::completeURL().
1100 * dom/StyledElement.cpp:
1101 (WebCore::StyledElement::addSubresourceAttributeURLs): Added method
1102 to extract URLs from inline style declarations.
1103 * dom/StyledElement.h:
1104 (WebCore::StyledElement::addSubresourceAttributeURLs): Added
1107 * html/HTMLBodyElement.cpp:
1108 (WebCore::HTMLBodyElement::addSubresourceAttributeURLs): Call
1109 addSubresourceAttributeURLs() in superclass to extract URLs
1110 from inline style declarations.
1111 * html/HTMLEmbedElement.cpp:
1112 (WebCore::HTMLEmbedElement::addSubresourceAttributeURLs): Ditto.
1113 * html/HTMLImageElement.cpp:
1114 (WebCore::HTMLImageElement::addSubresourceAttributeURLs): Ditto.
1115 * html/HTMLInputElement.cpp:
1116 (WebCore::HTMLInputElement::addSubresourceAttributeURLs): Ditto.
1117 * html/HTMLLinkElement.cpp:
1118 (WebCore::HTMLLinkElement::addSubresourceAttributeURLs): Ditto.
1119 * html/HTMLObjectElement.cpp:
1120 (WebCore::HTMLObjectElement::addSubresourceAttributeURLs): Ditto.
1121 * html/HTMLParamElement.cpp:
1122 (WebCore::HTMLParamElement::addSubresourceAttributeURLs): Ditto.
1123 * html/HTMLScriptElement.cpp:
1124 (WebCore::HTMLScriptElement::addSubresourceAttributeURLs): Ditto.
1125 * html/HTMLStyleElement.cpp:
1126 (WebCore::HTMLStyleElement::addSubresourceAttributeURLs): Ditto.
1127 * html/HTMLTableCellElement.cpp:
1128 (WebCore::HTMLTableCellElement::addSubresourceAttributeURLs): Ditto.
1129 * html/HTMLTableElement.cpp:
1130 (WebCore::HTMLTableElement::addSubresourceAttributeURLs): Ditto.
1131 * svg/SVGCursorElement.cpp:
1132 (WebCore::SVGCursorElement::addSubresourceAttributeURLs): Ditto.
1133 * svg/SVGFEImageElement.cpp:
1134 (WebCore::SVGFEImageElement::addSubresourceAttributeURLs): Ditto.
1135 * svg/SVGImageElement.cpp:
1136 (WebCore::SVGImageElement::addSubresourceAttributeURLs): Ditto.
1137 * svg/SVGScriptElement.cpp:
1138 (WebCore::SVGScriptElement::addSubresourceAttributeURLs): Ditto.
1140 2008-12-22 Dhananjoy Chutia <dhanrd@gmail.com>
1142 Reviewed by David Kilzer.
1144 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22959
1145 Memory leak fixes for WebKit+soup
1147 * platform/network/soup/ResourceHandleSoup.cpp:
1148 (WebCore::finishedCallback):
1150 2008-12-22 Alexey Proskuryakov <ap@webkit.org>
1152 Reviewed by Darin Adler.
1154 <rdar://problem/6277060> ASSERTION FAILED: !m_cacheBeingUpdated if the manifest is not available
1156 Tests: http/tests/appcache/404-manifest.html
1157 http/tests/appcache/fail-on-update.html
1159 * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::stopLoading):
1160 Removed the incorrect assertion.
1162 * loader/appcache/ApplicationCacheGroup.h: Added an explanation of somewhat nonintuitive
1163 m_currentHandle handling.
1165 2008-12-22 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
1167 Reviewed by Alexey Proskuryakov & George Staikos.
1169 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22961
1171 Add WML <fieldset> element support.
1172 Unlike HTML's <fieldset> element, WML doesn't provide a <legend> child element
1173 to describe the <fieldset>. WML instead offers a 'title' attribute on the <fieldset>
1174 element. To integrate within the existing RenderFieldset code, we just create an
1175 internal <insertedLegend> element as first child for a WML <fieldset> element, containing
1176 the title attribute value.
1180 * WebCore.vcproj/WebCore.vcproj:
1181 * WebCore.xcodeproj/project.pbxproj:
1182 * css/CSSStyleSelector.cpp:
1183 (WebCore::CSSStyleSelector::adjustRenderStyle):
1185 * rendering/RenderFieldset.cpp:
1186 (WebCore::RenderFieldset::RenderFieldset):
1187 (WebCore::RenderFieldset::findLegend):
1188 * rendering/RenderFieldset.h:
1189 * rendering/RenderLegend.cpp:
1190 (WebCore::RenderLegend::RenderLegend):
1191 * rendering/RenderLegend.h:
1192 * wml/WMLFieldSetElement.cpp: Added.
1193 (WebCore::WMLFieldSetElement::WMLFieldSetElement):
1194 (WebCore::WMLFieldSetElement::~WMLFieldSetElement):
1195 (WebCore::WMLFieldSetElement::parseMappedAttribute):
1196 (WebCore::WMLFieldSetElement::insertedIntoDocument):
1197 (WebCore::WMLFieldSetElement::removedFromDocument):
1198 (WebCore::WMLFieldSetElement::createRenderer):
1199 * wml/WMLFieldSetElement.h: Added.
1200 * wml/WMLInsertedLegendElement.cpp: Added.
1201 (WebCore::WMLInsertedLegendElement::WMLInsertedLegendElement):
1202 (WebCore::WMLInsertedLegendElement::~WMLInsertedLegendElement):
1203 (WebCore::WMLInsertedLegendElement::createRenderer):
1204 * wml/WMLInsertedLegendElement.h: Added.
1205 * wml/WMLTagNames.in:
1207 2008-12-22 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
1209 Not reviewed. Try to fix clean Mac builds, set role=private for FormDataBuilder.h
1211 * WebCore.xcodeproj/project.pbxproj:
1213 2008-12-22 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
1215 Rubber-stamped by George Staikos.
1217 Unify all TorchMobile copyright lines. Consolidate in a single line, as requested by Mark Rowe, some time ago.
1219 * css/CSSStyleSelector.cpp:
1221 * dom/DOMImplementation.cpp:
1224 * dom/XMLTokenizer.cpp:
1225 * dom/XMLTokenizerLibxml2.cpp:
1226 * dom/XMLTokenizerQt.cpp:
1227 * history/BackForwardList.cpp:
1228 * history/BackForwardList.h:
1229 * loader/FrameLoader.cpp:
1230 * loader/FrameLoader.h:
1231 * loader/MainResourceLoader.cpp:
1234 * platform/MIMETypeRegistry.cpp:
1235 * platform/network/FormDataBuilder.cpp:
1236 * platform/network/FormDataBuilder.h:
1237 * platform/qt/MIMETypeRegistryQt.cpp:
1238 * wml/WMLAElement.cpp:
1239 * wml/WMLAElement.h:
1240 * wml/WMLAccessElement.cpp:
1241 * wml/WMLAccessElement.h:
1242 * wml/WMLAnchorElement.cpp:
1243 * wml/WMLAnchorElement.h:
1244 * wml/WMLBRElement.cpp:
1245 * wml/WMLBRElement.h:
1246 * wml/WMLCardElement.cpp:
1247 * wml/WMLCardElement.h:
1248 * wml/WMLDoElement.cpp:
1249 * wml/WMLDoElement.h:
1250 * wml/WMLDocument.cpp:
1251 * wml/WMLDocument.h:
1252 * wml/WMLElement.cpp:
1254 * wml/WMLErrorHandling.cpp:
1255 * wml/WMLErrorHandling.h:
1256 * wml/WMLEventHandlingElement.cpp:
1257 * wml/WMLEventHandlingElement.h:
1258 * wml/WMLGoElement.cpp:
1259 * wml/WMLGoElement.h:
1260 * wml/WMLImageElement.cpp:
1261 * wml/WMLImageElement.h:
1262 * wml/WMLImageLoader.cpp:
1263 * wml/WMLImageLoader.h:
1264 * wml/WMLIntrinsicEvent.cpp:
1265 * wml/WMLIntrinsicEvent.h:
1266 * wml/WMLIntrinsicEventHandler.cpp:
1267 * wml/WMLIntrinsicEventHandler.h:
1268 * wml/WMLNoopElement.cpp:
1269 * wml/WMLNoopElement.h:
1270 * wml/WMLOnEventElement.cpp:
1271 * wml/WMLOnEventElement.h:
1272 * wml/WMLPElement.cpp:
1273 * wml/WMLPElement.h:
1274 * wml/WMLPageState.cpp:
1275 * wml/WMLPageState.h:
1276 * wml/WMLPostfieldElement.cpp:
1277 * wml/WMLPostfieldElement.h:
1278 * wml/WMLPrevElement.cpp:
1279 * wml/WMLPrevElement.h:
1280 * wml/WMLRefreshElement.cpp:
1281 * wml/WMLRefreshElement.h:
1282 * wml/WMLSetvarElement.cpp:
1283 * wml/WMLSetvarElement.h:
1284 * wml/WMLTableElement.cpp:
1285 * wml/WMLTableElement.h:
1286 * wml/WMLTaskElement.cpp:
1287 * wml/WMLTaskElement.h:
1288 * wml/WMLTemplateElement.cpp:
1289 * wml/WMLTemplateElement.h:
1290 * wml/WMLTimerElement.cpp:
1291 * wml/WMLTimerElement.h:
1292 * wml/WMLVariables.cpp:
1293 * wml/WMLVariables.h:
1295 2008-12-22 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
1297 Reviewed by George Staikos.
1299 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22638
1301 Add POST method support to WMLGoElement. GET & POST over HTTP
1302 covered by a new set of WML HTTP layout tests.
1304 Tests: http/tests/wml/go-task-get-method-accept-charset.html
1305 http/tests/wml/go-task-get-method.html
1306 http/tests/wml/go-task-post-method-accept-charset.html
1307 http/tests/wml/go-task-post-method.html
1309 * wml/WMLGoElement.cpp:
1310 (WebCore::WMLGoElement::WMLGoElement):
1311 (WebCore::WMLGoElement::registerPostfieldElement):
1312 (WebCore::WMLGoElement::parseMappedAttribute):
1313 (WebCore::WMLGoElement::executeTask):
1314 (WebCore::WMLGoElement::preparePOSTRequest):
1315 (WebCore::WMLGoElement::prepareGETRequest):
1316 (WebCore::WMLGoElement::createFormData):
1317 * wml/WMLGoElement.h:
1318 * wml/WMLPostfieldElement.cpp:
1319 (WebCore::encodedString):
1320 (WebCore::WMLPostfieldElement::encodeData):
1321 * wml/WMLPostfieldElement.h:
1323 2008-12-21 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
1325 Reviewed by Darin Adler and George Staikos.
1327 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22949
1329 Refactor HTMLFormElement to share a maximum level of code between HTMLFormElement & WMLGoElement.
1330 Create a new helper class 'FormDataBuilder', which is hold as member variable in those classes.
1331 It encapsulates all functionality needed to generate a FormData object, usable for HTML/WML form
1332 submission, including boundary string generation, multi-part form handling etc.
1334 No functional changes, no test cases affected.
1335 WMLGoElement will be converted in a follow-up patch.
1340 * WebCore.vcproj/WebCore.vcproj:
1341 * WebCore.xcodeproj/project.pbxproj:
1342 * WebCoreSources.bkl:
1343 * html/HTMLFormElement.cpp:
1344 (WebCore::HTMLFormElement::HTMLFormElement):
1345 (WebCore::HTMLFormElement::dataEncoding):
1346 (WebCore::HTMLFormElement::createFormData):
1347 (WebCore::HTMLFormElement::submit):
1348 (WebCore::HTMLFormElement::parseMappedAttribute):
1349 * html/HTMLFormElement.h:
1350 (WebCore::HTMLFormElement::enctype):
1351 (WebCore::HTMLFormElement::encoding):
1352 (WebCore::HTMLFormElement::setEncoding):
1353 (WebCore::HTMLFormElement::acceptCharset):
1354 * platform/network/FormDataBuilder.cpp: Added.
1355 (WebCore::FormDataBuilder::FormDataBuilder):
1356 (WebCore::FormDataBuilder::~FormDataBuilder):
1357 (WebCore::FormDataBuilder::parseEncodingType):
1358 (WebCore::FormDataBuilder::parseMethodType):
1359 (WebCore::FormDataBuilder::dataEncoding):
1360 (WebCore::appendString):
1361 (WebCore::FormDataBuilder::beginMultiPartHeader):
1362 (WebCore::FormDataBuilder::addBoundaryToMultiPartHeader):
1363 (WebCore::FormDataBuilder::addFileNameToMultiPartHeader):
1364 (WebCore::FormDataBuilder::addContentTypeToMultiPartHeader):
1365 (WebCore::FormDataBuilder::finishMultiPartHeader):
1366 (WebCore::FormDataBuilder::clear):
1367 (WebCore::FormDataBuilder::addKeyValuePairAsFormData):
1368 (WebCore::FormDataBuilder::encodeStringAsFormData):
1369 (WebCore::FormDataBuilder::generateUniqueBoundaryString):
1370 * platform/network/FormDataBuilder.h: Added.
1371 (WebCore::FormDataBuilder::isPostMethod):
1372 (WebCore::FormDataBuilder::setIsPostMethod):
1373 (WebCore::FormDataBuilder::isMultiPartForm):
1374 (WebCore::FormDataBuilder::setIsMultiPartForm):
1375 (WebCore::FormDataBuilder::encodingType):
1376 (WebCore::FormDataBuilder::setEncodingType):
1377 (WebCore::FormDataBuilder::acceptCharset):
1378 (WebCore::FormDataBuilder::setAcceptCharset):
1379 (WebCore::FormDataBuilder::encodedData):
1380 (WebCore::FormDataBuilder::multiPartData):
1382 2008-12-21 Dirk Schulze <krit@webkit.org>
1384 Reviewed by Darin Adler, Nikolas Zimmermann.
1386 Move the the platform dependent strokeBBox functionality out of RenderPath
1387 into Path with strokeBoundingRect.
1389 RenderPath clean-up for strokeBoundingBox
1390 [https://bugs.webkit.org/show_bug.cgi?id=22902]
1393 * WebCore.xcodeproj/project.pbxproj:
1394 * platform/graphics/GraphicsContext.h:
1395 * platform/graphics/Path.h:
1396 * platform/graphics/StrokeStyleApplier.h: Added.
1397 (WebCore::StrokeStyleApplier::~StrokeStyleApplier):
1398 * platform/graphics/cairo/PathCairo.cpp:
1399 (WebCore::Path::strokeBoundingRect):
1400 * platform/graphics/cg/PathCG.cpp:
1401 (WebCore::createScratchContext):
1402 (WebCore::scratchContext):
1403 (WebCore::Path::strokeBoundingRect):
1404 * platform/graphics/qt/GraphicsContextQt.cpp:
1405 (WebCore::GraphicsContext::pen):
1406 * platform/graphics/qt/PathQt.cpp:
1407 (WebCore::Path::strokeBoundingRect):
1408 * rendering/RenderPath.cpp:
1409 (WebCore::StrokeBoundingRectStyleApplier::StrokeBoundingRectStyleApplier):
1410 (WebCore::StrokeBoundingRectStyleApplier::strokeStyle):
1411 (WebCore::RenderPath::relativeBBox):
1412 * rendering/RenderPath.h:
1413 * svg/graphics/cairo/RenderPathCairo.cpp:
1414 * svg/graphics/cg/RenderPathCg.cpp:
1415 * svg/graphics/qt/RenderPathQt.cpp:
1417 2008-12-20 David Kilzer <ddkilzer@apple.com>
1419 Fix typo "CSSAferRuleValue" to "CSSAfterRuleValue"
1421 * html/PreloadScanner.cpp:
1422 (WebCore::PreloadScanner::tokenizeCSS):
1423 * html/PreloadScanner.h:
1424 (WebCore::PreloadScanner::CSSState):
1426 2008-12-19 Alexey Proskuryakov <ap@webkit.org>
1428 Reviewed by Geoff Garen.
1430 <rdar://problem/6454076> Random crashes on JS raytracer
1432 No test, because the crash is not readily reproducible.
1434 * platform/text/StringImpl.cpp:
1435 (WebCore::StringImpl::empty):
1436 * platform/text/StringImpl.h:
1437 Made empty string per-thread.
1439 2008-12-19 Anders Carlsson <andersca@apple.com>
1441 Reviewed by Sam Weinig.
1443 Replace some uses of HardRetain etc with RetainPtr.
1445 * platform/mac/DragImageMac.mm:
1446 * platform/mac/SharedBufferMac.mm:
1447 (WebCore::SharedBuffer::createCFData):
1448 * rendering/RenderThemeMac.mm:
1449 * svg/graphics/cg/SVGResourceFilterCg.mm:
1450 (WebCore::SVGResourceFilter::prepareFilter):
1451 (WebCore::SVGResourceFilter::applyFilter):
1452 * svg/graphics/mac/SVGResourceFilterPlatformDataMac.h:
1453 * svg/graphics/mac/SVGResourceFilterPlatformDataMac.mm:
1454 (WebCore::SVGResourceFilterPlatformDataMac::SVGResourceFilterPlatformDataMac):
1456 2008-12-19 miggilin <mr.diggilin@gmail.com>
1458 Reviewed by Kevin Ollivier.
1460 Add Context Menu support to wx bindings.
1462 https://bugs.webkit.org/show_bug.cgi?id=22675
1464 * platform/ContextMenu.h:
1465 * platform/ContextMenuItem.h:
1466 (WebCore::PlatformMenuItemDescription::PlatformMenuItemDescription):
1467 * platform/wx/ContextMenuItemWx.cpp: Added.
1468 * platform/wx/ContextMenuWx.cpp: Added.
1469 * platform/wx/LocalizedStringsWx.cpp:
1470 * platform/wx/TemporaryLinkStubs.cpp:
1474 2008-12-19 Beth Dakin <bdakin@apple.com>
1476 Reviewed by Darin Adler.
1478 Temporary band-aide fix for <rdar://problem/6372481> In Gmail, a
1480 AccessibilityTable::isTableExposableThroughAccessibility() when
1481 attempting to create a link in a rich text message
1483 We need to disable Accessibility Tables until we get this fixed for
1484 real to prevent rampant crashing.
1486 * page/AccessibilityTable.cpp:
1487 (WebCore::AccessibilityTable::AccessibilityTable):
1489 2008-12-19 Simon Fraser <simon.fraser@apple.com>
1491 Reviewed by Darin Adler
1493 https://bugs.webkit.org/show_bug.cgi?id=22938
1495 When the document element is transformed, we need to paint
1496 the view background to avoid unpainted areas.
1498 Test: fast/transforms/transformed-document-element.html
1500 * rendering/RenderView.cpp:
1501 (WebCore::RenderView::paintBoxDecorations):
1503 2008-12-19 Steve Falkenburg <sfalken@apple.com>
1507 * WebCore.vcproj/WebCore.vcproj:
1509 2008-12-19 Kevin Ollivier <kevino@theolliviers.com>
1511 wx build fixes after recent changes.
1513 * WebCoreSources.bkl:
1514 * platform/graphics/wx/ImageSourceWx.cpp:
1515 (WebCore::ImageSource::clear):
1518 2008-12-19 Holger Hans Peter Freyther <zecke@selfish.org>
1520 Reviewed by Sam Weinig.
1522 [GTK] Fix make distcheck again
1524 These files were moved to WebCore/platform/animation
1525 and WebCore/platform/graphics/transforms.
1529 2008-12-19 Gustavo Noronha Silva <gns@gnome.org>
1531 Reviewed by Holger Freyther.
1533 https://bugs.webkit.org/show_bug.cgi?id=22900
1535 Fix AtomicString usage, so that building works.
1537 * platform/network/soup/ResourceHandleSoup.cpp:
1539 2008-12-19 Adam Roben <aroben@apple.com>
1541 Windows build fix on older versions of CFNetwork after r39393
1543 * platform/network/cf/ResourceHandleCFNet.cpp:
1544 (WebCore::highestSupportedCFURLConnectionClientVersion): Changed
1545 preprocessor directives not to leave in unreachable code on old
1546 versions of CFNetwork.
1548 2008-12-19 Antti Koivisto <antti@apple.com>
1552 * platform/PurgeableBuffer.h:
1554 2008-12-19 Holger Hans Peter Freyther <zecke@selfish.org>
1556 [GTK] Build fix by adding the new files.
1560 2008-12-19 Jade Han <jade.han@nokia.com>
1562 Reviewed by Tor Arne Vestbø.
1564 [Qt] Allow conversion of JavaScript Number and Boolean types to Qt types
1566 https://bugs.webkit.org/show_bug.cgi?id=22880
1568 * bridge/qt/qt_runtime.cpp:
1569 (JSC::Bindings::convertValueToQVariant):
1571 2008-12-19 Tor Arne Vestbø <tavestbo@trolltech.com>
1573 Reviewed by Holger Freyther.
1575 Implement ImageDecoder::filenameExtension() for Qt
1577 * platform/graphics/qt/ImageDecoderQt.cpp:
1578 (WebCore::ImageDecoderQt::filenameExtension):
1579 * platform/graphics/qt/ImageDecoderQt.h:
1580 * platform/graphics/qt/ImageSourceQt.cpp:
1581 (WebCore::ImageSource::filenameExtension):
1583 2008-12-19 Adam Barth <abarth@webkit.org>
1585 Reviewed by Darin Alder.
1587 Implement ImageSource::filenameExtension for Cario
1588 https://bugs.webkit.org/show_bug.cgi?id=22905
1590 * platform/graphics/cairo/ImageSourceCairo.cpp:
1591 (WebCore::ImageSource::filenameExtension):
1592 * platform/image-decoders/ImageDecoder.h:
1593 * platform/image-decoders/bmp/BMPImageDecoder.h:
1594 (WebCore::BMPImageDecoder::filenameExtension):
1595 * platform/image-decoders/gif/GIFImageDecoder.h:
1596 (WebCore::GIFImageDecoder::filenameExtension):
1597 * platform/image-decoders/ico/ICOImageDecoder.h:
1598 (WebCore::ICOImageDecoder::filenameExtension):
1599 * platform/image-decoders/jpeg/JPEGImageDecoder.h:
1600 (WebCore::JPEGImageDecoder::filenameExtension):
1601 * platform/image-decoders/png/PNGImageDecoder.h:
1602 (WebCore::PNGImageDecoder::filenameExtension):
1603 * platform/image-decoders/xbm/XBMImageDecoder.h:
1604 (WebCore::XBMImageDecoder::filenameExtension):
1606 2008-12-18 Dan Bernstein <mitz@apple.com>
1608 Reviewed by Sam Weinig.
1610 - avoid using the ResourceHandle-level credential storage, if any,
1611 unless the client opts to use it; when use of the credential
1612 storage is disallowed, all authentication challenges are sent to
1614 - let the FrameLoaderClient decide whether to use the credential
1617 * loader/EmptyClients.h:
1618 (WebCore::EmptyFrameLoaderClient::shouldUseCredentialStorage): Added.
1620 * loader/FrameLoader.cpp:
1621 (WebCore::FrameLoader::shouldUseCredentialStorage): Added. Calls through
1622 to the FrameLoaderClient.
1623 * loader/FrameLoader.h: Declared shouldUseCredentialStorage().
1624 * loader/FrameLoaderClient.h: Declared shouldUseCredentialStorage().
1625 * loader/ResourceLoader.cpp:
1626 (WebCore::ResourceLoader::shouldUseCredentialStorage): Added. Calls
1627 through to the FrameLoader.
1628 * loader/ResourceLoader.h:
1629 (WebCore::ResourceLoader::shouldUseCredentialStorage): Implemented this
1630 ResourceHandleClient method.
1631 * loader/SubresourceLoader.cpp:
1632 (WebCore::SubresourceLoader::shouldUseCredentialStorage): Added.
1633 Overrides the ResourceLoader implementation by letting the client
1634 supply the return value. If the client does not do this, continues
1635 with the ResourceLoader behavior of asking the FrameLoader.
1636 * loader/SubresourceLoader.h: Removed an unused #include and declared
1637 shouldUseCredentialStorage().
1638 * loader/SubresourceLoaderClient.h:
1639 (WebCore::SubresourceLoaderClient::getShouldUseCredentialStorage):
1640 Added a default implementation which returns false, meaning the client
1641 does not wish to decide whether the credential storage should be used.
1642 * platform/network/ResourceHandle.h: Removed unused forward declarations.
1643 Declared a new member function, shouldUseCredentialStorage(), on Mac and
1644 CFNetwork-using builds.
1645 * platform/network/ResourceHandleClient.h:
1646 (WebCore::ResourceHandleClient::shouldUseCredentialStorage): Added this
1647 default implementation that returns false.
1648 * platform/network/cf/ResourceHandleCFNet.cpp:
1649 (WebCore::findCFNetworkModule): Added. Returns a handle to the CFNetwork
1651 (WebCore::cfNetworkVersion): Added. Returns the high word of the
1652 CFNetwork library's product version.
1653 (WebCore::highestSupportedCFURLConnectionClientVersion): Added. Returns
1654 the highest version of the CFURLConnectionClient structure supported by
1655 the CFNetwork library. The only reason to check this at runtime is
1656 that WebKit may be linking at runtime against an older version of
1657 CFNetwork than the one it was built with, as is the case with nightly
1659 (WebCore::shouldUseCredentialStorageCallback): Added this
1660 CFURLConnection callback which calls through to
1661 ResourceHandle::shouldUseCredentialStorage().
1662 (WebCore::ResourceHandle::start): Pass a version 3 CFURLConnectionClient
1663 including the shouldUseCredentialStorage callback. At runtime, clamp the
1664 client structure version down to the highest supported by CFNetwork.
1665 (WebCore::ResourceHandle::shouldUseCredentialStorage): Added. Calls through
1666 to the client if there is one. Otherwise returns false.
1667 * platform/network/mac/ResourceHandleMac.mm:
1668 (WebCore::ResourceHandle::shouldUseCredentialStorage): Ditto.
1669 (-[WebCoreResourceHandleAsDelegate connectionShouldUseCredentialStorage:]):
1670 Added this delegate method which callls through to
1671 ResourceHandle::shouldUseCredentialStorage().
1673 2008-12-18 David Kilzer <ddkilzer@apple.com>
1675 Reset role to "Private" on 6 header files to fix clean builds after r39378
1677 Reviewed by BUILD FIX.
1679 * WebCore.xcodeproj/project.pbxproj: Added back "Private" role
1680 that was lost on 6 headers when they were "moved":
1681 AffineTransform.h, Animation.h, AnimationList.h,
1682 TimingFunction.h, TransformOperation.h and
1683 TransformOperations.h.
1685 2008-12-18 Pamela Greene <pam@chromium.org>
1687 Reviewed by Dan Bernstein.
1689 Add initializer for m_textDirectionSubmenuInclusionBehavior.
1690 https://bugs.webkit.org/show_bug.cgi?id=22926
1692 * page/Settings.cpp:
1693 (WebCore::Settings::Settings): Initialize m_textDirectionSubmenuInclusionBehavior
1695 2008-12-18 Sam Weinig <sam@webkit.org>
1697 Reviewed by John Sullivan.
1699 Add new FrameLoaderClient method to indicate the first visually
1700 non-empty layout based on an heuristic. Right now that heuristic
1701 is the first layout after an image, text or plugin has been added
1702 to the render tree, but I can imagine it becoming much smarter.
1704 * loader/EmptyClients.h:
1705 (WebCore::EmptyFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
1706 * loader/FrameLoader.cpp:
1707 (WebCore::FrameLoader::didFirstVisuallyNonEmptyLayout):
1708 * loader/FrameLoader.h:
1709 * loader/FrameLoaderClient.h:
1710 * page/FrameView.cpp:
1711 (WebCore::FrameViewPrivate::reset):
1712 (WebCore::FrameView::layout):
1713 (WebCore::FrameView::performPostLayoutTasks):
1714 (WebCore::FrameView::setIsVisuallyNonEmpty):
1716 * rendering/RenderImage.cpp:
1717 (WebCore::RenderImage::RenderImage):
1718 * rendering/RenderPartObject.cpp:
1719 (WebCore::RenderPartObject::RenderPartObject):
1720 * rendering/RenderText.cpp:
1721 (WebCore::RenderText::RenderText):
1723 2008-12-18 Darin Adler <darin@apple.com>
1725 Reviewed by Sam Weinig.
1727 - fix <rdar://problem/6449841> reduce memory use of ResourceResponseBase by removing two maps
1729 We were parsing the cache-control and pragma header field values into maps.
1730 I changed that so instead we only cache two bits with the data we were actually
1731 using. Later we might want to move this responsibility out of this class entirely;
1732 we can cache it at the higher level instead.
1734 * loader/CachedResource.cpp:
1735 (WebCore::CachedResource::mustRevalidate): Changed to call a specific API to get at
1736 the bits in quest instead of a general "cache control directives" API.
1738 * platform/network/ResourceResponseBase.cpp:
1739 (WebCore::ResourceResponseBase::setHTTPHeaderField): Remove the logic for the
1740 pragma header field since no one is using this for now.
1741 (WebCore::ResourceResponseBase::parseCacheControlDirectives): Eliminated the return
1742 value and made this function have side effects only. Changed it so it's the caller's
1743 responsibility to check m_haveParsedCacheControl. Set m_cacheControlContainsNoCache
1744 and m_cacheControlContainsMustRevalidate rather than keeping a map around.
1746 * platform/network/ResourceResponseBase.h:
1747 (WebCore::ResourceResponseBase::cacheControlContainsNoCache): Added.
1748 (WebCore::ResourceResponseBase::cacheControlContainsMustRevalidate): Added.
1749 (WebCore::ResourceResponseBase::ResourceResponseBase): Updated since I removed
1750 m_haveParsedCacheControl and renamed m_haveParsedCacheControlHeader to remove
1751 the imprecise use of the term "header".
1753 2008-12-18 Steve Falkenburg <sfalken@apple.com>
1756 Delete 2nd copy of code in these files.
1758 * platform/animation/Animation.cpp:
1759 * platform/animation/Animation.h:
1760 * platform/animation/AnimationList.cpp:
1761 * platform/animation/AnimationList.h:
1762 * platform/animation/TimingFunction.h:
1763 * platform/graphics/transforms/AffineTransform.cpp:
1764 * platform/graphics/transforms/AffineTransform.h:
1765 * platform/graphics/transforms/IdentityTransformOperation.h:
1766 * platform/graphics/transforms/MatrixTransformOperation.cpp:
1767 * platform/graphics/transforms/MatrixTransformOperation.h:
1768 * platform/graphics/transforms/RotateTransformOperation.cpp:
1769 * platform/graphics/transforms/RotateTransformOperation.h:
1770 * platform/graphics/transforms/ScaleTransformOperation.cpp:
1771 * platform/graphics/transforms/ScaleTransformOperation.h:
1772 * platform/graphics/transforms/SkewTransformOperation.cpp:
1773 * platform/graphics/transforms/SkewTransformOperation.h:
1774 * platform/graphics/transforms/TransformOperation.h:
1775 * platform/graphics/transforms/TransformOperations.cpp:
1776 * platform/graphics/transforms/TransformOperations.h:
1777 * platform/graphics/transforms/TranslateTransformOperation.cpp:
1778 * platform/graphics/transforms/TranslateTransformOperation.h:
1780 2008-12-18 Dimitri Glazkov <dglazkov@chromium.org>
1782 Reviewed by Geoffrey Garen.
1784 https://bugs.webkit.org/show_bug.cgi?id=22859
1785 Abstract away the use of JSDOMWindow in CachedPage and introduce
1786 ScriptCachedPageData abstraction.
1788 * GNUmakefile.am: Added ScriptCachedPageData to project.
1789 * WebCore.pro: Added ScriptCachedPageData to project.
1790 * WebCore.vcproj/WebCore.vcproj: Added ScriptCachedPageData to project.
1791 * WebCore.xcodeproj/project.pbxproj: Added ScriptCachedPageData to
1793 * bindings/js/ScriptCachedPageData.cpp: Added.
1794 (WebCore::ScriptCachedPageData::ScriptCachedPageData):
1795 (WebCore::ScriptCachedPageData::~ScriptCachedPageData):
1796 (WebCore::ScriptCachedPageData::restore):
1797 (WebCore::ScriptCachedPageData::clear):
1798 * bindings/js/ScriptCachedPageData.h: Added.
1799 * history/CachedPage.cpp: Replaced JSDOMWindow and ProtectedPtr with
1800 ScriptCachedPageData.
1801 (WebCore::CachedPage::CachedPage):
1802 (WebCore::CachedPage::domWindow):
1803 (WebCore::CachedPage::restore):
1804 (WebCore::CachedPage::clear):
1805 * history/CachedPage.h: Replaced JSDOMWindow and ProtectedPtr with
1806 ScriptCachedPageData.
1808 2008-12-18 Chris Marrin <cmarrin@apple.com>
1810 Reviewed by Dave Hyatt.
1812 https://bugs.webkit.org/show_bug.cgi?id=22888
1814 To avoid future dependency issues, all the TransformOperations and Animation related files need to be moved to platform
1816 * WebCore.xcodeproj/project.pbxproj:
1817 * platform/animation: Added.
1818 * platform/animation/Animation.cpp: Copied from WebCore/rendering/style/Animation.cpp.
1819 * platform/animation/Animation.h: Copied from WebCore/rendering/style/Animation.h.
1820 * platform/animation/AnimationList.cpp: Copied from WebCore/rendering/style/AnimationList.cpp.
1821 * platform/animation/AnimationList.h: Copied from WebCore/rendering/style/AnimationList.h.
1822 * platform/animation/TimingFunction.h: Copied from WebCore/rendering/style/TimingFunction.h.
1823 * platform/graphics/AffineTransform.cpp: Removed.
1824 * platform/graphics/AffineTransform.h: Removed.
1825 * platform/graphics/transforms: Added.
1826 * platform/graphics/transforms/AffineTransform.cpp: Copied from WebCore/platform/graphics/AffineTransform.cpp.
1827 * platform/graphics/transforms/AffineTransform.h: Copied from WebCore/platform/graphics/AffineTransform.h.
1828 * platform/graphics/transforms/IdentityTransformOperation.h: Copied from WebCore/rendering/style/IdentityTransformOperation.h.
1829 * platform/graphics/transforms/MatrixTransformOperation.cpp: Copied from WebCore/rendering/style/MatrixTransformOperation.cpp.
1830 * platform/graphics/transforms/MatrixTransformOperation.h: Copied from WebCore/rendering/style/MatrixTransformOperation.h.
1831 * platform/graphics/transforms/RotateTransformOperation.cpp: Copied from WebCore/rendering/style/RotateTransformOperation.cpp.
1832 * platform/graphics/transforms/RotateTransformOperation.h: Copied from WebCore/rendering/style/RotateTransformOperation.h.
1833 * platform/graphics/transforms/ScaleTransformOperation.cpp: Copied from WebCore/rendering/style/ScaleTransformOperation.cpp.
1834 * platform/graphics/transforms/ScaleTransformOperation.h: Copied from WebCore/rendering/style/ScaleTransformOperation.h.
1835 * platform/graphics/transforms/SkewTransformOperation.cpp: Copied from WebCore/rendering/style/SkewTransformOperation.cpp.
1836 * platform/graphics/transforms/SkewTransformOperation.h: Copied from WebCore/rendering/style/SkewTransformOperation.h.
1837 * platform/graphics/transforms/TransformOperation.h: Copied from WebCore/rendering/style/TransformOperation.h.
1838 * platform/graphics/transforms/TransformOperations.cpp: Copied from WebCore/rendering/style/TransformOperations.cpp.
1839 * platform/graphics/transforms/TransformOperations.h: Copied from WebCore/rendering/style/TransformOperations.h.
1840 * platform/graphics/transforms/TranslateTransformOperation.cpp: Copied from WebCore/rendering/style/TranslateTransformOperation.cpp.
1841 * platform/graphics/transforms/TranslateTransformOperation.h: Copied from WebCore/rendering/style/TranslateTransformOperation.h.
1842 * rendering/style/Animation.cpp: Removed.
1843 * rendering/style/Animation.h: Removed.
1844 * rendering/style/AnimationList.cpp: Removed.
1845 * rendering/style/AnimationList.h: Removed.
1846 * rendering/style/IdentityTransformOperation.h: Removed.
1847 * rendering/style/MatrixTransformOperation.cpp: Removed.
1848 * rendering/style/MatrixTransformOperation.h: Removed.
1849 * rendering/style/RotateTransformOperation.cpp: Removed.
1850 * rendering/style/RotateTransformOperation.h: Removed.
1851 * rendering/style/ScaleTransformOperation.cpp: Removed.
1852 * rendering/style/ScaleTransformOperation.h: Removed.
1853 * rendering/style/SkewTransformOperation.cpp: Removed.
1854 * rendering/style/SkewTransformOperation.h: Removed.
1855 * rendering/style/TimingFunction.h: Removed.
1856 * rendering/style/TransformOperation.h: Removed.
1857 * rendering/style/TransformOperations.cpp: Removed.
1858 * rendering/style/TransformOperations.h: Removed.
1859 * rendering/style/TranslateTransformOperation.cpp: Removed.
1860 * rendering/style/TranslateTransformOperation.h: Removed.
1862 2008-12-18 Cameron Zwarich <zwarich@apple.com>
1864 Reviewed by Geoff Garen.
1866 Bug 21855: REGRESSION (r37323): Gmail complains about popup blocking when opening a link
1867 <https://bugs.webkit.org/show_bug.cgi?id=21855>
1868 <rdar://problem/6278244>
1870 If JavaScript is not currently executing, the handleEvent member function
1871 of JSAbstractEventListener should set the dynamic global object to the
1872 global object of the context in which the event occurred.
1874 If this is not set, then JavaScriptCore will simply take the global object
1875 of the context where the event handler function was created, which may be
1876 a different frame. This will cause the popup blocker to incorrectly block
1877 windows opened from onclick events inside of an iframe whose handler was
1878 created in the outer frame, as it will check the outer frame and see that
1879 it is not processing any events.
1881 * bindings/js/JSEventListener.cpp:
1882 (WebCore::JSAbstractEventListener::handleEvent):
1884 2008-12-17 Simon Fraser <simon.fraser@apple.com>
1886 Reviewed by Dave Hyatt
1888 https://bugs.webkit.org/show_bug.cgi?id=22570
1890 Add the ability to compute clip rects independently from
1891 caching them on the RenderLayer. When painting reflections, use
1892 such temporarily computed clipRects, otherwise the layer may cache
1893 clipRects which are invalid, since they have been computed with
1894 a rootLayer that is not the one usually used to paint.
1896 Test: fast/reflections/reflection-overflow-hidden.html
1898 * rendering/RenderLayer.cpp:
1899 (WebCore::RenderLayer::paintLayer):
1900 (WebCore::RenderLayer::hitTestLayer):
1901 (WebCore::RenderLayer::updateClipRects):
1902 (WebCore::RenderLayer::calculateClipRects):
1903 (WebCore::RenderLayer::calculateRects):
1904 * rendering/RenderLayer.h:
1905 (WebCore::ClipRects::ClipRects):
1906 (WebCore::ClipRects::reset):
1907 (WebCore::ClipRects::overflowClipRect):
1908 (WebCore::ClipRects::setOverflowClipRect):
1909 (WebCore::ClipRects::fixedClipRect):
1910 (WebCore::ClipRects::setFixedClipRect):
1911 (WebCore::ClipRects::posClipRect):
1912 (WebCore::ClipRects::setPosClipRect):
1913 (WebCore::ClipRects::setFixed):
1914 (WebCore::ClipRects::operator==):
1915 (WebCore::ClipRects::operator=):
1916 * rendering/RenderReplica.cpp:
1917 (WebCore::RenderReplica::paint):
1919 2008-12-17 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1921 Reviewed by Simon Hausmann.
1923 https://bugs.webkit.org/show_bug.cgi?id=22618
1925 Fix MinGW QtWebKit linking problems and also make the
1926 QtWebKit build system more robust.
1930 2008-12-17 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
1932 Reviewed by Maciej Stachowiak.
1934 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22866
1936 wml.css is based on an older copy of html4.css. Synchronize them.
1937 Remove all entries, that are irrelevant for WML.
1939 Fix <do> appearance: should behave like HTMLs <button>.
1943 2008-12-17 Yury Semikhatsky <yurys@google.com>
1945 Reviewed by Timothy Hatcher.
1946 Landed by Adam Barth.
1948 Added more checks that WebInspector.panels.{resources,scripts} are
1949 defined where they are accessed from other panels and WebInspector
1950 (some panels are not yet supported in Chrome).
1952 * inspector/front-end/Console.js:
1953 (WebInspector.Console.prototype.addMessage):
1954 (WebInspector.Console.prototype.clearMessages):
1955 (WebInspector.Console.prototype.completions):
1956 * inspector/front-end/ObjectPropertiesSection.js:
1957 (WebInspector.ObjectPropertyTreeElement.prototype.evaluateExpression):
1958 * inspector/front-end/ScriptsPanel.js:
1959 (WebInspector.ScriptsPanel.prototype.get searchableViews):
1960 (WebInspector.ScriptsPanel.prototype._sourceViewForScriptOrResource):
1961 (WebInspector.ScriptsPanel.prototype._sourceFrameForScriptOrResource):
1962 (WebInspector.ScriptsPanel.prototype._showScriptOrResource):
1963 * inspector/front-end/SourceView.js:
1964 (WebInspector.SourceView.prototype._addBreakpoint):
1965 * inspector/front-end/inspector.js:
1966 (WebInspector.addResource):
1967 (WebInspector.removeResource):
1968 (WebInspector.showResourceForURL):
1970 2008-12-17 Cary Clark < caryclark@google.com>
1972 Reviewed by Darin Adler.
1973 Landed by Adam Barth.
1975 Add ENABLE_TEXT_CARET to permit the ANDROID platform
1976 to invalidate and draw the caret in a separate thread.
1979 (WebCore::Frame::clearCaretRectIfNeeded): Body of
1980 function does nothing if text caret is disabled.
1981 (WebCore::Frame::selectionLayoutChanged): Do nothing
1982 if text caret is disabled and the caret only blinked.
1983 (WebCore::Frame::caretBlinkTimerFired):
1984 (WebCore::Frame::paintCaret):
1985 (WebCore::Frame::paintDragCaret): Body of
1986 functions does nothing if text caret is disabled.
1988 2008-12-16 Darin Adler <darin@apple.com>
1990 Reviewed and landed by Cameron Zwarich.
1992 Change the style of AtomicString::add() to match Identifier:add().
1994 * platform/text/AtomicString.cpp:
1995 (WebCore::AtomicString::add):
1997 2008-12-16 Adele Peterson <adele@apple.com>
1999 Reviewed by Darin Adler.
2001 Fix for https://bugs.webkit.org/show_bug.cgi?id=22827
2002 <rdar://problem/6247724> RenderThemeWin buttons have weird heavy text
2004 * rendering/RenderThemeWin.cpp:
2005 (WebCore::fillFontDescription): Add version that takes a font size.
2006 (WebCore::RenderThemeWin::systemFont): Use the default GUI font for control fonts, but specify the size.
2007 This will match Firefox.
2009 2008-12-16 Stephanie Lewis <slewis@apple.com>
2013 * platform/text/AtomicString.h:
2014 (WebCore::AtomicString::AtomicString):
2016 2008-12-16 Stephanie Lewis <slewis@apple.com>
2020 * platform/text/AtomicString.h:
2021 (WebCore::AtomicString::AtomicString):
2022 (WebCore::AtomicString::createCFString):
2024 2008-12-16 Peter Kasting <pkasting@google.com>
2026 Reviewed by David Hyatt.
2028 https://bugs.webkit.org/show_bug.cgi?id=22885
2029 Fix memory corruption in GIFImageDecoder.cpp with certain GIFs.
2031 * platform/image-decoders/gif/GIFImageDecoder.cpp:
2032 (WebCore::GIFImageDecoder::frameComplete):
2034 2008-12-16 Stephanie Lewis <slewis@apple.com>
2036 Reviewed by Geoff Garen.
2038 Change HTTPHeaderMap to use an AtomicString as its key.
2039 Shaves ~1MB off of the Mozilla Memory Test
2040 No functionality difference
2042 * WebCore.xcodeproj/project.pbxproj:
2043 * inspector/InspectorController.cpp:
2044 (WebCore::addHeaders):
2045 * loader/appcache/ApplicationCacheStorage.cpp:
2046 (WebCore::parseHeader):
2047 * platform/network/HTTPHeaderMap.h:
2048 * platform/network/ResourceRequestBase.cpp:
2049 (WebCore::ResourceRequestBase::httpHeaderField):
2050 (WebCore::ResourceRequestBase::setHTTPHeaderField):
2051 (WebCore::ResourceRequestBase::addHTTPHeaderField):
2052 * platform/network/ResourceRequestBase.h:
2053 * platform/network/ResourceResponseBase.cpp:
2054 (WebCore::ResourceResponseBase::httpHeaderField):
2055 (WebCore::ResourceResponseBase::setHTTPHeaderField):
2056 * platform/network/ResourceResponseBase.h:
2057 * platform/text/StringHash.h:
2058 (WebCore::CaseFoldingHash::hash):
2059 (WebCore::CaseFoldingHash::equal):
2060 * xml/XMLHttpRequest.cpp:
2061 (WebCore::isSetCookieHeader):
2062 (WebCore::XMLHttpRequest::setRequestHeader):
2063 (WebCore::XMLHttpRequest::setRequestHeaderInternal):
2064 (WebCore::XMLHttpRequest::getRequestHeader):
2065 (WebCore::XMLHttpRequest::getResponseHeader):
2066 * xml/XMLHttpRequest.h:
2068 2008-12-16 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
2070 Reviewed by Darin Adler.
2072 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22876
2074 Remove legacy randomNumber() functionality from HTMLFormElement, and use the new wtf/RandomNumber.h.
2075 Also remove an uneeded QFileInfo include while I'm at it - there is no Qt usage in this file.
2077 * ForwardingHeaders/wtf/RandomNumber.h: Added.
2078 * html/HTMLFormElement.cpp:
2079 (WebCore::getUniqueBoundaryString):
2081 2008-12-16 Yael Aharon <yael.aharon@nokia.com>
2083 Reviewed by Tor Arne Vestbø.
2087 * platform/win/SystemTimeWin.cpp:
2089 2008-12-16 Kalle Vahlman <kalle.vahlman@movial.com>
2091 Reviewed by Holger Freyther.
2093 [CURL] memory leak of ResouceHandles
2094 http://bugs.webkit.org/show_bug.cgi?id=20777
2096 Fix ResourceHandle ref management to be consistent and correct.
2097 Original patch from Marco Barisione.
2099 * platform/network/curl/ResourceHandleCurl.cpp:
2100 (WebCore::ResourceHandle::start):
2101 * platform/network/curl/ResourceHandleManager.cpp:
2102 (WebCore::ResourceHandleManager::removeFromCurl):
2103 (WebCore::ResourceHandleManager::add):
2104 (WebCore::ResourceHandleManager::removeScheduledJob):
2106 2008-12-16 Simon Hausmann <simon.hausmann@nokia.com>
2110 * platform/graphics/qt/ImageSourceQt.cpp:
2111 (WebCore::ImageSource::clear): Adjust to new signature.
2113 2008-12-15 Mark Rowe <mrowe@apple.com>
2115 Rubber-stamped by Cameron Zwarich.
2117 <rdar://problem/6289933> Change WebKit-related projects to build with GCC 4.2 on Leopard.
2119 * Configurations/Base.xcconfig:
2120 * Configurations/DebugRelease.xcconfig:
2122 2008-12-15 Adele Peterson <adele@apple.com>
2124 Reviewed by Darin Adler.
2126 Fix for https://bugs.webkit.org/show_bug.cgi?id=22871
2127 <rdar://problem/6417316> RenderThemeWin buttons are too short/thin
2129 * rendering/RenderButton.cpp: (WebCore::RenderButton::setupInnerStyle):
2130 Check if the button's style (not the new inner style) has appearance set to determine whether we should set padding on the inner style.
2132 2008-12-15 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
2134 Reviewed by Oliver Hunt.
2136 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22865
2138 Add complete WML <table> / <tr> / <td> element support.
2139 Proper handling of all table related attributes, including tests.
2141 Tests: fast/wml/table-element-align-attribute-invalid.wml (variable reference in 'align' attribute, raises error)
2142 fast/wml/table-element-columns-attribute-invalid-number.wml (columns='0', raises error)
2143 fast/wml/table-element-columns-attribute-invalid.wml (non-numeric 'columns' attribute value, raises error)
2144 fast/wml/table-element-columns-attribute-missing.wml (missing 'columns')
2145 fast/wml/table-element-columns-attribute.wml (test 'columns' attribute and <td> count mismatches)
2149 * WebCore.vcproj/WebCore.vcproj:
2150 * WebCore.xcodeproj/project.pbxproj:
2151 * rendering/RenderObject.cpp:
2152 (WebCore::RenderObject::offsetParent):
2153 * rendering/RenderTableRow.cpp:
2154 (WebCore::RenderTableRow::addChild):
2155 * wml/WMLTableElement.cpp: Added.
2156 (WebCore::WMLTableElement::WMLTableElement):
2157 (WebCore::WMLTableElement::~WMLTableElement):
2158 (WebCore::WMLTableElement::mapToEntry):
2159 (WebCore::WMLTableElement::parseMappedAttribute):
2160 (WebCore::WMLTableElement::finishParsingChildren):
2161 * wml/WMLTableElement.h: Added.
2162 * wml/WMLTagNames.in:
2164 2008-12-15 Darin Adler <darin@apple.com>
2166 Reviewed by Sam Weinig.
2168 - fix <rdar://problem/6427048> crash due to infinite recursion after setting window.__proto__ = window
2170 Test: fast/dom/Window/window-custom-prototype.html
2172 Replaced toGlobalObject with the more generally useful unwrappedObject.
2174 * bindings/js/JSDOMWindowShell.cpp:
2175 (WebCore::JSDOMWindowShell::unwrappedObject): Added.
2176 * bindings/js/JSDOMWindowShell.h: Declared unwrappedObject.
2177 * bindings/js/JSQuarantinedObjectWrapper.h:
2178 (WebCore::JSQuarantinedObjectWrapper::unwrappedObject): Ditto.
2180 2008-12-15 Gustavo Noronha Silva <kov@kov.eti.br>
2182 Reviewed by Mark Rowe.
2184 https://bugs.webkit.org/show_bug.cgi?id=22686
2190 2008-12-15 Sam Weinig <sam@webkit.org>
2192 Reviewed by Darin Adler.
2194 Fix for https://bugs.webkit.org/show_bug.cgi?id=22847
2195 Geolocation PositionOptions cannot be an arbitrary object.
2197 Allow the PositionOptions to be a vanilla JS object and parse it
2200 * DerivedSources.make: Remove PositionOptions.
2201 * GNUmakefile.am: Ditto.
2202 * WebCore.pro: Ditto.
2203 * WebCore.vcproj/WebCore.vcproj: Ditto.
2204 * WebCore.xcodeproj/project.pbxproj: Ditto.
2205 * WebCoreSources.bkl: Ditto.
2207 * bindings/js/JSGeolocationCustom.cpp:
2208 (WebCore::createPositionOptions): Added. Extracts the enableHighAccuracy
2209 and timeout fields from a vanilla JS object in order to create the
2210 PositionOptions object, checking for exceptions as necessary.
2211 (WebCore::JSGeolocation::getCurrentPosition): Use createPositionOptions
2212 instead of toPositionOptions.
2213 (WebCore::JSGeolocation::watchPosition): Ditto.
2214 * page/PositionOptions.idl: Removed
2216 2008-12-15 Peter Kasting <pkasting@google.com>
2218 Reviewed by David Hyatt.
2220 https://bugs.webkit.org/show_bug.cgi?id=22108
2221 Large animated GIFs weren't always animating. The code that deleted
2222 the entire decoder after each frame of a large image was resulting in
2223 us forgetting the loop count, breaking animations intermittently.
2225 Instead of throwing the whole decoder away, we're more careful to just
2226 delete frames we don't care about. This additionally addresses
2227 problems in the Cairo and Chromium ports with excessive peak memory
2228 use and CPU use when decoding large animated GIFs because it leads to
2229 much less redecoding (O(n) instead of O(n^2) CPU, and O(1) instead of
2232 This change has less impact on the CG decoder, which seems to throw
2233 away frames automatically when their external references are dropped;
2234 this means the CG decoder didn't suffer from the peak memory usage
2235 issue before (and still doesn't), but it also still burns excessive
2236 CPU redecoding earlier frames, that in theory it wouldn't need to
2237 redecode if it would judiciously save the most recent frames. At
2238 least this patch plumbs some useful info to the ImageSource so it can
2239 help guide the CG decoder heuristics in the future.
2241 * platform/graphics/BitmapImage.cpp:
2242 (WebCore::frameBytes):
2243 (WebCore::BitmapImage::destroyDecodedData):
2244 (WebCore::BitmapImage::destroyDecodedDataIfNecessary):
2245 (WebCore::BitmapImage::destroyMetadataAndNotify):
2246 (WebCore::BitmapImage::clearFrame):
2247 (WebCore::BitmapImage::cacheFrame):
2248 (WebCore::BitmapImage::dataChanged):
2249 (WebCore::BitmapImage::startAnimation):
2250 (WebCore::BitmapImage::resetAnimation):
2251 (WebCore::BitmapImage::internalAdvanceAnimation):
2252 * platform/graphics/BitmapImage.h:
2253 * platform/graphics/GeneratedImage.h:
2254 (WebCore::GeneratedImage::destroyDecodedData):
2255 * platform/graphics/Image.h:
2256 * platform/graphics/ImageSource.h:
2257 * platform/graphics/cairo/ImageSourceCairo.cpp:
2258 (WebCore::ImageSource::~ImageSource):
2259 (WebCore::ImageSource::clear):
2260 * platform/graphics/cg/ImageSourceCG.cpp:
2261 (WebCore::ImageSource::~ImageSource):
2262 (WebCore::ImageSource::clear):
2263 * platform/graphics/cg/PDFDocumentImage.h:
2264 (WebCore::PDFDocumentImage::destroyDecodedData):
2265 * platform/graphics/qt/StillImageQt.h:
2266 (WebCore::StillImage::destroyDecodedData):
2267 * platform/image-decoders/ImageDecoder.h:
2268 (WebCore::RGBA32Buffer::clear):
2269 (WebCore::ImageDecoder::clearFrameBufferCache):
2270 * platform/image-decoders/gif/GIFImageDecoder.cpp:
2271 (WebCore::GIFImageDecoder::repetitionCount):
2272 (WebCore::GIFImageDecoder::clearFrameBufferCache):
2273 (WebCore::GIFImageDecoder::initFrameBuffer):
2274 * platform/image-decoders/gif/GIFImageDecoder.h:
2275 * platform/image-decoders/gif/GIFImageReader.h:
2276 (GIFImageReader::GIFImageReader):
2277 * svg/graphics/SVGImage.h:
2278 (WebCore::SVGImage::destroyDecodedData):
2280 2008-12-15 Cameron Zwarich <zwarich@apple.com>
2282 Reviewed by Darin Adler.
2284 Bug 22562: REGRESSION (r37971): events not firing after going back in back/forward cache
2285 <https://bugs.webkit.org/show_bug.cgi?id=22562>
2286 <rdar://problem/6414593>
2288 Restore the Frame's DOMWindow to its previous value when going back in
2289 the back/forward cache. The fact that it was not getting set before may
2290 have always caused some subtle bugs with the back/forward cache, but
2291 after r37971, it causes no events to fire after restoring a page.
2293 Previously, ScriptController::clearScriptObjects() was calling
2294 clearPlatformScriptObjects(), which was not actually clearing any
2295 objects, only updating them to reflect some change in state. Since the
2296 window shell was not updated until after the call to clearScriptObjects(),
2297 this didn't actually make that much sense.
2299 We rename clearPlatformScriptObjects() to reflect its actual purpose and
2300 call it after the window shell has been updated rather than before.
2302 Unfortunately, there is no way to test this with a layout test because
2303 it involves the back/forward cache.
2305 * bindings/js/ScriptController.cpp:
2306 (WebCore::ScriptController::updatePlatformScriptObjects): Renamed from
2307 clearPlatformScriptObjects(), because the only nonempty implementation
2308 doesn't actually clear any objects, it updates them. Also made public.
2309 (WebCore::ScriptController::clearScriptObjects): Remove the call to
2310 clearPlatformScriptObjects().
2311 * bindings/js/ScriptController.h:
2312 * bindings/js/ScriptControllerMac.mm:
2313 (WebCore::ScriptController::updatePlatformScriptObjects):
2314 * history/CachedPage.cpp:
2315 (WebCore::CachedPage::domWindow): Added.
2316 * history/CachedPage.h:
2317 * loader/FrameLoader.cpp:
2318 (WebCore::FrameLoader::cancelAndClear): Added call to updatePlatformScriptObjects().
2319 (WebCore::FrameLoader::begin): Added call to updatePlatformScriptObjects().
2320 (WebCore::FrameLoader::open): Added call to updatePlatformScriptObjects().
2322 (WebCore::Frame::setDOMWindow): Added.
2323 (WebCore::Frame::pageDestroyed): Added call to updatePlatformScriptObjects().
2326 2008-12-15 Antti Koivisto <antti@apple.com>
2328 Reviewed by Darin Adler.
2330 When a resource is cached locally, WebKit should follow RFC 2616 "Specific end-to-end revalidation" instead of "Unspecified end-to-end revalidation"
2331 https://bugs.webkit.org/show_bug.cgi?id=17998
2333 - Enable conditional revalidation for reloads by default.
2334 - Add a parameter to FrameLoader::reload() for forcing end-to-end reload.
2335 - To avoid duplicating state remove m_cachePolicy variables from FrameLoader and DocLoader.
2336 Instead synthezise the policy on demand.
2338 This speeds up reloads and makes them use way less bandwidth.
2341 * loader/CachePolicy.h: Rename CachePolicyRefresh to CachePolicyRevalidate.
2343 * loader/DocLoader.cpp:
2344 (WebCore::DocLoader::DocLoader):
2345 (WebCore::DocLoader::checkForReload): Support CachePolicyRevalidate.
2346 (WebCore::DocLoader::requestResource):
2347 (WebCore::DocLoader::cachePolicy):
2348 * loader/DocLoader.h: Get rid of m_cachePolicy member.
2349 * loader/FrameLoader.cpp:
2350 (WebCore::ScheduledRedirection::ScheduledRedirection):
2351 Add parameter to differentiate refresh from other types of redirects.
2352 m_cachePolicy was used for signaling this before.
2353 (WebCore::isBackForwardLoadType):
2354 (WebCore::FrameLoader::FrameLoader):
2355 (WebCore::FrameLoader::changeLocation):
2356 (WebCore::FrameLoader::stopLoading):
2357 (WebCore::FrameLoader::receivedFirstData):
2358 (WebCore::FrameLoader::write):
2359 (WebCore::FrameLoader::startIconLoader):
2360 (WebCore::FrameLoader::restoreDocumentState):
2361 (WebCore::FrameLoader::scheduleHTTPRedirection):
2362 (WebCore::FrameLoader::scheduleLocationChange):
2363 (WebCore::FrameLoader::scheduleRefresh):
2364 (WebCore::FrameLoader::redirectionTimerFired):
2365 (WebCore::FrameLoader::canCachePage):
2366 (WebCore::FrameLoader::loadURL):
2367 (WebCore::FrameLoader::reload):
2368 Differentiate between revalidation and reload.
2369 No need to use setHTTPHeaderField here, addExtraFieldsToRequest will set the headers.
2370 (WebCore::FrameLoader::transitionToCommitted):
2371 (WebCore::FrameLoader::cachePolicy): Determine the cache policy based on current load type.
2372 (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
2373 (WebCore::FrameLoader::addExtraFieldsToRequest): Set Cache-control: no-cache for FrameLoadTypeReloadFromOrigin
2374 (WebCore::FrameLoader::shouldScrollToAnchor):
2375 (WebCore::FrameLoader::loadItem):
2376 (WebCore::FrameLoader::updateHistoryForReload):
2377 (WebCore::FrameLoader::updateHistoryForCommit):
2378 (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
2379 * loader/FrameLoader.h:
2380 * loader/FrameLoaderTypes.h: Add FrameLoadTypeReloadFromOrigin
2382 * loader/NavigationAction.cpp:
2383 (WebCore::navigationType): Support FrameLoadTypeReloadFromOrigin
2384 * loader/loader.cpp:
2385 (WebCore::Loader::Host::servePendingRequests):
2387 2008-12-15 Holger Hans Peter Freyther <zecke@selfish.org>
2389 Reviewed by Simon Hausmann.
2391 Add null checks to PlatformScreenQt
2393 The other ports do the null checks and JSDOMWindowBase is
2394 at least one caller that is passing 0.
2396 * platform/qt/PlatformScreenQt.cpp:
2397 (WebCore::screenDepth):
2398 (WebCore::screenDepthPerComponent):
2399 (WebCore::screenIsMonochrome):
2400 (WebCore::screenRect):
2401 (WebCore::screenAvailableRect):
2403 2008-12-15 Alexey Proskuryakov <ap@webkit.org>
2405 Reviewed by Oliver Hunt.
2407 <rdar://problem/6444455> Worker Thread crash running multiple workers for a moderate amount of time
2409 * dom/WorkerThread.cpp: (WebCore::WorkerThread::workerThread):
2410 Detach the thread. Without this, one page of its stack was never unmmaped, and fragmentation
2411 made RegisterFile allocaiton fail after a while.
2413 2008-12-13 Darin Adler <darin@apple.com>
2415 Reviewed by Sam Weinig.
2417 - half of https://bugs.webkit.org/show_bug.cgi?id=17425
2418 eliminate DeprecatedPtrList
2421 (WebCore::Document::removeImage): Change to set slots in the vector
2422 to 0 rather than removing items from a list.
2423 (WebCore::Document::dispatchImageLoadEventsNow): Rewrite to process
2424 the list. Since we now use a "set to zero" design, we don't need to
2425 be careful about where the iterator points while iterating the list,
2426 instead we just have to skip zeros.
2428 * dom/Document.h: Use Vector instead of DeprecatedPtrList.
2430 * dom/EventTargetNode.cpp:
2431 (WebCore::EventTargetNode::dispatchGenericEvent): Use a Vector instead
2432 of a DeprecatedPtrList for the list of nodes to handle. Also streamlined
2433 the logic a bit and used goto in a couple key places.
2436 (WebCore::Node::eventParentNode): Moved this function into this file
2437 because it's a virtual function so already can't be inlined. Also updated
2438 to return a ContainerNode, so it needs to be in a place where the
2439 definition of ContainerNode is visible, not the header file.
2441 * dom/Node.h: Changed return type of eventParentNode to ContainerNode
2442 and moved its definition into the cpp file.
2444 * dom/XMLTokenizerLibxml2.cpp:
2445 (WebCore::PendingCallbacks::~PendingCallbacks): Added a call to
2446 deleteAllValues here instead of setAutoDelete in the constructor, since
2447 we're using Deque instead of DeprecatedPtrList.
2448 (WebCore::PendingCallbacks::callAndRemoveFirstCallback): Changed the
2449 code to use an OwnPtr since the deque won't delete the callback object.
2451 * editing/ApplyStyleCommand.cpp:
2452 (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange): Use a
2453 Vector instead of a DeprecatedPtrList.
2455 * svg/SVGElement.cpp:
2456 (WebCore::SVGElement::eventParentNode): Moved this function into this file
2457 because it's a virtual function so already can't be inlined. Also updated
2458 to return a ContainerNode.
2460 * svg/SVGElement.h: Changed setShadowParentNode to take a ContainerNode*,
2461 made eventParentNode return a ContainerNode*, and made m_shadowParent a
2464 2008-12-14 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
2466 Reviewed by George Staikos.
2468 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22857
2470 Jumps within a WML deck using <go> task elements fail. Manual reloading
2471 is necessary to display the page - fix cache-policy in WMLGoElement::executeTask
2472 to prevent the problem.
2474 Refactor setActiveCardInDocument in two new functions: findNamedCardInDocument
2475 and determineActiveCard, to fix a side-effect of executing a <go> task:
2476 when switching cards within a deck the active card was changed before the load
2477 was fired which resulted in a flash effect on the screen, and doing unnecessary work.
2479 Test: wml/go-task-animation.html
2481 * wml/WMLCardElement.cpp:
2482 (WebCore::WMLCardElement::findNamedCardInDocument):
2483 (WebCore::WMLCardElement::determineActiveCard):
2484 * wml/WMLCardElement.h:
2485 * wml/WMLDocument.cpp:
2486 (WebCore::WMLDocument::finishedParsing):
2487 * wml/WMLGoElement.cpp:
2488 (WebCore::WMLGoElement::executeTask):
2489 (WebCore::WMLGoElement::prepareGETRequest):
2490 * wml/WMLGoElement.h:
2492 2008-12-14 Dirk Schulze <krit@webkit.org>
2494 Reviewed by Oliver Hunt.
2496 Fixes an issue in cairo. A fully transparent color can cause wrong
2497 drawings on canvas' composite.
2499 https://bugs.webkit.org/show_bug.cgi?id=22846
2500 [CAIRO] Canvas: transparent color and composite
2502 Test: fast/canvas/canvas-transparency-and-composite.html
2504 * platform/graphics/cairo/GraphicsContextCairo.cpp:
2505 (WebCore::GraphicsContext::fillPath):
2506 (WebCore::GraphicsContext::strokePath):
2508 2008-12-13 Julien Chaffraix <jchaffraix@webkit.org>
2510 Reviewed by Darin Adler.
2512 Bug 22665: Remove setCreatedByParser(bool) from the few elements that use it
2513 https://bugs.webkit.org/show_bug.cgi?id=22665
2515 Remove setCreatedByParser from frame and iframe.
2517 * html/HTMLElementFactory.cpp:
2518 (WebCore::frameConstructor):
2519 (WebCore::iframeConstructor):
2520 (WebCore::objectConstructor):
2521 * html/HTMLFrameElement.cpp:
2522 (WebCore::HTMLFrameElement::HTMLFrameElement):
2523 * html/HTMLFrameElement.h:
2524 * html/HTMLFrameElementBase.cpp:
2525 (WebCore::HTMLFrameElementBase::HTMLFrameElementBase):
2526 * html/HTMLFrameElementBase.h:
2527 * html/HTMLFrameOwnerElement.cpp:
2528 (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement):
2529 * html/HTMLFrameOwnerElement.h:
2530 (WebCore::HTMLFrameOwnerElement::createdByParser):
2531 * html/HTMLIFrameElement.cpp:
2532 (WebCore::HTMLIFrameElement::HTMLIFrameElement):
2533 * html/HTMLIFrameElement.h:
2534 * html/HTMLPlugInElement.cpp:
2535 (WebCore::HTMLPlugInElement::HTMLPlugInElement):
2536 * html/HTMLTagNames.in:
2538 2008-12-13 Alexey Proskuryakov <ap@webkit.org>
2540 Reviewed by Darin Adler.
2542 https://bugs.webkit.org/show_bug.cgi?id=22843
2543 Auto-generate JSWorkerContext
2545 * bindings/scripts/CodeGeneratorJS.pm:
2546 * dom/WorkerContext.idl: Added.
2547 * page/DOMWindow.idl:
2548 Added ExtendsDOMGlobalObject, a new attribute for behaviors common to DOMWindow and
2551 * bindings/js/WorkerScriptController.cpp:
2552 (WebCore::WorkerScriptController::initScript):
2553 Made JSWorkerContext creation look more like JSDOMWindow creation, to work with generated code.
2555 * DerivedSources.make:
2559 * WebCore.vcproj/WebCore.vcproj:
2560 * WebCore.xcodeproj/project.pbxproj:
2561 * bindings/js/JSWorkerContext.cpp: Removed.
2562 * bindings/js/JSWorkerContext.h: Removed.
2563 * bindings/js/JSWorkerContextBase.cpp: Copied from WebCore/bindings/js/JSWorkerContext.cpp.
2564 (WebCore::JSWorkerContextBase::JSWorkerContextBase):
2565 (WebCore::JSWorkerContextBase::~JSWorkerContextBase):
2566 (WebCore::JSWorkerContextBase::scriptExecutionContext):
2567 (WebCore::getJSWorkerContextBaseTable):
2569 (WebCore::JSWorkerContextBase::put):
2570 * bindings/js/JSWorkerContextBase.h: Copied from WebCore/bindings/js/JSWorkerContext.h.
2571 * bindings/js/JSWorkerContextCustom.cpp: Added.
2572 (WebCore::JSWorkerContext::customGetOwnPropertySlot):
2573 (WebCore::JSWorkerContext::mark):
2574 (WebCore::JSWorkerContext::self):
2575 (WebCore::JSWorkerContext::setSelf):
2576 (WebCore::JSWorkerContext::addEventListener):
2577 (WebCore::JSWorkerContext::removeEventListener):
2578 Moved code around. Note that currently, JSWorkerContextBase lookup table is empty, but we'll
2579 need to add some global objects to it in the future, as it is done in JSDOMWindowBase.
2581 * page/WorkerNavigator.cpp:
2582 * page/WorkerNavigator.h:
2583 Added ENABLE(WORKERS) ifdefs.
2585 2008-12-13 Darin Adler <darin@apple.com>
2590 (WebCore::Node::rareData): Remove inappropriate inline directive.
2592 2008-12-13 Darin Adler <darin@apple.com>
2594 Reviewed by Dan Bernstein.
2596 - fix https://bugs.webkit.org/show_bug.cgi?id=18734
2597 REGRESSION (r31081): Focus problems in Gmail 2/Plain text message text
2598 <rdar://problem/5892415>
2600 Test: fast/forms/textarea-selection-preservation.html
2602 The regression reported was caused by the fact that the renderer code had
2603 a bug where it would constantly think the newline at the end of text was
2604 missing, and so it would replace all the text even though it wasn't changing,
2605 which would destroy the selection.
2607 When writing the regression test I discovered another problem: The value
2608 property in HTMLTextAreaElement was intentionally changing the selection
2609 to the end of the textarea, but doing that even when the value wasn't changing.
2611 This patch fixes both and the test checks both.
2613 * html/HTMLTextAreaElement.cpp:
2614 (WebCore::HTMLTextAreaElement::setValue): Exit early if the value is
2617 * rendering/RenderTextControl.cpp:
2618 (WebCore::RenderTextControl::text): Add a newline character for each <br>
2619 element encountered in the control
2621 2008-12-13 Darin Adler <darin@apple.com>
2623 - file deletion part of https://bugs.webkit.org/show_bug.cgi?id=17497
2624 eliminate DeprecatedValueList
2626 * GNUmakefile.am: Removed references to deleted files.
2627 * WebCore.pro: Ditto.
2628 * WebCore.scons: Ditto.
2629 * WebCore.vcproj/WebCore.vcproj: Ditto.
2630 * WebCore.xcodeproj/project.pbxproj: Ditto.
2631 * WebCoreSources.bkl: Ditto.
2633 * platform/DeprecatedPtrQueue.h: Removed.
2634 * platform/DeprecatedValueList.h: Removed.
2635 * platform/DeprecatedValueListImpl.cpp: Removed.
2636 * platform/DeprecatedValueListImpl.h: Removed.
2638 2008-12-13 Darin Adler <darin@apple.com>
2640 Reviewed by Anders Carlsson.
2642 - https://bugs.webkit.org/show_bug.cgi?id=17497
2643 eliminate DeprecatedValueList
2645 * css/CSSStyleDeclaration.cpp: Removed unneeded include.
2648 (WebCore::Document::removeAllEventListenersFromAllNodes):
2649 Set the removed flag on the window event listeners in case we
2650 are in the middle of dispatching events on this window.
2651 (WebCore::Document::clear): Ditto.
2652 (WebCore::Document::handleWindowEvent): Changed to use a vector
2653 instead of a DeprecatedPtrList.
2654 (WebCore::Document::windowInlineEventListenerForType): Ditto.
2655 (WebCore::Document::removeWindowInlineEventListenerForType): Ditto.
2656 Also added a call to setRemoved, which is needed here just as in
2657 other functions that remove.
2658 (WebCore::Document::removeWindowEventListener): Ditto.
2659 (WebCore::Document::hasWindowEventListener): Ditto.
2661 * dom/Document.h: Changed RegisteredEventListenerList to
2662 RegisteredEventListeners.
2665 (WebCore::Element::attach): Use a function to access rare data instead
2666 of getting directly at the data field.
2667 (WebCore::Element::focus): Ditto.
2668 (WebCore::Element::cancelFocusAppearanceUpdate): Ditto.
2670 * dom/ElementRareData.h: Use "using" to make things that are protected
2671 in NodeRareData be public here.
2673 * dom/EventTarget.h: Removed include of DeprecatedValueList and
2674 related declearations that weren't needed. Tweaked the definitions
2675 of the forbidEventDispatch functions too.
2677 * dom/EventTargetNode.cpp:
2678 (WebCore::EventTargetNode::EventTargetNode): Eliminated code that
2679 was used to initialized m_regdListeners.
2680 (WebCore::EventTargetNode::~EventTargetNode): Elminated delete of
2681 m_regdListeners. Changed code to use eventListeners() instead of
2683 (WebCore::EventTargetNode::eventListeners): Added.
2684 (WebCore::EventTargetNode::insertedIntoDocument): Use eventListeners.
2685 (WebCore::EventTargetNode::removedFromDocument): Ditto.
2686 (WebCore::EventTargetNode::willMoveToNewOwnerDocument): Ditto.
2687 (WebCore::EventTargetNode::didMoveToNewOwnerDocument): Ditto.
2688 (WebCore::EventTargetNode::addEventListener): Ditto.
2689 (WebCore::EventTargetNode::removeEventListener): Ditto.
2690 (WebCore::EventTargetNode::removeAllEventListeners): Ditto.
2691 Also added code to call setRemoved on all the listeners.
2692 (WebCore::EventTargetNode::handleLocalEvents): Ditto.
2693 (WebCore::EventTargetNode::dispatchGenericEvent): Fixed indentation.
2694 (WebCore::EventTargetNode::removeInlineEventListenerForType): Use
2695 the new event listeners vector. Also added missing call to setRemoved.
2696 (WebCore::EventTargetNode::inlineEventListenerForType): Ditto.
2698 * dom/EventTargetNode.h: Added a new RegisteredEventListenerVector
2699 type and replaced the old localEventListeners function with a new
2700 eventListeners function. Removed m_regdListeners.
2703 (WebCore::Node::childNodes): Removed unneeded std prefix.
2704 (WebCore::Node::setFocus): Use function instead of going directly
2706 (WebCore::Node::rareDataFocused): Ditto.
2707 (WebCore::Node::registerDynamicNodeList): Removed unneeded std prefix.
2708 (WebCore::Node::getElementsByName): Ditto.
2709 (WebCore::Node::getElementsByClassName): Ditto.
2710 (WebCore::Node::compareDocumentPosition): Ditto.
2712 * dom/Node.h: Removed unneeded forward declaration of
2713 RegisteredEventListener. This is now in EventTargetNode.
2715 * dom/NodeRareData.h: Renamed m_focused to m_isFocused and made it
2716 private. Made m_needsFocusAppearanceUpdateSoonAfterAttach private.
2717 Added listeners and ensureListeners functions as well as isFocused,
2718 setFocused, and focus-appearance functions. Made all data members private.
2720 * dom/RegisteredEventListener.cpp: Removed operator ==.
2721 * dom/RegisteredEventListener.h: Removed operator == and !=.
2723 * svg/SVGElement.cpp:
2724 (WebCore::hasLoadListener): Rewrote to work with the vector.
2725 * svg/SVGUseElement.cpp:
2726 (WebCore::SVGUseElement::transferEventListenersToShadowTree): Ditto.
2728 2008-12-13 Holger Hans Peter Freyther <zecke@selfish.org>
2730 Reviewed by Dan Bernstein.
2732 https://bugs.webkit.org/show_bug.cgi?id=22824
2734 Change ENABLE(FONT_FAST_PATH) to USE(FONT_FAST_PATH). With r39206
2735 floatWidth always used the complex path causing a regression
2738 * platform/graphics/Font.cpp:
2739 (WebCore::Font::floatWidth): Use the fast path again
2741 2008-12-13 Dirk Schulze <krit@webkit.org>
2743 Reviewed by Darin Adler.
2745 Fixes behavior of gradients on empty path in canvas/Cg
2747 https://bugs.webkit.org/show_bug.cgi?id=22844
2748 [Cg] Canvas fill() draws gradients even without a path
2750 Test: fast/canvas/canvas-gradient-without-path.html
2752 * html/CanvasRenderingContext2D.cpp:
2753 (WebCore::CanvasRenderingContext2D::fill):
2754 (WebCore::CanvasRenderingContext2D::stroke):
2756 2008-12-13 Kevin Ollivier <kevino@theolliviers.com>
2760 * platform/graphics/wx/ImageSourceWx.cpp:
2761 (WebCore::ImageSource::filenameExtension):
2763 2008-12-12 Brent Fulgham <bfulgham@gmail.com>
2765 Reviewed by Oliver Hunt.
2767 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22805
2769 Provides implementation of image dragging logic for Windows Cairo
2772 * platform/win/DragImageCGWin.cpp:
2773 (WebCore::deallocContext): Add a generic CGContextRef destructor.
2774 * platform/win/DragImageCairoWin.cpp:
2775 (WebCore::deallocContext): Add a generic cairo_* destructor.
2776 (WebCore::allocImage): New implementation to allocate a Cairo
2777 surface of a specified size.
2778 (WebCore::createCairoContextFromBitmap): New implementation to
2779 create a Cairo surface from a Windows BITMAP.
2780 (WebCore::scaleDragImage): Replace stub with implementation to
2781 actually create a scaled image.
2782 (WebCore::createDragImageFromImage): Replace stub with implementation
2783 to actually create an image.
2785 2008-12-12 Dean Jackson <dino@apple.com>
2787 Reviewed by Darin Adler.
2789 Expose WebKitAnimationEvent, WebKitTransitionEvent,
2790 WebKitCSSTransformValue, WebKitCSSKeyframeRule and
2791 WebKitCSSKeyframesRule to Window object.
2792 This required generating constructors for the event
2795 https://bugs.webkit.org/show_bug.cgi?id=20560
2797 * dom/WebKitAnimationEvent.idl:
2798 * dom/WebKitTransitionEvent.idl:
2799 * page/DOMWindow.idl:
2801 2008-12-12 Dave Moore <davemoore@google.com>
2803 Reviewed by Eric Seidel.
2805 Fixed https://bugs.webkit.org/show_bug.cgi?id=22798
2807 In Font::drawTextUsingSVGFont() a variable of type SVGTextRunWalkerDrawTextData
2808 is created on the stack (called data). One of its fields, charsConsumed, is
2809 unitialized, leading to random values after calling walk() on the
2810 SVGTextRunWalker created with it. I now initialize the variable
2812 This bug was revealed in our Purify run. I don't know of any specific incorrect
2813 behavior caused by it but it would lead to the charsConsumed field having a
2817 (WebCore::Font::drawTextUsingSVGFont):
2819 2008-12-12 Beth Dakin <bdakin@apple.com>
2821 Rubber Stamped by Steve Falkenburg.
2827 2008-12-12 Brett Wilson <brettw@chromium.org>
2829 Reviewed by Darin Adler.
2831 Add the ability so that Google-URL can optionally be used in a build
2832 of WebKit without changing the shared header. The guts of KURL are
2833 optionally ifdefed out, and the replacement code goes in a different
2834 header to avoid polluting KURL.h
2836 * platform/KURL.cpp:
2838 (WebCore::KURL::string):
2839 (WebCore::KURL::operator const String&):
2840 (WebCore::KURL::operator JSC::UString):
2841 (WebCore::KURL::operator NSString*):
2842 (WebCore::KURL::parsed):
2843 (WebCore::KURL::utf8String):
2844 (WebCore::KURL::isNull):
2845 (WebCore::KURL::isEmpty):
2846 (WebCore::KURL::isValid):
2847 (WebCore::KURL::hostStart):
2848 (WebCore::KURL::hostEnd):
2849 (WebCore::KURL::pathStart):
2850 (WebCore::KURL::pathEnd):
2851 (WebCore::KURL::pathAfterLastSlash):
2853 2008-12-11 Steve Falkenburg <sfalken@apple.com>
2855 Delete the previous timer-queue timer in the main thread, just prior to scheduling a new timer.
2856 The code previously called DeleteTimerQueueTimer in the timer callback proc.
2858 The new technique simplifies the code, since we now create and delete timers on the
2859 same thread, and don't access the timer queue or timer handles in the callback.
2860 This allows us to remove some mutex use, and more importantly, it solves a race
2861 condition that was occuring between ChangeTimerQueueTimer and DeleteTimerQueueTimer.
2863 Since the timer callback isn't passed the timer handle, we were retrieving that handle
2864 via a global. If the timer callback code was entered, but then a new timer was immediately
2865 scheduled (prior to the callback acquiring the mutex and calling DeleteTimerQueueTimer),
2866 there was a small window where the timer could be re-scheduled via ChangeTimerQueueTimer
2867 and then immediately deleted once the already running callback acquired the mutex and
2868 then called DeleteTimerQueueTimer. This resulted in the newly scheduled timer never firing.
2870 Reviewed by Oliver Hunt.
2872 * platform/win/SharedTimerWin.cpp:
2873 (WebCore::queueTimerProc): Don't delete the timer in the callback.
2874 (WebCore::setSharedTimerFireTime): Always delete and create the timer instead of using ChangeTimerQueueTimer.
2875 (WebCore::stopSharedTimer): Call DeleteTimerQueueTimer directly.
2877 2008-12-12 Kai Brüning <kai@granus.net>
2879 Reviewed and tweaked by Darin Adler.
2881 - fix https://bugs.webkit.org/show_bug.cgi?id=18205
2882 DOMNode objects are garbage collected although there are strong references
2883 <rdar://problem/6441200>
2885 Fixes resurrection bug for wrapper objects by using an NSMapTable with zeroing weak
2886 memory for the wrapper reference for DOMWrapperCache (DOMInternal.mm),
2887 JSWrapperCache (WebScriptObject.mm) and wrapperCache (DOMRGBColor.mm).
2888 BUILDING_ON_TIGER is used to create a Leopard-only NSMapTable or an old-style
2889 procedural map table for Tiger systems.
2891 No regression tests yet since we don't currently run any tests in GC mode.
2893 * bindings/objc/DOMInternal.h: added WebCore::createWrapperCache for use by all three caches
2894 * bindings/objc/DOMInternal.mm:
2895 (WebCore::createWrapperCache): Contains the compile-time check for map table creation
2896 (WebCore::getDOMWrapper): HashMap -> NSMapTable
2897 (WebCore::addDOMWrapper): ditto
2898 (WebCore::removeDOMWrapper): ditto
2899 * bindings/objc/DOMObject.mm: removed [DOMObject finalize]
2900 * bindings/objc/DOMRGBColor.mm: removed [DOMRGBColor finalize]
2901 (WebCore::getWrapperForRGB): CFMutableDictionaryRef -> NSMapTable
2902 (WebCore::setWrapperForRGB): ditto
2903 (WebCore::removeWrapperForRGB): ditto
2904 * bindings/objc/WebScriptObject.mm:
2905 (WebCore::getJSWrapper): HashMap -> NSMapTable
2906 (WebCore::addJSWrapper): ditto
2907 (WebCore::removeJSWrapper): ditto
2908 (-[WebScriptObject finalize]): removed call of removeJSWrapper()
2910 2008-12-12 Dimitri Glazkov <dglazkov@chromium.org>
2912 Reviewed by Alexey Proskuryakov.
2914 https://bugs.webkit.org/show_bug.cgi?id=22813
2915 Remove unused references to JSDOMBinding, CallFrame, and JSLock.
2917 * dom/Node.cpp: Removed CallFrame and JSLock header includes.
2918 * loader/FrameLoader.cpp: Removed JSDOMBinding header include.
2920 2008-12-12 Holger Hans Peter Freyther <zecke@selfish.org>
2922 Reviewed by Simon Hausmann.
2924 Update the WebKit.qrc and add a script to automatically generate the file.
2926 With the way rcc and qmake work this can not be done at build time
2927 as the WebKit.qrc must sit inside the directory that contains the files
2928 and at build time we may not change the content of the source directory.
2930 * inspector/front-end/WebKit.qrc: Updated with new script
2932 2008-12-12 Oliver Hunt <oliver@apple.com>
2934 Reviewed by Alexey Proskuryakov.
2936 REGRESSION: Canvas is broken in high dpi mode
2937 <rdar://problem/6432739> <https://bugs.webkit.org/show_bug.cgi?id=22823>
2939 Simply made sure that we correctly scale the graphics context to
2940 account for the difference between logical and buffer resolution.
2942 * html/HTMLCanvasElement.cpp:
2943 (WebCore::HTMLCanvasElement::createImageBuffer):
2944 (WebCore::HTMLCanvasElement::baseTransform):
2946 2008-12-12 Tor Arne Vestbø <tavestbo@trolltech.com>
2948 Rubber-stamped by Oliver Hunt.
2950 Share PluginView::paintMissingPluginIcon() between ports
2952 Also, enable this feature for Qt/X11, Qt/Mac and GTK
2954 * plugins/PluginView.cpp:
2955 (WebCore::PluginView::paintMissingPluginIcon):
2956 * plugins/gtk/PluginViewGtk.cpp:
2957 (WebCore::PluginView::paint):
2958 * plugins/mac/PluginViewMac.cpp:
2959 (WebCore::PluginView::paint):
2960 * plugins/qt/PluginViewQt.cpp:
2961 (WebCore::PluginView::paint):
2962 * plugins/win/PluginViewWin.cpp:
2964 2008-12-12 Tor Arne Vestbø <tavestbo@trolltech.com>
2966 Reviewed by Simon Hausmann.
2968 [Qt/Mac] Implement PluginView::updatePluginWidget()
2970 We should update the window and clip rect regardless of whether or
2971 not the plugin has been loaded, for example to ensure that the
2972 missing plugin image is placed correctly.
2974 * plugins/mac/PluginViewMac.cpp:
2975 (WebCore::PluginView::setNPWindowIfNeeded):
2976 (WebCore::PluginView::updatePluginWidget):
2978 2008-12-12 Tor Arne Vestbø <tavestbo@trolltech.com>
2980 Rubber-stamped by Oliver Hunt.
2982 Make PluginView::updatePluginWidget() non-const
2984 We can do this now since frameRectsChanged() is no longer const. This
2985 also allows us to get rid of the mutables in the PluginView.
2987 * platform/qt/TemporaryLinkStubs.cpp:
2988 (PluginView::updatePluginWidget):
2989 * plugins/PluginView.h:
2990 * plugins/gtk/PluginViewGtk.cpp:
2991 (WebCore::PluginView::updatePluginWidget):
2992 * plugins/mac/PluginViewMac.cpp:
2993 (WebCore::PluginView::updatePluginWidget):
2994 * plugins/qt/PluginViewQt.cpp:
2995 (WebCore::PluginView::updatePluginWidget):
2996 * plugins/win/PluginViewWin.cpp:
2997 (WebCore::PluginView::updatePluginWidget):
2998 * plugins/wx/PluginViewWx.cpp:
2999 (WebCore::PluginView::updatePluginWidget):
3001 2008-12-12 Tor Arne Vestbø <tavestbo@trolltech.com>
3003 Reviewed by Simon Hausmann.
3005 Implement ImageSource::filenameExtension() for the Qt port
3007 We're using QImageReader::imageFormat().toLower() to check
3008 that the image format is supported, and if it is we store
3009 the resulting extension when creating the ImageDecoderQt.
3011 * platform/graphics/qt/ImageDecoderQt.cpp:
3012 (WebCore::ImageDecoderQt::create):
3013 (WebCore::ImageDecoderQt::ImageDecoderQt):
3014 (WebCore::ImageDecoderQt::imageFormat):
3015 * platform/graphics/qt/ImageDecoderQt.h:
3016 * platform/graphics/qt/ImageSourceQt.cpp:
3017 (WebCore::ImageSource::setData):
3018 (WebCore::ImageSource::filenameExtension):
3020 2008-12-11 Stephanie Lewis <slewis@apple.com>
3022 Reviewed by Geoff Garen
3024 Account for the size of the response and request headers as well as other overhead
3025 when calculating the size a resource takes up in the cache. Halts unbounded
3026 growth in the cache. Reduced stress test memory high water marks by > 50%.
3028 Uses estimates gathered from the stress test to set the overhead size.
3029 A version of the patch was created that calculated most of the sizes, but it was
3030 decided that the patch was still at a basic level an estimate. What gains it made
3031 in accuracy was offset by the complexity involved in creating and updating the
3035 (WebCore::Cache::resourceAccessed):
3036 (WebCore::Cache::TypeStatistic::addResource):
3037 (WebCore::Cache::dumpLRULists):
3038 * loader/CachedResource.cpp:
3039 (WebCore::CachedResource::overheadSize):
3040 * loader/CachedResource.h:
3041 (WebCore::CachedResource::size):
3043 2008-12-11 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
3045 Reviewed by Holger Freyther.
3047 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22814
3049 Add <wml> image element support. Based on HTML/SVGImage{Element/Loader}, with
3050 the only difference that WML defines a second source attribute 'localsrc', that
3051 takes precedence over the 'src' attribute. If loading the 'localsrc' attribute
3052 fails, the user agent should try loading the 'src' attribute. If both fail the
3053 'alt' fallback content will be used - just like in HTML.
3055 Fixes: fast/wml/img-localsrc.wml (<img> and 'localsrc' attribute)
3056 fast/wml/img-src-localsrc-alt.wml ('localsrc'/'src' fallback handling)
3057 fast/wml/img-src.wml (<img> and 'src' attribute)
3060 * WebCore.vcproj/WebCore.vcproj:
3061 * WebCore.xcodeproj/project.pbxproj:
3062 * rendering/HitTestResult.cpp:
3063 (WebCore::HitTestResult::altDisplayString):
3064 (WebCore::HitTestResult::absoluteImageURL):
3065 * rendering/RenderImage.cpp:
3066 (WebCore::RenderImage::updateAltText):
3067 * wml/WMLImageElement.cpp: Added.
3068 (WebCore::WMLImageElement::WMLImageElement):
3069 (WebCore::WMLImageElement::~WMLImageElement):
3070 (WebCore::WMLImageElement::mapToEntry):
3071 (WebCore::WMLImageElement::parseMappedAttribute):
3072 (WebCore::WMLImageElement::attach):
3073 (WebCore::WMLImageElement::createRenderer):
3074 (WebCore::WMLImageElement::insertedIntoDocument):
3075 (WebCore::WMLImageElement::isURLAttribute):
3076 (WebCore::WMLImageElement::imageSourceAttributeName):
3077 (WebCore::WMLImageElement::altText):
3078 * wml/WMLImageElement.h: Added.
3079 (WebCore::WMLImageElement::useFallbackAttribute):
3080 (WebCore::WMLImageElement::setUseFallbackAttribute):
3081 * wml/WMLImageLoader.cpp: Added.
3082 (WebCore::WMLImageLoader::WMLImageLoader):
3083 (WebCore::WMLImageLoader::~WMLImageLoader):
3084 (WebCore::WMLImageLoader::dispatchLoadEvent):
3085 (WebCore::WMLImageLoader::sourceURI):
3086 (WebCore::WMLImageLoader::notifyFinished):
3087 * wml/WMLImageLoader.h: Added.
3088 * wml/WMLTagNames.in:
3090 2008-12-11 Holger Hans Peter Freyther <zecke@selfish.org>
3092 Reviewed by Darin Adler.
3094 https://bugs.webkit.org/show_bug.cgi?id=22043
3096 Do not run into the WebCore::DocumentLoader::updateLoading
3097 ASSERT on Gtk+/CURL when trying to load tests from our LayoutTests.
3099 Do not call setPrimaryLoadComplete when the
3100 activeDocumentLoader has already been replaced. This can happen
3101 when a script executed from within FramerLoader::didFinishLoading will
3102 navigate to another URL.
3104 The assertion is caused by existing tests (e.g.
3105 fast/history/clicked-link-is-visited.html) reproducing this with
3106 network backends not equal to curl is tough or maybe not
3109 * loader/DocumentLoader.cpp:
3110 (WebCore::DocumentLoader::setPrimaryLoadComplete):
3112 2008-12-11 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
3114 Reviewed by Eric Seidel.
3116 - Remove some dead, commented-out code from WMLAElement.
3117 - Add missing virtual destructor for <noop>, as suggested by Alexey.
3118 - Refactor addHTMLAlignment in a static helper function to share with WML.
3120 * html/HTMLElement.cpp:
3121 (WebCore::HTMLElement::addHTMLAlignment):
3122 (WebCore::HTMLElement::addHTMLAlignmentToStyledElement):
3123 * html/HTMLElement.h:
3124 * wml/WMLAElement.cpp:
3125 (WebCore::WMLAElement::defaultEventHandler):
3126 * wml/WMLNoopElement.cpp:
3127 (WebCore::WMLNoopElement::~WMLNoopElement):
3128 * wml/WMLNoopElement.h:
3130 2008-12-10 Oliver Hunt <oliver@apple.com>
3132 Reviewed by Adele Peterson.
3134 <rdar://problem/6302405> Crash (null-deref) when using :before pseudoselector with content CSS rule in SVG
3135 <https://bugs.webkit.org/show_bug.cgi?id=22804>
3137 This issue was caused by css generated content resulting in non-svg flowboxes
3138 being injected into SVG content. As SVG spec does not describe behaviour in
3139 this case, and neither Opera nor Firefox displays such generated content, so
3140 now we make svg text layout and rendering just ignore any such content.
3142 Test: svg/css/crash-css-generated-content.xhtml
3144 * rendering/SVGRootInlineBox.cpp:
3145 (WebCore::SVGRootInlineBox::buildLayoutInformation):
3146 (WebCore::SVGRootInlineBox::layoutInlineBoxes):
3147 (WebCore::SVGRootInlineBox::buildTextChunks):
3149 2008-12-11 Cameron Zwarich <zwarich@apple.com>
3151 Reviewed by Dave Hyatt.
3153 Bug 21256: REGRESSION (r36906): horizontally repeating image leaves ghosts when vertical scrolling
3154 <https://bugs.webkit.org/show_bug.cgi?id=21256>
3155 <rdar://problem/6362978>
3157 The ScrollView refactoring in r36906 caused the ScrollView and the
3158 platform widget to disagree about whether optimizing scrolling via
3159 blitting is allowed. The easiest way to fix this is to make ScrollView
3160 simply ask the platform widget whether this is safe on platforms that
3163 It is not possible to write a layout test for this bug because it
3164 involves the back/forward cache.
3166 * platform/ScrollView.cpp:
3167 (WebCore::ScrollView::ScrollView):
3168 (WebCore::ScrollView::setCanBlitOnScroll):
3169 (WebCore::ScrollView::canBlitOnScroll):
3170 (WebCore::ScrollView::platformSetCanBlitOnScroll):
3171 (WebCore::ScrollView::platformCanBlitOnScroll):
3172 * platform/ScrollView.h:
3173 * platform/mac/ScrollViewMac.mm:
3174 (WebCore::ScrollView::platformSetCanBlitOnScroll):
3175 (WebCore::ScrollView::platformCanBlitOnScroll):
3176 * platform/wx/ScrollViewWx.cpp:
3177 (WebCore::ScrollView::platformSetCanBlitOnScroll):
3178 (WebCore::ScrollView::platformCanBlitOnScroll):
3180 2008-12-11 Brent Fulgham <bfulgham@gmail.com>
3182 Reviewed by Adam Roben.
3184 https://bugs.webkit.org/show_bug.cgi?id=22808
3186 Correct build break due to malformed XML in Visual Studio project
3187 following @r39205 change.
3189 * WebCore.vcproj/WebCore.vcproj: Correct file entry so project loads.
3191 2008-12-10 Chris Marrin <cmarrin@apple.com>
3193 Reviewed by Dave Hyatt.
3195 Fixed https://bugs.webkit.org/show_bug.cgi?id=22738
3197 This gets rid of the per-animation timers which were used when an animation
3198 started, ended and looped. Their job is now done by the main AnimationController's
3199 timer. It is now set to fire as needed. For instance, if there is a delay, it will
3200 fire after the delay time and then every 30ms to run the animation. The start, loop
3201 and end events are generated as needed during the firing of this timer.
3203 I had to add one more bit of code. When animation timers used to fire the animation events.
3204 This would always happen from the RunLoop, so any style changes that happened in the
3205 event handler would get picked up on the next updateRendering() call. But now the start
3206 event is generated during the styleIsAvailable() call, which is in the middle of the
3207 updateRendering() cycle. And calling an event handler in the middle of updateRendering()
3208 is not allowed and causes style changes to get missed. We already have a mechanism in
3209 AnimationController to defer updateRendering() calls. So I added logic to defer all
3210 event handling to there. Now, I put any request for event handling into a list and ask
3211 for a deferred updateRendering() call. When that deferred timer fires, I go through that
3212 list, send all the events and then call updateRendering().
3214 * page/animation/AnimationBase.cpp:
3215 (WebCore::AnimationBase::AnimationBase):
3216 (WebCore::AnimationBase::updateStateMachine):
3217 (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
3218 (WebCore::AnimationBase::willNeedService):
3219 (WebCore::AnimationBase::goIntoEndingOrLoopingState):
3220 * page/animation/AnimationBase.h:
3221 * page/animation/AnimationController.cpp:
3222 (WebCore::AnimationControllerPrivate::updateAnimationTimer):
3223 (WebCore::AnimationControllerPrivate::updateRenderingDispatcherFired):
3224 (WebCore::AnimationControllerPrivate::addEventToDispatch):
3225 (WebCore::AnimationControllerPrivate::animationTimerFired):
3226 (WebCore::AnimationController::addEventToDispatch):
3227 * page/animation/AnimationController.h:
3228 * page/animation/CompositeAnimation.cpp:
3229 (WebCore::CompositeAnimationPrivate::updateTransitions):
3230 (WebCore::CompositeAnimationPrivate::willNeedService):
3231 (WebCore::CompositeAnimationPrivate::getAnimationForProperty):
3232 (WebCore::CompositeAnimation::willNeedService):
3233 (WebCore::CompositeAnimation::getAnimationForProperty):
3234 * page/animation/CompositeAnimation.h:
3235 * page/animation/ImplicitAnimation.cpp:
3236 (WebCore::ImplicitAnimation::animate):
3237 (WebCore::ImplicitAnimation::onAnimationEnd):
3238 (WebCore::ImplicitAnimation::sendTransitionEvent):
3239 * page/animation/ImplicitAnimation.h:
3240 * page/animation/KeyframeAnimation.cpp:
3241 (WebCore::KeyframeAnimation::animate):
3242 (WebCore::KeyframeAnimation::sendAnimationEvent):
3243 * page/animation/KeyframeAnimation.h:
3244 (WebCore::KeyframeAnimation::setUnanimatedStyle):
3246 2008-12-11 Simon Hausmann <simon.hausmann@nokia.com>
3248 Fix the Qt build with an empty filenameExtension() implementation.
3250 * platform/graphics/qt/ImageSourceQt.cpp:
3251 (WebCore::ImageSource::filenameExtension):
3253 2008-12-11 Holger Hans Peter Freyther <zecke@selfish.org>
3255 Reviewed by Simon Hausmann.
3257 Fix crash in the cairo implementation of the SVGPaintServer
3259 For SVGFonts the RenderObject can be zero. The existing SVGFont
3260 test cases is exposing this bug. Qt and other ports have fixed
3261 this issue by adding null checks as well.
3263 * svg/graphics/cairo/SVGPaintServerCairo.cpp:
3264 (WebCore::SVGPaintServer::renderPath):
3266 2008-12-11 Holger Freyther <zecke@selfish.org>
3268 Reviewed by Simon Hausmann.
3270 https://bugs.webkit.org/show_bug.cgi?id=20953
3272 Make the Qt port follow the Win, Mac, Gtk+ port in regard to Font
3273 handling. FontQt.cpp from now on is only implementing the complex path. Create
3274 FontFallbackListQt.cpp and FontPlatformDataQt.cpp to work within
3275 the framework set by the Font code.
3277 Sharing the Font.cpp implementation allows the Qt port to support
3278 the CSS font faces and SVG fonts.
3280 Split out the Qt4.3 Font handling into FonQt43.cpp to allow to more
3281 easily deprecate it.
3283 This commit is removing a lot of #ifdefs from Font.h as the Qt Font
3284 implementation is now in line with the rest of WebCore.
3287 * platform/graphics/Font.h: Remove #ifdefs
3288 (WebCore::Font::letterSpacing):
3289 (WebCore::Font::setLetterSpacing):
3290 (WebCore::Font::isPlatformFont):
3291 * platform/graphics/FontFallbackList.h:
3292 * platform/graphics/SimpleFontData.cpp:
3293 (WebCore::SimpleFontData::SimpleFontData):
3294 (WebCore::SimpleFontData::platformGlyphInit): There is no GlyphCache
3295 on Qt, move the initialisation over.
3296 (WebCore::SimpleFontData::~SimpleFontData):
3297 * platform/graphics/SimpleFontData.h:
3298 (WebCore::SimpleFontData::getQtFont):
3299 * platform/graphics/qt/FontCacheQt.cpp:
3300 (WebCore::FontCache::getCachedFontPlatformData): Remove unused parameter
3301 (WebCore::FontCache::releaseFontData): Add to build
3302 * platform/graphics/qt/FontCustomPlatformData.cpp:
3303 (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
3304 (WebCore::FontCustomPlatformData::fontPlatformData):
3305 (WebCore::createFontCustomPlatformData):
3306 * platform/graphics/qt/FontCustomPlatformData.h:
3307 * platform/graphics/qt/FontFallbackListQt.cpp: Added.
3308 (WebCore::FontFallbackList::FontFallbackList):
3309 (WebCore::FontFallbackList::invalidate):
3310 (WebCore::FontFallbackList::releaseFontData):
3311 (WebCore::FontFallbackList::determinePitch):
3312 (WebCore::FontFallbackList::fontDataAt):
3313 (WebCore::FontFallbackList::fontDataForCharacters):
3314 (WebCore::FontFallbackList::setPlatformFont):
3315 * platform/graphics/qt/FontPlatformData.h:
3316 (WebCore::FontPlatformData::font):
3317 (WebCore::FontPlatformData::size):
3318 * platform/graphics/qt/FontPlatformDataQt.cpp: Added.
3319 (WebCore::FontPlatformData::FontPlatformData):
3320 * platform/graphics/qt/FontQt.cpp:
3321 (WebCore::Font::drawComplexText):
3322 (WebCore::Font::floatWidthForComplexText):
3323 (WebCore::Font::offsetForPositionForComplexText):
3324 (WebCore::Font::selectionRectForComplexText):
3325 (WebCore::Font::font):
3326 * platform/graphics/qt/FontQt43.cpp: Added. Moved Qt4.3 code from FontQt.cpp
3327 (WebCore::Font::drawComplexText):
3328 (WebCore::Font::floatWidthForComplexText):
3329 (WebCore::Font::offsetForPositionForComplexText):
3330 (WebCore::Font::selectionRectForComplexText):
3331 * platform/graphics/qt/GlyphPageTreeNodeQt.cpp:
3332 (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData):
3333 (WebCore::GlyphPageTreeNode::pruneTreeFontData):
3334 * platform/graphics/qt/SimpleFontDataQt.cpp:
3335 (WebCore::SimpleFontData::determinePitch):
3336 (WebCore::SimpleFontData::containsCharacters):
3337 (WebCore::SimpleFontData::platformInit):
3338 (WebCore::SimpleFontData::platformGlyphInit):
3339 (WebCore::SimpleFontData::platformDestroy):
3340 * platform/qt/RenderThemeQt.cpp:
3341 (WebCore::RenderThemeQt::adjustButtonStyle): Avoid crashes.
3343 2008-12-11 Holger Freyther <zecke@selfish.org>
3345 Reviewed by Simon Hausmann.
3347 https://bugs.webkit.org/show_bug.cgi?id=20953
3349 For Qt it is not pratical to have a FontCache and GlyphPageTreeNode
3350 implementation. This is one of the reasons why the Qt port is currently not
3351 using WebCore/platform/graphics/Font.cpp. By allowing to not use
3352 the simple/fast-path the Qt port will be able to use it.
3354 Introduce USE(FONT_FAST_PATH) and define it for every port but the
3357 * platform/graphics/Font.cpp:
3358 (WebCore::Font::drawText):
3359 (WebCore::Font::floatWidth):
3360 (WebCore::Font::selectionRectForText):
3361 (WebCore::Font::offsetForPosition):
3362 * platform/graphics/Font.h:
3364 2008-12-11 Holger Hans Peter Freyther <zecke@selfish.org>
3366 Reviewed by Darin Adler.
3368 https://bugs.webkit.org/show_bug.cgi?id=20953
3370 Split out the font fast path from Fast.cpp into FontFastPath.cpp. This
3371 will allow the Qt port to share most of WebCore::Font
3372 implementation but the fast path. Qt does not provide the API to get
3373 individual Glyphs making the fast path hard to support.
3377 * WebCore.vcproj/WebCore.vcproj:
3378 * WebCore.xcodeproj/project.pbxproj:
3379 * WebCoreSources.bkl:
3380 * platform/graphics/Font.cpp:
3381 * platform/graphics/FontFastPath.cpp: Added.
3382 (WebCore::Font::glyphDataForCharacter):
3384 2008-12-11 Robert Carr <racarr@svn.gnome.org>
3386 Reviewed by Holger Freyther.
3388 https://bugs.webkit.org/show_bug.cgi?id=22560
3390 Code in PlatformScreenGtk for screenDepth and screenRect can not
3391 assume that the platformWindow for the widget has a valid "window"
3392 member. For example in the case of, a new browser view opening as a
3393 child of a GtkNotebook, but never being switched to, or manually
3394 realized. Solve by using the toplevel window of the widget, rather
3395 than the widget itself.
3397 * platform/gtk/PlatformScreenGtk.cpp:
3398 (WebCore::screenDepth):
3399 (WebCore::screenRect):
3401 2008-12-08 Tor Arne Vestbø <tavestbo@trolltech.com>
3403 Reviewed by Darin Adler and Holger Freyther.
3405 Make Widget::frameRectsChanged() and overrides non-const
3407 This will hopefully allow us to get rid of some of the mutables in
3408 the classes that react to the callback by changing their own state.
3410 * platform/ScrollView.cpp:
3411 (WebCore::ScrollView::frameRectsChanged):
3412 * platform/ScrollView.h:
3413 * platform/Widget.h:
3414 (WebCore::Widget::frameRectsChanged):
3415 * platform/gtk/ScrollbarGtk.cpp: Remove non-const version since
3416 this was more complex and did the same thing, changed const of
3417 the leftover frameRectsChanged() method.
3418 (ScrollbarGtk::frameRectsChanged):
3419 * platform/gtk/ScrollbarGtk.h:
3420 * plugins/PluginView.cpp:
3421 (WebCore::PluginView::frameRectsChanged):
3422 * plugins/PluginView.h:
3424 2008-12-11 Holger Hans Peter Freyther <zecke@selfish.org>
3426 Reviewed and implemented with Tor Arne Vestbø.
3428 Reimplement RenderTheme::caretBlinkInterval for Qt.
3430 The QApplication::cursorFlashTime is in milliseconds and describes
3431 the whole cycle while WebCore expects half a cycle.
3433 * platform/qt/RenderThemeQt.cpp:
3434 (WebCore::RenderThemeQt::caretBlinkInterval):
3435 * platform/qt/RenderThemeQt.h:
3437 2008-12-09 Trenton Schulz <trenton.schulz@nokia.com>
3439 Reviewed by Tor Arne Vestbø.
3441 [Qt/Mac] Don't call HIGetScaleFactor() if we're not on Tiger or better
3443 * plugins/mac/PluginViewMac.cpp:
3444 (WebCore::tigerOrBetter):
3445 (WebCore::PluginView::globalMousePosForPlugin):
3447 2008-12-10 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
3449 Reviewed by Eric Seidel and George Staikos.
3451 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22799
3453 Add WML <template> support. The <template> element is specified at deck-level
3454 and declares a template for all <card> elements in the document.
3457 * WebCore.vcproj/WebCore.vcproj:
3458 * WebCore.xcodeproj/project.pbxproj:
3459 * editing/htmlediting.cpp:
3460 (WebCore::canHaveChildrenForEditing): Treat <do> just like a <button>.
3461 * wml/WMLCardElement.cpp:
3462 (WebCore::WMLCardElement::WMLCardElement):
3463 (WebCore::WMLCardElement::setTemplateElement):
3464 (WebCore::WMLCardElement::handleIntrinsicEventIfNeeded):
3465 (WebCore::WMLCardElement::handleDeckLevelTaskOverridesIfNeeded):
3466 * wml/WMLCardElement.h:
3467 (WebCore::WMLCardElement::templateElement):
3468 * wml/WMLDoElement.cpp:
3469 (WebCore::WMLDoElement::insertedIntoDocument):
3470 * wml/WMLDocument.cpp:
3471 (WebCore::WMLDocument::finishedParsing):
3472 * wml/WMLErrorHandling.cpp:
3473 (WebCore::errorMessageForErrorCode):
3474 * wml/WMLErrorHandling.h:
3476 * wml/WMLEventHandlingElement.cpp:
3477 (WebCore::WMLEventHandlingElement::~WMLEventHandlingElement):
3478 * wml/WMLEventHandlingElement.h:
3479 (WebCore::WMLEventHandlingElement::doElements):
3480 * wml/WMLTagNames.in:
3481 * wml/WMLTemplateElement.cpp: Added.
3482 (WebCore::WMLTemplateElement::WMLTemplateElement):
3483 (WebCore::WMLTemplateElement::~WMLTemplateElement):
3484 (WebCore::WMLTemplateElement::parseMappedAttribute):
3485 (WebCore::WMLTemplateElement::registerTemplatesInDocument):
3486 * wml/WMLTemplateElement.h: Added.
3487 * wml/WMLTimerElement.cpp:
3488 (WebCore::WMLTimerElement::timerFired):
3490 2008-12-09 Dmitry Titov <dimich@chromium.org>
3492 Reviewed by Darin Adler.
3494 Fix memory leak - need to call stopActiveDOMObjects
3495 when cached pages get destroyed.
3496 https://bugs.webkit.org/show_bug.cgi?id=22753
3499 (WebCore::Document::detach):
3501 2008-12-10 Alice Liu <alice.liu@apple.com>
3503 Manual test for https://bugs.webkit.org/show_bug.cgi?id=20685
3505 Reviewed by Darin Adler.
3507 * manual-tests/drag-image-to-desktop.html: Added.
3509 2008-12-10 Alice Liu <alice.liu@apple.com>
3511 fixed https://bugs.webkit.org/show_bug.cgi?id=20685
3513 Reviewed by Darin Adler.
3515 Manual test case is manual-tests/drag-image-to-desktop.html
3517 Added new files to projects
3518 * WebCore.vcproj/WebCore.vcproj:
3519 * WebCore.xcodeproj/project.pbxproj:
3521 * page/DragController.cpp:
3522 (WebCore::DragController::startDrag):
3523 * platform/MIMETypeRegistry.cpp:
3524 (WebCore::initializeSupportedImageMIMETypes):
3525 (WebCore::initializeSupportedImageMIMETypesForEncoding):
3527 These changes add a method to obtain the extension for an image
3528 * platform/graphics/BitmapImage.cpp:
3529 (WebCore::BitmapImage::filenameExtension):
3530 * platform/graphics/BitmapImage.h:
3531 * platform/graphics/Image.h:
3532 (WebCore::Image::filenameExtension):
3533 * platform/graphics/ImageSource.h:
3534 * platform/graphics/cairo/ImageSourceCairo.cpp:
3535 (WebCore::ImageSource::filenameExtension):
3536 * platform/graphics/cg/ImageSourceCG.cpp:
3537 (WebCore::ImageSource::filenameExtension):
3539 These changes added a utility that returns the preferred extension for a UTI
3540 * platform/graphics/cg/ImageSourceCG.h: Added.
3541 * platform/graphics/cg/ImageSourceCGMac.mm: Added.
3542 (WebCore::MIMETypeForImageSourceType):
3543 (WebCore::preferredExtensionForImageSourceType):
3544 * platform/graphics/cg/ImageSourceCGWin.cpp: Added.
3545 (WebCore::MIMETypeForImageSourceType):
3546 (WebCore::preferredExtensionForImageSourceType):
3548 * platform/mac/MIMETypeRegistryMac.mm:
3549 moved getMIMETypeForUTI to ImageSourceCGMac.mm
3551 Ask image for its file extension instead of relying on MIME type and file path
3552 * platform/win/ClipboardWin.cpp:
3553 (WebCore::createGlobalImageFileDescriptor):
3555 Remove extraneous code from getPreferredExtensionForMIMEType.
3556 Also moved getMIMETypeForUTI to ImageSourceCGWin.cpp
3557 * platform/win/MIMETypeRegistryWin.cpp:
3558 (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
3560 2008-12-10 Simon Fraser <simon.fraser@apple.com>
3562 Reviewed by Antti Koivisto
3564 <rdar://problem/6431224>
3566 When updating the value of a slider, don't mark the parents
3567 as needing layout, because the size of the slider can never
3568 change. This fixes full-page repaints in some cases.
3570 * rendering/RenderSlider.cpp:
3571 (WebCore::RenderSlider::updateFromElement):
3573 2008-12-10 Simon Fraser <simon.fraser@apple.com>
3575 Potential build fix. The forward declaration of FloatPoint should
3576 be inside the WebCore namespace.
3578 * platform/graphics/FloatPoint3D.h:
3580 2008-12-10 Simon Fraser <simon.fraser@apple.com>
3582 Reviewed by Sam Weinig.
3584 https://bugs.webkit.org/show_bug.cgi?id=22793
3586 Cleanup FloatPoint3D: inline the getters and setters,
3587 fix a potential divide-by-zero in normalize(), and add
3588 a FloatPoint constructor.
3590 * platform/graphics/FloatPoint3D.cpp:
3591 (WebCore::FloatPoint3D::FloatPoint3D):
3592 (WebCore::FloatPoint3D::normalize):
3593 * platform/graphics/FloatPoint3D.h:
3594 (WebCore::FloatPoint3D::x):
3595 (WebCore::FloatPoint3D::setX):
3596 (WebCore::FloatPoint3D::y):
3597 (WebCore::FloatPoint3D::setY):
3598 (WebCore::FloatPoint3D::z):
3599 (WebCore::FloatPoint3D::setZ):
3601 2008-12-09 Julien Chaffraix <jchaffraix@webkit.org>
3603 Reviewed by Eric Seidel.
3605 Bug 22665: Remove setCreatedByParser(bool) from the few elements that use it
3606 https://bugs.webkit.org/show_bug.cgi?id=22665
3608 - Removed setCreatedByParser from style and link elements.
3610 - Removed XMLTokenizer::eventuallyMarkAsCreatedByParser.
3612 * dom/XMLTokenizer.cpp:
3613 * dom/XMLTokenizer.h:
3614 * dom/XMLTokenizerLibxml2.cpp:
3615 (WebCore::XMLTokenizer::startElementNs):
3616 * dom/XMLTokenizerQt.cpp:
3617 (WebCore::XMLTokenizer::parseStartElement):
3618 * html/HTMLElementFactory.cpp:
3619 (WebCore::linkConstructor):
3620 (WebCore::styleConstructor):
3621 * html/HTMLLinkElement.cpp:
3622 (WebCore::HTMLLinkElement::HTMLLinkElement):
3623 * html/HTMLLinkElement.h:
3624 * html/HTMLStyleElement.cpp:
3625 (WebCore::HTMLStyleElement::HTMLStyleElement):
3626 * html/HTMLStyleElement.h:
3627 * html/HTMLTagNames.in:
3628 * svg/SVGStyleElement.cpp:
3629 (WebCore::SVGStyleElement::SVGStyleElement):
3630 * svg/SVGStyleElement.h:
3633 2008-12-10 Brady Eidson <beidson@apple.com>
3637 https://bugs.webkit.org/show_bug.cgi?id=22194 and <rdar://problem/6388378> -
3638 Dialog when going back to a page from whence you submitted a form
3640 http://trac.webkit.org/changeset/37317 changed the manner in which headers are added to
3641 http requests, which caused the networking layer to have an incomplete set of headers
3642 just before consulting the Policy Delegate. This caused a cache miss and incorrectly made
3643 us believe we'd be resubmitting the form.
3645 * loader/FrameLoader.cpp:
3646 (WebCore::FrameLoader::loadItem): Being careful to maintain the new behavior required by
3647 the Origin header mechanism as discussed in bug 22194, restore the previous behavior of
3648 setting all the headers before the networking layer is asked about the cache lookup.
3650 2008-12-10 Dimitri Glazkov <dglazkov@chromium.org>
3652 Reviewed by Timothy Hatcher.
3654 Add back ability to end all profiling via console by invoking profileEnd
3658 (WebCore::Console::profileEnd): Removed title null-checking and
3659 subsequent early exit.
3661 2008-12-10 Pierre-Olivier Latour <pol@apple.com>
3663 Reviewed by Darin Adler.
3665 KeyframeAnimation::animate() needs to compute the elapsed animation time
3666 properly taking into account its paused state.
3668 https://bugs.webkit.org/show_bug.cgi?id=22773
3670 Test: animations/animation-drt-api-multiple-keyframes.html
3672 * page/animation/KeyframeAnimation.cpp:
3673 (WebCore::KeyframeAnimation::animate):
3675 2008-12-10 Simon Fraser <simon.fraser@apple.com>
3677 Reviewed by Dan Bernstein
3680 https://bugs.webkit.org/show_bug.cgi?id=22570
3682 Rename methods on RenderLayer for clarity:
3683 clearClipRects -> clearClipRectsIncludingDescendants
3684 clearClipRect -> clearClipRects
3686 * rendering/RenderBox.cpp:
3687 (WebCore::RenderBox::destroy):
3688 * rendering/RenderLayer.cpp:
3689 (WebCore::RenderLayer::updateLayerPosition):
3690 (WebCore::RenderLayer::removeOnlyThisLayer):
3691 (WebCore::RenderLayer::insertOnlyThisLayer):
3692 (WebCore::RenderLayer::clearClipRectsIncludingDescendants):
3693 (WebCore::RenderLayer::clearClipRects):
3694 * rendering/RenderLayer.h:
3695 * rendering/RenderObject.cpp:
3696 (WebCore::RenderObject::styleWillChange):
3697 * rendering/RenderWidget.cpp:
3698 (WebCore::RenderWidget::destroy):
3700 2008-12-10 Kevin Ollivier <kevino@theolliviers.com>
3702 wx build fix after the script call stack/frame additions.
3704 * WebCoreSources.bkl:
3706 2008-12-10 Srinivasa Rao M. Hamse <msrinirao@gmail.com>
3708 Reviewed by Holger Freyther.
3710 F1-F12 key mappings for WebKit Gtk Port
3712 * platform/gtk/KeyEventGtk.cpp:
3713 (WebCore::windowsKeyCodeForKeyEvent):
3715 2008-12-10 Enrico Ros <enrico.ros@m31.com>
3717 Reviewed by Simon Hausmann.
3719 Fix the Qt build when SVG is disabled. A broken dependancy caused
3720 unnecessary rebuilds even with no changes.
3722 * WebCore.pro: fix a broken build dependancy
3724 2008-12-10 Hironori Bono <hbono@chromium.org>
3726 Reviewed by Alexey Proskuryakov.
3728 Bug 21820: Unable to enter the Tamil UNICODE Characters via Thamizha Phonetic IME
3729 https://bugs.webkit.org/show_bug.cgi?id=21820
3731 <rdar://problem/5683248> Typing backspace to delete a diacritical mark also deletes the character before (Arabic)
3732 <rdar://problem/5702038> Backspace removes Thai Character in wrong sequence
3734 Tests: editing/deleting/delete-ligature-001.html
3735 editing/deleting/delete-ligature-002.html
3736 editing/deleting/delete-ligature-003.html
3738 * editing/TypingCommand.cpp:
3739 (WebCore::TypingCommand::deleteKeyPressed): Delete only the last character
3740 of a ligature which consists of multiple Unicode characters when deleting it with
3743 2008-12-10 David Levin <levin@chromium.org>
3745 Reviewed by Alexey Proskuryakov.
3747 https://bugs.webkit.org/show_bug.cgi?id=22177
3748 Fix the windows build by removing calls to notifyFormStateChanged
3749 where they didn't appear in the original reviewed patch.
3751 * html/HTMLInputElement.cpp:
3752 (WebCore::HTMLInputElement::type):
3753 (WebCore::HTMLInputElement::attach):
3755 2008-12-09 Adam Barth <abarth@webkit.org>
3757 Reviewed by Sam Weinig.
3759 Add ScriptController::updateSecurityOrigin to notify the bindings
3760 that a document's securityOrigin has been updated. This is used by
3761 V8 to update its security context.
3763 * bindings/js/ScriptController.cpp:
3764 (WebCore::ScriptController::updateSecurityOrigin):
3765 * bindings/js/ScriptController.h:
3767 (WebCore::Document::setDomain):
3769 2008-12-09 Eric Seidel <eric@webkit.org>
3771 No review, build fix only.
3773 Fix a few config issues to let the Chromium Windows WebCore build get further.
3777 2008-12-09 Brett Wilson <brettw@chromium.org>
3779 Reviewed by Dave Hyatt.
3781 https://bugs.webkit.org/show_bug.cgi?id=22177
3783 Add a callback on ChromeClient that the state of form elements on
3784 the page has changed. This is to allow clients implementing session
3785 saving to know when the current state is dirty.
3787 * html/HTMLInputElement.cpp:
3788 (WebCore::notifyFormStateChanged):
3789 (WebCore::HTMLInputElement::setInputType):
3790 (WebCore::HTMLInputElement::type):
3791 (WebCore::HTMLInputElement::attach):
3792 (WebCore::HTMLInputElement::setValue):
3793 (WebCore::HTMLInputElement::setValueFromRenderer):
3794 (WebCore::HTMLInputElement::setFileListFromRenderer):
3795 * html/HTMLSelectElement.cpp:
3796 (WebCore::HTMLSelectElement::setSelectedIndex):
3797 * html/HTMLTextAreaElement.cpp:
3798 (WebCore::notifyFormStateChanged):
3799 (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
3800 (WebCore::HTMLTextAreaElement::updateValue):
3801 (WebCore::HTMLTextAreaElement::setValue):
3802 * loader/EmptyClients.h:
3803 (WebCore::EmptyChromeClient::formStateDidChange):
3804 * page/ChromeClient.h:
3806 2008-12-09 Sam Weinig <sam@webkit.org>
3808 Reviewed by Darin Adler.
3810 https://bugs.webkit.org/show_bug.cgi?id=19762
3812 Fix intermittent crash in buildbot. The CSSCursorImageValues and
3813 SVGCursorElements held onto raw SVGElement pointers without any
3814 guarantee that the element is still around.
3816 We did not fix the design that resulted in this issue, we just fixed
3817 the pointer lifetimes.
3819 * css/CSSCursorImageValue.cpp:
3820 (WebCore::CSSCursorImageValue::~CSSCursorImageValue): Zero out the back pointers.
3821 (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed): Set up a back pointer.
3822 (WebCore::CSSCursorImageValue::removeReferencedElement): Added. Used when the element
3824 * css/CSSCursorImageValue.h: Added removeReferencedElement.
3826 * svg/SVGCursorElement.cpp:
3827 (WebCore::SVGCursorElement::~SVGCursorElement): Zero out the back pointers.
3828 (WebCore::SVGCursorElement::addClient): Set up a back pointer.
3829 (WebCore::SVGCursorElement::removeClient): Zero out the back pointer.
3831 * svg/SVGElement.cpp:
3832 (WebCore::SVGElement::SVGElement): Initialize back pointers to zero.
3833 (WebCore::SVGElement::~SVGElement): Call both the element and cursor image value
3834 to remove the element from their sets.
3836 (WebCore::SVGElement::setCursorElement): Added.
3837 (WebCore::SVGElement::setCursorImageValue): Added.
3839 2008-12-09 David Hyatt <hyatt@apple.com>
3841 Add code that will create custom CSS scrollbars from the <body>, the document element (<html>) and the owning
3842 frame/iframe. If any of them set a custom style, it will be used. The scrollbars do not update dynamically
3843 yet as you switch from page to page (until they are destroyed and recreated).
3847 * page/FrameView.cpp:
3848 (WebCore::FrameView::createScrollbar):
3850 2008-12-09 Ojan Vafai <ojan@chromium.org>
3852 Reviewed by Dave Hyatt.
3854 https://bugs.webkit.org/show_bug.cgi?id=22689
3855 Match Firefox button metrics on Windows.
3857 * rendering/RenderButton.cpp:
3858 (WebCore::RenderButton::addChild):
3859 (WebCore::RenderButton::styleDidChange):
3860 (WebCore::RenderButton::setupInnerStyle):
3861 * rendering/RenderButton.h:
3862 * rendering/RenderTheme.cpp:
3863 (WebCore::RenderTheme::adjustButtonInnerStyle):
3864 * rendering/RenderTheme.h:
3865 * rendering/RenderThemeWin.cpp:
3866 (WebCore::RenderThemeWin::adjustSliderThumbSize):
3867 (WebCore::RenderThemeWin::adjustButtonInnerStyle):
3868 * rendering/RenderThemeWin.h:
3870 2008-12-09 Darin Fisher <darin@chromium.org>
3874 https://bugs.webkit.org/show_bug.cgi?id=22631
3875 Adding missing files from previous commit.
3877 * bindings/js/ScriptCallFrame.cpp: Added.
3878 (WebCore::ScriptCallFrame::ScriptCallFrame):
3879 (WebCore::ScriptCallFrame::~ScriptCallFrame):
3880 (WebCore::ScriptCallFrame::argumentAt):
3881 * bindings/js/ScriptCallFrame.h: Added.
3882 (WebCore::ScriptCallFrame::functionName):
3883 (WebCore::ScriptCallFrame::sourceURL):
3884 (WebCore::ScriptCallFrame::lineNumber):
3885 (WebCore::ScriptCallFrame::argumentCount):
3886 * bindings/js/ScriptCallStack.cpp: Added.
3887 (WebCore::ScriptCallStack::ScriptCallStack):
3888 (WebCore::ScriptCallStack::~ScriptCallStack):
3889 (WebCore::ScriptCallStack::at):
3890 (WebCore::ScriptCallStack::size):
3891 (WebCore::ScriptCallStack::initialize):
3892 * bindings/js/ScriptCallStack.h: Added.
3893 (WebCore::ScriptCallStack::state):
3895 2008-12-09 Dimitri Glazkov <dglazkov@chromium.org>
3897 Reviewed by Timothy Hatcher.
3899 https://bugs.webkit.org/show_bug.cgi?id=22631
3900 Streamline Console.cpp, abstract out the use of JSC::ExecState and
3901 JSC::ArgList by introducing ScriptCallFrame and ScriptCallStack
3904 * GNUmakefile.am: Added ScriptCallFrame and ScriptCallStack to build
3905 * WebCore.pro: Added ScriptCallFrame and ScriptCallStack to build
3906 * WebCore.vcproj/WebCore.vcproj: Added ScriptCallFrame and
3907 ScriptCallStack to project
3908 * WebCore.xcodeproj/project.pbxproj: Added ScriptCallFrame and
3909 ScriptCallStack to project
3910 * bindings/js/JSConsoleCustom.cpp: Remove custom bindings.
3911 * bindings/js/ScriptCallFrame.cpp: Added.
3912 (WebCore::ScriptCallFrame::ScriptCallFrame):
3913 (WebCore::ScriptCallFrame::~ScriptCallFrame):
3914 (WebCore::ScriptCallFrame::argumentAt):
3915 * bindings/js/ScriptCallFrame.h: Added.
3916 (WebCore::ScriptCallFrame::functionName):
3917 (WebCore::ScriptCallFrame::sourceURL):
3918 (WebCore::ScriptCallFrame::lineNumber):
3919 (WebCore::ScriptCallFrame::argumentCount):
3920 * bindings/js/ScriptCallStack.cpp: Added.
3921 (WebCore::ScriptCallStack::ScriptCallStack):
3922 (WebCore::ScriptCallStack::~ScriptCallStack):
3923 (WebCore::ScriptCallStack::at):
3924 (WebCore::ScriptCallStack::size):
3925 (WebCore::ScriptCallStack::initialize):
3926 * bindings/js/ScriptCallStack.h: Added.
3927 (WebCore::ScriptCallStack::ScriptCallStack):
3928 (WebCore::ScriptCallStack::~ScriptCallStack):
3929 (WebCore::ScriptCallStack::state):
3930 (WebCore::ScriptCallStack::at):
3931 (WebCore::ScriptCallStack::size):
3932 (WebCore::ScriptCallStack::initialize):
3933 * bindings/js/ScriptString.h: Added missing PlatformString include.
3934 (WebCore::ScriptString::ScriptString): Added default constructor.
3935 (WebCore::ScriptString::operator==): Added equality operator.
3936 (WebCore::ScriptString::operator!=):
3937 * bindings/js/ScriptValue.cpp: Added isNull and isUndefined.
3938 (WebCore::ScriptValue::isNull):
3939 (WebCore::ScriptValue::isUndefined):
3940 * bindings/js/ScriptValue.h: Added isNull and isUndefined
3941 * bindings/scripts/CodeGeneratorJS.pm: Add handling for
3942 CustomArgumentHandling attribute.
3943 * inspector/InspectorController.cpp: Refactored to use
3944 ScriptCallFrame and ScriptCallStack.
3945 (WebCore::ConsoleMessage::ConsoleMessage):
3946 (WebCore::InspectorController::addMessageToConsole):
3947 (WebCore::InspectorController::startGroup):
3948 (WebCore::InspectorController::addScriptConsoleMessage):
3949 (WebCore::InspectorController::count):
3950 (WebCore::InspectorController::startTiming):
3951 (WebCore::InspectorController::stopTiming):
3952 * inspector/InspectorController.h: Refactored to use ScriptCallFrame and
3954 * inspector/front-end/Console.js: Modified to use argument value itself
3955 rather than f.name for stack trace.
3956 * page/Console.cpp: Refactored to use ScriptCallFrame and
3958 (WebCore::getFirstArgumentAsString):
3959 (WebCore::Console::addMessage):
3960 (WebCore::Console::debug):
3961 (WebCore::Console::error):
3962 (WebCore::Console::info):
3963 (WebCore::Console::log):
3964 (WebCore::Console::dir):
3965 (WebCore::Console::dirxml):
3966 (WebCore::Console::trace):
3967 (WebCore::Console::assertCondition):
3968 (WebCore::Console::count):
3969 (WebCore::Console::profile):
3970 (WebCore::Console::profileEnd):
3971 (WebCore::Console::time):
3972 (WebCore::Console::timeEnd):
3973 (WebCore::Console::group):
3974 (WebCore::Console::warn):
3976 * page/Console.idl: Removed Custom attributes, added
3977 CustomArgumentHandling attributes, and tweaked argument defs.
3979 2008-12-09 Darin Adler <darin@apple.com>
3981 Try to fix non-Mac builds.
3983 * GNUmakefile.am: Added NavigatorBase.
3984 * WebCore.pro: Ditto.
3985 * WebCore.scons: Ditto.
3986 * WebCore.vcproj/WebCore.vcproj: Ditto.
3987 * WebCoreSources.bkl: Ditto.
3989 Unrelated tweak sitting in my tree.
3991 * bindings/objc/DOMAbstractView.mm: Remove pointless override of finalize method.
3993 2008-12-09 Darin Adler <darin@apple.com>
3995 Try to fix Tiger build.
3997 * platform/network/mac/NetworkStateNotifierMac.cpp: Declare CFRunLoopGetMain.
3999 2008-12-09 Alexey Proskuryakov <ap@webkit.org>
4001 Reviewed by Darin Adler.
4003 https://bugs.webkit.org/show_bug.cgi?id=22719
4004 Implement Navigator object in Workers
4006 Test: fast/workers/worker-navigator.html
4008 * DerivedSources.make:
4011 * WebCore.vcproj/WebCore.vcproj:
4012 * WebCore.xcodeproj/project.pbxproj:
4013 Added WorkerNavigator sources.
4015 * bindings/js/JSWorkerContext.cpp: (WebCore::jsWorkerContextNavigator):
4016 Worker.navigator returns a WoerkerNavigator object (it is named just Navigator in the spec,
4017 but it is not the same interface that is available on Windows).
4020 (WebCore::Worker::notifyFinished):
4021 * dom/WorkerContext.cpp:
4022 (WebCore::WorkerContext::WorkerContext):
4023 (WebCore::WorkerContext::navigator):
4024 * dom/WorkerContext.h:
4025 (WebCore::WorkerContext::create):
4026 * dom/WorkerThread.cpp:
4027 (WebCore::WorkerThread::create):
4028 (WebCore::WorkerThread::WorkerThread):
4029 (WebCore::WorkerThread::workerThread):
4030 * dom/WorkerThread.h:
4031 Pass a pre-computed user agent string into worker, because it cannot call a client method
4032 directly, and pre-computing is easier than sending a synchronous message to the main thread.
4034 * page/Navigator.cpp:
4036 * page/NavigatorBase.cpp: Added.
4037 * page/NavigatorBase.h: Added.
4038 Factor out common (and uncommon, but very similar) functionality into a base class.
4040 * page/WorkerNavigator.cpp: Added.
4041 * page/WorkerNavigator.h: Added.
4042 * page/WorkerNavigator.idl: Added.
4043 Per Web Workers and HTML5, implement a small subset of what we currently have in Window.Navigator.
4045 * platform/network/NetworkStateNotifier.cpp: (WebCore::networkStateNotifier):
4046 Make networkStateNotifier() static constructor thread safe. The object is created on the
4047 thread it is first called from, while callbacks are registered on the main thread. Calls to
4048 onLine() from other threads are safe, because it is just loading a boolean.
4050 * platform/network/mac/NetworkStateNotifierMac.cpp: (WebCore::NetworkStateNotifier::NetworkStateNotifier):
4051 Schedule notifications on main event loop, not the current one.
4053 2008-12-09 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
4055 Rubber-stamped by Alexey Proskuryakov.
4057 Forgot to update Qt/WML build - add some new files to the build.
4061 2008-12-09 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
4063 Reviewed by Alexey Proskuryakov.
4065 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22637
4067 Implement the GET method for WMLGoElement, and some test covering it's behaviour.
4068 Update all build systems supporting WML that haven't been updated since a while.
4070 Add WMLPostField stub implementation, needed for implementing POST method.
4072 Tests: wml/go-task-get-method-external-deck-with-href.html
4073 wml/go-task-get-method-external-deck.html
4074 wml/go-task-get-method-same-deck.html
4077 * WebCore.vcproj/WebCore.vcproj:
4078 * WebCore.xcodeproj/project.pbxproj:
4080 (WebCore::Document::resetWMLPageState):
4081 * wml/WMLCardElement.cpp:
4082 * wml/WMLCardElement.h:
4083 * wml/WMLEventHandlingElement.cpp:
4084 (WebCore::WMLCardElement::registerDoElement):
4085 * wml/WMLEventHandlingElement.h:
4086 * wml/WMLGoElement.cpp:
4087 (WebCore::WMLGoElement::WMLGoElement):
4088 (WebCore::WMLGoElement::registerPostfieldElement):
4089 (WebCore::WMLGoElement::parseMappedAttribute):
4090 (WebCore::WMLGoElement::executeTask):
4091 (WebCore::WMLGoElement::parseContentType):
4092 (WebCore::WMLGoElement::preparePOSTRequest):
4093 (WebCore::WMLGoElement::prepareGETRequest):
4094 * wml/WMLGoElement.h:
4095 * wml/WMLPostfieldElement.cpp: Added.
4096 (WebCore::WMLPostfieldElement::WMLPostfieldElement):
4097 (WebCore::WMLPostfieldElement::parseMappedAttribute):
4098 (WebCore::WMLPostfieldElement::insertedIntoDocument):
4099 * wml/WMLPostfieldElement.h: Added.
4100 (WebCore::WMLPostfieldElement::name):
4101 (WebCore::WMLPostfieldElement::value):
4102 * wml/WMLTagNames.in:
4104 2008-12-08 Peter Kasting <pkasting@google.com>
4106 Reviewed by Anders Carlsson.
4108 https://bugs.webkit.org/show_bug.cgi?id=16814
4109 Allow ports to disable ActiveX->NPAPI conversion for Media Player.
4110 Improve handling of miscellaneous ActiveX objects.
4112 * rendering/RenderPartObject.cpp:
4113 (WebCore::mapClassIdToServiceType):
4114 (WebCore::shouldUseChildEmbedOfObject):
4115 (WebCore::RenderPartObject::updateWidget):
4117 2008-12-08 Darin Adler <darin@apple.com>
4119 Reviewed by John Sullivan.
4121 - fix https://bugs.webkit.org/show_bug.cgi?id=22409
4122 REGRESSION: cmd-shift-left/right don't switch tabs, instead select text
4124 Tests: editing/execCommand/enabling-and-selection-2.html
4125 editing/execCommand/enabling-and-selection.html
4127 * editing/EditorCommand.cpp: Updated table to use these functions by their new names.
4128 (WebCore::enabledVisibleSelection): Renamed this to reflect its new algorithm.
4129 An invisible selection with a position that selects no characters doesn't count
4130 as a visible selection.
4131 (WebCore::enabledVisibleSelectionAndMark): Ditto.
4133 2008-12-08 David Kilzer <ddkilzer@apple.com>
4135 Remove duplicate entries from WebCore project.
4137 Reviewed by Eric Seidel.
4139 Bug 22555: Sort "children" sections in Xcode project files.
4140 <https://bugs.webkit.org/show_bug.cgi?id=22555>
4142 Recipe for removing duplicates:
4143 $ ./WebKitTools/Scripts/sort-Xcode-project-file project.pbxproj
4144 $ uniq < project.pbxproj | diff -u project.pbxproj - | patch -p0 project.pbxproj
4146 * WebCore.xcodeproj/project.pbxproj: Removed duplicates.
4148 2008-12-08 Julien Chaffraix <jchaffraix@webkit.org>
4150 Reviewed by Darin Adler.
4152 Bug 22665: Remove setCreatedByParser(bool) from the few elements that use it
4153 https://bugs.webkit.org/show_bug.cgi?id=22665
4155 Remove setCreatedByParser from the script elements (HTML and SVG).
4157 * dom/XMLTokenizer.cpp:
4158 (WebCore::XMLTokenizer::eventuallyMarkAsParserCreated): Removed
4159 call to setCreatedByParser for the 2 elements.
4161 * dom/make_names.pl: Modified to call the constructor with
4162 the createByParser parameter if 'constructorNeedsCreatedByParser'
4165 * html/HTMLElementFactory.cpp:
4166 (WebCore::scriptConstructor):
4167 * html/HTMLScriptElement.cpp:
4168 (WebCore::HTMLScriptElement::HTMLScriptElement):
4169 * html/HTMLScriptElement.h:
4170 * html/HTMLTagNames.in: Added constructorNeedsCreatedByParser
4172 * svg/SVGScriptElement.cpp:
4173 (WebCore::SVGScriptElement::SVGScriptElement):
4174 * svg/SVGScriptElement.h:
4175 * svg/svgtags.in: Added constructorNeedsCreatedByParser
4178 2008-12-08 David Kilzer <ddkilzer@apple.com>
4180 Bug 22555: Sort "children" sections in Xcode project files
4182 <https://bugs.webkit.org/show_bug.cgi?id=22555>
4184 Reviewed by Eric Seidel.
4186 * WebCore.xcodeproj/project.pbxproj: Sorted.
4187 * manual-tests/NPN_Invoke/NPN_Invoke.xcodeproj/project.pbxproj: Sorted.