1 2008-12-29 Oliver Hunt <oliver@apple.com>
3 Reviewed by Cameron Zwarich.
5 Bug 23030: Cannot setTransform with a non-invertible ctm
7 Removed a series of unnecessary and incorrect checks for an invertible
10 Test: fast/canvas/canvas-set-properties-with-non-invertible-ctm.html
12 * html/CanvasRenderingContext2D.cpp:
13 (WebCore::CanvasRenderingContext2D::setStrokeStyle):
14 (WebCore::CanvasRenderingContext2D::setFillStyle):
15 These properties are not effected by the current CTM, so there
16 is no need to prevent them from being assigned.
18 (WebCore::CanvasRenderingContext2D::setTransform):
19 The whole point of tracking whether the current CTM was expected to be
20 non-invertible was to allow setTransform to be used when the CTM had become
23 (WebCore::CanvasRenderingContext2D::beginPath):
24 (WebCore::CanvasRenderingContext2D::closePath):
25 beginPath and closePath change the state of the path, but not any of
26 its coordinates so there is no need prevent them from being called.
28 2008-12-29 Josh Roesslein <jroesslein@gmail.com>
30 Reviewed by Oliver Hunt.
32 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22968
34 Context menu rendering error when full page zoomed
36 * page/ContextMenuController.cpp:
37 (WebCore::ContextMenuController::handleContextMenuEvent):
39 2008-12-29 Sam Weinig <sam@webkit.org>
41 Reviewed by Mark Rowe.
43 Add some basic memory statistic logging for Node.
46 (WebCore::Node::dumpStatistics):
47 (WebCore::Node::Node):
48 (WebCore::Node::~Node):
49 (WebCore::Node::setDocument):
52 2008-12-29 Sam Weinig <sam@webkit.org>
54 Reviewed by Anders Carlsson.
56 Remove one use of DeprecatedPtrList.
58 * css/CSSRuleList.cpp:
59 (WebCore::CSSRuleList::~CSSRuleList):
60 (WebCore::CSSRuleList::length):
61 (WebCore::CSSRuleList::item):
62 (WebCore::CSSRuleList::deleteRule):
63 (WebCore::CSSRuleList::append):
64 (WebCore::CSSRuleList::insertRule):
65 * css/CSSRuleList.h: Change m_lstCSSRules from using DeprecatedPtrList to a Vector.
66 I measured no performance change and was comforted by the fact that we use a Vector
67 for StyleList, which serves the exact same purpose.
69 2008-12-29 Adele Peterson <adele@apple.com>
71 Reviewed by Brady Eidson.
73 Fix for https://bugs.webkit.org/show_bug.cgi?id=21797
74 <rdar://problem/6310682> REGRESSION: Crash in CFHTTPCookieStorageCopy beneath WebCore::cookies() when
75 running fast/dom/document-attribute-js-null.html and http/tests/security/cookies/create-document.html
77 Return early if the document is trying to get or set a cookie with an empty cookie url.
80 (WebCore::Document::cookie):
81 (WebCore::Document::setCookie):
83 2008-12-28 Cameron Zwarich <cwzwarich@uwaterloo.ca>
85 Reviewed by Sam Weinig.
87 Bug 23016: JavaScriptDebugServer::recompileAllJSFunctions() should not execute JS while reparsing all functions
88 <https://bugs.webkit.org/show_bug.cgi?id=23016>
89 <rdar://problem/6425077>
91 JavaScriptDebugServer::recompileAllJSFunctions() calls sourceParsed() while
92 reparsing all JS functions, which will execute JS in the inspector. Depending
93 on the order in which functions are recompiled, a function could have a new
94 body but other functions that have not been recompiled could have an optimized
95 (in the sense of inline caching) call to it, bypassing the check of whether or
96 not there is generated bytecode. This leads to a crash caused by accessing
97 indices off of a null pointer.
99 To fix the problem, simply delay calling sourceParsed() until after all functions
100 have been reparsed. The crash isn't 100% reproducible, but on the one test case
101 I have, this makes it impossible to reproduce after a large number of attempts,
102 when it used to happen every few attempts.
104 * inspector/JavaScriptDebugServer.cpp:
105 (WebCore::JavaScriptDebugServer::recompileAllJSFunctions):
107 2008-12-28 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
109 Rubber-stamped by Antti Koivisto.
110 Oops, remove some last minute ASSERTS that are obviously wrong.
112 * rendering/RenderTextControlMultiLine.cpp:
113 (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
114 * rendering/RenderTextControlSingleLine.cpp:
115 (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
117 2008-12-28 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
119 Reviewed by Antti Koivisto.
121 Fixes: https://bugs.webkit.org/show_bug.cgi?id=23015
123 Don't rely on HTMLFormControlElement in RenderTextControl.
125 Introduce an abstract FormControlElement class, containing the
126 valueMatchesRenderer/setValueMatchesRenderer, the only HTMLFormControlElement
127 specific methods that RenderTextControl relies on.
129 This makes it possible for WML to reuse RenderTextControl.
130 RenderTextControlSingleLine still relies on HTMLInputElement,
131 this will change if WMLInputElement is introduced.
134 * WebCore.vcproj/WebCore.vcproj:
135 * WebCore.xcodeproj/project.pbxproj:
136 * dom/FormControlElement.h: Added.
137 (WebCore::FormControlElement::~FormControlElement):
138 (WebCore::FormControlElement::FormControlElement):
139 * html/HTMLFormControlElement.h:
140 (WebCore::HTMLFormControlElement::valueMatchesRenderer):
141 (WebCore::HTMLFormControlElement::setValueMatchesRenderer):
142 * html/HTMLTextAreaElement.cpp:
143 (WebCore::HTMLTextAreaElement::updateValue):
144 * rendering/RenderTextControl.cpp:
145 (WebCore::RenderTextControl::adjustInnerTextStyle):
146 (WebCore::RenderTextControl::updateFromElement):
147 (WebCore::RenderTextControl::setInnerTextValue):
148 (WebCore::RenderTextControl::selectionChanged):
149 (WebCore::RenderTextControl::formControlElement):
150 * rendering/RenderTextControl.h:
151 * rendering/RenderTextControlMultiLine.cpp:
152 (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
153 (WebCore::RenderTextControlMultiLine::subtreeHasChanged):
154 * rendering/RenderTextControlSingleLine.cpp:
155 (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
156 (WebCore::RenderTextControlSingleLine::updateFromElement):
158 2008-12-28 Cameron Zwarich <cwzwarich@uwaterloo.ca>
160 Reviewed by Darin Adler.
162 Bug 23006: Many Loader::Host member functions are not safe to use reentrantly
163 <https://bugs.webkit.org/show_bug.cgi?id=23006>
164 <rdar://problem/6216106>
166 Many Loader::Host member functions set m_processingResource to true when they
167 begin processing a resource and set it to false when they are done. Thanks to
168 JavaScript and the web inspector, almost anything can happen during the
169 processing of a resource, including these functions being called reentrantly,
170 which is unsafe due to this way of using m_processingResource.
172 This can theoretically cause a Loader::Host to be used after it is freed,
173 because when Loader::servedPendingRequests() is called, it will free Hosts
174 that have m_processingResource set to false.
176 To fix this, we replace m_processingResource with m_numResourcesProcessing,
177 which is incremented and decremented using a helper object, ProcessingResource.
179 There are no occurrences of crashes caused by this bug that are reproducible
180 by multiple people, but this fixes the problem of m_processingResource being
181 set to false while a Host is still alive.
184 (WebCore::Loader::Host::Host):
185 (WebCore::Loader::Host::didFinishLoading): Change to use ProcessingResource
186 instead of manually setting m_processingResource.
187 (WebCore::Loader::Host::didFail): Ditto.
188 (WebCore::Loader::Host::didReceiveData): Ditto.
190 (WebCore::Loader::Host::ProcessingResource::ProcessingResource): Added.
191 (WebCore::Loader::Host::ProcessingResource::~ProcessingResource): Added.
192 (WebCore::Loader::Host::processingResource): Change to use m_numResourcesProcessing
193 instead of just getting m_processingResource.
195 2008-12-28 Alexey Proskuryakov <ap@webkit.org>
197 Reviewed by Darin Adler.
199 https://bugs.webkit.org/show_bug.cgi?id=23007
200 REGRESSION: Timer-related crash when closing Web Inspector
202 Test: fast/dom/Window/remove-timeout-crash.html
204 * bindings/js/DOMTimer.cpp: (WebCore::DOMTimer::fired): Besides deleting the timer, make
205 sure to remove it from a Document map.
207 2008-12-28 Alexey Proskuryakov <ap@webkit.org>
209 Reviewed by Anders Carlsson.
211 https://bugs.webkit.org/show_bug.cgi?id=23012
212 Bring application cache manifest parsing up to date
214 Test: http/tests/appcache/manifest-parsing.html
216 * loader/appcache/ManifestParser.cpp:
217 (WebCore::Mode): Added a constant for unknown sections, which are ignored when parsing. This
218 is necessary for future extensions.
219 (WebCore::parseManifest): Parse unknown sections correctly. Ignore trailing tokens in
222 2008-12-28 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
224 Reviewed by Darin Adler.
226 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22996
228 RenderTextControl heavily depends on HTMLInputElement & HTMLTextAreaElement.
229 It handles multi & single line text control rendering in one class. Split up
230 in two new classes: RenderTextControlSingleLine & RenderTextControlMultiLine.
232 This has several benefits - code is more readable now, the memory usage
233 for RenderTextControlMultiLine is reduced, as all stuff related to search fields
234 lives in RenderTextControlSingleLine, and it's easier to introduce an
235 abstraction for input/textarea-like elements for other HTML flavours like WML.
241 * WebCore.vcproj/WebCore.vcproj:
242 * WebCore.xcodeproj/project.pbxproj:
243 * WebCoreSources.bkl:
244 * html/HTMLInputElement.cpp:
245 (WebCore::HTMLInputElement::createRenderer):
246 (WebCore::HTMLInputElement::defaultEventHandler):
247 (WebCore::HTMLInputElement::updatePlaceholderVisibility):
248 (WebCore::HTMLInputElement::addSearchResult):
249 (WebCore::HTMLInputElement::onSearch):
250 * html/HTMLTextAreaElement.cpp:
251 (WebCore::HTMLTextAreaElement::createRenderer):
252 (WebCore::HTMLTextAreaElement::defaultEventHandler):
253 * rendering/RenderTextControl.cpp:
254 (WebCore::RenderTextControl::RenderTextControl):
255 (WebCore::RenderTextControl::~RenderTextControl):
256 (WebCore::RenderTextControl::styleDidChange):
257 (WebCore::RenderTextControl::adjustInnerTextStyle):
258 (WebCore::RenderTextControl::createSubtreeIfNeeded):
259 (WebCore::RenderTextControl::textBlockHeight):
260 (WebCore::RenderTextControl::textBlockWidth):
261 (WebCore::RenderTextControl::updateFromElement):
262 (WebCore::RenderTextControl::setInnerTextValue):
263 (WebCore::RenderTextControl::setSelectionRange):
264 (WebCore::RenderTextControl::visiblePositionForIndex):
265 (WebCore::RenderTextControl::indexForVisiblePosition):
266 (WebCore::RenderTextControl::subtreeHasChanged):
267 (WebCore::RenderTextControl::scrollbarThickness):
268 (WebCore::RenderTextControl::calcHeight):
269 (WebCore::RenderTextControl::hitInnerTextBlock):
270 (WebCore::RenderTextControl::forwardEvent):
271 (WebCore::RenderTextControl::calcPrefWidths):
272 (WebCore::RenderTextControl::selectionChanged):
273 (WebCore::RenderTextControl::innerTextElement):
274 * rendering/RenderTextControl.h:
275 (WebCore::RenderTextControl::hasControlClip):
276 (WebCore::RenderTextControl::canHaveChildren):
277 (WebCore::RenderTextControl::avoidsFloats):
278 (WebCore::RenderTextControl::isEdited):
279 (WebCore::RenderTextControl::setEdited):
280 * rendering/RenderTextControlMultiLine.cpp: Added.
281 (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
282 (WebCore::RenderTextControlMultiLine::~RenderTextControlMultiLine):
283 (WebCore::RenderTextControlMultiLine::subtreeHasChanged):
284 (WebCore::RenderTextControlMultiLine::layout):
285 (WebCore::RenderTextControlMultiLine::nodeAtPoint):
286 (WebCore::RenderTextControlMultiLine::forwardEvent):
287 (WebCore::RenderTextControlMultiLine::preferredContentWidth):
288 (WebCore::RenderTextControlMultiLine::adjustControlHeightBasedOnLineHeight):
289 (WebCore::RenderTextControlMultiLine::baselinePosition):
290 (WebCore::RenderTextControlMultiLine::updateFromElement):
291 (WebCore::RenderTextControlMultiLine::cacheSelection):
292 (WebCore::RenderTextControlMultiLine::createInnerTextStyle):
293 * rendering/RenderTextControlMultiLine.h: Added.
294 (WebCore::RenderTextControlMultiLine::isTextArea):
295 * rendering/RenderTextControlSingleLine.cpp: Added.
296 (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
297 (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine):
298 (WebCore::RenderTextControlSingleLine::placeholderShouldBeVisible):
299 (WebCore::RenderTextControlSingleLine::updatePlaceholderVisibility):
300 (WebCore::RenderTextControlSingleLine::addSearchResult):
301 (WebCore::RenderTextControlSingleLine::stopSearchEventTimer):
302 (WebCore::RenderTextControlSingleLine::showPopup):
303 (WebCore::RenderTextControlSingleLine::hidePopup):
304 (WebCore::RenderTextControlSingleLine::subtreeHasChanged):
305 (WebCore::RenderTextControlSingleLine::paint):
306 (WebCore::RenderTextControlSingleLine::layout):
307 (WebCore::RenderTextControlSingleLine::nodeAtPoint):
308 (WebCore::RenderTextControlSingleLine::forwardEvent):
309 (WebCore::RenderTextControlSingleLine::styleDidChange):
310 (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged):
311 (WebCore::RenderTextControlSingleLine::textBlockWidth):
312 (WebCore::RenderTextControlSingleLine::preferredContentWidth):
313 (WebCore::RenderTextControlSingleLine::adjustControlHeightBasedOnLineHeight):
314 (WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded):
315 (WebCore::RenderTextControlSingleLine::updateFromElement):
316 (WebCore::RenderTextControlSingleLine::cacheSelection):
317 (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
318 (WebCore::RenderTextControlSingleLine::createInnerBlockStyle):
319 (WebCore::RenderTextControlSingleLine::createResultsButtonStyle):
320 (WebCore::RenderTextControlSingleLine::createCancelButtonStyle):
321 (WebCore::RenderTextControlSingleLine::updateCancelButtonVisibility):
322 (WebCore::RenderTextControlSingleLine::autosaveName):
323 (WebCore::RenderTextControlSingleLine::startSearchEventTimer):
324 (WebCore::RenderTextControlSingleLine::searchEventTimerFired):
325 (WebCore::RenderTextControlSingleLine::valueChanged):
326 (WebCore::RenderTextControlSingleLine::itemText):
327 (WebCore::RenderTextControlSingleLine::itemIsEnabled):
328 (WebCore::RenderTextControlSingleLine::itemStyle):
329 (WebCore::RenderTextControlSingleLine::menuStyle):
330 (WebCore::RenderTextControlSingleLine::clientInsetLeft):
331 (WebCore::RenderTextControlSingleLine::clientInsetRight):
332 (WebCore::RenderTextControlSingleLine::clientPaddingLeft):
333 (WebCore::RenderTextControlSingleLine::clientPaddingRight):
334 (WebCore::RenderTextControlSingleLine::listSize):
335 (WebCore::RenderTextControlSingleLine::selectedIndex):
336 (WebCore::RenderTextControlSingleLine::itemIsSeparator):
337 (WebCore::RenderTextControlSingleLine::itemIsLabel):
338 (WebCore::RenderTextControlSingleLine::itemIsSelected):
339 (WebCore::RenderTextControlSingleLine::setTextFromItem):
340 (WebCore::RenderTextControlSingleLine::fontSelector):
341 (WebCore::RenderTextControlSingleLine::hostWindow):
342 (WebCore::RenderTextControlSingleLine::createScrollbar):
343 * rendering/RenderTextControlSingleLine.h: Added.
344 (WebCore::RenderTextControlSingleLine::hasControlClip):
345 (WebCore::RenderTextControlSingleLine::isTextField):
346 (WebCore::RenderTextControlSingleLine::placeholderIsVisible):
347 (WebCore::RenderTextControlSingleLine::popupIsVisible):
348 (WebCore::RenderTextControlSingleLine::shouldPopOver):
349 (WebCore::RenderTextControlSingleLine::valueShouldChangeOnHotTrack):
350 * rendering/TextControlInnerElements.cpp:
351 (WebCore::RenderTextControlInnerBlock::nodeAtPoint):
352 (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
354 2008-12-28 Dmitry Titov <dimich@chromium.org>
356 Reviewed by Darin Adler.
358 https://bugs.webkit.org/show_bug.cgi?id=22755
359 Prepare to add create/remove timeout methods to JSWorkerContext by moving
360 timer-specific code from JSDOMWindowBase to DOMTimer.
361 Moved everything JS-related from DOMTimer to ScheduledAction.
362 Now ScheduledAction is what it wanted to be all the time: a JS engine-specific
363 container for timer callback that knows how to invoke it.
364 DOMTimer is not anymore JS-specific.
366 This is mostly moving the code around. No intended functional changes.
368 * bindings/js/DOMTimer.cpp:
369 (WebCore::DOMTimer::DOMTimer):
370 (WebCore::DOMTimer::~DOMTimer):
371 (WebCore::DOMTimer::install):
372 (WebCore::DOMTimer::removeById):
373 (WebCore::DOMTimer::fired):
374 (WebCore::DOMTimer::stop):
375 * bindings/js/DOMTimer.h:
376 * bindings/js/JSDOMWindowBase.cpp:
377 (WebCore::JSDOMWindowBase::installTimeout):
378 (WebCore::JSDOMWindowBase::removeTimeout):
379 * bindings/js/JSDOMWindowBase.h:
380 * bindings/js/ScheduledAction.cpp:
381 (WebCore::ScheduledAction::execute):
382 * bindings/js/ScheduledAction.h:
384 (WebCore::Document::addTimeout):
386 2008-12-26 Zalan Bujtas <zbujtas@gmail.com>
388 Reviewed by Darin Adler.
390 https://bugs.webkit.org/show_bug.cgi?id=22999
391 Check if database thread exists.
393 * storage/Database.cpp:
394 (WebCore::Database::openAndVerifyVersion):
395 (WebCore::Database::markAsDeletedAndClose):
396 (WebCore::Database::tableNames):
398 2008-12-26 Alexey Proskuryakov <ap@webkit.org>
400 Reviewed by Darin Adler.
402 https://bugs.webkit.org/show_bug.cgi?id=23001
403 A call to applicationCache.update() from a cached event listener should be ignored
405 Test: http/tests/appcache/idempotent-update.html
407 * loader/appcache/ApplicationCacheGroup.cpp:
408 (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete): Only reset m_status after
411 2008-12-26 Alexey Proskuryakov <ap@webkit.org>
413 Reviewed by Darin Adler.
415 https://bugs.webkit.org/show_bug.cgi?id=22997
416 ASSERTION FAILED: !m_resources.contains(url) in ApplicationCache::addResource()
418 Tests: http/tests/appcache/top-frame-1.html
419 http/tests/appcache/top-frame-2.html
420 http/tests/appcache/top-frame-3.html
421 http/tests/appcache/top-frame-4.html
423 * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::cacheForMainRequest):
424 Fixed one more instance of top level frame being used for caching purposes.
426 2008-12-26 Dmitry Titov <dimich@chromium.org>
428 Reviewed by Darin Adler.
430 https://bugs.webkit.org/show_bug.cgi?id=22987
431 Fix for broken test editing/execCommand/5763082.html
433 * editing/CompositeEditCommand.cpp:
434 (WebCore::CompositeEditCommand::mergeIdenticalElements): Used local RefPtr to hold onto
435 function parameter across multiple calls.
437 2008-12-25 Alexey Proskuryakov <ap@webkit.org>
439 Reviewed by Darin Adler.
441 https://bugs.webkit.org/show_bug.cgi?id=22993
442 Application cache shouldn't be inherited by subframes
444 <rdar://problem/6284708> AppCache crashes in ApplicationCacheResource::addType()
445 This crash happened because main resource for subframe was looked up in top frame's
446 appcache. If not for the spec change, it could have been fixed by preventing the load
449 Test: http/tests/appcache/foreign-iframe-main.html
450 I intend to write additional tests for the behavior change.
452 * loader/DocumentLoader.cpp:
453 (WebCore::DocumentLoader::shouldLoadResourceFromApplicationCache):
454 * loader/DocumentLoader.h:
455 (WebCore::DocumentLoader::applicationCache):
456 * loader/MainResourceLoader.cpp:
457 (WebCore::MainResourceLoader::load):
458 * loader/appcache/DOMApplicationCache.cpp:
459 (WebCore::DOMApplicationCache::associatedCache):
460 Removed DocumentLoader::topLevelApplicationCache(), and changed callers accordingly.
462 * loader/appcache/ApplicationCacheGroup.cpp:
463 (WebCore::ApplicationCacheGroup::selectCache):
464 (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
465 Removed checks for the frame being top-level one, now that subframes are cached independently.
467 2008-12-25 Antti Koivisto <antti@apple.com>
469 Reviewed by Oliver Hunt.
471 <rdar://problem/6465669> Frequent !isPurgeable() assertion in WebCore::CachedResource::addClient
473 Disallow turning resources that are being revalidated to purgable state.
475 No test, the condition is difficult to produce in DRT.
477 * loader/CachedCSSStyleSheet.cpp:
478 (WebCore::CachedCSSStyleSheet::allClientsRemoved):
479 * loader/CachedImage.cpp:
480 (WebCore::CachedImage::destroyDecodedData):
481 * loader/CachedResource.cpp:
482 (WebCore::CachedResource::isSafeToMakePurgeable):
483 (WebCore::CachedResource::makePurgeable):
484 * loader/CachedResource.h:
485 * loader/CachedScript.cpp:
486 (WebCore::CachedScript::destroyDecodedData):
488 2008-12-25 Alexey Proskuryakov <ap@webkit.org>
492 * WebCore.pro: Added ThreadGlobalData.cpp.
494 2008-12-24 Mark Rowe <mrowe@apple.com>
498 * WebCore.base.exp: Remove a symbol from the export file now that it is no longer generated.
500 2008-12-24 Holger Hans Peter Freyther <zecke@selfish.org>
502 Unreviewed build fix to find addSubresourceURL
504 This is needed to compile on WebKit/Gtk+
506 * css/CSSFontFaceSrcValue.cpp:
508 2008-12-23 Alexey Proskuryakov <ap@webkit.org>
510 Reviewed by Darin Adler.
512 https://bugs.webkit.org/show_bug.cgi?id=22980
513 WebCore uses more thread specific keys than it really needs
515 Consolidated ThreadSpecific data into a single ThreadGlobalData structure.
520 * WebCore.vcproj/WebCore.vcproj:
521 * WebCore.xcodeproj/project.pbxproj:
522 * WebCoreSources.bkl:
523 * dom/EventNames.cpp:
525 (WebCore::eventNames):
527 (WebCore::Frame::Frame):
528 * platform/ThreadGlobalData.cpp: Added.
529 (WebCore::threadGlobalData):
530 (WebCore::ThreadGlobalData::ThreadGlobalData):
531 (WebCore::ThreadGlobalData::~ThreadGlobalData):
532 * platform/ThreadGlobalData.h: Added.
533 (WebCore::ThreadGlobalData::eventNames):
534 (WebCore::ThreadGlobalData::emptyString):
535 (WebCore::ThreadGlobalData::atomicStringTable):
536 (WebCore::ThreadGlobalData::cachedConverterICU):
537 (WebCore::ThreadGlobalData::cachedConverterTEC):
538 * platform/text/AtomicString.cpp:
539 (WebCore::stringTable):
540 (WebCore::AtomicString::add):
541 (WebCore::AtomicString::remove):
542 (WebCore::AtomicString::find):
543 (WebCore::AtomicString::init):
544 * platform/text/StringImpl.cpp:
545 (WebCore::StringImpl::empty):
546 * platform/text/StringImpl.h:
547 * platform/text/TextCodecICU.cpp:
548 (WebCore::ICUConverterWrapper::~ICUConverterWrapper):
549 (WebCore::cachedConverterICU):
550 * platform/text/TextCodecICU.h:
551 (WebCore::ICUConverterWrapper::ICUConverterWrapper):
552 * platform/text/mac/TextCodecMac.cpp:
553 (WebCore::cachedConverterTEC):
554 * platform/text/mac/TextCodecMac.h:
555 (WebCore::TECConverterWrapper::TECConverterWrapper):
556 (WebCore::TECConverterWrapper::~TECConverterWrapper):
558 2008-12-23 Mark Rowe <mrowe@apple.com>
562 * WebCore.xcodeproj/project.pbxproj: CSSPropertyNames.h is a generated file so it needs to be explicitly copied
563 into the PrivateHeaders directory, rather than relying on the automatic copying of headers which runs before the
564 derived sources are generated.
566 2008-12-23 Simon Fraser <simon.fraser@apple.com>
568 Reviewed by Dan Bernstein
570 https://bugs.webkit.org/show_bug.cgi?id=22941
572 If the document element has opacity, we need to erase the view background to
573 white before painting.
575 Test: fast/backgrounds/opacity-on-document-element.html
577 * rendering/RenderView.cpp:
578 (WebCore::rendererObscuresBackground):
580 2008-12-23 Simon Fraser <simon.fraser@apple.com>
582 Reviewed by Dan Bernstein
584 https://bugs.webkit.org/show_bug.cgi?id=21910
586 Fix SVGImage painting by ensuring that the SVGImage resizes its FrameView correctly.
587 Otherwise the FrameView is left at 0x0, and nothing paints.
589 * svg/graphics/SVGImage.cpp:
590 (WebCore::SVGImage::draw):
592 2008-12-23 Darin Adler <darin@apple.com>
594 Reviewed by John Sullivan.
596 - improve robustness of undo/redo in HTML editing to fix the following bugs
597 <https://bugs.webkit.org/show_bug.cgi?id=19703> Crash in WebCore::InsertNodeBeforeCommand::doUnapply()
598 <rdar://problem/4059423> DOM operations performed on editable HTML can cause a crash later during Undo
600 Major categories of improvements:
602 1) Added null checks.
603 2) Eliminated type casts without corresponding type checks.
604 3) Avoided possible infinite loops by building up lists of nodes to operate on
605 before starting to make DOM changes.
608 No test at this time, but test cases should follow in separate patches.
610 * WebCore.xcodeproj/project.pbxproj: Set the role of CSSPropertyNames.h to Private so it
611 can be used in other Private headers, specifically editing ones.
613 * css/CSSStyleSelector.cpp:
614 (WebCore::CSSStyleSelector::locateCousinList): Adopt parentElement.
615 (WebCore::CSSStyleSelector::locateSharedStyle): Ditto.
616 (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Ditto.
618 * dom/Element.cpp: (WebCore::Element::cloneElement): Added.
619 * dom/Element.h: Added cloneElement and an implementation of parentElement.
620 * dom/Node.h: Moved parentElement from here to Element.h and changed its
621 implementation so it will return 0 when the parent is not an element
622 (document, document fragment, etc.).
624 * editing/AppendNodeCommand.cpp:
625 (WebCore::AppendNodeCommand::AppendNodeCommand): Made parent be an Element.
626 Moved assertions from doApply in here.
627 (WebCore::AppendNodeCommand::doApply): Simplified to just a single unchecked
629 (WebCore::AppendNodeCommand::doUnapply): Simplified to just a single remove call.
630 * editing/AppendNodeCommand.h: Updated.
632 * editing/ApplyStyleCommand.cpp:
633 (WebCore::createStyleSpanElement): Eliminate casting by creating an element in a more
634 direct way with new instead of createElementNS.
635 (WebCore::ApplyStyleCommand::ApplyStyleCommand): Use PassRefPtr.
636 (WebCore::ApplyStyleCommand::removeCSSStyle): Use CSSPropertyID.
637 (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded): Use cloneElement.
638 * editing/ApplyStyleCommand.h:
640 * editing/BreakBlockquoteCommand.cpp:
641 (WebCore::BreakBlockquoteCommand::doApply): Use Element* and cloneElement.
643 * editing/CompositeEditCommand.cpp:
644 (WebCore::CompositeEditCommand::applyStyledElement): Use PassRefPtr and unsigned.
645 (WebCore::CompositeEditCommand::removeStyledElement): Ditto.
646 (WebCore::CompositeEditCommand::insertNodeBefore): Ditto.
647 (WebCore::CompositeEditCommand::insertNodeAfter): Ditto.
648 (WebCore::CompositeEditCommand::insertNodeAt): Ditto.
649 (WebCore::CompositeEditCommand::appendNode): Ditto.
650 (WebCore::CompositeEditCommand::removeChildrenInRange): Ditto. Also use a vector to
651 make the list of children in case removing them has side effects.
652 (WebCore::CompositeEditCommand::removeNode): Ditto.
653 (WebCore::CompositeEditCommand::removeNodePreservingChildren): Ditto.
654 (WebCore::CompositeEditCommand::removeNodeAndPruneAncestors): Ditto.
655 (WebCore::CompositeEditCommand::splitTextNode): Ditto.
656 (WebCore::CompositeEditCommand::splitElement): Ditto.
657 (WebCore::CompositeEditCommand::mergeIdenticalElements): Ditto.
658 (WebCore::CompositeEditCommand::wrapContentsInDummySpan): Ditto.
659 (WebCore::CompositeEditCommand::splitTextNodeContainingElement): Ditto.
660 (WebCore::CompositeEditCommand::joinTextNodes): Ditto.
661 (WebCore::CompositeEditCommand::inputText): Ditto.
662 (WebCore::CompositeEditCommand::insertTextIntoNode): Ditto.
663 (WebCore::CompositeEditCommand::deleteTextFromNode): Ditto.
664 (WebCore::CompositeEditCommand::replaceTextInNode): Ditto.
665 (WebCore::CompositeEditCommand::insertNodeAtTabSpanPosition): Ditto.
666 (WebCore::CompositeEditCommand::removeCSSProperty): Ditto.
667 (WebCore::CompositeEditCommand::removeNodeAttribute): Ditto. Implement by calling
668 setNodeAttribute instead of with its own SimpleEditCommand.
669 (WebCore::CompositeEditCommand::setNodeAttribute): Ditto.
670 (WebCore::CompositeEditCommand::deleteInsignificantText): Ditto.
671 (WebCore::CompositeEditCommand::appendBlockPlaceholder): Ditto.
672 (WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded): Ditto.
673 (WebCore::CompositeEditCommand::insertNewDefaultParagraphElementAt): Ditto. Don't
674 bother using an undoable operation to put the break element into the paragraph
675 element because there's no need to split them and redo this when doing undo/redo.
676 (WebCore::CompositeEditCommand::moveParagraphs): Ditto.
677 (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): Ditto.
678 * editing/CompositeEditCommand.h: Ditto.
680 * editing/DeleteFromTextNodeCommand.cpp:
681 (WebCore::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand): Use unsigned.
682 (WebCore::DeleteFromTextNodeCommand::doApply): Eliminated inappropriate assertions.
683 (WebCore::DeleteFromTextNodeCommand::doUnapply): Ditto.
684 * editing/DeleteFromTextNodeCommand.h:
686 * editing/DeleteSelectionCommand.cpp:
687 (WebCore::DeleteSelectionCommand::removeNode): Use PassRefPtr.
688 (WebCore::DeleteSelectionCommand::deleteTextFromNode): Ditto.
689 * editing/DeleteSelectionCommand.h:
691 * editing/FormatBlockCommand.cpp:
692 (WebCore::FormatBlockCommand::FormatBlockCommand): Use AtomicString.
693 (WebCore::FormatBlockCommand::doApply): Use Element.
694 * editing/FormatBlockCommand.h:
696 * editing/IndentOutdentCommand.cpp:
697 (WebCore::createIndentBlockquoteElement): Use new to create the element
698 instead of calling a function so we have a more specific type.
699 (WebCore::IndentOutdentCommand::prepareBlockquoteLevelForInsertion):
700 Use RefPtr and Element.
701 (WebCore::IndentOutdentCommand::indentRegion): Ditto.
702 (WebCore::IndentOutdentCommand::outdentParagraph): Ditto.
703 * editing/IndentOutdentCommand.h:
705 * editing/InsertIntoTextNodeCommand.cpp:
706 (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand):
707 Use unsigned. Added an assertion.
708 (WebCore::InsertIntoTextNodeCommand::doApply): Eliminated inappropriate assertions.
709 (WebCore::InsertIntoTextNodeCommand::doUnapply): Ditto.
710 * editing/InsertIntoTextNodeCommand.h:
712 * editing/InsertLineBreakCommand.cpp:
713 (WebCore::InsertLineBreakCommand::insertNodeAfterPosition): Use Element.
714 (WebCore::InsertLineBreakCommand::insertNodeBeforePosition): Ditto.
716 * editing/InsertListCommand.cpp:
717 (WebCore::InsertListCommand::doApply): Use Element.
719 * editing/InsertNodeBeforeCommand.cpp:
720 (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand): Moved assertions
722 (WebCore::InsertNodeBeforeCommand::doApply): Eliminated inappropriate assertions.
724 (WebCore::InsertNodeBeforeCommand::doUnapply): Simplified to just a single remove call.
726 * editing/InsertParagraphSeparatorCommand.cpp:
727 (WebCore::InsertParagraphSeparatorCommand::doApply): Use Element and cloneElement.
729 * editing/JoinTextNodesCommand.cpp:
730 (WebCore::JoinTextNodesCommand::doApply): Eliminated inappropriate assertions.
731 Added some runtime checks. Don't store anything in m_offset.
732 (WebCore::JoinTextNodesCommand::doUnapply): Ditto.
733 * editing/JoinTextNodesCommand.h:
735 * editing/MergeIdenticalElementsCommand.cpp:
736 (WebCore::MergeIdenticalElementsCommand::MergeIdenticalElementsCommand): Moved
737 an assertion here from doApply.
738 (WebCore::MergeIdenticalElementsCommand::doApply): Eliminated inappropriate assertions.
739 Added a null check. Changed implementation to use remove to avoid null parent issue.
740 Use a vector of nodes to avoid possible infinite loop if mutation happens while iterating.
741 (WebCore::MergeIdenticalElementsCommand::doUnapply): Ditto.
743 * editing/ModifySelectionListLevel.cpp:
744 (WebCore::ModifySelectionListLevelCommand::appendSiblingNodeRange): Use Element*.
745 (WebCore::IncreaseSelectionListLevelCommand::doApply): Ditto.
746 * editing/ModifySelectionListLevel.h:
748 * editing/RemoveCSSPropertyCommand.cpp:
749 (WebCore::RemoveCSSPropertyCommand::RemoveCSSPropertyCommand): Use PassRefPtr and
750 CSSPropertyID. Also renamed m_decl to m_style.
751 (WebCore::RemoveCSSPropertyCommand::doApply): Eliminated inappropriate assertions.
752 (WebCore::RemoveCSSPropertyCommand::doUnapply): Ditto.
754 * editing/RemoveNodeAttributeCommand.cpp: Removed contents of this file. To be deleted.
755 Use SetNodeAttributeCommand instead.
756 * editing/RemoveNodeAttributeCommand.h: Ditto.
758 * editing/RemoveNodeCommand.cpp:
759 (WebCore::RemoveNodeCommand::RemoveNodeCommand): Moved assertions here from doApply.
760 Don't initialize m_refChild here; rather do it in doApply.
761 (WebCore::RemoveNodeCommand::doApply): Eliminated inappropriate assertions. Added
762 checks and streamlined implementation.
763 (WebCore::RemoveNodeCommand::doUnapply): Ditto.
764 * editing/RemoveNodeCommand.h:
766 * editing/RemoveNodePreservingChildrenCommand.cpp:
767 (WebCore::RemoveNodePreservingChildrenCommand::doApply): Use a vector.
769 * editing/ReplaceSelectionCommand.cpp:
770 (WebCore::ReplacementFragment::insertFragmentForTestRendering): Removed now-unneeded cast.
772 * editing/SetNodeAttributeCommand.cpp:
773 (WebCore::SetNodeAttributeCommand::SetNodeAttributeCommand): Use AtomicString.
774 Removed assertion that prevents us from using this to remove an attribute.
775 (WebCore::SetNodeAttributeCommand::doApply): Eliminated inappropriate assertions.
776 (WebCore::SetNodeAttributeCommand::doUnapply): Ditto.
777 * editing/SetNodeAttributeCommand.h:
779 * editing/SplitElementCommand.cpp:
780 (WebCore::SplitElementCommand::SplitElementCommand): Moved assertion here from doApply.
781 (WebCore::SplitElementCommand::doApply): Check some more invariants and use a vector
782 to avoid possible infinite loops.
783 (WebCore::SplitElementCommand::doUnapply): Ditto.
785 * editing/SplitTextNodeCommand.cpp:
786 (WebCore::SplitTextNodeCommand::SplitTextNodeCommand): Moved assertions and comment
788 (WebCore::SplitTextNodeCommand::doApply): Check for null and failures when applying.
789 (WebCore::SplitTextNodeCommand::doUnapply): Ditto.
791 * editing/SplitTextNodeContainingElementCommand.cpp:
792 (WebCore::SplitTextNodeContainingElementCommand::doApply): Use Element.
794 * editing/WrapContentsInDummySpanCommand.cpp:
795 (WebCore::WrapContentsInDummySpanCommand::doApply): Check for null and ignore failures.
796 Don't reuse the dummy span. Simplified logic.
797 (WebCore::WrapContentsInDummySpanCommand::doUnapply): Ditto.
799 * editing/htmlediting.cpp:
800 (WebCore::isBlock): Make sure this returns true only for elements.
801 (WebCore::enclosingBlock): Return an Element*.
802 (WebCore::enclosingTableCell): Ditto.
803 (WebCore::enclosingList): Return an HTMLElement*.
804 (WebCore::outermostEnclosingList): Return an HTMLElement*.
805 (WebCore::createDefaultParagraphElement): Return an HTMLElement*.
806 (WebCore::createBreakElement): Return an HTMLElement*.
807 (WebCore::createOrderedListElement): Return an HTMLElement*.
808 (WebCore::createUnorderedListElement): Return an HTMLElement*.
809 (WebCore::createListItemElement): Return an HTMLElement*.
810 (WebCore::createHTMLElement): Return an HTMLElement*.
811 * editing/htmlediting.h:
813 * editing/markup.cpp:
814 (WebCore::createFragmentFromText): Use createBreakElement and use Element*.
816 * page/MouseEventWithHitTestResults.cpp:
817 (WebCore::MouseEventWithHitTestResults::targetNode): Use parentElement.
819 2008-12-23 Darin Adler <darin@apple.com>
821 Reviewed by Dan Bernstein.
823 * dom/Node.h: Tweak comments and order of bits that Sam moved
825 * dom/Node.cpp: Ditto.
827 2008-12-22 Julien Chaffraix <jchaffraix@webkit.org>
829 Reviewed by Darin Adler.
831 Bug 11106: Some XMLHttpRequest URI resolving tests fail
832 https://bugs.webkit.org/show_bug.cgi?id=11106
834 Use the ScriptExecutionContext to resolve the URI when calling open in JavaScript.
835 The previous code was using the containing DOMWindow to do so which would fail for
836 XMLHttpRequest object being passed between iframe.
838 Tests: http/tests/xmlhttprequest/uri-resolution-opera-open-004.html
839 http/tests/xmlhttprequest/uri-resolution-opera-open-005.html
840 http/tests/xmlhttprequest/uri-resolution-opera-open-006.html
841 http/tests/xmlhttprequest/uri-resolution-opera-open-007.html
842 http/tests/xmlhttprequest/uri-resolution-opera-open-008.html
843 http/tests/xmlhttprequest/uri-resolution-opera-open-009.html
844 http/tests/xmlhttprequest/uri-resolution-opera-open-010.html
846 * bindings/js/JSXMLHttpRequestCustom.cpp:
847 (WebCore::JSXMLHttpRequest::open): Use the ScriptExecutionContext
851 (WebCore::Document::virtualCompleteURL): Virtual method added to
852 avoid performance hit on completeURL call.
855 * dom/ScriptExecutionContext.h:
856 (WebCore::ScriptExecutionContext::completeURL): Non-virtual method
857 that wrap the call to the virtual call.
858 * dom/WorkerContext.cpp:
859 (WebCore::WorkerContext::virtualCompleteURL): Pure virtual method.
860 * dom/WorkerContext.h:
862 2008-12-23 Darin Adler <darin@apple.com>
864 Reviewed by Dan Bernstein.
866 - https://bugs.webkit.org/show_bug.cgi?id=22978
867 a couple tweaks to the new strokeBoundingRect functions
869 * platform/graphics/cairo/PathCairo.cpp:
870 (WebCore::Path::strokeBoundingRect): Only create a GraphicsContext
871 if the applier is non-null.
873 * platform/graphics/cg/PathCG.cpp:
874 (WebCore::putBytesNowhere): Added.
875 (WebCore::createScratchContext): Changed to use a "/dev/null" type
876 function to discard bytes rather than using a data object. This
877 eliminates the possibility that memory will be used if someone draws
878 into the scratch context by accident. Also moved to the top of the
879 file; it was in a slightly strange place before.
880 (WebCore::Path::strokeBoundingRect): Only create a GraphicsContext
881 if the applier is non-null. Simplify the empty path special case.
883 2008-12-22 Sam Weinig <sam@webkit.org>
885 Reviewed by Mark Rowe.
887 Save a word in all Elements by moving the 5 loose bits to Node,
888 where we had 16 spare.
891 (WebCore::Element::Element):
894 (WebCore::Node::Node):
897 2008-12-22 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
899 Reviewed by George Staikos.
901 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22972
903 Add WML <meta> element support. All needed functionality is present
904 in Document::processHttpEquiv, already covered by tests.
908 * WebCore.vcproj/WebCore.vcproj:
909 * WebCore.xcodeproj/project.pbxproj:
910 * wml/WMLMetaElement.cpp: Added.
911 (WebCore::WMLMetaElement::WMLMetaElement):
912 (WebCore::WMLMetaElement::parseMappedAttribute):
913 (WebCore::WMLMetaElement::insertedIntoDocument):
914 * wml/WMLMetaElement.h: Added.
915 * wml/WMLTagNames.in:
917 2008-12-22 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
919 Rubber-stamped by Darin Adler.
921 Don't reference specific layout tests in comments.
923 * html/HTMLFormElement.cpp:
924 (WebCore::HTMLFormElement::createFormData):
926 2008-12-22 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
928 Reviewed by George Staikos.
930 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22965
932 Add WML <head> element support. Doesn't require a WMLHeadElement.
933 No functional behaviour, as we already created a WMLElement for headTag, by default.
934 It's just cleaner to list <head> in WMLTagNames, forwarding to a WMLElement constructor.
936 * wml/WMLTagNames.in:
938 2008-12-22 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
940 Reviewed by George Staikos.
942 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22971
944 Fix regression caused by the HTMLFormElement refactorization.
945 File form elements without a name have to be included in multipart/form-data
946 submission. Cover this behaviour with a new test case.
948 Test: http/tests/misc/empty-file-formdata.html
950 * html/HTMLFormElement.cpp:
951 (WebCore::HTMLFormElement::createFormData):
952 * wml/WMLTagNames.in:
954 2008-12-22 David Kilzer <ddkilzer@apple.com>
956 <rdar://problem/6438298> Bump schema version for app cache
958 Reviewed by Alexey Proskuryakov.
960 * loader/appcache/ApplicationCacheStorage.cpp: Increment
961 SchemaVersion from 2 to 3.
963 2008-12-22 David Kilzer <ddkilzer@apple.com>
965 Use Deque in CSSStyleSheet::addSubresourceStyleURLs()
967 Reviewed by Darin Adler.
969 * css/CSSStyleSheet.cpp:
970 (WebCore::CSSStyleSheet::addSubresourceStyleURLs): Replaced
971 use of ListHashSet with more efficient Deque.
973 2008-12-22 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
975 Reviewed by Sam Weinig.
977 Fix obvious crash fix for WML enabled builds.
979 * css/CSSStyleSelector.cpp:
980 (WebCore::CSSStyleSelector::adjustRenderStyle):
982 2008-12-22 David Kilzer <ddkilzer@apple.com>
984 Bug 11850: Webarchive fails to save images referenced in CSS
986 <https://bugs.webkit.org/show_bug.cgi?id=11850>
988 Reviewed by Darin Adler.
990 This entry contains two parts since the tests for adding a
991 completeURL() method to StyleSheet and CSSStyleSheet (part 1) depend
992 on Bug 11850 being fixed (part 2).
996 Tests: http/tests/webarchive/test-css-url-encoding-shift-jis.html
997 http/tests/webarchive/test-css-url-encoding-utf-8.html
998 http/tests/webarchive/test-css-url-encoding.html
1000 Added completeURL() methods to StyleSheet and CSSStyleSheet that
1001 match the behavior of Document::completeURL(). Most notably,
1002 CSSStyleSheet::completeURL() uses the charset of the stylesheet
1003 (if it exists) to construct URLs, just like Document::completeURL().
1005 * css/CSSParser.cpp:
1006 (WebCore::CSSParser::parseValue): Use CSSStyleSheet::completeURL().
1007 (WebCore::CSSParser::parseContent): Ditto.
1008 (WebCore::CSSParser::parseFillImage): Ditto.
1009 (WebCore::CSSParser::parseFontFaceSrc): Ditto.
1010 (WebCore::CSSParser::parseBorderImage): Ditto.
1012 * css/CSSStyleSheet.cpp:
1013 (WebCore::CSSStyleSheet::completeURL): Added.
1014 * css/CSSStyleSheet.h:
1015 (WebCore::CSSStyleSheet::completeURL): Added declaration.
1017 * css/StyleSheet.cpp:
1018 (WebCore::StyleSheet::completeURL): Added.
1020 (WebCore::StyleSheet::completeURL): Added declaration.
1023 (WebCore::Document::completeURL): Added comment referring to the new
1024 completeURL() methods in StyleSheet and CSSStyleSheet.
1028 Tests: webarchive/test-css-url-resources-in-stylesheets.html
1029 webarchive/test-css-url-resources-inline-styles.html
1031 Walk stylesheets and inline style attributes for url() references
1032 when building a list of URLs to include in a webarchive. Note that
1033 not all URLs found this way will be included in the webarchive if
1034 they were not used (and thus not downloaded) when laying out the
1037 The key method for CSS stylesheets is
1038 CSSStyleSheet::addSubresourceStyleURLs() which iterates over all
1039 CSSStyleSheet objects recursively referenced from its own stylesheet
1040 through @import rules. Starting with the CSSRule objects in each
1041 sheet and continuing down through the CSSMutableStyleDeclaration and
1042 CSSValue objects, addSubresourceStyleURLs() methods are called to
1045 For inline style attributes in HTML DOM elements,
1046 StyledElement::addSubresourceAttributeURLs() calls
1047 CSSMutableStyleDeclaration::addSubresourceStyleURLs() to gather URLs
1048 from each element, hence the need to call
1049 addSubresourceAttributeURLs() on superclasses when the method is
1050 implemented on the element class itself.
1052 * css/CSSBorderImageValue.cpp:
1053 (WebCore::CSSBorderImageValue::addSubresourceStyleURLs): Added.
1054 * css/CSSBorderImageValue.h:
1055 (WebCore::CSSBorderImageValue::addSubresourceStyleURLs): Added
1058 * css/CSSFontFaceRule.cpp:
1059 (WebCore::CSSFontFaceRule::addSubresourceStyleURLs): Added.
1060 * css/CSSFontFaceRule.h:
1061 (WebCore::CSSFontFaceRule::addSubresourceStyleURLs): Added
1064 * css/CSSFontFaceSrcValue.cpp:
1065 (WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs): Added.
1066 * css/CSSFontFaceSrcValue.h:
1067 (WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs): Added
1070 * css/CSSImportRule.cpp:
1071 (WebCore::CSSImportRule::addSubresourceStyleURLs): Added.
1072 * css/CSSImportRule.h:
1073 (WebCore::CSSImportRule::addSubresourceStyleURLs): Added
1076 * css/CSSMutableStyleDeclaration.cpp:
1077 (WebCore::CSSMutableStyleDeclaration::addSubresourceStyleURLs): Added.
1078 Iterates over m_properties vector of CSSProperty objects calling
1079 addSubresourceStyleURLs() on each property's CSSValue object.
1080 * css/CSSMutableStyleDeclaration.h:
1081 (WebCore::CSSMutableStyleDeclaration::addSubresourceStyleURLs): Added
1084 * css/CSSPrimitiveValue.cpp:
1085 (WebCore::CSSPrimitiveValue::addSubresourceStyleURLs): Added.
1086 * css/CSSPrimitiveValue.h:
1087 (WebCore::CSSPrimitiveValue::addSubresourceStyleURLs): Added
1090 * css/CSSReflectValue.cpp:
1091 (WebCore::CSSReflectValue::addSubresourceStyleURLs): Added.
1092 * css/CSSReflectValue.h:
1093 (WebCore::CSSReflectValue::addSubresourceStyleURLs): Added
1097 (WebCore::CSSRule::addSubresourceStyleURLs): Added. Virtual
1098 method with empty implementation that's overridden by subclasses
1101 * css/CSSStyleRule.cpp:
1102 (WebCore::CSSStyleRule::addSubresourceStyleURLs): Added.
1103 * css/CSSStyleRule.h:
1104 (WebCore::CSSStyleRule::addSubresourceStyleURLs): Added
1107 * css/CSSStyleSheet.cpp:
1108 (WebCore::CSSStyleSheet::addSubresourceStyleURLs): Updated to
1109 call CSSRule::addSubresourceStyleURLs on each rule to extract
1110 URLs. Removed unneeded baseURL parameter now that the
1111 completeURL() method exists.
1112 * css/CSSStyleSheet.h:
1113 (WebCore::CSSStyleSheet::addSubresourceStyleURLs): Updated
1117 (WebCore::CSSValue::addSubresourceStyleURLs): Added. Virtual
1118 method with empty implementation that's overridden by subclasses
1121 * css/CSSValueList.cpp:
1122 (WebCore::CSSValueList::addSubresourceStyleURLs): Added.
1123 Iterates over m_values vector of CSSValue objects calling
1124 addSubresourceStyleURLs() on each.
1125 * css/CSSValueList.h:
1126 (WebCore::CSSValueList::addSubresourceStyleURLs): Added
1130 (WebCore::StyleSheet::addSubresourceStyleURLs): Updated
1131 declaration to remove unneeded baseURL parameter.
1133 * dom/ProcessingInstruction.cpp:
1134 (WebCore::ProcessingInstruction::addSubresourceAttributeURLs):
1135 Fixed to use the StyleBase::baseURL() method to get the
1136 stylesheet's URL instead of calling Document::completeURL().
1138 * dom/StyledElement.cpp:
1139 (WebCore::StyledElement::addSubresourceAttributeURLs): Added method
1140 to extract URLs from inline style declarations.
1141 * dom/StyledElement.h:
1142 (WebCore::StyledElement::addSubresourceAttributeURLs): Added
1145 * html/HTMLBodyElement.cpp:
1146 (WebCore::HTMLBodyElement::addSubresourceAttributeURLs): Call
1147 addSubresourceAttributeURLs() in superclass to extract URLs
1148 from inline style declarations.
1149 * html/HTMLEmbedElement.cpp:
1150 (WebCore::HTMLEmbedElement::addSubresourceAttributeURLs): Ditto.
1151 * html/HTMLImageElement.cpp:
1152 (WebCore::HTMLImageElement::addSubresourceAttributeURLs): Ditto.
1153 * html/HTMLInputElement.cpp:
1154 (WebCore::HTMLInputElement::addSubresourceAttributeURLs): Ditto.
1155 * html/HTMLLinkElement.cpp:
1156 (WebCore::HTMLLinkElement::addSubresourceAttributeURLs): Ditto.
1157 * html/HTMLObjectElement.cpp:
1158 (WebCore::HTMLObjectElement::addSubresourceAttributeURLs): Ditto.
1159 * html/HTMLParamElement.cpp:
1160 (WebCore::HTMLParamElement::addSubresourceAttributeURLs): Ditto.
1161 * html/HTMLScriptElement.cpp:
1162 (WebCore::HTMLScriptElement::addSubresourceAttributeURLs): Ditto.
1163 * html/HTMLStyleElement.cpp:
1164 (WebCore::HTMLStyleElement::addSubresourceAttributeURLs): Ditto.
1165 * html/HTMLTableCellElement.cpp:
1166 (WebCore::HTMLTableCellElement::addSubresourceAttributeURLs): Ditto.
1167 * html/HTMLTableElement.cpp:
1168 (WebCore::HTMLTableElement::addSubresourceAttributeURLs): Ditto.
1169 * svg/SVGCursorElement.cpp:
1170 (WebCore::SVGCursorElement::addSubresourceAttributeURLs): Ditto.
1171 * svg/SVGFEImageElement.cpp:
1172 (WebCore::SVGFEImageElement::addSubresourceAttributeURLs): Ditto.
1173 * svg/SVGImageElement.cpp:
1174 (WebCore::SVGImageElement::addSubresourceAttributeURLs): Ditto.
1175 * svg/SVGScriptElement.cpp:
1176 (WebCore::SVGScriptElement::addSubresourceAttributeURLs): Ditto.
1178 2008-12-22 Dhananjoy Chutia <dhanrd@gmail.com>
1180 Reviewed by David Kilzer.
1182 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22959
1183 Memory leak fixes for WebKit+soup
1185 * platform/network/soup/ResourceHandleSoup.cpp:
1186 (WebCore::finishedCallback):
1188 2008-12-22 Alexey Proskuryakov <ap@webkit.org>
1190 Reviewed by Darin Adler.
1192 <rdar://problem/6277060> ASSERTION FAILED: !m_cacheBeingUpdated if the manifest is not available
1194 Tests: http/tests/appcache/404-manifest.html
1195 http/tests/appcache/fail-on-update.html
1197 * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::stopLoading):
1198 Removed the incorrect assertion.
1200 * loader/appcache/ApplicationCacheGroup.h: Added an explanation of somewhat nonintuitive
1201 m_currentHandle handling.
1203 2008-12-22 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
1205 Reviewed by Alexey Proskuryakov & George Staikos.
1207 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22961
1209 Add WML <fieldset> element support.
1210 Unlike HTML's <fieldset> element, WML doesn't provide a <legend> child element
1211 to describe the <fieldset>. WML instead offers a 'title' attribute on the <fieldset>
1212 element. To integrate within the existing RenderFieldset code, we just create an
1213 internal <insertedLegend> element as first child for a WML <fieldset> element, containing
1214 the title attribute value.
1218 * WebCore.vcproj/WebCore.vcproj:
1219 * WebCore.xcodeproj/project.pbxproj:
1220 * css/CSSStyleSelector.cpp:
1221 (WebCore::CSSStyleSelector::adjustRenderStyle):
1223 * rendering/RenderFieldset.cpp:
1224 (WebCore::RenderFieldset::RenderFieldset):
1225 (WebCore::RenderFieldset::findLegend):
1226 * rendering/RenderFieldset.h:
1227 * rendering/RenderLegend.cpp:
1228 (WebCore::RenderLegend::RenderLegend):
1229 * rendering/RenderLegend.h:
1230 * wml/WMLFieldSetElement.cpp: Added.
1231 (WebCore::WMLFieldSetElement::WMLFieldSetElement):
1232 (WebCore::WMLFieldSetElement::~WMLFieldSetElement):
1233 (WebCore::WMLFieldSetElement::parseMappedAttribute):
1234 (WebCore::WMLFieldSetElement::insertedIntoDocument):
1235 (WebCore::WMLFieldSetElement::removedFromDocument):
1236 (WebCore::WMLFieldSetElement::createRenderer):
1237 * wml/WMLFieldSetElement.h: Added.
1238 * wml/WMLInsertedLegendElement.cpp: Added.
1239 (WebCore::WMLInsertedLegendElement::WMLInsertedLegendElement):
1240 (WebCore::WMLInsertedLegendElement::~WMLInsertedLegendElement):
1241 (WebCore::WMLInsertedLegendElement::createRenderer):
1242 * wml/WMLInsertedLegendElement.h: Added.
1243 * wml/WMLTagNames.in:
1245 2008-12-22 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
1247 Not reviewed. Try to fix clean Mac builds, set role=private for FormDataBuilder.h
1249 * WebCore.xcodeproj/project.pbxproj:
1251 2008-12-22 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
1253 Rubber-stamped by George Staikos.
1255 Unify all TorchMobile copyright lines. Consolidate in a single line, as requested by Mark Rowe, some time ago.
1257 * css/CSSStyleSelector.cpp:
1259 * dom/DOMImplementation.cpp:
1262 * dom/XMLTokenizer.cpp:
1263 * dom/XMLTokenizerLibxml2.cpp:
1264 * dom/XMLTokenizerQt.cpp:
1265 * history/BackForwardList.cpp:
1266 * history/BackForwardList.h:
1267 * loader/FrameLoader.cpp:
1268 * loader/FrameLoader.h:
1269 * loader/MainResourceLoader.cpp:
1272 * platform/MIMETypeRegistry.cpp:
1273 * platform/network/FormDataBuilder.cpp:
1274 * platform/network/FormDataBuilder.h:
1275 * platform/qt/MIMETypeRegistryQt.cpp:
1276 * wml/WMLAElement.cpp:
1277 * wml/WMLAElement.h:
1278 * wml/WMLAccessElement.cpp:
1279 * wml/WMLAccessElement.h:
1280 * wml/WMLAnchorElement.cpp:
1281 * wml/WMLAnchorElement.h:
1282 * wml/WMLBRElement.cpp:
1283 * wml/WMLBRElement.h:
1284 * wml/WMLCardElement.cpp:
1285 * wml/WMLCardElement.h:
1286 * wml/WMLDoElement.cpp:
1287 * wml/WMLDoElement.h:
1288 * wml/WMLDocument.cpp:
1289 * wml/WMLDocument.h:
1290 * wml/WMLElement.cpp:
1292 * wml/WMLErrorHandling.cpp:
1293 * wml/WMLErrorHandling.h:
1294 * wml/WMLEventHandlingElement.cpp:
1295 * wml/WMLEventHandlingElement.h:
1296 * wml/WMLGoElement.cpp:
1297 * wml/WMLGoElement.h:
1298 * wml/WMLImageElement.cpp:
1299 * wml/WMLImageElement.h:
1300 * wml/WMLImageLoader.cpp:
1301 * wml/WMLImageLoader.h:
1302 * wml/WMLIntrinsicEvent.cpp:
1303 * wml/WMLIntrinsicEvent.h:
1304 * wml/WMLIntrinsicEventHandler.cpp:
1305 * wml/WMLIntrinsicEventHandler.h:
1306 * wml/WMLNoopElement.cpp:
1307 * wml/WMLNoopElement.h:
1308 * wml/WMLOnEventElement.cpp:
1309 * wml/WMLOnEventElement.h:
1310 * wml/WMLPElement.cpp:
1311 * wml/WMLPElement.h:
1312 * wml/WMLPageState.cpp:
1313 * wml/WMLPageState.h:
1314 * wml/WMLPostfieldElement.cpp:
1315 * wml/WMLPostfieldElement.h:
1316 * wml/WMLPrevElement.cpp:
1317 * wml/WMLPrevElement.h:
1318 * wml/WMLRefreshElement.cpp:
1319 * wml/WMLRefreshElement.h:
1320 * wml/WMLSetvarElement.cpp:
1321 * wml/WMLSetvarElement.h:
1322 * wml/WMLTableElement.cpp:
1323 * wml/WMLTableElement.h:
1324 * wml/WMLTaskElement.cpp:
1325 * wml/WMLTaskElement.h:
1326 * wml/WMLTemplateElement.cpp:
1327 * wml/WMLTemplateElement.h:
1328 * wml/WMLTimerElement.cpp:
1329 * wml/WMLTimerElement.h:
1330 * wml/WMLVariables.cpp:
1331 * wml/WMLVariables.h:
1333 2008-12-22 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
1335 Reviewed by George Staikos.
1337 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22638
1339 Add POST method support to WMLGoElement. GET & POST over HTTP
1340 covered by a new set of WML HTTP layout tests.
1342 Tests: http/tests/wml/go-task-get-method-accept-charset.html
1343 http/tests/wml/go-task-get-method.html
1344 http/tests/wml/go-task-post-method-accept-charset.html
1345 http/tests/wml/go-task-post-method.html
1347 * wml/WMLGoElement.cpp:
1348 (WebCore::WMLGoElement::WMLGoElement):
1349 (WebCore::WMLGoElement::registerPostfieldElement):
1350 (WebCore::WMLGoElement::parseMappedAttribute):
1351 (WebCore::WMLGoElement::executeTask):
1352 (WebCore::WMLGoElement::preparePOSTRequest):
1353 (WebCore::WMLGoElement::prepareGETRequest):
1354 (WebCore::WMLGoElement::createFormData):
1355 * wml/WMLGoElement.h:
1356 * wml/WMLPostfieldElement.cpp:
1357 (WebCore::encodedString):
1358 (WebCore::WMLPostfieldElement::encodeData):
1359 * wml/WMLPostfieldElement.h:
1361 2008-12-21 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
1363 Reviewed by Darin Adler and George Staikos.
1365 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22949
1367 Refactor HTMLFormElement to share a maximum level of code between HTMLFormElement & WMLGoElement.
1368 Create a new helper class 'FormDataBuilder', which is hold as member variable in those classes.
1369 It encapsulates all functionality needed to generate a FormData object, usable for HTML/WML form
1370 submission, including boundary string generation, multi-part form handling etc.
1372 No functional changes, no test cases affected.
1373 WMLGoElement will be converted in a follow-up patch.
1378 * WebCore.vcproj/WebCore.vcproj:
1379 * WebCore.xcodeproj/project.pbxproj:
1380 * WebCoreSources.bkl:
1381 * html/HTMLFormElement.cpp:
1382 (WebCore::HTMLFormElement::HTMLFormElement):
1383 (WebCore::HTMLFormElement::dataEncoding):
1384 (WebCore::HTMLFormElement::createFormData):
1385 (WebCore::HTMLFormElement::submit):
1386 (WebCore::HTMLFormElement::parseMappedAttribute):
1387 * html/HTMLFormElement.h:
1388 (WebCore::HTMLFormElement::enctype):
1389 (WebCore::HTMLFormElement::encoding):
1390 (WebCore::HTMLFormElement::setEncoding):
1391 (WebCore::HTMLFormElement::acceptCharset):
1392 * platform/network/FormDataBuilder.cpp: Added.
1393 (WebCore::FormDataBuilder::FormDataBuilder):
1394 (WebCore::FormDataBuilder::~FormDataBuilder):
1395 (WebCore::FormDataBuilder::parseEncodingType):
1396 (WebCore::FormDataBuilder::parseMethodType):
1397 (WebCore::FormDataBuilder::dataEncoding):
1398 (WebCore::appendString):
1399 (WebCore::FormDataBuilder::beginMultiPartHeader):
1400 (WebCore::FormDataBuilder::addBoundaryToMultiPartHeader):
1401 (WebCore::FormDataBuilder::addFileNameToMultiPartHeader):
1402 (WebCore::FormDataBuilder::addContentTypeToMultiPartHeader):
1403 (WebCore::FormDataBuilder::finishMultiPartHeader):
1404 (WebCore::FormDataBuilder::clear):
1405 (WebCore::FormDataBuilder::addKeyValuePairAsFormData):
1406 (WebCore::FormDataBuilder::encodeStringAsFormData):
1407 (WebCore::FormDataBuilder::generateUniqueBoundaryString):
1408 * platform/network/FormDataBuilder.h: Added.
1409 (WebCore::FormDataBuilder::isPostMethod):
1410 (WebCore::FormDataBuilder::setIsPostMethod):
1411 (WebCore::FormDataBuilder::isMultiPartForm):
1412 (WebCore::FormDataBuilder::setIsMultiPartForm):
1413 (WebCore::FormDataBuilder::encodingType):
1414 (WebCore::FormDataBuilder::setEncodingType):
1415 (WebCore::FormDataBuilder::acceptCharset):
1416 (WebCore::FormDataBuilder::setAcceptCharset):
1417 (WebCore::FormDataBuilder::encodedData):
1418 (WebCore::FormDataBuilder::multiPartData):
1420 2008-12-21 Dirk Schulze <krit@webkit.org>
1422 Reviewed by Darin Adler, Nikolas Zimmermann.
1424 Move the the platform dependent strokeBBox functionality out of RenderPath
1425 into Path with strokeBoundingRect.
1427 RenderPath clean-up for strokeBoundingBox
1428 [https://bugs.webkit.org/show_bug.cgi?id=22902]
1431 * WebCore.xcodeproj/project.pbxproj:
1432 * platform/graphics/GraphicsContext.h:
1433 * platform/graphics/Path.h:
1434 * platform/graphics/StrokeStyleApplier.h: Added.
1435 (WebCore::StrokeStyleApplier::~StrokeStyleApplier):
1436 * platform/graphics/cairo/PathCairo.cpp:
1437 (WebCore::Path::strokeBoundingRect):
1438 * platform/graphics/cg/PathCG.cpp:
1439 (WebCore::createScratchContext):
1440 (WebCore::scratchContext):
1441 (WebCore::Path::strokeBoundingRect):
1442 * platform/graphics/qt/GraphicsContextQt.cpp:
1443 (WebCore::GraphicsContext::pen):
1444 * platform/graphics/qt/PathQt.cpp:
1445 (WebCore::Path::strokeBoundingRect):
1446 * rendering/RenderPath.cpp:
1447 (WebCore::StrokeBoundingRectStyleApplier::StrokeBoundingRectStyleApplier):
1448 (WebCore::StrokeBoundingRectStyleApplier::strokeStyle):
1449 (WebCore::RenderPath::relativeBBox):
1450 * rendering/RenderPath.h:
1451 * svg/graphics/cairo/RenderPathCairo.cpp:
1452 * svg/graphics/cg/RenderPathCg.cpp:
1453 * svg/graphics/qt/RenderPathQt.cpp:
1455 2008-12-20 David Kilzer <ddkilzer@apple.com>
1457 Fix typo "CSSAferRuleValue" to "CSSAfterRuleValue"
1459 * html/PreloadScanner.cpp:
1460 (WebCore::PreloadScanner::tokenizeCSS):
1461 * html/PreloadScanner.h:
1462 (WebCore::PreloadScanner::CSSState):
1464 2008-12-19 Alexey Proskuryakov <ap@webkit.org>
1466 Reviewed by Geoff Garen.
1468 <rdar://problem/6454076> Random crashes on JS raytracer
1470 No test, because the crash is not readily reproducible.
1472 * platform/text/StringImpl.cpp:
1473 (WebCore::StringImpl::empty):
1474 * platform/text/StringImpl.h:
1475 Made empty string per-thread.
1477 2008-12-19 Anders Carlsson <andersca@apple.com>
1479 Reviewed by Sam Weinig.
1481 Replace some uses of HardRetain etc with RetainPtr.
1483 * platform/mac/DragImageMac.mm:
1484 * platform/mac/SharedBufferMac.mm:
1485 (WebCore::SharedBuffer::createCFData):
1486 * rendering/RenderThemeMac.mm:
1487 * svg/graphics/cg/SVGResourceFilterCg.mm:
1488 (WebCore::SVGResourceFilter::prepareFilter):
1489 (WebCore::SVGResourceFilter::applyFilter):
1490 * svg/graphics/mac/SVGResourceFilterPlatformDataMac.h:
1491 * svg/graphics/mac/SVGResourceFilterPlatformDataMac.mm:
1492 (WebCore::SVGResourceFilterPlatformDataMac::SVGResourceFilterPlatformDataMac):
1494 2008-12-19 miggilin <mr.diggilin@gmail.com>
1496 Reviewed by Kevin Ollivier.
1498 Add Context Menu support to wx bindings.
1500 https://bugs.webkit.org/show_bug.cgi?id=22675
1502 * platform/ContextMenu.h:
1503 * platform/ContextMenuItem.h:
1504 (WebCore::PlatformMenuItemDescription::PlatformMenuItemDescription):
1505 * platform/wx/ContextMenuItemWx.cpp: Added.
1506 * platform/wx/ContextMenuWx.cpp: Added.
1507 * platform/wx/LocalizedStringsWx.cpp:
1508 * platform/wx/TemporaryLinkStubs.cpp:
1512 2008-12-19 Beth Dakin <bdakin@apple.com>
1514 Reviewed by Darin Adler.
1516 Temporary band-aide fix for <rdar://problem/6372481> In Gmail, a
1518 AccessibilityTable::isTableExposableThroughAccessibility() when
1519 attempting to create a link in a rich text message
1521 We need to disable Accessibility Tables until we get this fixed for
1522 real to prevent rampant crashing.
1524 * page/AccessibilityTable.cpp:
1525 (WebCore::AccessibilityTable::AccessibilityTable):
1527 2008-12-19 Simon Fraser <simon.fraser@apple.com>
1529 Reviewed by Darin Adler
1531 https://bugs.webkit.org/show_bug.cgi?id=22938
1533 When the document element is transformed, we need to paint
1534 the view background to avoid unpainted areas.
1536 Test: fast/transforms/transformed-document-element.html
1538 * rendering/RenderView.cpp:
1539 (WebCore::RenderView::paintBoxDecorations):
1541 2008-12-19 Steve Falkenburg <sfalken@apple.com>
1545 * WebCore.vcproj/WebCore.vcproj:
1547 2008-12-19 Kevin Ollivier <kevino@theolliviers.com>
1549 wx build fixes after recent changes.
1551 * WebCoreSources.bkl:
1552 * platform/graphics/wx/ImageSourceWx.cpp:
1553 (WebCore::ImageSource::clear):
1556 2008-12-19 Holger Hans Peter Freyther <zecke@selfish.org>
1558 Reviewed by Sam Weinig.
1560 [GTK] Fix make distcheck again
1562 These files were moved to WebCore/platform/animation
1563 and WebCore/platform/graphics/transforms.
1567 2008-12-19 Gustavo Noronha Silva <gns@gnome.org>
1569 Reviewed by Holger Freyther.
1571 https://bugs.webkit.org/show_bug.cgi?id=22900
1573 Fix AtomicString usage, so that building works.
1575 * platform/network/soup/ResourceHandleSoup.cpp:
1577 2008-12-19 Adam Roben <aroben@apple.com>
1579 Windows build fix on older versions of CFNetwork after r39393
1581 * platform/network/cf/ResourceHandleCFNet.cpp:
1582 (WebCore::highestSupportedCFURLConnectionClientVersion): Changed
1583 preprocessor directives not to leave in unreachable code on old
1584 versions of CFNetwork.
1586 2008-12-19 Antti Koivisto <antti@apple.com>
1590 * platform/PurgeableBuffer.h:
1592 2008-12-19 Holger Hans Peter Freyther <zecke@selfish.org>
1594 [GTK] Build fix by adding the new files.
1598 2008-12-19 Jade Han <jade.han@nokia.com>
1600 Reviewed by Tor Arne Vestbø.
1602 [Qt] Allow conversion of JavaScript Number and Boolean types to Qt types
1604 https://bugs.webkit.org/show_bug.cgi?id=22880
1606 * bridge/qt/qt_runtime.cpp:
1607 (JSC::Bindings::convertValueToQVariant):
1609 2008-12-19 Tor Arne Vestbø <tavestbo@trolltech.com>
1611 Reviewed by Holger Freyther.
1613 Implement ImageDecoder::filenameExtension() for Qt
1615 * platform/graphics/qt/ImageDecoderQt.cpp:
1616 (WebCore::ImageDecoderQt::filenameExtension):
1617 * platform/graphics/qt/ImageDecoderQt.h:
1618 * platform/graphics/qt/ImageSourceQt.cpp:
1619 (WebCore::ImageSource::filenameExtension):
1621 2008-12-19 Adam Barth <abarth@webkit.org>
1623 Reviewed by Darin Alder.
1625 Implement ImageSource::filenameExtension for Cario
1626 https://bugs.webkit.org/show_bug.cgi?id=22905
1628 * platform/graphics/cairo/ImageSourceCairo.cpp:
1629 (WebCore::ImageSource::filenameExtension):
1630 * platform/image-decoders/ImageDecoder.h:
1631 * platform/image-decoders/bmp/BMPImageDecoder.h:
1632 (WebCore::BMPImageDecoder::filenameExtension):
1633 * platform/image-decoders/gif/GIFImageDecoder.h:
1634 (WebCore::GIFImageDecoder::filenameExtension):
1635 * platform/image-decoders/ico/ICOImageDecoder.h:
1636 (WebCore::ICOImageDecoder::filenameExtension):
1637 * platform/image-decoders/jpeg/JPEGImageDecoder.h:
1638 (WebCore::JPEGImageDecoder::filenameExtension):
1639 * platform/image-decoders/png/PNGImageDecoder.h:
1640 (WebCore::PNGImageDecoder::filenameExtension):
1641 * platform/image-decoders/xbm/XBMImageDecoder.h:
1642 (WebCore::XBMImageDecoder::filenameExtension):
1644 2008-12-18 Dan Bernstein <mitz@apple.com>
1646 Reviewed by Sam Weinig.
1648 - avoid using the ResourceHandle-level credential storage, if any,
1649 unless the client opts to use it; when use of the credential
1650 storage is disallowed, all authentication challenges are sent to
1652 - let the FrameLoaderClient decide whether to use the credential
1655 * loader/EmptyClients.h:
1656 (WebCore::EmptyFrameLoaderClient::shouldUseCredentialStorage): Added.
1658 * loader/FrameLoader.cpp:
1659 (WebCore::FrameLoader::shouldUseCredentialStorage): Added. Calls through
1660 to the FrameLoaderClient.
1661 * loader/FrameLoader.h: Declared shouldUseCredentialStorage().
1662 * loader/FrameLoaderClient.h: Declared shouldUseCredentialStorage().
1663 * loader/ResourceLoader.cpp:
1664 (WebCore::ResourceLoader::shouldUseCredentialStorage): Added. Calls
1665 through to the FrameLoader.
1666 * loader/ResourceLoader.h:
1667 (WebCore::ResourceLoader::shouldUseCredentialStorage): Implemented this
1668 ResourceHandleClient method.
1669 * loader/SubresourceLoader.cpp:
1670 (WebCore::SubresourceLoader::shouldUseCredentialStorage): Added.
1671 Overrides the ResourceLoader implementation by letting the client
1672 supply the return value. If the client does not do this, continues
1673 with the ResourceLoader behavior of asking the FrameLoader.
1674 * loader/SubresourceLoader.h: Removed an unused #include and declared
1675 shouldUseCredentialStorage().
1676 * loader/SubresourceLoaderClient.h:
1677 (WebCore::SubresourceLoaderClient::getShouldUseCredentialStorage):
1678 Added a default implementation which returns false, meaning the client
1679 does not wish to decide whether the credential storage should be used.
1680 * platform/network/ResourceHandle.h: Removed unused forward declarations.
1681 Declared a new member function, shouldUseCredentialStorage(), on Mac and
1682 CFNetwork-using builds.
1683 * platform/network/ResourceHandleClient.h:
1684 (WebCore::ResourceHandleClient::shouldUseCredentialStorage): Added this
1685 default implementation that returns false.
1686 * platform/network/cf/ResourceHandleCFNet.cpp:
1687 (WebCore::findCFNetworkModule): Added. Returns a handle to the CFNetwork
1689 (WebCore::cfNetworkVersion): Added. Returns the high word of the
1690 CFNetwork library's product version.
1691 (WebCore::highestSupportedCFURLConnectionClientVersion): Added. Returns
1692 the highest version of the CFURLConnectionClient structure supported by
1693 the CFNetwork library. The only reason to check this at runtime is
1694 that WebKit may be linking at runtime against an older version of
1695 CFNetwork than the one it was built with, as is the case with nightly
1697 (WebCore::shouldUseCredentialStorageCallback): Added this
1698 CFURLConnection callback which calls through to
1699 ResourceHandle::shouldUseCredentialStorage().
1700 (WebCore::ResourceHandle::start): Pass a version 3 CFURLConnectionClient
1701 including the shouldUseCredentialStorage callback. At runtime, clamp the
1702 client structure version down to the highest supported by CFNetwork.
1703 (WebCore::ResourceHandle::shouldUseCredentialStorage): Added. Calls through
1704 to the client if there is one. Otherwise returns false.
1705 * platform/network/mac/ResourceHandleMac.mm:
1706 (WebCore::ResourceHandle::shouldUseCredentialStorage): Ditto.
1707 (-[WebCoreResourceHandleAsDelegate connectionShouldUseCredentialStorage:]):
1708 Added this delegate method which callls through to
1709 ResourceHandle::shouldUseCredentialStorage().
1711 2008-12-18 David Kilzer <ddkilzer@apple.com>
1713 Reset role to "Private" on 6 header files to fix clean builds after r39378
1715 Reviewed by BUILD FIX.
1717 * WebCore.xcodeproj/project.pbxproj: Added back "Private" role
1718 that was lost on 6 headers when they were "moved":
1719 AffineTransform.h, Animation.h, AnimationList.h,
1720 TimingFunction.h, TransformOperation.h and
1721 TransformOperations.h.
1723 2008-12-18 Pamela Greene <pam@chromium.org>
1725 Reviewed by Dan Bernstein.
1727 Add initializer for m_textDirectionSubmenuInclusionBehavior.
1728 https://bugs.webkit.org/show_bug.cgi?id=22926
1730 * page/Settings.cpp:
1731 (WebCore::Settings::Settings): Initialize m_textDirectionSubmenuInclusionBehavior
1733 2008-12-18 Sam Weinig <sam@webkit.org>
1735 Reviewed by John Sullivan.
1737 Add new FrameLoaderClient method to indicate the first visually
1738 non-empty layout based on an heuristic. Right now that heuristic
1739 is the first layout after an image, text or plugin has been added
1740 to the render tree, but I can imagine it becoming much smarter.
1742 * loader/EmptyClients.h:
1743 (WebCore::EmptyFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
1744 * loader/FrameLoader.cpp:
1745 (WebCore::FrameLoader::didFirstVisuallyNonEmptyLayout):
1746 * loader/FrameLoader.h:
1747 * loader/FrameLoaderClient.h:
1748 * page/FrameView.cpp:
1749 (WebCore::FrameViewPrivate::reset):
1750 (WebCore::FrameView::layout):
1751 (WebCore::FrameView::performPostLayoutTasks):
1752 (WebCore::FrameView::setIsVisuallyNonEmpty):
1754 * rendering/RenderImage.cpp:
1755 (WebCore::RenderImage::RenderImage):
1756 * rendering/RenderPartObject.cpp:
1757 (WebCore::RenderPartObject::RenderPartObject):
1758 * rendering/RenderText.cpp:
1759 (WebCore::RenderText::RenderText):
1761 2008-12-18 Darin Adler <darin@apple.com>
1763 Reviewed by Sam Weinig.
1765 - fix <rdar://problem/6449841> reduce memory use of ResourceResponseBase by removing two maps
1767 We were parsing the cache-control and pragma header field values into maps.
1768 I changed that so instead we only cache two bits with the data we were actually
1769 using. Later we might want to move this responsibility out of this class entirely;
1770 we can cache it at the higher level instead.
1772 * loader/CachedResource.cpp:
1773 (WebCore::CachedResource::mustRevalidate): Changed to call a specific API to get at
1774 the bits in quest instead of a general "cache control directives" API.
1776 * platform/network/ResourceResponseBase.cpp:
1777 (WebCore::ResourceResponseBase::setHTTPHeaderField): Remove the logic for the
1778 pragma header field since no one is using this for now.
1779 (WebCore::ResourceResponseBase::parseCacheControlDirectives): Eliminated the return
1780 value and made this function have side effects only. Changed it so it's the caller's
1781 responsibility to check m_haveParsedCacheControl. Set m_cacheControlContainsNoCache
1782 and m_cacheControlContainsMustRevalidate rather than keeping a map around.
1784 * platform/network/ResourceResponseBase.h:
1785 (WebCore::ResourceResponseBase::cacheControlContainsNoCache): Added.
1786 (WebCore::ResourceResponseBase::cacheControlContainsMustRevalidate): Added.
1787 (WebCore::ResourceResponseBase::ResourceResponseBase): Updated since I removed
1788 m_haveParsedCacheControl and renamed m_haveParsedCacheControlHeader to remove
1789 the imprecise use of the term "header".
1791 2008-12-18 Steve Falkenburg <sfalken@apple.com>
1794 Delete 2nd copy of code in these files.
1796 * platform/animation/Animation.cpp:
1797 * platform/animation/Animation.h:
1798 * platform/animation/AnimationList.cpp:
1799 * platform/animation/AnimationList.h:
1800 * platform/animation/TimingFunction.h:
1801 * platform/graphics/transforms/AffineTransform.cpp:
1802 * platform/graphics/transforms/AffineTransform.h:
1803 * platform/graphics/transforms/IdentityTransformOperation.h:
1804 * platform/graphics/transforms/MatrixTransformOperation.cpp:
1805 * platform/graphics/transforms/MatrixTransformOperation.h:
1806 * platform/graphics/transforms/RotateTransformOperation.cpp:
1807 * platform/graphics/transforms/RotateTransformOperation.h:
1808 * platform/graphics/transforms/ScaleTransformOperation.cpp:
1809 * platform/graphics/transforms/ScaleTransformOperation.h:
1810 * platform/graphics/transforms/SkewTransformOperation.cpp:
1811 * platform/graphics/transforms/SkewTransformOperation.h:
1812 * platform/graphics/transforms/TransformOperation.h:
1813 * platform/graphics/transforms/TransformOperations.cpp:
1814 * platform/graphics/transforms/TransformOperations.h:
1815 * platform/graphics/transforms/TranslateTransformOperation.cpp:
1816 * platform/graphics/transforms/TranslateTransformOperation.h:
1818 2008-12-18 Dimitri Glazkov <dglazkov@chromium.org>
1820 Reviewed by Geoffrey Garen.
1822 https://bugs.webkit.org/show_bug.cgi?id=22859
1823 Abstract away the use of JSDOMWindow in CachedPage and introduce
1824 ScriptCachedPageData abstraction.
1826 * GNUmakefile.am: Added ScriptCachedPageData to project.
1827 * WebCore.pro: Added ScriptCachedPageData to project.
1828 * WebCore.vcproj/WebCore.vcproj: Added ScriptCachedPageData to project.
1829 * WebCore.xcodeproj/project.pbxproj: Added ScriptCachedPageData to
1831 * bindings/js/ScriptCachedPageData.cpp: Added.
1832 (WebCore::ScriptCachedPageData::ScriptCachedPageData):
1833 (WebCore::ScriptCachedPageData::~ScriptCachedPageData):
1834 (WebCore::ScriptCachedPageData::restore):
1835 (WebCore::ScriptCachedPageData::clear):
1836 * bindings/js/ScriptCachedPageData.h: Added.
1837 * history/CachedPage.cpp: Replaced JSDOMWindow and ProtectedPtr with
1838 ScriptCachedPageData.
1839 (WebCore::CachedPage::CachedPage):
1840 (WebCore::CachedPage::domWindow):
1841 (WebCore::CachedPage::restore):
1842 (WebCore::CachedPage::clear):
1843 * history/CachedPage.h: Replaced JSDOMWindow and ProtectedPtr with
1844 ScriptCachedPageData.
1846 2008-12-18 Chris Marrin <cmarrin@apple.com>
1848 Reviewed by Dave Hyatt.
1850 https://bugs.webkit.org/show_bug.cgi?id=22888
1852 To avoid future dependency issues, all the TransformOperations and Animation related files need to be moved to platform
1854 * WebCore.xcodeproj/project.pbxproj:
1855 * platform/animation: Added.
1856 * platform/animation/Animation.cpp: Copied from WebCore/rendering/style/Animation.cpp.
1857 * platform/animation/Animation.h: Copied from WebCore/rendering/style/Animation.h.
1858 * platform/animation/AnimationList.cpp: Copied from WebCore/rendering/style/AnimationList.cpp.
1859 * platform/animation/AnimationList.h: Copied from WebCore/rendering/style/AnimationList.h.
1860 * platform/animation/TimingFunction.h: Copied from WebCore/rendering/style/TimingFunction.h.
1861 * platform/graphics/AffineTransform.cpp: Removed.
1862 * platform/graphics/AffineTransform.h: Removed.
1863 * platform/graphics/transforms: Added.
1864 * platform/graphics/transforms/AffineTransform.cpp: Copied from WebCore/platform/graphics/AffineTransform.cpp.
1865 * platform/graphics/transforms/AffineTransform.h: Copied from WebCore/platform/graphics/AffineTransform.h.
1866 * platform/graphics/transforms/IdentityTransformOperation.h: Copied from WebCore/rendering/style/IdentityTransformOperation.h.
1867 * platform/graphics/transforms/MatrixTransformOperation.cpp: Copied from WebCore/rendering/style/MatrixTransformOperation.cpp.
1868 * platform/graphics/transforms/MatrixTransformOperation.h: Copied from WebCore/rendering/style/MatrixTransformOperation.h.
1869 * platform/graphics/transforms/RotateTransformOperation.cpp: Copied from WebCore/rendering/style/RotateTransformOperation.cpp.
1870 * platform/graphics/transforms/RotateTransformOperation.h: Copied from WebCore/rendering/style/RotateTransformOperation.h.
1871 * platform/graphics/transforms/ScaleTransformOperation.cpp: Copied from WebCore/rendering/style/ScaleTransformOperation.cpp.
1872 * platform/graphics/transforms/ScaleTransformOperation.h: Copied from WebCore/rendering/style/ScaleTransformOperation.h.
1873 * platform/graphics/transforms/SkewTransformOperation.cpp: Copied from WebCore/rendering/style/SkewTransformOperation.cpp.
1874 * platform/graphics/transforms/SkewTransformOperation.h: Copied from WebCore/rendering/style/SkewTransformOperation.h.
1875 * platform/graphics/transforms/TransformOperation.h: Copied from WebCore/rendering/style/TransformOperation.h.
1876 * platform/graphics/transforms/TransformOperations.cpp: Copied from WebCore/rendering/style/TransformOperations.cpp.
1877 * platform/graphics/transforms/TransformOperations.h: Copied from WebCore/rendering/style/TransformOperations.h.
1878 * platform/graphics/transforms/TranslateTransformOperation.cpp: Copied from WebCore/rendering/style/TranslateTransformOperation.cpp.
1879 * platform/graphics/transforms/TranslateTransformOperation.h: Copied from WebCore/rendering/style/TranslateTransformOperation.h.
1880 * rendering/style/Animation.cpp: Removed.
1881 * rendering/style/Animation.h: Removed.
1882 * rendering/style/AnimationList.cpp: Removed.
1883 * rendering/style/AnimationList.h: Removed.
1884 * rendering/style/IdentityTransformOperation.h: Removed.
1885 * rendering/style/MatrixTransformOperation.cpp: Removed.
1886 * rendering/style/MatrixTransformOperation.h: Removed.
1887 * rendering/style/RotateTransformOperation.cpp: Removed.
1888 * rendering/style/RotateTransformOperation.h: Removed.
1889 * rendering/style/ScaleTransformOperation.cpp: Removed.
1890 * rendering/style/ScaleTransformOperation.h: Removed.
1891 * rendering/style/SkewTransformOperation.cpp: Removed.
1892 * rendering/style/SkewTransformOperation.h: Removed.
1893 * rendering/style/TimingFunction.h: Removed.
1894 * rendering/style/TransformOperation.h: Removed.
1895 * rendering/style/TransformOperations.cpp: Removed.
1896 * rendering/style/TransformOperations.h: Removed.
1897 * rendering/style/TranslateTransformOperation.cpp: Removed.
1898 * rendering/style/TranslateTransformOperation.h: Removed.
1900 2008-12-18 Cameron Zwarich <zwarich@apple.com>
1902 Reviewed by Geoff Garen.
1904 Bug 21855: REGRESSION (r37323): Gmail complains about popup blocking when opening a link
1905 <https://bugs.webkit.org/show_bug.cgi?id=21855>
1906 <rdar://problem/6278244>
1908 If JavaScript is not currently executing, the handleEvent member function
1909 of JSAbstractEventListener should set the dynamic global object to the
1910 global object of the context in which the event occurred.
1912 If this is not set, then JavaScriptCore will simply take the global object
1913 of the context where the event handler function was created, which may be
1914 a different frame. This will cause the popup blocker to incorrectly block
1915 windows opened from onclick events inside of an iframe whose handler was
1916 created in the outer frame, as it will check the outer frame and see that
1917 it is not processing any events.
1919 * bindings/js/JSEventListener.cpp:
1920 (WebCore::JSAbstractEventListener::handleEvent):
1922 2008-12-17 Simon Fraser <simon.fraser@apple.com>
1924 Reviewed by Dave Hyatt
1926 https://bugs.webkit.org/show_bug.cgi?id=22570
1928 Add the ability to compute clip rects independently from
1929 caching them on the RenderLayer. When painting reflections, use
1930 such temporarily computed clipRects, otherwise the layer may cache
1931 clipRects which are invalid, since they have been computed with
1932 a rootLayer that is not the one usually used to paint.
1934 Test: fast/reflections/reflection-overflow-hidden.html
1936 * rendering/RenderLayer.cpp:
1937 (WebCore::RenderLayer::paintLayer):
1938 (WebCore::RenderLayer::hitTestLayer):
1939 (WebCore::RenderLayer::updateClipRects):
1940 (WebCore::RenderLayer::calculateClipRects):
1941 (WebCore::RenderLayer::calculateRects):
1942 * rendering/RenderLayer.h:
1943 (WebCore::ClipRects::ClipRects):
1944 (WebCore::ClipRects::reset):
1945 (WebCore::ClipRects::overflowClipRect):
1946 (WebCore::ClipRects::setOverflowClipRect):
1947 (WebCore::ClipRects::fixedClipRect):
1948 (WebCore::ClipRects::setFixedClipRect):
1949 (WebCore::ClipRects::posClipRect):
1950 (WebCore::ClipRects::setPosClipRect):
1951 (WebCore::ClipRects::setFixed):
1952 (WebCore::ClipRects::operator==):
1953 (WebCore::ClipRects::operator=):
1954 * rendering/RenderReplica.cpp:
1955 (WebCore::RenderReplica::paint):
1957 2008-12-17 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1959 Reviewed by Simon Hausmann.
1961 https://bugs.webkit.org/show_bug.cgi?id=22618
1963 Fix MinGW QtWebKit linking problems and also make the
1964 QtWebKit build system more robust.
1968 2008-12-17 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
1970 Reviewed by Maciej Stachowiak.
1972 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22866
1974 wml.css is based on an older copy of html4.css. Synchronize them.
1975 Remove all entries, that are irrelevant for WML.
1977 Fix <do> appearance: should behave like HTMLs <button>.
1981 2008-12-17 Yury Semikhatsky <yurys@google.com>
1983 Reviewed by Timothy Hatcher.
1984 Landed by Adam Barth.
1986 Added more checks that WebInspector.panels.{resources,scripts} are
1987 defined where they are accessed from other panels and WebInspector
1988 (some panels are not yet supported in Chrome).
1990 * inspector/front-end/Console.js:
1991 (WebInspector.Console.prototype.addMessage):
1992 (WebInspector.Console.prototype.clearMessages):
1993 (WebInspector.Console.prototype.completions):
1994 * inspector/front-end/ObjectPropertiesSection.js:
1995 (WebInspector.ObjectPropertyTreeElement.prototype.evaluateExpression):
1996 * inspector/front-end/ScriptsPanel.js:
1997 (WebInspector.ScriptsPanel.prototype.get searchableViews):
1998 (WebInspector.ScriptsPanel.prototype._sourceViewForScriptOrResource):
1999 (WebInspector.ScriptsPanel.prototype._sourceFrameForScriptOrResource):
2000 (WebInspector.ScriptsPanel.prototype._showScriptOrResource):
2001 * inspector/front-end/SourceView.js:
2002 (WebInspector.SourceView.prototype._addBreakpoint):
2003 * inspector/front-end/inspector.js:
2004 (WebInspector.addResource):
2005 (WebInspector.removeResource):
2006 (WebInspector.showResourceForURL):
2008 2008-12-17 Cary Clark < caryclark@google.com>
2010 Reviewed by Darin Adler.
2011 Landed by Adam Barth.
2013 Add ENABLE_TEXT_CARET to permit the ANDROID platform
2014 to invalidate and draw the caret in a separate thread.
2017 (WebCore::Frame::clearCaretRectIfNeeded): Body of
2018 function does nothing if text caret is disabled.
2019 (WebCore::Frame::selectionLayoutChanged): Do nothing
2020 if text caret is disabled and the caret only blinked.
2021 (WebCore::Frame::caretBlinkTimerFired):
2022 (WebCore::Frame::paintCaret):
2023 (WebCore::Frame::paintDragCaret): Body of
2024 functions does nothing if text caret is disabled.
2026 2008-12-16 Darin Adler <darin@apple.com>
2028 Reviewed and landed by Cameron Zwarich.
2030 Change the style of AtomicString::add() to match Identifier:add().
2032 * platform/text/AtomicString.cpp:
2033 (WebCore::AtomicString::add):
2035 2008-12-16 Adele Peterson <adele@apple.com>
2037 Reviewed by Darin Adler.
2039 Fix for https://bugs.webkit.org/show_bug.cgi?id=22827
2040 <rdar://problem/6247724> RenderThemeWin buttons have weird heavy text
2042 * rendering/RenderThemeWin.cpp:
2043 (WebCore::fillFontDescription): Add version that takes a font size.
2044 (WebCore::RenderThemeWin::systemFont): Use the default GUI font for control fonts, but specify the size.
2045 This will match Firefox.
2047 2008-12-16 Stephanie Lewis <slewis@apple.com>
2051 * platform/text/AtomicString.h:
2052 (WebCore::AtomicString::AtomicString):
2054 2008-12-16 Stephanie Lewis <slewis@apple.com>
2058 * platform/text/AtomicString.h:
2059 (WebCore::AtomicString::AtomicString):
2060 (WebCore::AtomicString::createCFString):
2062 2008-12-16 Peter Kasting <pkasting@google.com>
2064 Reviewed by David Hyatt.
2066 https://bugs.webkit.org/show_bug.cgi?id=22885
2067 Fix memory corruption in GIFImageDecoder.cpp with certain GIFs.
2069 * platform/image-decoders/gif/GIFImageDecoder.cpp:
2070 (WebCore::GIFImageDecoder::frameComplete):
2072 2008-12-16 Stephanie Lewis <slewis@apple.com>
2074 Reviewed by Geoff Garen.
2076 Change HTTPHeaderMap to use an AtomicString as its key.
2077 Shaves ~1MB off of the Mozilla Memory Test
2078 No functionality difference
2080 * WebCore.xcodeproj/project.pbxproj:
2081 * inspector/InspectorController.cpp:
2082 (WebCore::addHeaders):
2083 * loader/appcache/ApplicationCacheStorage.cpp:
2084 (WebCore::parseHeader):
2085 * platform/network/HTTPHeaderMap.h:
2086 * platform/network/ResourceRequestBase.cpp:
2087 (WebCore::ResourceRequestBase::httpHeaderField):
2088 (WebCore::ResourceRequestBase::setHTTPHeaderField):
2089 (WebCore::ResourceRequestBase::addHTTPHeaderField):
2090 * platform/network/ResourceRequestBase.h:
2091 * platform/network/ResourceResponseBase.cpp:
2092 (WebCore::ResourceResponseBase::httpHeaderField):
2093 (WebCore::ResourceResponseBase::setHTTPHeaderField):
2094 * platform/network/ResourceResponseBase.h:
2095 * platform/text/StringHash.h:
2096 (WebCore::CaseFoldingHash::hash):
2097 (WebCore::CaseFoldingHash::equal):
2098 * xml/XMLHttpRequest.cpp:
2099 (WebCore::isSetCookieHeader):
2100 (WebCore::XMLHttpRequest::setRequestHeader):
2101 (WebCore::XMLHttpRequest::setRequestHeaderInternal):
2102 (WebCore::XMLHttpRequest::getRequestHeader):
2103 (WebCore::XMLHttpRequest::getResponseHeader):
2104 * xml/XMLHttpRequest.h:
2106 2008-12-16 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
2108 Reviewed by Darin Adler.
2110 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22876
2112 Remove legacy randomNumber() functionality from HTMLFormElement, and use the new wtf/RandomNumber.h.
2113 Also remove an uneeded QFileInfo include while I'm at it - there is no Qt usage in this file.
2115 * ForwardingHeaders/wtf/RandomNumber.h: Added.
2116 * html/HTMLFormElement.cpp:
2117 (WebCore::getUniqueBoundaryString):
2119 2008-12-16 Yael Aharon <yael.aharon@nokia.com>
2121 Reviewed by Tor Arne Vestbø.
2125 * platform/win/SystemTimeWin.cpp:
2127 2008-12-16 Kalle Vahlman <kalle.vahlman@movial.com>
2129 Reviewed by Holger Freyther.
2131 [CURL] memory leak of ResouceHandles
2132 http://bugs.webkit.org/show_bug.cgi?id=20777
2134 Fix ResourceHandle ref management to be consistent and correct.
2135 Original patch from Marco Barisione.
2137 * platform/network/curl/ResourceHandleCurl.cpp:
2138 (WebCore::ResourceHandle::start):
2139 * platform/network/curl/ResourceHandleManager.cpp:
2140 (WebCore::ResourceHandleManager::removeFromCurl):
2141 (WebCore::ResourceHandleManager::add):
2142 (WebCore::ResourceHandleManager::removeScheduledJob):
2144 2008-12-16 Simon Hausmann <simon.hausmann@nokia.com>
2148 * platform/graphics/qt/ImageSourceQt.cpp:
2149 (WebCore::ImageSource::clear): Adjust to new signature.
2151 2008-12-15 Mark Rowe <mrowe@apple.com>
2153 Rubber-stamped by Cameron Zwarich.
2155 <rdar://problem/6289933> Change WebKit-related projects to build with GCC 4.2 on Leopard.
2157 * Configurations/Base.xcconfig:
2158 * Configurations/DebugRelease.xcconfig:
2160 2008-12-15 Adele Peterson <adele@apple.com>
2162 Reviewed by Darin Adler.
2164 Fix for https://bugs.webkit.org/show_bug.cgi?id=22871
2165 <rdar://problem/6417316> RenderThemeWin buttons are too short/thin
2167 * rendering/RenderButton.cpp: (WebCore::RenderButton::setupInnerStyle):
2168 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.
2170 2008-12-15 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
2172 Reviewed by Oliver Hunt.
2174 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22865
2176 Add complete WML <table> / <tr> / <td> element support.
2177 Proper handling of all table related attributes, including tests.
2179 Tests: fast/wml/table-element-align-attribute-invalid.wml (variable reference in 'align' attribute, raises error)
2180 fast/wml/table-element-columns-attribute-invalid-number.wml (columns='0', raises error)
2181 fast/wml/table-element-columns-attribute-invalid.wml (non-numeric 'columns' attribute value, raises error)
2182 fast/wml/table-element-columns-attribute-missing.wml (missing 'columns')
2183 fast/wml/table-element-columns-attribute.wml (test 'columns' attribute and <td> count mismatches)
2187 * WebCore.vcproj/WebCore.vcproj:
2188 * WebCore.xcodeproj/project.pbxproj:
2189 * rendering/RenderObject.cpp:
2190 (WebCore::RenderObject::offsetParent):
2191 * rendering/RenderTableRow.cpp:
2192 (WebCore::RenderTableRow::addChild):
2193 * wml/WMLTableElement.cpp: Added.
2194 (WebCore::WMLTableElement::WMLTableElement):
2195 (WebCore::WMLTableElement::~WMLTableElement):
2196 (WebCore::WMLTableElement::mapToEntry):
2197 (WebCore::WMLTableElement::parseMappedAttribute):
2198 (WebCore::WMLTableElement::finishParsingChildren):
2199 * wml/WMLTableElement.h: Added.
2200 * wml/WMLTagNames.in:
2202 2008-12-15 Darin Adler <darin@apple.com>
2204 Reviewed by Sam Weinig.
2206 - fix <rdar://problem/6427048> crash due to infinite recursion after setting window.__proto__ = window
2208 Test: fast/dom/Window/window-custom-prototype.html
2210 Replaced toGlobalObject with the more generally useful unwrappedObject.
2212 * bindings/js/JSDOMWindowShell.cpp:
2213 (WebCore::JSDOMWindowShell::unwrappedObject): Added.
2214 * bindings/js/JSDOMWindowShell.h: Declared unwrappedObject.
2215 * bindings/js/JSQuarantinedObjectWrapper.h:
2216 (WebCore::JSQuarantinedObjectWrapper::unwrappedObject): Ditto.
2218 2008-12-15 Gustavo Noronha Silva <kov@kov.eti.br>
2220 Reviewed by Mark Rowe.
2222 https://bugs.webkit.org/show_bug.cgi?id=22686
2228 2008-12-15 Sam Weinig <sam@webkit.org>
2230 Reviewed by Darin Adler.
2232 Fix for https://bugs.webkit.org/show_bug.cgi?id=22847
2233 Geolocation PositionOptions cannot be an arbitrary object.
2235 Allow the PositionOptions to be a vanilla JS object and parse it
2238 * DerivedSources.make: Remove PositionOptions.
2239 * GNUmakefile.am: Ditto.
2240 * WebCore.pro: Ditto.
2241 * WebCore.vcproj/WebCore.vcproj: Ditto.
2242 * WebCore.xcodeproj/project.pbxproj: Ditto.
2243 * WebCoreSources.bkl: Ditto.
2245 * bindings/js/JSGeolocationCustom.cpp:
2246 (WebCore::createPositionOptions): Added. Extracts the enableHighAccuracy
2247 and timeout fields from a vanilla JS object in order to create the
2248 PositionOptions object, checking for exceptions as necessary.
2249 (WebCore::JSGeolocation::getCurrentPosition): Use createPositionOptions
2250 instead of toPositionOptions.
2251 (WebCore::JSGeolocation::watchPosition): Ditto.
2252 * page/PositionOptions.idl: Removed
2254 2008-12-15 Peter Kasting <pkasting@google.com>
2256 Reviewed by David Hyatt.
2258 https://bugs.webkit.org/show_bug.cgi?id=22108
2259 Large animated GIFs weren't always animating. The code that deleted
2260 the entire decoder after each frame of a large image was resulting in
2261 us forgetting the loop count, breaking animations intermittently.
2263 Instead of throwing the whole decoder away, we're more careful to just
2264 delete frames we don't care about. This additionally addresses
2265 problems in the Cairo and Chromium ports with excessive peak memory
2266 use and CPU use when decoding large animated GIFs because it leads to
2267 much less redecoding (O(n) instead of O(n^2) CPU, and O(1) instead of
2270 This change has less impact on the CG decoder, which seems to throw
2271 away frames automatically when their external references are dropped;
2272 this means the CG decoder didn't suffer from the peak memory usage
2273 issue before (and still doesn't), but it also still burns excessive
2274 CPU redecoding earlier frames, that in theory it wouldn't need to
2275 redecode if it would judiciously save the most recent frames. At
2276 least this patch plumbs some useful info to the ImageSource so it can
2277 help guide the CG decoder heuristics in the future.
2279 * platform/graphics/BitmapImage.cpp:
2280 (WebCore::frameBytes):
2281 (WebCore::BitmapImage::destroyDecodedData):
2282 (WebCore::BitmapImage::destroyDecodedDataIfNecessary):
2283 (WebCore::BitmapImage::destroyMetadataAndNotify):
2284 (WebCore::BitmapImage::clearFrame):
2285 (WebCore::BitmapImage::cacheFrame):
2286 (WebCore::BitmapImage::dataChanged):
2287 (WebCore::BitmapImage::startAnimation):
2288 (WebCore::BitmapImage::resetAnimation):
2289 (WebCore::BitmapImage::internalAdvanceAnimation):
2290 * platform/graphics/BitmapImage.h:
2291 * platform/graphics/GeneratedImage.h:
2292 (WebCore::GeneratedImage::destroyDecodedData):
2293 * platform/graphics/Image.h:
2294 * platform/graphics/ImageSource.h:
2295 * platform/graphics/cairo/ImageSourceCairo.cpp:
2296 (WebCore::ImageSource::~ImageSource):
2297 (WebCore::ImageSource::clear):
2298 * platform/graphics/cg/ImageSourceCG.cpp:
2299 (WebCore::ImageSource::~ImageSource):
2300 (WebCore::ImageSource::clear):
2301 * platform/graphics/cg/PDFDocumentImage.h:
2302 (WebCore::PDFDocumentImage::destroyDecodedData):
2303 * platform/graphics/qt/StillImageQt.h:
2304 (WebCore::StillImage::destroyDecodedData):
2305 * platform/image-decoders/ImageDecoder.h:
2306 (WebCore::RGBA32Buffer::clear):
2307 (WebCore::ImageDecoder::clearFrameBufferCache):
2308 * platform/image-decoders/gif/GIFImageDecoder.cpp:
2309 (WebCore::GIFImageDecoder::repetitionCount):
2310 (WebCore::GIFImageDecoder::clearFrameBufferCache):
2311 (WebCore::GIFImageDecoder::initFrameBuffer):
2312 * platform/image-decoders/gif/GIFImageDecoder.h:
2313 * platform/image-decoders/gif/GIFImageReader.h:
2314 (GIFImageReader::GIFImageReader):
2315 * svg/graphics/SVGImage.h:
2316 (WebCore::SVGImage::destroyDecodedData):
2318 2008-12-15 Cameron Zwarich <zwarich@apple.com>
2320 Reviewed by Darin Adler.
2322 Bug 22562: REGRESSION (r37971): events not firing after going back in back/forward cache
2323 <https://bugs.webkit.org/show_bug.cgi?id=22562>
2324 <rdar://problem/6414593>
2326 Restore the Frame's DOMWindow to its previous value when going back in
2327 the back/forward cache. The fact that it was not getting set before may
2328 have always caused some subtle bugs with the back/forward cache, but
2329 after r37971, it causes no events to fire after restoring a page.
2331 Previously, ScriptController::clearScriptObjects() was calling
2332 clearPlatformScriptObjects(), which was not actually clearing any
2333 objects, only updating them to reflect some change in state. Since the
2334 window shell was not updated until after the call to clearScriptObjects(),
2335 this didn't actually make that much sense.
2337 We rename clearPlatformScriptObjects() to reflect its actual purpose and
2338 call it after the window shell has been updated rather than before.
2340 Unfortunately, there is no way to test this with a layout test because
2341 it involves the back/forward cache.
2343 * bindings/js/ScriptController.cpp:
2344 (WebCore::ScriptController::updatePlatformScriptObjects): Renamed from
2345 clearPlatformScriptObjects(), because the only nonempty implementation
2346 doesn't actually clear any objects, it updates them. Also made public.
2347 (WebCore::ScriptController::clearScriptObjects): Remove the call to
2348 clearPlatformScriptObjects().
2349 * bindings/js/ScriptController.h:
2350 * bindings/js/ScriptControllerMac.mm:
2351 (WebCore::ScriptController::updatePlatformScriptObjects):
2352 * history/CachedPage.cpp:
2353 (WebCore::CachedPage::domWindow): Added.
2354 * history/CachedPage.h:
2355 * loader/FrameLoader.cpp:
2356 (WebCore::FrameLoader::cancelAndClear): Added call to updatePlatformScriptObjects().
2357 (WebCore::FrameLoader::begin): Added call to updatePlatformScriptObjects().
2358 (WebCore::FrameLoader::open): Added call to updatePlatformScriptObjects().
2360 (WebCore::Frame::setDOMWindow): Added.
2361 (WebCore::Frame::pageDestroyed): Added call to updatePlatformScriptObjects().
2364 2008-12-15 Antti Koivisto <antti@apple.com>
2366 Reviewed by Darin Adler.
2368 When a resource is cached locally, WebKit should follow RFC 2616 "Specific end-to-end revalidation" instead of "Unspecified end-to-end revalidation"
2369 https://bugs.webkit.org/show_bug.cgi?id=17998
2371 - Enable conditional revalidation for reloads by default.
2372 - Add a parameter to FrameLoader::reload() for forcing end-to-end reload.
2373 - To avoid duplicating state remove m_cachePolicy variables from FrameLoader and DocLoader.
2374 Instead synthezise the policy on demand.
2376 This speeds up reloads and makes them use way less bandwidth.
2379 * loader/CachePolicy.h: Rename CachePolicyRefresh to CachePolicyRevalidate.
2381 * loader/DocLoader.cpp:
2382 (WebCore::DocLoader::DocLoader):
2383 (WebCore::DocLoader::checkForReload): Support CachePolicyRevalidate.
2384 (WebCore::DocLoader::requestResource):
2385 (WebCore::DocLoader::cachePolicy):
2386 * loader/DocLoader.h: Get rid of m_cachePolicy member.
2387 * loader/FrameLoader.cpp:
2388 (WebCore::ScheduledRedirection::ScheduledRedirection):
2389 Add parameter to differentiate refresh from other types of redirects.
2390 m_cachePolicy was used for signaling this before.
2391 (WebCore::isBackForwardLoadType):
2392 (WebCore::FrameLoader::FrameLoader):
2393 (WebCore::FrameLoader::changeLocation):
2394 (WebCore::FrameLoader::stopLoading):
2395 (WebCore::FrameLoader::receivedFirstData):
2396 (WebCore::FrameLoader::write):
2397 (WebCore::FrameLoader::startIconLoader):
2398 (WebCore::FrameLoader::restoreDocumentState):
2399 (WebCore::FrameLoader::scheduleHTTPRedirection):
2400 (WebCore::FrameLoader::scheduleLocationChange):
2401 (WebCore::FrameLoader::scheduleRefresh):
2402 (WebCore::FrameLoader::redirectionTimerFired):
2403 (WebCore::FrameLoader::canCachePage):
2404 (WebCore::FrameLoader::loadURL):
2405 (WebCore::FrameLoader::reload):
2406 Differentiate between revalidation and reload.
2407 No need to use setHTTPHeaderField here, addExtraFieldsToRequest will set the headers.
2408 (WebCore::FrameLoader::transitionToCommitted):
2409 (WebCore::FrameLoader::cachePolicy): Determine the cache policy based on current load type.
2410 (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
2411 (WebCore::FrameLoader::addExtraFieldsToRequest): Set Cache-control: no-cache for FrameLoadTypeReloadFromOrigin
2412 (WebCore::FrameLoader::shouldScrollToAnchor):
2413 (WebCore::FrameLoader::loadItem):
2414 (WebCore::FrameLoader::updateHistoryForReload):
2415 (WebCore::FrameLoader::updateHistoryForCommit):
2416 (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
2417 * loader/FrameLoader.h:
2418 * loader/FrameLoaderTypes.h: Add FrameLoadTypeReloadFromOrigin
2420 * loader/NavigationAction.cpp:
2421 (WebCore::navigationType): Support FrameLoadTypeReloadFromOrigin
2422 * loader/loader.cpp:
2423 (WebCore::Loader::Host::servePendingRequests):
2425 2008-12-15 Holger Hans Peter Freyther <zecke@selfish.org>
2427 Reviewed by Simon Hausmann.
2429 Add null checks to PlatformScreenQt
2431 The other ports do the null checks and JSDOMWindowBase is
2432 at least one caller that is passing 0.
2434 * platform/qt/PlatformScreenQt.cpp:
2435 (WebCore::screenDepth):
2436 (WebCore::screenDepthPerComponent):
2437 (WebCore::screenIsMonochrome):
2438 (WebCore::screenRect):
2439 (WebCore::screenAvailableRect):
2441 2008-12-15 Alexey Proskuryakov <ap@webkit.org>
2443 Reviewed by Oliver Hunt.
2445 <rdar://problem/6444455> Worker Thread crash running multiple workers for a moderate amount of time
2447 * dom/WorkerThread.cpp: (WebCore::WorkerThread::workerThread):
2448 Detach the thread. Without this, one page of its stack was never unmmaped, and fragmentation
2449 made RegisterFile allocaiton fail after a while.
2451 2008-12-13 Darin Adler <darin@apple.com>
2453 Reviewed by Sam Weinig.
2455 - half of https://bugs.webkit.org/show_bug.cgi?id=17425
2456 eliminate DeprecatedPtrList
2459 (WebCore::Document::removeImage): Change to set slots in the vector
2460 to 0 rather than removing items from a list.
2461 (WebCore::Document::dispatchImageLoadEventsNow): Rewrite to process
2462 the list. Since we now use a "set to zero" design, we don't need to
2463 be careful about where the iterator points while iterating the list,
2464 instead we just have to skip zeros.
2466 * dom/Document.h: Use Vector instead of DeprecatedPtrList.
2468 * dom/EventTargetNode.cpp:
2469 (WebCore::EventTargetNode::dispatchGenericEvent): Use a Vector instead
2470 of a DeprecatedPtrList for the list of nodes to handle. Also streamlined
2471 the logic a bit and used goto in a couple key places.
2474 (WebCore::Node::eventParentNode): Moved this function into this file
2475 because it's a virtual function so already can't be inlined. Also updated
2476 to return a ContainerNode, so it needs to be in a place where the
2477 definition of ContainerNode is visible, not the header file.
2479 * dom/Node.h: Changed return type of eventParentNode to ContainerNode
2480 and moved its definition into the cpp file.
2482 * dom/XMLTokenizerLibxml2.cpp:
2483 (WebCore::PendingCallbacks::~PendingCallbacks): Added a call to
2484 deleteAllValues here instead of setAutoDelete in the constructor, since
2485 we're using Deque instead of DeprecatedPtrList.
2486 (WebCore::PendingCallbacks::callAndRemoveFirstCallback): Changed the
2487 code to use an OwnPtr since the deque won't delete the callback object.
2489 * editing/ApplyStyleCommand.cpp:
2490 (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange): Use a
2491 Vector instead of a DeprecatedPtrList.
2493 * svg/SVGElement.cpp:
2494 (WebCore::SVGElement::eventParentNode): Moved this function into this file
2495 because it's a virtual function so already can't be inlined. Also updated
2496 to return a ContainerNode.
2498 * svg/SVGElement.h: Changed setShadowParentNode to take a ContainerNode*,
2499 made eventParentNode return a ContainerNode*, and made m_shadowParent a
2502 2008-12-14 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
2504 Reviewed by George Staikos.
2506 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22857
2508 Jumps within a WML deck using <go> task elements fail. Manual reloading
2509 is necessary to display the page - fix cache-policy in WMLGoElement::executeTask
2510 to prevent the problem.
2512 Refactor setActiveCardInDocument in two new functions: findNamedCardInDocument
2513 and determineActiveCard, to fix a side-effect of executing a <go> task:
2514 when switching cards within a deck the active card was changed before the load
2515 was fired which resulted in a flash effect on the screen, and doing unnecessary work.
2517 Test: wml/go-task-animation.html
2519 * wml/WMLCardElement.cpp:
2520 (WebCore::WMLCardElement::findNamedCardInDocument):
2521 (WebCore::WMLCardElement::determineActiveCard):
2522 * wml/WMLCardElement.h:
2523 * wml/WMLDocument.cpp:
2524 (WebCore::WMLDocument::finishedParsing):
2525 * wml/WMLGoElement.cpp:
2526 (WebCore::WMLGoElement::executeTask):
2527 (WebCore::WMLGoElement::prepareGETRequest):
2528 * wml/WMLGoElement.h:
2530 2008-12-14 Dirk Schulze <krit@webkit.org>
2532 Reviewed by Oliver Hunt.
2534 Fixes an issue in cairo. A fully transparent color can cause wrong
2535 drawings on canvas' composite.
2537 https://bugs.webkit.org/show_bug.cgi?id=22846
2538 [CAIRO] Canvas: transparent color and composite
2540 Test: fast/canvas/canvas-transparency-and-composite.html
2542 * platform/graphics/cairo/GraphicsContextCairo.cpp:
2543 (WebCore::GraphicsContext::fillPath):
2544 (WebCore::GraphicsContext::strokePath):
2546 2008-12-13 Julien Chaffraix <jchaffraix@webkit.org>
2548 Reviewed by Darin Adler.
2550 Bug 22665: Remove setCreatedByParser(bool) from the few elements that use it
2551 https://bugs.webkit.org/show_bug.cgi?id=22665
2553 Remove setCreatedByParser from frame and iframe.
2555 * html/HTMLElementFactory.cpp:
2556 (WebCore::frameConstructor):
2557 (WebCore::iframeConstructor):
2558 (WebCore::objectConstructor):
2559 * html/HTMLFrameElement.cpp:
2560 (WebCore::HTMLFrameElement::HTMLFrameElement):
2561 * html/HTMLFrameElement.h:
2562 * html/HTMLFrameElementBase.cpp:
2563 (WebCore::HTMLFrameElementBase::HTMLFrameElementBase):
2564 * html/HTMLFrameElementBase.h:
2565 * html/HTMLFrameOwnerElement.cpp:
2566 (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement):
2567 * html/HTMLFrameOwnerElement.h:
2568 (WebCore::HTMLFrameOwnerElement::createdByParser):
2569 * html/HTMLIFrameElement.cpp:
2570 (WebCore::HTMLIFrameElement::HTMLIFrameElement):
2571 * html/HTMLIFrameElement.h:
2572 * html/HTMLPlugInElement.cpp:
2573 (WebCore::HTMLPlugInElement::HTMLPlugInElement):
2574 * html/HTMLTagNames.in:
2576 2008-12-13 Alexey Proskuryakov <ap@webkit.org>
2578 Reviewed by Darin Adler.
2580 https://bugs.webkit.org/show_bug.cgi?id=22843
2581 Auto-generate JSWorkerContext
2583 * bindings/scripts/CodeGeneratorJS.pm:
2584 * dom/WorkerContext.idl: Added.
2585 * page/DOMWindow.idl:
2586 Added ExtendsDOMGlobalObject, a new attribute for behaviors common to DOMWindow and
2589 * bindings/js/WorkerScriptController.cpp:
2590 (WebCore::WorkerScriptController::initScript):
2591 Made JSWorkerContext creation look more like JSDOMWindow creation, to work with generated code.
2593 * DerivedSources.make:
2597 * WebCore.vcproj/WebCore.vcproj:
2598 * WebCore.xcodeproj/project.pbxproj:
2599 * bindings/js/JSWorkerContext.cpp: Removed.
2600 * bindings/js/JSWorkerContext.h: Removed.
2601 * bindings/js/JSWorkerContextBase.cpp: Copied from WebCore/bindings/js/JSWorkerContext.cpp.
2602 (WebCore::JSWorkerContextBase::JSWorkerContextBase):
2603 (WebCore::JSWorkerContextBase::~JSWorkerContextBase):
2604 (WebCore::JSWorkerContextBase::scriptExecutionContext):
2605 (WebCore::getJSWorkerContextBaseTable):
2607 (WebCore::JSWorkerContextBase::put):
2608 * bindings/js/JSWorkerContextBase.h: Copied from WebCore/bindings/js/JSWorkerContext.h.
2609 * bindings/js/JSWorkerContextCustom.cpp: Added.
2610 (WebCore::JSWorkerContext::customGetOwnPropertySlot):
2611 (WebCore::JSWorkerContext::mark):
2612 (WebCore::JSWorkerContext::self):
2613 (WebCore::JSWorkerContext::setSelf):
2614 (WebCore::JSWorkerContext::addEventListener):
2615 (WebCore::JSWorkerContext::removeEventListener):
2616 Moved code around. Note that currently, JSWorkerContextBase lookup table is empty, but we'll
2617 need to add some global objects to it in the future, as it is done in JSDOMWindowBase.
2619 * page/WorkerNavigator.cpp:
2620 * page/WorkerNavigator.h:
2621 Added ENABLE(WORKERS) ifdefs.
2623 2008-12-13 Darin Adler <darin@apple.com>
2628 (WebCore::Node::rareData): Remove inappropriate inline directive.
2630 2008-12-13 Darin Adler <darin@apple.com>
2632 Reviewed by Dan Bernstein.
2634 - fix https://bugs.webkit.org/show_bug.cgi?id=18734
2635 REGRESSION (r31081): Focus problems in Gmail 2/Plain text message text
2636 <rdar://problem/5892415>
2638 Test: fast/forms/textarea-selection-preservation.html
2640 The regression reported was caused by the fact that the renderer code had
2641 a bug where it would constantly think the newline at the end of text was
2642 missing, and so it would replace all the text even though it wasn't changing,
2643 which would destroy the selection.
2645 When writing the regression test I discovered another problem: The value
2646 property in HTMLTextAreaElement was intentionally changing the selection
2647 to the end of the textarea, but doing that even when the value wasn't changing.
2649 This patch fixes both and the test checks both.
2651 * html/HTMLTextAreaElement.cpp:
2652 (WebCore::HTMLTextAreaElement::setValue): Exit early if the value is
2655 * rendering/RenderTextControl.cpp:
2656 (WebCore::RenderTextControl::text): Add a newline character for each <br>
2657 element encountered in the control
2659 2008-12-13 Darin Adler <darin@apple.com>
2661 - file deletion part of https://bugs.webkit.org/show_bug.cgi?id=17497
2662 eliminate DeprecatedValueList
2664 * GNUmakefile.am: Removed references to deleted files.
2665 * WebCore.pro: Ditto.
2666 * WebCore.scons: Ditto.
2667 * WebCore.vcproj/WebCore.vcproj: Ditto.
2668 * WebCore.xcodeproj/project.pbxproj: Ditto.
2669 * WebCoreSources.bkl: Ditto.
2671 * platform/DeprecatedPtrQueue.h: Removed.
2672 * platform/DeprecatedValueList.h: Removed.
2673 * platform/DeprecatedValueListImpl.cpp: Removed.
2674 * platform/DeprecatedValueListImpl.h: Removed.
2676 2008-12-13 Darin Adler <darin@apple.com>
2678 Reviewed by Anders Carlsson.
2680 - https://bugs.webkit.org/show_bug.cgi?id=17497
2681 eliminate DeprecatedValueList
2683 * css/CSSStyleDeclaration.cpp: Removed unneeded include.
2686 (WebCore::Document::removeAllEventListenersFromAllNodes):
2687 Set the removed flag on the window event listeners in case we
2688 are in the middle of dispatching events on this window.
2689 (WebCore::Document::clear): Ditto.
2690 (WebCore::Document::handleWindowEvent): Changed to use a vector
2691 instead of a DeprecatedPtrList.
2692 (WebCore::Document::windowInlineEventListenerForType): Ditto.
2693 (WebCore::Document::removeWindowInlineEventListenerForType): Ditto.
2694 Also added a call to setRemoved, which is needed here just as in
2695 other functions that remove.
2696 (WebCore::Document::removeWindowEventListener): Ditto.
2697 (WebCore::Document::hasWindowEventListener): Ditto.
2699 * dom/Document.h: Changed RegisteredEventListenerList to
2700 RegisteredEventListeners.
2703 (WebCore::Element::attach): Use a function to access rare data instead
2704 of getting directly at the data field.
2705 (WebCore::Element::focus): Ditto.
2706 (WebCore::Element::cancelFocusAppearanceUpdate): Ditto.
2708 * dom/ElementRareData.h: Use "using" to make things that are protected
2709 in NodeRareData be public here.
2711 * dom/EventTarget.h: Removed include of DeprecatedValueList and
2712 related declearations that weren't needed. Tweaked the definitions
2713 of the forbidEventDispatch functions too.
2715 * dom/EventTargetNode.cpp:
2716 (WebCore::EventTargetNode::EventTargetNode): Eliminated code that
2717 was used to initialized m_regdListeners.
2718 (WebCore::EventTargetNode::~EventTargetNode): Elminated delete of
2719 m_regdListeners. Changed code to use eventListeners() instead of
2721 (WebCore::EventTargetNode::eventListeners): Added.
2722 (WebCore::EventTargetNode::insertedIntoDocument): Use eventListeners.
2723 (WebCore::EventTargetNode::removedFromDocument): Ditto.
2724 (WebCore::EventTargetNode::willMoveToNewOwnerDocument): Ditto.
2725 (WebCore::EventTargetNode::didMoveToNewOwnerDocument): Ditto.
2726 (WebCore::EventTargetNode::addEventListener): Ditto.
2727 (WebCore::EventTargetNode::removeEventListener): Ditto.
2728 (WebCore::EventTargetNode::removeAllEventListeners): Ditto.
2729 Also added code to call setRemoved on all the listeners.
2730 (WebCore::EventTargetNode::handleLocalEvents): Ditto.
2731 (WebCore::EventTargetNode::dispatchGenericEvent): Fixed indentation.
2732 (WebCore::EventTargetNode::removeInlineEventListenerForType): Use
2733 the new event listeners vector. Also added missing call to setRemoved.
2734 (WebCore::EventTargetNode::inlineEventListenerForType): Ditto.
2736 * dom/EventTargetNode.h: Added a new RegisteredEventListenerVector
2737 type and replaced the old localEventListeners function with a new
2738 eventListeners function. Removed m_regdListeners.
2741 (WebCore::Node::childNodes): Removed unneeded std prefix.
2742 (WebCore::Node::setFocus): Use function instead of going directly
2744 (WebCore::Node::rareDataFocused): Ditto.
2745 (WebCore::Node::registerDynamicNodeList): Removed unneeded std prefix.
2746 (WebCore::Node::getElementsByName): Ditto.
2747 (WebCore::Node::getElementsByClassName): Ditto.
2748 (WebCore::Node::compareDocumentPosition): Ditto.
2750 * dom/Node.h: Removed unneeded forward declaration of
2751 RegisteredEventListener. This is now in EventTargetNode.
2753 * dom/NodeRareData.h: Renamed m_focused to m_isFocused and made it
2754 private. Made m_needsFocusAppearanceUpdateSoonAfterAttach private.
2755 Added listeners and ensureListeners functions as well as isFocused,
2756 setFocused, and focus-appearance functions. Made all data members private.
2758 * dom/RegisteredEventListener.cpp: Removed operator ==.
2759 * dom/RegisteredEventListener.h: Removed operator == and !=.
2761 * svg/SVGElement.cpp:
2762 (WebCore::hasLoadListener): Rewrote to work with the vector.
2763 * svg/SVGUseElement.cpp:
2764 (WebCore::SVGUseElement::transferEventListenersToShadowTree): Ditto.
2766 2008-12-13 Holger Hans Peter Freyther <zecke@selfish.org>
2768 Reviewed by Dan Bernstein.
2770 https://bugs.webkit.org/show_bug.cgi?id=22824
2772 Change ENABLE(FONT_FAST_PATH) to USE(FONT_FAST_PATH). With r39206
2773 floatWidth always used the complex path causing a regression
2776 * platform/graphics/Font.cpp:
2777 (WebCore::Font::floatWidth): Use the fast path again
2779 2008-12-13 Dirk Schulze <krit@webkit.org>
2781 Reviewed by Darin Adler.
2783 Fixes behavior of gradients on empty path in canvas/Cg
2785 https://bugs.webkit.org/show_bug.cgi?id=22844
2786 [Cg] Canvas fill() draws gradients even without a path
2788 Test: fast/canvas/canvas-gradient-without-path.html
2790 * html/CanvasRenderingContext2D.cpp:
2791 (WebCore::CanvasRenderingContext2D::fill):
2792 (WebCore::CanvasRenderingContext2D::stroke):
2794 2008-12-13 Kevin Ollivier <kevino@theolliviers.com>
2798 * platform/graphics/wx/ImageSourceWx.cpp:
2799 (WebCore::ImageSource::filenameExtension):
2801 2008-12-12 Brent Fulgham <bfulgham@gmail.com>
2803 Reviewed by Oliver Hunt.
2805 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22805
2807 Provides implementation of image dragging logic for Windows Cairo
2810 * platform/win/DragImageCGWin.cpp:
2811 (WebCore::deallocContext): Add a generic CGContextRef destructor.
2812 * platform/win/DragImageCairoWin.cpp:
2813 (WebCore::deallocContext): Add a generic cairo_* destructor.
2814 (WebCore::allocImage): New implementation to allocate a Cairo
2815 surface of a specified size.
2816 (WebCore::createCairoContextFromBitmap): New implementation to
2817 create a Cairo surface from a Windows BITMAP.
2818 (WebCore::scaleDragImage): Replace stub with implementation to
2819 actually create a scaled image.
2820 (WebCore::createDragImageFromImage): Replace stub with implementation
2821 to actually create an image.
2823 2008-12-12 Dean Jackson <dino@apple.com>
2825 Reviewed by Darin Adler.
2827 Expose WebKitAnimationEvent, WebKitTransitionEvent,
2828 WebKitCSSTransformValue, WebKitCSSKeyframeRule and
2829 WebKitCSSKeyframesRule to Window object.
2830 This required generating constructors for the event
2833 https://bugs.webkit.org/show_bug.cgi?id=20560
2835 * dom/WebKitAnimationEvent.idl:
2836 * dom/WebKitTransitionEvent.idl:
2837 * page/DOMWindow.idl:
2839 2008-12-12 Dave Moore <davemoore@google.com>
2841 Reviewed by Eric Seidel.
2843 Fixed https://bugs.webkit.org/show_bug.cgi?id=22798
2845 In Font::drawTextUsingSVGFont() a variable of type SVGTextRunWalkerDrawTextData
2846 is created on the stack (called data). One of its fields, charsConsumed, is
2847 unitialized, leading to random values after calling walk() on the
2848 SVGTextRunWalker created with it. I now initialize the variable
2850 This bug was revealed in our Purify run. I don't know of any specific incorrect
2851 behavior caused by it but it would lead to the charsConsumed field having a
2855 (WebCore::Font::drawTextUsingSVGFont):
2857 2008-12-12 Beth Dakin <bdakin@apple.com>
2859 Rubber Stamped by Steve Falkenburg.
2865 2008-12-12 Brett Wilson <brettw@chromium.org>
2867 Reviewed by Darin Adler.
2869 Add the ability so that Google-URL can optionally be used in a build
2870 of WebKit without changing the shared header. The guts of KURL are
2871 optionally ifdefed out, and the replacement code goes in a different
2872 header to avoid polluting KURL.h
2874 * platform/KURL.cpp:
2876 (WebCore::KURL::string):
2877 (WebCore::KURL::operator const String&):
2878 (WebCore::KURL::operator JSC::UString):
2879 (WebCore::KURL::operator NSString*):
2880 (WebCore::KURL::parsed):
2881 (WebCore::KURL::utf8String):
2882 (WebCore::KURL::isNull):
2883 (WebCore::KURL::isEmpty):
2884 (WebCore::KURL::isValid):
2885 (WebCore::KURL::hostStart):
2886 (WebCore::KURL::hostEnd):
2887 (WebCore::KURL::pathStart):
2888 (WebCore::KURL::pathEnd):
2889 (WebCore::KURL::pathAfterLastSlash):
2891 2008-12-11 Steve Falkenburg <sfalken@apple.com>
2893 Delete the previous timer-queue timer in the main thread, just prior to scheduling a new timer.
2894 The code previously called DeleteTimerQueueTimer in the timer callback proc.
2896 The new technique simplifies the code, since we now create and delete timers on the
2897 same thread, and don't access the timer queue or timer handles in the callback.
2898 This allows us to remove some mutex use, and more importantly, it solves a race
2899 condition that was occuring between ChangeTimerQueueTimer and DeleteTimerQueueTimer.
2901 Since the timer callback isn't passed the timer handle, we were retrieving that handle
2902 via a global. If the timer callback code was entered, but then a new timer was immediately
2903 scheduled (prior to the callback acquiring the mutex and calling DeleteTimerQueueTimer),
2904 there was a small window where the timer could be re-scheduled via ChangeTimerQueueTimer
2905 and then immediately deleted once the already running callback acquired the mutex and
2906 then called DeleteTimerQueueTimer. This resulted in the newly scheduled timer never firing.
2908 Reviewed by Oliver Hunt.
2910 * platform/win/SharedTimerWin.cpp:
2911 (WebCore::queueTimerProc): Don't delete the timer in the callback.
2912 (WebCore::setSharedTimerFireTime): Always delete and create the timer instead of using ChangeTimerQueueTimer.
2913 (WebCore::stopSharedTimer): Call DeleteTimerQueueTimer directly.
2915 2008-12-12 Kai Brüning <kai@granus.net>
2917 Reviewed and tweaked by Darin Adler.
2919 - fix https://bugs.webkit.org/show_bug.cgi?id=18205
2920 DOMNode objects are garbage collected although there are strong references
2921 <rdar://problem/6441200>
2923 Fixes resurrection bug for wrapper objects by using an NSMapTable with zeroing weak
2924 memory for the wrapper reference for DOMWrapperCache (DOMInternal.mm),
2925 JSWrapperCache (WebScriptObject.mm) and wrapperCache (DOMRGBColor.mm).
2926 BUILDING_ON_TIGER is used to create a Leopard-only NSMapTable or an old-style
2927 procedural map table for Tiger systems.
2929 No regression tests yet since we don't currently run any tests in GC mode.
2931 * bindings/objc/DOMInternal.h: added WebCore::createWrapperCache for use by all three caches
2932 * bindings/objc/DOMInternal.mm:
2933 (WebCore::createWrapperCache): Contains the compile-time check for map table creation
2934 (WebCore::getDOMWrapper): HashMap -> NSMapTable
2935 (WebCore::addDOMWrapper): ditto
2936 (WebCore::removeDOMWrapper): ditto
2937 * bindings/objc/DOMObject.mm: removed [DOMObject finalize]
2938 * bindings/objc/DOMRGBColor.mm: removed [DOMRGBColor finalize]
2939 (WebCore::getWrapperForRGB): CFMutableDictionaryRef -> NSMapTable
2940 (WebCore::setWrapperForRGB): ditto
2941 (WebCore::removeWrapperForRGB): ditto
2942 * bindings/objc/WebScriptObject.mm:
2943 (WebCore::getJSWrapper): HashMap -> NSMapTable
2944 (WebCore::addJSWrapper): ditto
2945 (WebCore::removeJSWrapper): ditto
2946 (-[WebScriptObject finalize]): removed call of removeJSWrapper()
2948 2008-12-12 Dimitri Glazkov <dglazkov@chromium.org>
2950 Reviewed by Alexey Proskuryakov.
2952 https://bugs.webkit.org/show_bug.cgi?id=22813
2953 Remove unused references to JSDOMBinding, CallFrame, and JSLock.
2955 * dom/Node.cpp: Removed CallFrame and JSLock header includes.
2956 * loader/FrameLoader.cpp: Removed JSDOMBinding header include.
2958 2008-12-12 Holger Hans Peter Freyther <zecke@selfish.org>
2960 Reviewed by Simon Hausmann.
2962 Update the WebKit.qrc and add a script to automatically generate the file.
2964 With the way rcc and qmake work this can not be done at build time
2965 as the WebKit.qrc must sit inside the directory that contains the files
2966 and at build time we may not change the content of the source directory.
2968 * inspector/front-end/WebKit.qrc: Updated with new script
2970 2008-12-12 Oliver Hunt <oliver@apple.com>
2972 Reviewed by Alexey Proskuryakov.
2974 REGRESSION: Canvas is broken in high dpi mode
2975 <rdar://problem/6432739> <https://bugs.webkit.org/show_bug.cgi?id=22823>
2977 Simply made sure that we correctly scale the graphics context to
2978 account for the difference between logical and buffer resolution.
2980 * html/HTMLCanvasElement.cpp:
2981 (WebCore::HTMLCanvasElement::createImageBuffer):
2982 (WebCore::HTMLCanvasElement::baseTransform):
2984 2008-12-12 Tor Arne Vestbø <tavestbo@trolltech.com>
2986 Rubber-stamped by Oliver Hunt.
2988 Share PluginView::paintMissingPluginIcon() between ports
2990 Also, enable this feature for Qt/X11, Qt/Mac and GTK
2992 * plugins/PluginView.cpp:
2993 (WebCore::PluginView::paintMissingPluginIcon):
2994 * plugins/gtk/PluginViewGtk.cpp:
2995 (WebCore::PluginView::paint):
2996 * plugins/mac/PluginViewMac.cpp:
2997 (WebCore::PluginView::paint):
2998 * plugins/qt/PluginViewQt.cpp:
2999 (WebCore::PluginView::paint):
3000 * plugins/win/PluginViewWin.cpp:
3002 2008-12-12 Tor Arne Vestbø <tavestbo@trolltech.com>
3004 Reviewed by Simon Hausmann.
3006 [Qt/Mac] Implement PluginView::updatePluginWidget()
3008 We should update the window and clip rect regardless of whether or
3009 not the plugin has been loaded, for example to ensure that the
3010 missing plugin image is placed correctly.
3012 * plugins/mac/PluginViewMac.cpp:
3013 (WebCore::PluginView::setNPWindowIfNeeded):
3014 (WebCore::PluginView::updatePluginWidget):
3016 2008-12-12 Tor Arne Vestbø <tavestbo@trolltech.com>
3018 Rubber-stamped by Oliver Hunt.
3020 Make PluginView::updatePluginWidget() non-const
3022 We can do this now since frameRectsChanged() is no longer const. This
3023 also allows us to get rid of the mutables in the PluginView.
3025 * platform/qt/TemporaryLinkStubs.cpp:
3026 (PluginView::updatePluginWidget):
3027 * plugins/PluginView.h:
3028 * plugins/gtk/PluginViewGtk.cpp:
3029 (WebCore::PluginView::updatePluginWidget):
3030 * plugins/mac/PluginViewMac.cpp:
3031 (WebCore::PluginView::updatePluginWidget):
3032 * plugins/qt/PluginViewQt.cpp:
3033 (WebCore::PluginView::updatePluginWidget):
3034 * plugins/win/PluginViewWin.cpp:
3035 (WebCore::PluginView::updatePluginWidget):
3036 * plugins/wx/PluginViewWx.cpp:
3037 (WebCore::PluginView::updatePluginWidget):
3039 2008-12-12 Tor Arne Vestbø <tavestbo@trolltech.com>
3041 Reviewed by Simon Hausmann.
3043 Implement ImageSource::filenameExtension() for the Qt port
3045 We're using QImageReader::imageFormat().toLower() to check
3046 that the image format is supported, and if it is we store
3047 the resulting extension when creating the ImageDecoderQt.
3049 * platform/graphics/qt/ImageDecoderQt.cpp:
3050 (WebCore::ImageDecoderQt::create):
3051 (WebCore::ImageDecoderQt::ImageDecoderQt):
3052 (WebCore::ImageDecoderQt::imageFormat):
3053 * platform/graphics/qt/ImageDecoderQt.h:
3054 * platform/graphics/qt/ImageSourceQt.cpp:
3055 (WebCore::ImageSource::setData):
3056 (WebCore::ImageSource::filenameExtension):
3058 2008-12-11 Stephanie Lewis <slewis@apple.com>
3060 Reviewed by Geoff Garen
3062 Account for the size of the response and request headers as well as other overhead
3063 when calculating the size a resource takes up in the cache. Halts unbounded
3064 growth in the cache. Reduced stress test memory high water marks by > 50%.
3066 Uses estimates gathered from the stress test to set the overhead size.
3067 A version of the patch was created that calculated most of the sizes, but it was
3068 decided that the patch was still at a basic level an estimate. What gains it made
3069 in accuracy was offset by the complexity involved in creating and updating the
3073 (WebCore::Cache::resourceAccessed):
3074 (WebCore::Cache::TypeStatistic::addResource):
3075 (WebCore::Cache::dumpLRULists):
3076 * loader/CachedResource.cpp:
3077 (WebCore::CachedResource::overheadSize):
3078 * loader/CachedResource.h:
3079 (WebCore::CachedResource::size):
3081 2008-12-11 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
3083 Reviewed by Holger Freyther.
3085 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22814
3087 Add <wml> image element support. Based on HTML/SVGImage{Element/Loader}, with
3088 the only difference that WML defines a second source attribute 'localsrc', that
3089 takes precedence over the 'src' attribute. If loading the 'localsrc' attribute
3090 fails, the user agent should try loading the 'src' attribute. If both fail the
3091 'alt' fallback content will be used - just like in HTML.
3093 Fixes: fast/wml/img-localsrc.wml (<img> and 'localsrc' attribute)
3094 fast/wml/img-src-localsrc-alt.wml ('localsrc'/'src' fallback handling)
3095 fast/wml/img-src.wml (<img> and 'src' attribute)
3098 * WebCore.vcproj/WebCore.vcproj:
3099 * WebCore.xcodeproj/project.pbxproj:
3100 * rendering/HitTestResult.cpp:
3101 (WebCore::HitTestResult::altDisplayString):
3102 (WebCore::HitTestResult::absoluteImageURL):
3103 * rendering/RenderImage.cpp:
3104 (WebCore::RenderImage::updateAltText):
3105 * wml/WMLImageElement.cpp: Added.
3106 (WebCore::WMLImageElement::WMLImageElement):
3107 (WebCore::WMLImageElement::~WMLImageElement):
3108 (WebCore::WMLImageElement::mapToEntry):
3109 (WebCore::WMLImageElement::parseMappedAttribute):
3110 (WebCore::WMLImageElement::attach):
3111 (WebCore::WMLImageElement::createRenderer):
3112 (WebCore::WMLImageElement::insertedIntoDocument):
3113 (WebCore::WMLImageElement::isURLAttribute):
3114 (WebCore::WMLImageElement::imageSourceAttributeName):
3115 (WebCore::WMLImageElement::altText):
3116 * wml/WMLImageElement.h: Added.
3117 (WebCore::WMLImageElement::useFallbackAttribute):
3118 (WebCore::WMLImageElement::setUseFallbackAttribute):
3119 * wml/WMLImageLoader.cpp: Added.
3120 (WebCore::WMLImageLoader::WMLImageLoader):
3121 (WebCore::WMLImageLoader::~WMLImageLoader):
3122 (WebCore::WMLImageLoader::dispatchLoadEvent):
3123 (WebCore::WMLImageLoader::sourceURI):
3124 (WebCore::WMLImageLoader::notifyFinished):
3125 * wml/WMLImageLoader.h: Added.
3126 * wml/WMLTagNames.in:
3128 2008-12-11 Holger Hans Peter Freyther <zecke@selfish.org>
3130 Reviewed by Darin Adler.
3132 https://bugs.webkit.org/show_bug.cgi?id=22043
3134 Do not run into the WebCore::DocumentLoader::updateLoading
3135 ASSERT on Gtk+/CURL when trying to load tests from our LayoutTests.
3137 Do not call setPrimaryLoadComplete when the
3138 activeDocumentLoader has already been replaced. This can happen
3139 when a script executed from within FramerLoader::didFinishLoading will
3140 navigate to another URL.
3142 The assertion is caused by existing tests (e.g.
3143 fast/history/clicked-link-is-visited.html) reproducing this with
3144 network backends not equal to curl is tough or maybe not
3147 * loader/DocumentLoader.cpp:
3148 (WebCore::DocumentLoader::setPrimaryLoadComplete):
3150 2008-12-11 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
3152 Reviewed by Eric Seidel.
3154 - Remove some dead, commented-out code from WMLAElement.
3155 - Add missing virtual destructor for <noop>, as suggested by Alexey.
3156 - Refactor addHTMLAlignment in a static helper function to share with WML.
3158 * html/HTMLElement.cpp:
3159 (WebCore::HTMLElement::addHTMLAlignment):
3160 (WebCore::HTMLElement::addHTMLAlignmentToStyledElement):
3161 * html/HTMLElement.h:
3162 * wml/WMLAElement.cpp:
3163 (WebCore::WMLAElement::defaultEventHandler):
3164 * wml/WMLNoopElement.cpp:
3165 (WebCore::WMLNoopElement::~WMLNoopElement):
3166 * wml/WMLNoopElement.h:
3168 2008-12-10 Oliver Hunt <oliver@apple.com>
3170 Reviewed by Adele Peterson.
3172 <rdar://problem/6302405> Crash (null-deref) when using :before pseudoselector with content CSS rule in SVG
3173 <https://bugs.webkit.org/show_bug.cgi?id=22804>
3175 This issue was caused by css generated content resulting in non-svg flowboxes
3176 being injected into SVG content. As SVG spec does not describe behaviour in
3177 this case, and neither Opera nor Firefox displays such generated content, so
3178 now we make svg text layout and rendering just ignore any such content.
3180 Test: svg/css/crash-css-generated-content.xhtml
3182 * rendering/SVGRootInlineBox.cpp:
3183 (WebCore::SVGRootInlineBox::buildLayoutInformation):
3184 (WebCore::SVGRootInlineBox::layoutInlineBoxes):
3185 (WebCore::SVGRootInlineBox::buildTextChunks):
3187 2008-12-11 Cameron Zwarich <zwarich@apple.com>
3189 Reviewed by Dave Hyatt.
3191 Bug 21256: REGRESSION (r36906): horizontally repeating image leaves ghosts when vertical scrolling
3192 <https://bugs.webkit.org/show_bug.cgi?id=21256>
3193 <rdar://problem/6362978>
3195 The ScrollView refactoring in r36906 caused the ScrollView and the
3196 platform widget to disagree about whether optimizing scrolling via
3197 blitting is allowed. The easiest way to fix this is to make ScrollView
3198 simply ask the platform widget whether this is safe on platforms that
3201 It is not possible to write a layout test for this bug because it
3202 involves the back/forward cache.
3204 * platform/ScrollView.cpp:
3205 (WebCore::ScrollView::ScrollView):
3206 (WebCore::ScrollView::setCanBlitOnScroll):
3207 (WebCore::ScrollView::canBlitOnScroll):
3208 (WebCore::ScrollView::platformSetCanBlitOnScroll):
3209 (WebCore::ScrollView::platformCanBlitOnScroll):
3210 * platform/ScrollView.h:
3211 * platform/mac/ScrollViewMac.mm:
3212 (WebCore::ScrollView::platformSetCanBlitOnScroll):
3213 (WebCore::ScrollView::platformCanBlitOnScroll):
3214 * platform/wx/ScrollViewWx.cpp:
3215 (WebCore::ScrollView::platformSetCanBlitOnScroll):
3216 (WebCore::ScrollView::platformCanBlitOnScroll):
3218 2008-12-11 Brent Fulgham <bfulgham@gmail.com>
3220 Reviewed by Adam Roben.
3222 https://bugs.webkit.org/show_bug.cgi?id=22808
3224 Correct build break due to malformed XML in Visual Studio project
3225 following @r39205 change.
3227 * WebCore.vcproj/WebCore.vcproj: Correct file entry so project loads.
3229 2008-12-10 Chris Marrin <cmarrin@apple.com>
3231 Reviewed by Dave Hyatt.
3233 Fixed https://bugs.webkit.org/show_bug.cgi?id=22738
3235 This gets rid of the per-animation timers which were used when an animation
3236 started, ended and looped. Their job is now done by the main AnimationController's
3237 timer. It is now set to fire as needed. For instance, if there is a delay, it will
3238 fire after the delay time and then every 30ms to run the animation. The start, loop
3239 and end events are generated as needed during the firing of this timer.
3241 I had to add one more bit of code. When animation timers used to fire the animation events.
3242 This would always happen from the RunLoop, so any style changes that happened in the
3243 event handler would get picked up on the next updateRendering() call. But now the start
3244 event is generated during the styleIsAvailable() call, which is in the middle of the
3245 updateRendering() cycle. And calling an event handler in the middle of updateRendering()
3246 is not allowed and causes style changes to get missed. We already have a mechanism in
3247 AnimationController to defer updateRendering() calls. So I added logic to defer all
3248 event handling to there. Now, I put any request for event handling into a list and ask
3249 for a deferred updateRendering() call. When that deferred timer fires, I go through that
3250 list, send all the events and then call updateRendering().
3252 * page/animation/AnimationBase.cpp:
3253 (WebCore::AnimationBase::AnimationBase):
3254 (WebCore::AnimationBase::updateStateMachine):
3255 (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
3256 (WebCore::AnimationBase::willNeedService):
3257 (WebCore::AnimationBase::goIntoEndingOrLoopingState):
3258 * page/animation/AnimationBase.h:
3259 * page/animation/AnimationController.cpp:
3260 (WebCore::AnimationControllerPrivate::updateAnimationTimer):
3261 (WebCore::AnimationControllerPrivate::updateRenderingDispatcherFired):
3262 (WebCore::AnimationControllerPrivate::addEventToDispatch):
3263 (WebCore::AnimationControllerPrivate::animationTimerFired):
3264 (WebCore::AnimationController::addEventToDispatch):
3265 * page/animation/AnimationController.h:
3266 * page/animation/CompositeAnimation.cpp:
3267 (WebCore::CompositeAnimationPrivate::updateTransitions):
3268 (WebCore::CompositeAnimationPrivate::willNeedService):
3269 (WebCore::CompositeAnimationPrivate::getAnimationForProperty):
3270 (WebCore::CompositeAnimation::willNeedService):
3271 (WebCore::CompositeAnimation::getAnimationForProperty):
3272 * page/animation/CompositeAnimation.h:
3273 * page/animation/ImplicitAnimation.cpp:
3274 (WebCore::ImplicitAnimation::animate):
3275 (WebCore::ImplicitAnimation::onAnimationEnd):
3276 (WebCore::ImplicitAnimation::sendTransitionEvent):
3277 * page/animation/ImplicitAnimation.h:
3278 * page/animation/KeyframeAnimation.cpp:
3279 (WebCore::KeyframeAnimation::animate):
3280 (WebCore::KeyframeAnimation::sendAnimationEvent):
3281 * page/animation/KeyframeAnimation.h:
3282 (WebCore::KeyframeAnimation::setUnanimatedStyle):
3284 2008-12-11 Simon Hausmann <simon.hausmann@nokia.com>
3286 Fix the Qt build with an empty filenameExtension() implementation.
3288 * platform/graphics/qt/ImageSourceQt.cpp:
3289 (WebCore::ImageSource::filenameExtension):
3291 2008-12-11 Holger Hans Peter Freyther <zecke@selfish.org>
3293 Reviewed by Simon Hausmann.
3295 Fix crash in the cairo implementation of the SVGPaintServer
3297 For SVGFonts the RenderObject can be zero. The existing SVGFont
3298 test cases is exposing this bug. Qt and other ports have fixed
3299 this issue by adding null checks as well.
3301 * svg/graphics/cairo/SVGPaintServerCairo.cpp:
3302 (WebCore::SVGPaintServer::renderPath):
3304 2008-12-11 Holger Freyther <zecke@selfish.org>
3306 Reviewed by Simon Hausmann.
3308 https://bugs.webkit.org/show_bug.cgi?id=20953
3310 Make the Qt port follow the Win, Mac, Gtk+ port in regard to Font
3311 handling. FontQt.cpp from now on is only implementing the complex path. Create
3312 FontFallbackListQt.cpp and FontPlatformDataQt.cpp to work within
3313 the framework set by the Font code.
3315 Sharing the Font.cpp implementation allows the Qt port to support
3316 the CSS font faces and SVG fonts.
3318 Split out the Qt4.3 Font handling into FonQt43.cpp to allow to more
3319 easily deprecate it.
3321 This commit is removing a lot of #ifdefs from Font.h as the Qt Font
3322 implementation is now in line with the rest of WebCore.
3325 * platform/graphics/Font.h: Remove #ifdefs
3326 (WebCore::Font::letterSpacing):
3327 (WebCore::Font::setLetterSpacing):
3328 (WebCore::Font::isPlatformFont):
3329 * platform/graphics/FontFallbackList.h:
3330 * platform/graphics/SimpleFontData.cpp:
3331 (WebCore::SimpleFontData::SimpleFontData):
3332 (WebCore::SimpleFontData::platformGlyphInit): There is no GlyphCache
3333 on Qt, move the initialisation over.
3334 (WebCore::SimpleFontData::~SimpleFontData):
3335 * platform/graphics/SimpleFontData.h:
3336 (WebCore::SimpleFontData::getQtFont):
3337 * platform/graphics/qt/FontCacheQt.cpp:
3338 (WebCore::FontCache::getCachedFontPlatformData): Remove unused parameter
3339 (WebCore::FontCache::releaseFontData): Add to build
3340 * platform/graphics/qt/FontCustomPlatformData.cpp:
3341 (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
3342 (WebCore::FontCustomPlatformData::fontPlatformData):
3343 (WebCore::createFontCustomPlatformData):
3344 * platform/graphics/qt/FontCustomPlatformData.h:
3345 * platform/graphics/qt/FontFallbackListQt.cpp: Added.
3346 (WebCore::FontFallbackList::FontFallbackList):
3347 (WebCore::FontFallbackList::invalidate):
3348 (WebCore::FontFallbackList::releaseFontData):
3349 (WebCore::FontFallbackList::determinePitch):
3350 (WebCore::FontFallbackList::fontDataAt):
3351 (WebCore::FontFallbackList::fontDataForCharacters):
3352 (WebCore::FontFallbackList::setPlatformFont):
3353 * platform/graphics/qt/FontPlatformData.h:
3354 (WebCore::FontPlatformData::font):
3355 (WebCore::FontPlatformData::size):
3356 * platform/graphics/qt/FontPlatformDataQt.cpp: Added.
3357 (WebCore::FontPlatformData::FontPlatformData):
3358 * platform/graphics/qt/FontQt.cpp:
3359 (WebCore::Font::drawComplexText):
3360 (WebCore::Font::floatWidthForComplexText):
3361 (WebCore::Font::offsetForPositionForComplexText):
3362 (WebCore::Font::selectionRectForComplexText):
3363 (WebCore::Font::font):
3364 * platform/graphics/qt/FontQt43.cpp: Added. Moved Qt4.3 code from FontQt.cpp
3365 (WebCore::Font::drawComplexText):
3366 (WebCore::Font::floatWidthForComplexText):
3367 (WebCore::Font::offsetForPositionForComplexText):
3368 (WebCore::Font::selectionRectForComplexText):
3369 * platform/graphics/qt/GlyphPageTreeNodeQt.cpp:
3370 (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData):
3371 (WebCore::GlyphPageTreeNode::pruneTreeFontData):
3372 * platform/graphics/qt/SimpleFontDataQt.cpp:
3373 (WebCore::SimpleFontData::determinePitch):
3374 (WebCore::SimpleFontData::containsCharacters):
3375 (WebCore::SimpleFontData::platformInit):
3376 (WebCore::SimpleFontData::platformGlyphInit):
3377 (WebCore::SimpleFontData::platformDestroy):
3378 * platform/qt/RenderThemeQt.cpp:
3379 (WebCore::RenderThemeQt::adjustButtonStyle): Avoid crashes.
3381 2008-12-11 Holger Freyther <zecke@selfish.org>
3383 Reviewed by Simon Hausmann.
3385 https://bugs.webkit.org/show_bug.cgi?id=20953
3387 For Qt it is not pratical to have a FontCache and GlyphPageTreeNode
3388 implementation. This is one of the reasons why the Qt port is currently not
3389 using WebCore/platform/graphics/Font.cpp. By allowing to not use
3390 the simple/fast-path the Qt port will be able to use it.
3392 Introduce USE(FONT_FAST_PATH) and define it for every port but the
3395 * platform/graphics/Font.cpp:
3396 (WebCore::Font::drawText):
3397 (WebCore::Font::floatWidth):
3398 (WebCore::Font::selectionRectForText):
3399 (WebCore::Font::offsetForPosition):
3400 * platform/graphics/Font.h:
3402 2008-12-11 Holger Hans Peter Freyther <zecke@selfish.org>
3404 Reviewed by Darin Adler.
3406 https://bugs.webkit.org/show_bug.cgi?id=20953
3408 Split out the font fast path from Fast.cpp into FontFastPath.cpp. This
3409 will allow the Qt port to share most of WebCore::Font
3410 implementation but the fast path. Qt does not provide the API to get
3411 individual Glyphs making the fast path hard to support.
3415 * WebCore.vcproj/WebCore.vcproj:
3416 * WebCore.xcodeproj/project.pbxproj:
3417 * WebCoreSources.bkl:
3418 * platform/graphics/Font.cpp:
3419 * platform/graphics/FontFastPath.cpp: Added.
3420 (WebCore::Font::glyphDataForCharacter):
3422 2008-12-11 Robert Carr <racarr@svn.gnome.org>
3424 Reviewed by Holger Freyther.
3426 https://bugs.webkit.org/show_bug.cgi?id=22560
3428 Code in PlatformScreenGtk for screenDepth and screenRect can not
3429 assume that the platformWindow for the widget has a valid "window"
3430 member. For example in the case of, a new browser view opening as a
3431 child of a GtkNotebook, but never being switched to, or manually
3432 realized. Solve by using the toplevel window of the widget, rather
3433 than the widget itself.
3435 * platform/gtk/PlatformScreenGtk.cpp:
3436 (WebCore::screenDepth):
3437 (WebCore::screenRect):
3439 2008-12-08 Tor Arne Vestbø <tavestbo@trolltech.com>
3441 Reviewed by Darin Adler and Holger Freyther.
3443 Make Widget::frameRectsChanged() and overrides non-const
3445 This will hopefully allow us to get rid of some of the mutables in
3446 the classes that react to the callback by changing their own state.
3448 * platform/ScrollView.cpp:
3449 (WebCore::ScrollView::frameRectsChanged):
3450 * platform/ScrollView.h:
3451 * platform/Widget.h:
3452 (WebCore::Widget::frameRectsChanged):
3453 * platform/gtk/ScrollbarGtk.cpp: Remove non-const version since
3454 this was more complex and did the same thing, changed const of
3455 the leftover frameRectsChanged() method.
3456 (ScrollbarGtk::frameRectsChanged):
3457 * platform/gtk/ScrollbarGtk.h:
3458 * plugins/PluginView.cpp:
3459 (WebCore::PluginView::frameRectsChanged):
3460 * plugins/PluginView.h:
3462 2008-12-11 Holger Hans Peter Freyther <zecke@selfish.org>
3464 Reviewed and implemented with Tor Arne Vestbø.
3466 Reimplement RenderTheme::caretBlinkInterval for Qt.
3468 The QApplication::cursorFlashTime is in milliseconds and describes
3469 the whole cycle while WebCore expects half a cycle.
3471 * platform/qt/RenderThemeQt.cpp:
3472 (WebCore::RenderThemeQt::caretBlinkInterval):
3473 * platform/qt/RenderThemeQt.h:
3475 2008-12-09 Trenton Schulz <trenton.schulz@nokia.com>
3477 Reviewed by Tor Arne Vestbø.
3479 [Qt/Mac] Don't call HIGetScaleFactor() if we're not on Tiger or better
3481 * plugins/mac/PluginViewMac.cpp:
3482 (WebCore::tigerOrBetter):
3483 (WebCore::PluginView::globalMousePosForPlugin):
3485 2008-12-10 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
3487 Reviewed by Eric Seidel and George Staikos.
3489 Fixes: https://bugs.webkit.org/show_bug.cgi?id=22799
3491 Add WML <template> support. The <template> element is specified at deck-level
3492 and declares a template for all <card> elements in the document.
3495 * WebCore.vcproj/WebCore.vcproj:
3496 * WebCore.xcodeproj/project.pbxproj:
3497 * editing/htmlediting.cpp:
3498 (WebCore::canHaveChildrenForEditing): Treat <do> just like a <button>.
3499 * wml/WMLCardElement.cpp:
3500 (WebCore::WMLCardElement::WMLCardElement):
3501 (WebCore::WMLCardElement::setTemplateElement):
3502 (WebCore::WMLCardElement::handleIntrinsicEventIfNeeded):
3503 (WebCore::WMLCardElement::handleDeckLevelTaskOverridesIfNeeded):
3504 * wml/WMLCardElement.h:
3505 (WebCore::WMLCardElement::templateElement):
3506 * wml/WMLDoElement.cpp:
3507 (WebCore::WMLDoElement::insertedIntoDocument):
3508 * wml/WMLDocument.cpp:
3509 (WebCore::WMLDocument::finishedParsing):
3510 * wml/WMLErrorHandling.cpp:
3511 (WebCore::errorMessageForErrorCode):
3512 * wml/WMLErrorHandling.h:
3514 * wml/WMLEventHandlingElement.cpp:
3515 (WebCore::WMLEventHandlingElement::~WMLEventHandlingElement):
3516 * wml/WMLEventHandlingElement.h:
3517 (WebCore::WMLEventHandlingElement::doElements):
3518 * wml/WMLTagNames.in:
3519 * wml/WMLTemplateElement.cpp: Added.
3520 (WebCore::WMLTemplateElement::WMLTemplateElement):
3521 (WebCore::WMLTemplateElement::~WMLTemplateElement):
3522 (WebCore::WMLTemplateElement::parseMappedAttribute):
3523 (WebCore::WMLTemplateElement::registerTemplatesInDocument):
3524 * wml/WMLTemplateElement.h: Added.
3525 * wml/WMLTimerElement.cpp:
3526 (WebCore::WMLTimerElement::timerFired):
3528 2008-12-09 Dmitry Titov <dimich@chromium.org>
3530 Reviewed by Darin Adler.
3532 Fix memory leak - need to call stopActiveDOMObjects
3533 when cached pages get destroyed.
3534 https://bugs.webkit.org/show_bug.cgi?id=22753
3537 (WebCore::Document::detach):
3539 2008-12-10 Alice Liu <alice.liu@apple.com>
3541 Manual test for https://bugs.webkit.org/show_bug.cgi?id=20685
3543 Reviewed by Darin Adler.
3545 * manual-tests/drag-image-to-desktop.html: Added.