1 2009-03-27 Darin Adler <darin@apple.com>
3 Reviewed by Sam Weinig.
5 Get mailto code out of FrameLoader.
7 * html/HTMLFormElement.cpp:
8 (WebCore::transferMailtoPostFormDataToURL): Added. Factored out the mailto
9 logic so HTMLFormElement::submit isn't full of ugly bits. This includes the
10 part of the logic that involves transformeing the URL that was previously
12 (WebCore::HTMLFormElement::submit): Call transferMailtoPostFormDataToURL and
13 also release the data for slightly less refcount churn.
15 * loader/FrameLoader.cpp:
16 (WebCore::FrameLoader::submitForm): Removed all the special casing for mailto,
17 since HTMLFormElement now properly prepares both the URL and the form data.
19 2009-03-27 Dan Bernstein <mitz@apple.com>
21 Reviewed by Mark Rowe.
23 - fix <rdar://problem/6724514> A bit of OpenTypeUtilities cleanup
25 * platform/graphics/chromium/FontCustomPlatformData.cpp:
26 (WebCore::EOTStream::EOTStream): Changed to use EOTHeader.
27 (WebCore::createFontCustomPlatformData): Ditto.
28 * platform/graphics/opentype/OpenTypeUtilities.cpp:
29 (WebCore::EOTHeader::EOTHeader): Added. Initializes the buffer size to
30 the size of an EOTPrefix.
31 (WebCore::EOTHeader::updateEOTSize): Added. Updates the size field in
33 (WebCore::EOTHeader::appendBigEndianString): Changed the static
34 appendBigEndianStringToEOTHeader() into this member function.
35 (WebCore::EOTHeader::appendPaddingShort): Added.
36 (WebCore::getEOTHeader): Changed to use EOTHeader.
37 * platform/graphics/opentype/OpenTypeUtilities.h:
38 (WebCore::EOTHeader::size):
39 (WebCore::EOTHeader::data):
40 (WebCore::EOTHeader::prefix):
41 * platform/graphics/win/FontCustomPlatformData.cpp:
42 (WebCore::EOTStream::EOTStream): Changed to use EOTHeader.
43 (WebCore::createFontCustomPlatformData): Ditto.
45 2009-03-27 Darin Adler <darin@apple.com>
47 Reviewed by Sam Weinig.
49 To prepare for work on a form loading fix, remove some unused functions,
50 consolidate some functions, and make many more functions private in
53 * WebCore.base.exp: Remove some unused entry points, update another.
56 (WebCore::Document::detach): Clear m_frame directly instead of using
58 * dom/Document.h: Ditto.
60 * loader/FrameLoader.cpp:
61 (WebCore::FrameLoader::urlSelected): Consolidate the two functions
62 of this name into a single function. Also changed the event argument
63 to be PassRefPtr<Event>.
64 (WebCore::FrameLoader::submitForm): Changed the event argument to
66 (WebCore::FrameLoader::scheduleLocationChange): Call completeURL
67 explicitly so we can remove the version of changeLocation that does
69 (WebCore::FrameLoader::redirectionTimerFired): Ditto.
70 (WebCore::FrameLoader::loadURLIntoChildFrame): Set m_provisionalHistoryItem
71 directly so we don't need a setProvisionalHistoryItem function.
72 (WebCore::FrameLoader::canCachePageContainingThisFrame): Get at
73 m_quickRedirectComing directly so we don't need a isQuickRedirectComing
75 (WebCore::FrameLoader::logCanCacheFrameDecision): Ditto.
76 (WebCore::FrameLoader::loadFrameRequestWithFormAndValues): Changed the
77 event argument to be PassRefPtr<Event>.
78 (WebCore::FrameLoader::loadURL): Move the logic of the continueLoadWithData
79 function here because this is the only caller. If we want to make the
80 resulting function smaller we should refactor some other way. Also
81 streamlined the user-chosen encoding logic, but did not change what it does.
82 (WebCore::FrameLoader::finishedLoadingDocument): Changed the event argument
83 to be PassRefPtr<Event>.
84 (WebCore::FrameLoader::loadPostRequest): Ditto.
85 (WebCore::FrameLoader::receivedMainResourceError): Moved the logic from
86 the didNotOpenURL function here, since this was the only caller.
88 * loader/FrameLoader.h: Removed include of FormState.h and used a forward
89 declaration instead. Removed unneeded forward declation of Element.
90 Moved many functions into the private section, and removed some other
91 unused or uneeded functions.
93 2009-03-27 Xiaomei Ji <xji@chromium.org>
95 Reviewed by Dan Bernstein.
97 Fix https://bugs.webkit.org/show_bug.cgi?id=24303
98 Using keyboard select RTL text, Highlights goes to opposite direction from Firefox and IE.
100 Test: editing/selection/extend-selection.html
102 * editing/SelectionController.cpp:
103 (WebCore::SelectionController::directionOfEnclosingBlock): Added
104 (WebCore::SelectionController::modifyExtendingRight): Added. Currenctly
105 implemented for character and word granularity, all other granularities
106 are treated as "forward".
107 (WebCore::SelectionController::modifyExtendingForward): Renamed
108 modifyExtendingRightForward() to this.
109 (WebCore::SelectionController::modifyExtendingLeft): Added. Currenctly
110 implemented for character and word granularity, all other granularities
111 are treated as "backward".
112 (WebCore::SelectionController::modifyExtendingBackward): Renamed
113 modifyExtendingLeftBackward() to this.
114 (WebCore::SelectionController::modify): Change to call either the
115 left/right or backward/forward methods depending on the 'dir' argument
117 * editing/SelectionController.h:
119 2009-03-27 John Abd-El-Malek <jam@google.com>
121 Reviewed by Eric Seidel.
123 https://bugs.webkit.org/show_bug.cgi?id=24836
124 Fix navigator.plugins.refresh(false) in Chromium.
126 * plugins/chromium/PluginDataChromium.cpp:
127 (WebCore::PluginData::refresh):
129 2009-03-27 Timothy Hatcher <timothy@apple.com>
131 Make scrollLeft, scrollTop, scrollWidth, and scrollHeight
132 virtual to fix the broken layout tests from my last commit.
134 Reviewed by Mark Rowe.
137 (WebCore::Element::scrollLeft):
138 (WebCore::Element::scrollTop):
139 (WebCore::Element::scrollWidth):
140 (WebCore::Element::scrollHeight):
142 * html/HTMLBodyElement.h:
144 2009-03-27 Mark Rowe <mrowe@apple.com>
146 Reviewed by Sam Weinig.
148 Fix <https://bugs.webkit.org/show_bug.cgi?id=24876>.
149 Bug 24876: fast/forms/select-max-length.html times out in debug builds due to HTMLSelectElement::setLength being O(N^2)
151 * html/HTMLSelectElement.cpp:
152 (WebCore::HTMLSelectElement::setLength): Repeatedly calling remove to remove elements causes us to recalculate the list
153 items after each node is removed, leading to O(N^2) behaviour. By inlining the batch removal in to setLength we can avoid
154 this gratuitous recalcuation.
156 2009-03-27 Dirk Schulze <krit@webkit.org>
158 Reviewed by Eric Seidel.
160 We don't support images for GtkCursors yet. We need a placeholder to avoid crashes.
161 I took crosshair to have a common behavior with firefox.
163 [GTK] SVG - Crash on setting the cursor icon
164 https://bugs.webkit.org/show_bug.cgi?id=24565
166 * platform/gtk/CursorGtk.cpp:
167 (WebCore::Cursor::Cursor):
169 2009-03-27 Timothy Hatcher <timothy@apple.com>
171 Remove redundant attributes and functions from IDL files that have the
172 same attributes and functions defined in the super class.
174 Reviewed by Simon Fraser.
176 * WebCore.xcodeproj/project.pbxproj: Remove DOMHTMLBodyElementPrivate.h.
177 * bindings/objc/PublicDOMInterfaces.h: Remove focus and blur from DOMHTMLElement.
178 * html/HTMLBodyElement.idl: Remove scrollLeft, scrollTop, scrollWidth
180 * html/HTMLElement.idl: Remove blur and focus.
182 2009-03-27 Adam Roben <aroben@apple.com>
184 Don't include substitute data URLs in global history redirect chains
188 Reviewed by Darin Adler.
190 This might be testable if:
191 - support were added to DRT for providing substitute data on failed
193 - support were added to DRT for dumping redirect chains
195 I tried doing the above and was still unable to make a test.
197 * loader/FrameLoader.cpp:
198 (WebCore::FrameLoader::updateHistoryForStandardLoad):
199 (WebCore::FrameLoader::updateHistoryForRedirectWithLockedBackForwardList):
200 Call updateGlobalHistoryRedirectLinks only if the load succeeded
201 (i.e., there is no unreachableURL). Previous the FrameLoaderClient
202 implementations were unconditionally calling
203 updateGlobalHistoryRedirectLinks from within updateGlobalHistory.
205 2009-03-27 Peter Kasting <pkasting@google.com>
207 Reviewed by Eric Seidel.
209 https://bugs.webkit.org/show_bug.cgi?id=24861
210 Chromium port did not render decorations for <input type="search">.
211 This copies RenderThemeWin.*.
213 * css/themeChromiumWin.css: Removed.
214 * rendering/RenderThemeChromiumLinux.cpp:
215 (WebCore::RenderThemeChromiumLinux::extraDefaultStyleSheet):
216 (WebCore::RenderThemeChromiumLinux::adjustSearchFieldCancelButtonStyle):
217 (WebCore::RenderThemeChromiumLinux::paintSearchFieldCancelButton):
218 (WebCore::RenderThemeChromiumLinux::adjustSearchFieldDecorationStyle):
219 (WebCore::RenderThemeChromiumLinux::adjustSearchFieldResultsDecorationStyle):
220 (WebCore::RenderThemeChromiumLinux::paintSearchFieldResultsDecoration):
221 (WebCore::RenderThemeChromiumLinux::adjustSearchFieldResultsButtonStyle):
222 (WebCore::RenderThemeChromiumLinux::paintSearchFieldResultsButton):
223 * rendering/RenderThemeChromiumLinux.h:
224 (WebCore::RenderThemeChromiumLinux::paintSearchField):
225 * rendering/RenderThemeChromiumWin.cpp:
227 (WebCore::RenderThemeChromiumWin::extraDefaultStyleSheet):
228 (WebCore::RenderThemeChromiumWin::adjustSearchFieldCancelButtonStyle):
229 (WebCore::RenderThemeChromiumWin::paintSearchFieldCancelButton):
230 (WebCore::RenderThemeChromiumWin::adjustSearchFieldDecorationStyle):
231 (WebCore::RenderThemeChromiumWin::adjustSearchFieldResultsDecorationStyle):
232 (WebCore::RenderThemeChromiumWin::paintSearchFieldResultsDecoration):
233 (WebCore::RenderThemeChromiumWin::adjustSearchFieldResultsButtonStyle):
234 (WebCore::RenderThemeChromiumWin::paintSearchFieldResultsButton):
235 * rendering/RenderThemeChromiumWin.h:
236 (WebCore::RenderThemeChromiumWin::paintSearchField):
238 2009-03-27 David Hyatt <hyatt@apple.com>
240 Reviewed by Simon Fraser
242 If an object has a self-painting layer, don't count it as part of a block's visual overflow.
243 This fix has only been made for block-level children. The inline-level case is still broken
244 (and covered by an existing bug).
246 Added fast/block/positioning/negative-rel-position.html
248 * rendering/InlineFlowBox.cpp:
249 (WebCore::InlineFlowBox::placeBoxesVertically):
250 * rendering/RenderBlock.cpp:
251 (WebCore::RenderBlock::layoutBlockChildren):
252 (WebCore::RenderBlock::lowestPosition):
253 (WebCore::RenderBlock::rightmostPosition):
254 (WebCore::RenderBlock::leftmostPosition):
256 2009-03-27 Anders Carlsson <andersca@apple.com>
258 Reviewed by Darin Adler.
260 <rdar://problem/6642221>
261 REGRESSION: With the Movie widget, movie trailer fails to load if movie had been previously viewed
263 Add a dashboard specific workaround so that we always create renderers for object elements, even if display:none is set.
265 I've filed <rdar://problem/6731022> against the Movies widget.
267 * html/HTMLObjectElement.cpp:
268 (WebCore::HTMLObjectElement::rendererIsNeeded):
270 2009-03-25 Timothy Hatcher <timothy@apple.com>
272 Expose new DOM methods as public Objective-C API.
274 <rdar://problem/5837350> Expose new DOM classes and methods
275 as public API (match the additions to the JavaScript DOM)
277 Reviewed by Mark Rowe and Darin Adler.
279 * WebCore.xcodeproj/project.pbxproj:
280 * bindings/objc/DOMHTML.h:
281 * bindings/objc/DOMPrivate.h:
282 * bindings/objc/PublicDOMInterfaces.h:
284 2009-03-27 Zack Rusin <zack@kde.org>
286 Reviewed by Simon Hausmann.
288 https://bugs.webkit.org/show_bug.cgi?id=24280
290 Fix propagation of fill rules when rendering paths in the Qt build.
292 * platform/graphics/qt/GraphicsContextQt.cpp:
293 (WebCore::toQtFillRule):
294 (WebCore::GraphicsContext::fillPath):
295 (WebCore::GraphicsContext::strokePath):
297 2009-03-27 Zack Rusin <zack@kde.org>
299 Reviewed by Tor Arne Vestbø.
301 https://bugs.webkit.org/show_bug.cgi?id=24275
303 Fix text field theming in the Qt build with the KDE 4 Oxygen
304 style by adjusting the size vertically and horizontally to
305 set padding on the element equal to the width of the style painted border.
307 * platform/qt/RenderThemeQt.cpp:
308 (WebCore::RenderThemeQt::RenderThemeQt):
309 (WebCore::RenderThemeQt::computeSizeBasedOnStyle):
310 (WebCore::RenderThemeQt::adjustTextFieldStyle):
311 (WebCore::RenderThemeQt::paintTextField):
312 * platform/qt/RenderThemeQt.h:
314 2009-03-27 Laszlo Gombos <laszlo.1.gombos@nokia.com>
316 Reviewed by Simon Hausmann.
318 https://bugs.webkit.org/show_bug.cgi?id=24852
319 Build fix for GNU mode RVCT compilation
321 * html/PreloadScanner.cpp:
323 2009-03-27 Erik L. Bunce <elbunce@xendom.com>
325 Reviewed by Simon Hausmann.
327 https://bugs.webkit.org/show_bug.cgi?id=24868
329 Make text of the writing direction items more user friendly.
331 * platform/qt/Localizations.cpp:
332 (WebCore::contextMenuItemTagLeftToRight):
333 (WebCore::contextMenuItemTagRightToLeft):
335 2009-03-27 Erik L. Bunce <elbunce@xendom.com>
337 Reviewed by Simon Hausmann.
339 https://bugs.webkit.org/show_bug.cgi?id=24274
341 Fixed the Qt 4.4 Mac build with netscape plugins enabled.
343 * plugins/mac/PluginViewMac.cpp:
345 2009-03-26 Mark Rowe <mrowe@apple.com>
347 Try and fix the Qt build.
349 * platform/text/TextEncodingDetectorNone.cpp:
350 (WebCore::detectTextEncoding):
352 2009-03-26 Eric Carlson <eric.carlson@apple.com>
354 Reviewed by Simon Fraser.
356 https://bugs.webkit.org/show_bug.cgi?id=24874
357 24874: HTMLMediaElement: 'duration' defaults to NaN, deal with it
359 The 'duration' attribute is NaN when no media is available, so the
360 media element should take care when comparing with duration().
362 * html/HTMLMediaElement.cpp:
363 (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Don't compare with duration when
365 (WebCore::HTMLMediaElement::endedPlayback): Ditto.
367 2009-03-26 Mark Rowe <mrowe@apple.com>
371 * platform/text/TextEncodingDetectorICU.cpp:
372 * platform/text/TextEncodingDetectorNone.cpp:
374 2009-03-26 Jungshik Shin <jshin@chromium.org>
376 Reviewed by Cameron Zwarich.
378 1. Fix the crash in setHintEncoding
379 2. Fix build failures on Tiger and Qt.
380 UnusedParam.h was not included by TextEncodingDetector{None,ICU}.cpp
381 in the patch landed in r42023
382 for http://bugs.webkit.org/show_bug.cgi?id=16482
384 * loader/TextResourceDecoder.h:
385 (WebCore::TextResourceDecoder::setHintEncoding):
386 * platform/text/TextEncodingDetectorICU.cpp:
387 * platform/text/TextEncodingDetectorNone.cpp:
389 2009-03-26 Simon Fraser <simon.fraser@apple.com>
391 Build fix when ACCELERATED_COMPOSITING is turned on.
393 * rendering/RenderLayerBacking.cpp:
394 (WebCore::RenderLayerBacking::canUseDirectCompositing):
396 2009-03-26 Eric Seidel <eric@webkit.org>
398 No additional review, committing previously reviewed files for build fix only.
400 Add files I missed when commiting Jungshik's patch in r42022.
401 https://bugs.webkit.org/show_bug.cgi?id=16482
403 * icu/unicode/ucsdet.h: Added.
404 * platform/text/TextEncodingDetector.h: Added.
405 * platform/text/TextEncodingDetectorICU.cpp: Added.
406 (WebCore::detectTextEncoding):
407 * platform/text/TextEncodingDetectorNone.cpp: Added.
408 (WebCore::detectTextEncoding):
410 2009-03-26 Jungshik Shin <jshin@chromium.org>
412 Reviewed by Alexey Proskuryakov.
414 Add an encoding detector 'hook' to TextResourceDecoder.
415 - add |usesEncodingDetector| to Settings. It's off by default.
416 - add a new encoding source type |EncodingFromParent|
417 to distinguish cases when the encoding is inherited from
418 the parent frame from cases when it's actually auto-detected.
419 - add TextEncodingDetector* to platform/text. Currently,
420 the only implementation uses ICU. Stub is added for
421 ports that do not use ICU and a build on Tiger. Mac OS
422 Tiger comes with ICU 3.2 that does not support encoding detector.
423 - add ucsdet.h to icu/unicode for ports using ICU.
425 Layout tests will be added once bug 20534 is fixed and a WebPreference
426 can be controlled in test_shell. With UsesEncodingDetector off, there
427 is no change to test.
429 http://bugs.webkit.org/show_bug.cgi?id=16482
431 * WebCore.vcproj/WebCore.vcproj:
432 * WebCore.xcodeproj/project.pbxproj:
433 * WebCore/GNUmakefile.am
434 * WebCore/WebCore.pro
435 * WebCore/WebCore.scons
436 * WebCore/WebCoreSources.bkl
438 * icu/unicode/ucsdet.h
439 * loader/FrameLoader.cpp:
440 (WebCore::FrameLoader::write): turn on/off encoding detector depending on Settings and set hintEncoding of TextResourceDecoder to the parent frame encoding if necessary and the security policy allows refering to the parent frame encoding.
441 * loader/TextResourceDecoder.cpp:
442 (WebCore::TextResourceDecoder::TextResourceDecoder):
443 (WebCore::TextResourceDecoder::checkForCSSCharset): add check for EncodingFromParentFrame
444 (WebCore::TextResourceDecoder::checkForHeadCharset): ditto
445 (WebCore::TextResourceDecoder::shouldAutoDetect):
446 (WebCore::TextResourceDecoder::decode): call encoding detector if shouldAutoDetect returns true.
447 (WebCore::TextResourceDecoder::flush): if encoding is not determined by now, call encoding detector if shouldAutoDetect returns true.
448 * loader/TextResourceDecoder.h:
449 (WebCore::TextResourceDecoder::):
450 (WebCore::TextResourceDecoder::create):
451 (WebCore::TextResourceDecoder::setHintEncoding):
452 (WebCore::TextResourceDecoder::source):
453 * page/Settings.cpp: add m_usesEncodingDetector
454 (WebCore::Settings::Settings):
455 (WebCore::Settings::setUsesEncodingDetector):
457 (WebCore::Settings::usesEncodingDetector):
458 * platform/text/TextEncodingDetector.h: Added.
459 * platform/text/TextEncodingDetectorICU.cpp: Added.
460 (WebCore::detectTextEncoding):
461 * platform/text/TextEncodingDetectorNone.cpp: Added.
462 (WebCore::detectTextEncoding):
464 2009-03-26 Darin Adler <darin@apple.com>
466 Reviewed by Geoff Garen.
468 Removed code that casts EventListener down to derived classes
469 without type checking. A crash could happen if you added event
470 listeners with Objective-C and then manipulated the class with
473 * bindings/js/JSDOMApplicationCacheCustom.cpp:
474 (WebCore::JSDOMApplicationCache::mark): Removed all the casts
475 and used the markIfNotNull function and mark functions on
476 EventListener instead.
477 * bindings/js/JSMessagePortCustom.cpp:
478 (WebCore::JSMessagePort::mark): Ditto.
479 * bindings/js/JSWorkerContextCustom.cpp:
480 (WebCore::JSWorkerContext::mark): Ditto.
481 * bindings/js/JSWorkerCustom.cpp:
482 (WebCore::JSWorker::mark): Ditto.
483 * bindings/js/JSXMLHttpRequestCustom.cpp:
484 (WebCore::JSXMLHttpRequest::mark): Ditto.
485 * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
486 (WebCore::JSXMLHttpRequestUpload::mark): Ditto.
488 * bindings/js/JSEventListener.cpp:
489 (WebCore::JSAbstractEventListener::handleEvent): Used function,
490 the new name for what used to be called listenerObj.
491 (WebCore::JSAbstractEventListener::virtualIsInline): Renamed since
492 this doesn't need to be virtual for callers who have a pointer to
493 this class, not the base class.
494 (WebCore::JSEventListener::function): Renamed from listenerObj.
495 (WebCore::JSProtectedEventListener::function): Ditto.
497 * bindings/js/JSEventListener.h: Removed unneeded forward class
498 declarations. Made all virtual functions private since there's no
499 need to call any of them on a particular derived class, only on
500 EventListener. Explicitly declare JSEventListener::mark as virtual
501 since it's now overriding a function in the EventListener base class.
502 Made JSProtectedEventListener::m_globalObject protected so the
503 JSLazyEventListener derived class can use it directly instead of using
504 a virtual function to get the pointer.
506 * bindings/js/JSLazyEventListener.cpp:
507 (WebCore::JSLazyEventListener::parseCode): Use m_globalObject instead
508 of globalObject since the latter is a virtual function and there's no
509 need to pay virtual function overhead.
510 (WebCore::JSLazyEventListener::function): Renamed from listenerObj.
512 * bindings/js/JSLazyEventListener.h: Moved forward declaration of the
513 Node class here from JSEventListener.h.
515 * bindings/scripts/CodeGeneratorJS.pm: Removed now-unneeded cast to
516 JSEventListener when getting the script object from a listener.
518 * dom/EventListener.h: Added virtual function and mark functions
519 so we can extract the JavaScript function object or mark a JavaScript
520 event listener in a type safe manner.
522 2009-03-26 Peter Kasting <pkasting@google.com>
524 Reviewed by Adele Peterson.
526 https://bugs.webkit.org/show_bug.cgi?id=24859
527 Use CSS file instead of code to adjust search field styling.
530 * rendering/RenderThemeWin.cpp:
531 * rendering/RenderThemeWin.h:
533 2009-03-26 Darin Adler <darin@apple.com>
535 Reviewed by Geoff Garen.
537 Split JSLazyEventListener out into its own separate source file.
538 We'll be removing JSAbstractEventListener and JSProtectedEventListener soon,
539 so leave those in the same file with JSEventListener.
541 * GNUmakefile.am: Added JSLazyEventListener.
542 * WebCore.pro: Ditto.
543 * WebCore.scons: Ditto.
544 * WebCore.vcproj/WebCore.vcproj: Ditto.
545 * WebCore.xcodeproj/project.pbxproj: Ditto.
546 * WebCoreSources.bkl: Ditto.
548 * bindings/js/JSEventListener.cpp: Removed the JSLazyEventListener part.
549 Removed unneeded includes. Removed incorrect ASSERT_CLASS_FITS_IN_CELL, since
550 JSAbstractEventListener is not derived from JSCell.
552 * bindings/js/JSEventListener.h: Removed the JSLazyEventListener part
553 and the now-unneeded include of PlatformString.h.
555 * bindings/js/JSLazyEventListener.cpp: Copied from bindings/js/JSEventListener.cpp.
556 Kept only the JSLazyEventListener part.
557 (WebCore::eventParameterName): Made this have internal linkage by adding "static".
558 Also moved the default case out of the switch statement so we will get a warning
559 if we omit any cases in the future.
561 * bindings/js/JSLazyEventListener.h: Copied from bindings/js/JSEventListener.h.
562 Kept only the JSLazyEventListener part.
564 * bindings/js/ScriptController.cpp: Removed unneeded includes and sorted the
565 remanining ones. Include JSLazyEventListener.h instead of JSEventListener.h.
567 2009-03-26 Darin Adler <darin@apple.com>
569 Reviewed by Geoff Garen.
571 Renamed JSUnprotectedEventListener to JSEventListener.
574 Soon Geoff will make all JavaScript event listeners use mark instead
575 of protect, so there's no need to emphasize "unprotected".
577 * bindings/js/JSDOMApplicationCacheCustom.cpp:
578 (WebCore::JSDOMApplicationCache::mark):
579 (WebCore::JSDOMApplicationCache::addEventListener):
580 (WebCore::JSDOMApplicationCache::removeEventListener):
581 * bindings/js/JSDOMGlobalObject.cpp:
582 (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject):
583 (WebCore::JSDOMGlobalObject::findJSEventListener):
584 (WebCore::JSDOMGlobalObject::findOrCreateJSEventListener):
585 (WebCore::JSDOMGlobalObject::jsEventListeners):
586 (WebCore::JSDOMGlobalObject::jsInlineEventListeners):
587 * bindings/js/JSDOMGlobalObject.h:
588 * bindings/js/JSDOMWindowBase.h:
589 * bindings/js/JSEventListener.cpp:
590 (WebCore::JSEventListener::JSEventListener):
591 (WebCore::JSEventListener::~JSEventListener):
592 (WebCore::JSEventListener::listenerObj):
593 (WebCore::JSEventListener::globalObject):
594 (WebCore::JSEventListener::clearGlobalObject):
595 (WebCore::JSEventListener::mark):
596 * bindings/js/JSEventListener.h:
597 (WebCore::JSEventListener::create):
598 * bindings/js/JSMessagePortCustom.cpp:
599 (WebCore::JSMessagePort::mark):
600 (WebCore::JSMessagePort::addEventListener):
601 (WebCore::JSMessagePort::removeEventListener):
602 * bindings/js/JSWorkerContextCustom.cpp:
603 (WebCore::JSWorkerContext::mark):
604 (WebCore::JSWorkerContext::addEventListener):
605 (WebCore::JSWorkerContext::removeEventListener):
606 * bindings/js/JSWorkerCustom.cpp:
607 (WebCore::JSWorker::mark):
608 (WebCore::JSWorker::addEventListener):
609 (WebCore::JSWorker::removeEventListener):
610 * bindings/js/JSXMLHttpRequestCustom.cpp:
611 (WebCore::JSXMLHttpRequest::mark):
612 (WebCore::JSXMLHttpRequest::addEventListener):
613 (WebCore::JSXMLHttpRequest::removeEventListener):
614 * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
615 (WebCore::JSXMLHttpRequestUpload::mark):
616 (WebCore::JSXMLHttpRequestUpload::addEventListener):
617 (WebCore::JSXMLHttpRequestUpload::removeEventListener):
618 * bindings/scripts/CodeGeneratorJS.pm:
621 2009-03-26 Darin Adler <darin@apple.com>
623 Reviewed by Geoff Garen.
625 Renamed JSEventListener to JSProtectedEventListener.
628 Soon Geoff will make all JavaScript event listeners use mark instead
629 of protect, and so this class will be be obsolete. We will rename
630 JSUnrpotectedEventListener to JSEventListener in the next check-in,
631 since that one will remain.
633 * bindings/js/JSDOMGlobalObject.cpp:
634 (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject):
635 (WebCore::JSDOMGlobalObject::findJSProtectedEventListener):
636 (WebCore::JSDOMGlobalObject::findOrCreateJSProtectedEventListener):
637 (WebCore::JSDOMGlobalObject::jsProtectedEventListeners):
638 (WebCore::JSDOMGlobalObject::jsProtectedInlineEventListeners):
639 * bindings/js/JSDOMGlobalObject.h:
640 * bindings/js/JSDOMWindowBase.h:
641 * bindings/js/JSDOMWindowCustom.cpp:
642 (WebCore::JSDOMWindow::addEventListener):
643 (WebCore::JSDOMWindow::removeEventListener):
644 * bindings/js/JSEventListener.cpp:
645 (WebCore::JSProtectedEventListener::JSProtectedEventListener):
646 (WebCore::JSProtectedEventListener::~JSProtectedEventListener):
647 (WebCore::JSProtectedEventListener::listenerObj):
648 (WebCore::JSProtectedEventListener::globalObject):
649 (WebCore::JSProtectedEventListener::clearGlobalObject):
650 (WebCore::JSLazyEventListener::JSLazyEventListener):
651 (WebCore::JSLazyEventListener::parseCode):
652 * bindings/js/JSEventListener.h:
653 (WebCore::JSProtectedEventListener::create):
654 * bindings/js/JSNodeCustom.cpp:
655 (WebCore::JSNode::addEventListener):
656 (WebCore::JSNode::removeEventListener):
657 * bindings/js/JSSVGElementInstanceCustom.cpp:
658 (WebCore::JSSVGElementInstance::addEventListener):
659 (WebCore::JSSVGElementInstance::removeEventListener):
660 * bindings/scripts/CodeGeneratorJS.pm:
663 2009-03-26 Dan Bernstein <mitz@apple.com>
665 Reviewed by Anders Carlsson.
667 - fix <rdar://problem/6725042> BidiResolver::createBidiRunsForLine can
668 create runs extending beyond the end
670 No test because Safari does not use this version of
671 createBidiRunsForLine() with the end iterator not pointing to the end
674 * platform/text/BidiResolver.h:
675 (WebCore::BidiResolver::appendRun): Cap the end of the run at the end
676 of the line and set the reachedEndOfLine flag. This mirrors the logic
677 in the specialized version of appendRun() in bidi.cpp, which is why the
678 problem did not show up in HTML. Also avoid creating empty runs.
680 2009-03-26 Simon Fraser <simon.fraser@apple.com>
682 Reviewed by Dave Hyatt
684 https://bugs.webkit.org/show_bug.cgi?id=24864
686 Change the terminology from "inner content layer" to "direct compositing"
687 for cases where we can push an image directly over to the compositing system,
688 without having to draw it.
690 Clean up much of the code which looks at style to determine if this is possible,
691 and fix some bugs when backgrounds change dynamically.
693 * rendering/RenderLayerBacking.cpp:
694 (WebCore::hasBorderOutlineOrShadow):
695 (WebCore::hasBoxDecorations):
696 (WebCore::hasBoxDecorationsWithBackgroundImage):
697 (WebCore::RenderLayerBacking::canBeSimpleContainerCompositingLayer):
698 (WebCore::RenderLayerBacking::canUseDirectCompositing):
699 (WebCore::RenderLayerBacking::detectDrawingOptimizations):
700 (WebCore::RenderLayerBacking::rendererContentChanged):
701 (WebCore::RenderLayerBacking::updateImageContents):
702 * rendering/RenderLayerBacking.h:
704 2009-03-26 Simon Fraser <simon.fraser@apple.com>
706 Reviewed by Dave Hyatt
708 https://bugs.webkit.org/show_bug.cgi?id=23914
710 Tests: compositing/overflow/ancestor-overflow.html
711 compositing/overflow/parent-overflow.html
713 * rendering/RenderLayer.cpp:
714 (WebCore::RenderLayer::calculateClipRects):
715 * rendering/RenderLayer.h:
716 (WebCore::ClipRects::infiniteRect):
717 New static method that returns a large rect that is used by the clipping
720 * rendering/RenderLayerBacking.cpp:
721 (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
722 Use parentClipRects(), rather than calculateRects(), to compute the overflow
723 rect that we'll use to create a masking layer for composited clipping.
725 * rendering/RenderLayerCompositor.cpp:
726 (WebCore::RenderLayerCompositor::clippedByAncestor):
727 Use parentClipRects() to see whether there's a layer between us and our
728 compositing ancestor which applies clipping.
730 (WebCore::RenderLayerCompositor::clipsCompositingDescendants):
731 A layer which imposes clipping to its children doesn't have to be a stacking
732 context; it might be a normal flow layer; in either case, we can rely on the
733 hasCompositingDescendant() bit.
735 2009-03-26 Steve Falkenburg <sfalken@apple.com>
737 https://bugs.webkit.org/show_bug.cgi?id=24837
738 Escape key should dismiss select menu
740 Reviewed by Adam Roben.
742 * platform/win/PopupMenuWin.cpp:
743 (WebCore::PopupWndProc):
745 2009-03-26 Kevin Ollivier <kevino@theolliviers.com>
747 Reviewed by Alexey Proskuryakov.
749 Make sure the script uses LF line endings even on Windows.
751 https://bugs.webkit.org/show_bug.cgi?id=24805
753 * WebCore/make-generated-sources.sh: Change svn:eol-style to LF
755 2009-03-26 Eli Fidler <eli.fidler@torchmobile.com>
757 Reviewed by George Staikos.
759 Remove warnings all over the place by making operator precedence
760 explicit in cases like x && y || z. No functional change.
762 * css/CSSFontSelector.cpp:
763 (WebCore::CSSFontSelector::addFontFaceRule):
765 (WebCore::CSSParser::parseValue):
766 (WebCore::CSSParser::parseShadow):
768 (WebCore::Document::shouldScheduleLayout):
770 (WebCore::Node::isBlockFlowOrBlockTable):
772 (WebCore::Node::document):
774 (WebCore::Position::next):
775 (WebCore::Position::upstream):
776 (WebCore::Position::downstream):
777 (WebCore::Position::getInlineBoxAndOffset):
778 * dom/PositionIterator.cpp:
779 (WebCore::PositionIterator::atStart):
781 (WebCore::Range::intersectsNode):
782 * editing/Editor.cpp:
783 (WebCore::Editor::setBaseWritingDirection):
784 * editing/InsertParagraphSeparatorCommand.cpp:
785 (WebCore::InsertParagraphSeparatorCommand::doApply):
786 * editing/ReplaceSelectionCommand.cpp:
787 (WebCore::ReplaceSelectionCommand::doApply):
788 * editing/TextIterator.cpp:
789 (WebCore::TextIterator::advance):
790 (WebCore::SimplifiedBackwardsTextIterator::advance):
791 * editing/VisiblePosition.cpp:
792 (WebCore::VisiblePosition::leftVisuallyDistinctCandidate):
793 (WebCore::VisiblePosition::rightVisuallyDistinctCandidate):
794 (WebCore::VisiblePosition::canonicalPosition):
795 * editing/htmlediting.cpp:
796 (WebCore::isMailBlockquote):
797 (WebCore::lineBreakExistsAtPosition):
798 * html/HTMLSelectElement.cpp:
799 (WebCore::HTMLSelectElement::parseMappedAttribute):
800 * loader/FTPDirectoryDocument.cpp:
801 (WebCore::processFileDateString):
802 * loader/ImageLoader.cpp:
803 (WebCore::ImageLoader::updateFromElement):
804 * loader/TextResourceDecoder.cpp:
805 (WebCore::TextResourceDecoder::checkForHeadCharset):
806 * page/AccessibilityObject.cpp:
807 (WebCore::updateAXLineStartForVisiblePosition):
808 * page/EventHandler.cpp:
809 (WebCore::EventHandler::sendContextMenuEvent):
810 * page/animation/AnimationBase.cpp:
811 (WebCore::PropertyWrapperGetter::equals):
812 (WebCore::PropertyWrapperShadow::equals):
813 * platform/ContextMenu.cpp:
814 (WebCore::ContextMenu::populate):
815 * platform/ScrollView.cpp:
816 (WebCore::ScrollView::adjustScrollbarsAvoidingResizerCount):
817 * platform/text/Base64.cpp:
818 (WebCore::base64Encode):
819 * platform/text/BidiResolver.h:
820 (WebCore::::raiseExplicitEmbeddingLevel):
821 (WebCore::::createBidiRunsForLine):
822 * rendering/InlineTextBox.cpp:
823 (WebCore::InlineTextBox::placeEllipsisBox):
824 * rendering/RenderBlock.cpp:
825 (WebCore::RenderBlock::addChild):
826 (WebCore::RenderBlock::repaintOverhangingFloats):
827 (WebCore::RenderBlock::fillInlineSelectionGaps):
828 (WebCore::RenderBlock::positionForPoint):
829 (WebCore::RenderBlock::calcInlinePrefWidths):
830 (WebCore::RenderBlock::hasLineIfEmpty):
831 * rendering/RenderBox.cpp:
832 (WebCore::RenderBox::imageChanged):
833 (WebCore::RenderBox::localCaretRect):
834 (WebCore::RenderBox::positionForPoint):
835 (WebCore::RenderBox::shrinkToAvoidFloats):
836 * rendering/RenderObject.h:
837 (WebCore::objectIsRelayoutBoundary):
838 * rendering/RenderTableCell.cpp:
839 (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
840 * rendering/RenderText.cpp:
841 (WebCore::RenderText::calcPrefWidths):
842 * rendering/bidi.cpp:
843 (WebCore::RenderBlock::determineStartPosition):
844 (WebCore::textWidth):
845 * rendering/style/RenderStyle.cpp:
846 (WebCore::RenderStyle::diff):
847 * rendering/style/StyleInheritedData.cpp:
848 (WebCore::cursorDataEquivalent):
849 * rendering/style/StyleRareInheritedData.cpp:
850 (WebCore::StyleRareInheritedData::shadowDataEquivalent):
851 * rendering/style/StyleRareNonInheritedData.cpp:
852 (WebCore::StyleRareNonInheritedData::shadowDataEquivalent):
853 (WebCore::StyleRareNonInheritedData::animationDataEquivalent):
854 (WebCore::StyleRareNonInheritedData::transitionDataEquivalent):
856 2009-03-26 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
858 Reviewed by Holger Freyther.
860 https://bugs.webkit.org/show_bug.cgi?id=24804
861 [GTK] 401 responses cause rogue content to be loaded
863 Our soup code handles 401 responses itself, so we should not feed
864 the headers and data of those responses to the loader.
866 * platform/network/soup/ResourceHandleSoup.cpp:
867 (WebCore::gotHeadersCallback):
868 (WebCore::gotChunkCallback):
870 2009-03-25 Geoffrey Garen <ggaren@apple.com>
872 Reviewed by Oliver Hunt and Darin Adler.
874 Fixed <rdar://problem/6603167> Crash in WebKit!JSC::JSGlobalObject::resetPrototype
875 during Stress test (#3 & #7 WER crashes for Safari 4 Beta)
877 The problem was that allocation of the global object would, for just a
878 moment, leave the global object's prototype unprotected from GC. This
879 bug doesn't apply to non-global DOM objects because their prototypes are
880 cached and marked by the global object.
882 No test case because the crashing condition is hard to deterministically
883 produce in a normal build, and in a Windows Release build with
884 COLLECT_ON_EVERY_ALLOCATION set to 1, existing tests crash/hang.
886 * bindings/js/JSDOMWindowShell.cpp:
887 (WebCore::JSDOMWindowShell::setWindow):
888 * bindings/js/WorkerScriptController.cpp:
889 (WebCore::WorkerScriptController::initScript): Protect the global object's
890 prototype from GC during construction, since the global object does not
891 yet point to it, and therefore won't mark it.
893 2009-03-25 Dean Jackson <dino@apple.com>
895 Reviewed by Simon Fraser
897 https://bugs.webkit.org/show_bug.cgi?id=23361
899 When using hardware compositing, some images can be directly
900 rendered by the hardware - no need to draw them into a separate
901 context, therefore saving memory.
902 Only images with certain style properties can be directly
903 composited - basically anything that is not a simple image requires
904 the usual rendering path (eg. if the image has borders).
906 Test: compositing/direct-image-compositing.html
908 * manual-tests/resources/simple_image.png: Added.
909 * manual-tests/simple-image-compositing.html: Added.
910 * platform/graphics/Image.h:
911 (WebCore::Image::startAnimation):
912 - move this to public
913 * rendering/RenderImage.cpp:
914 (WebCore::RenderImage::imageChanged):
915 - poke compositing layer if image has changed
916 (WebCore::RenderImage::notifyFinished):
917 - let the compositing layer know that it can render the image
918 * rendering/RenderImage.h:
919 * rendering/RenderLayer.cpp:
920 (WebCore::RenderLayer::rendererContentChanged):
921 * rendering/RenderLayer.h:
922 * rendering/RenderLayerBacking.cpp:
923 (WebCore::RenderLayerBacking::canUseInnerContentLayer):
924 (WebCore::RenderLayerBacking::detectDrawingOptimizations):
925 (WebCore::RenderLayerBacking::rendererContentChanged):
926 * rendering/RenderLayerBacking.h:
927 - code to hook up direct compositing of images where
930 2009-03-25 David Levin <levin@chromium.org>
932 Reviewed by Dimitri Glazkov.
934 Chromium build fix. Fix #include in V8NodeFilterCondition.cpp due to the
935 rename of V8NodeFilter to V8NodeFilterCondition.
937 * bindings/v8/V8NodeFilterCondition.cpp:
939 2009-03-25 Simon Fraser <simon.fraser@apple.com>
941 Reviewed by Darin Adler
943 https://bugs.webkit.org/show_bug.cgi?id=24817
945 When the slider range is zero, avoid a divide by zero, which caused the
946 thumb to be positioned off in the weeds, which broke painting.
948 Test: media/video-empty-source.html
950 * rendering/RenderSlider.cpp:
951 (WebCore::SliderRange::proportionFromValue):
952 (WebCore::SliderRange::valueFromProportion):
953 (WebCore::sliderPosition):
954 (WebCore::RenderSlider::setValueForPosition):
956 2009-03-24 Eric Seidel <eric@webkit.org>
958 Reviewed by Darin Adler.
960 Remove dead code and style cleanup
961 https://bugs.webkit.org/show_bug.cgi?id=24684
963 * html/CanvasStyle.cpp:
964 (WebCore::CanvasStyle::CanvasStyle):
965 Coverty was annoyed that we didn't initialize all of our members. I agree, but I didn't
966 want to paste all 8 members each time, so I just cleaned up the existing constructors and left them.
967 * page/FocusController.cpp:
968 (WebCore::FocusController::setFocusedNode):
969 "node" was checked just above and is already known to be non-null
970 * rendering/RenderLayer.cpp:
971 (WebCore::RenderLayer::insertOnlyThisLayer):
972 We were already using parentLayer w/o a NULL check above, so just add an explicit ASSERT and use it w/o NULL check
973 (WebCore::RenderLayer::resize):
974 element is already ASSERTed above, no need to null check it here
975 * rendering/RenderTableSection.cpp:
976 (WebCore::RenderTableSection::addCell):
977 currentCell.cell was just assigned to the value "cell" which is known to be non-null, no need to null check again.
979 2009-03-24 Eric Seidel <eric@webkit.org>
981 Reviewed by Darin Adler.
983 Move ASSERT(foo) to before where foo-> is used
984 https://bugs.webkit.org/show_bug.cgi?id=24684
986 * platform/chromium/PasteboardChromium.cpp:
987 (WebCore::Pasteboard::writeImage):
988 Move ASSERTs to the top of the function, code was using "node" before ASSERT(node), once I moved
989 ASSERT(node) to the top of the function it made sense to move the rest of them there too.
990 * rendering/SVGRenderSupport.cpp:
991 (WebCore::prepareToRenderSVGContent):
992 move ASSERT(object) to *before* we use "object" :)
994 2009-03-24 Eric Seidel <eric@webkit.org>
996 Reviewed by Simon Fraser.
998 Make TextTokenizer ASSERT that the buffer was freed
999 https://bugs.webkit.org/show_bug.cgi?id=24684
1001 * loader/TextDocument.cpp:
1002 (WebCore::TextTokenizer::TextTokenizer):
1003 (WebCore::TextTokenizer::~TextTokenizer):
1004 (WebCore::TextTokenizer::finish):
1005 Make it clear by adding a ~TextTokenizer that finish() will always be called and the memory never leaked.
1007 2009-03-24 Eric Seidel <eric@webkit.org>
1009 Reviewed by Darin Adler.
1011 Fix case where lBreak.obj->isBR() when lBreak.obj was NULL
1012 https://bugs.webkit.org/show_bug.cgi?id=24684
1014 I don't have a test case where we were taking the wrong path here
1015 However, adding an ASSERT(lBreak.obj) before this usage caused
1016 multiple bidi tests to fail, so lBreak.obj can be null here.
1018 * rendering/bidi.cpp:
1019 (WebCore::RenderBlock::findNextLineBreak):
1020 lBreak.obj can be null, so we can't call ->isBR() on it unconditionally.
1022 2009-03-24 Eric Seidel <eric@webkit.org>
1024 Reviewed by Simon Fraser.
1026 Style cleanup and dead code removal in dom, editing
1027 https://bugs.webkit.org/show_bug.cgi?id=24684
1029 * dom/ContainerNode.cpp:
1030 (WebCore::ContainerNode::getUpperLeftCorner):
1031 (WebCore::ContainerNode::getLowerRightCorner):
1032 (WebCore::ContainerNode::getRect):
1033 Coverty was (rightly) confused as to what the hell "o" was being used for
1034 and whether or not it would ever be NULL. I added some ASSERTS so that people (and machines)
1035 would be less confused about the logic in getUpperLeftCorner/getLowerRightCorner
1037 (WebCore::Document::recalcStyle):
1038 Remove dead code, this block already checked that change == Force
1039 * editing/ApplyStyleCommand.cpp:
1040 (WebCore::ApplyStyleCommand::removeInlineStyle):
1041 Coverty correctly identified that traversePreviousNodePostOrder can return NULL, thus
1042 prev will be null, and we don't really explicitly handle it (like we probably should)
1043 It's OK though, because we end up creating a null position object, which may not have
1044 been what we intended, but we certainly don't crash.
1045 * editing/InsertParagraphSeparatorCommand.cpp:
1046 (WebCore::InsertParagraphSeparatorCommand::doApply):
1047 Remove dead code, insertionPosition.node() is already checked to be non-null above.
1048 * editing/markup.cpp:
1049 (WebCore::appendStartMarkup):
1050 removed dead code, annotate is already known to be true at this point in the file
1051 !annotate was checked above, and break; was called.
1053 2009-03-24 Eric Seidel <eric@webkit.org>
1055 Reviewed by Simon Fraser.
1057 CSS dead code removal and cleanup from Coverty errors
1058 https://bugs.webkit.org/show_bug.cgi?id=24684
1060 * css/CSSStyleSelector.cpp:
1061 (WebCore::CSSStyleSelector::applyProperty):
1062 Every other place in the code we check settings() for NULL, so I made these places
1063 check too, even though we should never be resolving style against a document which has
1064 no frame (which I believe is the only time settings() can be null)
1065 * css/CSSStyleSheet.cpp:
1066 (WebCore::CSSStyleSheet::styleSheetChanged):
1067 Removing dead code, "root" can never be null here.
1068 * css/SVGCSSStyleSelector.cpp:
1069 (WebCore::colorFromSVGColorCSSValue):
1070 (WebCore::CSSStyleSelector::applySVGProperty):
1071 Extra returns in the old macros caused dead code. Removing the old macros and use modern
1073 Extra null checks to value were not needed. Added an ASSERT at the top of the function
1074 to make it clear that value will never be NULL.
1075 Added colorFromSVGColorCSSValue to clean up the code a little.
1077 2009-03-24 Eric Seidel <eric@webkit.org>
1079 Reviewed by Simon Fraser.
1081 Font fallback cleanup and added ASSERT for GlyphPageTreeNode
1082 https://bugs.webkit.org/show_bug.cgi?id=24684
1084 * css/CSSFontSelector.cpp:
1085 (WebCore::compareFontFaces):
1086 Coverty was concerned that it was possible to index off the end of weightFallbackRuleSets
1087 I can't read the code well enough to tell, so I tried to make the code clearer
1088 and added an ASSERT.
1089 * platform/graphics/GlyphPageTreeNode.cpp:
1090 (WebCore::GlyphPageTreeNode::initializePage):
1091 Coverty believes we can crash here due to j being larger than GlyphPage::size. I think to is already
1092 known to be < GlyphPage::size due to the min() statement above, but not being sure I added an ASSERT.
1094 2009-03-24 Eric Seidel <eric@webkit.org>
1096 Reviewed by Simon Fraser.
1098 Coverty inspired fixes in Animations/Transforms
1099 https://bugs.webkit.org/show_bug.cgi?id=24684
1101 * page/animation/AnimationBase.h:
1102 Fix animate() signatures to match so that the virtual methods actually override one another. :)
1103 * page/animation/AnimationController.cpp:
1104 (WebCore::AnimationControllerPrivate::removeFromStartTimeResponseWaitList):
1105 Attempt to fix this method, prevAnimation was never set to anything but NULL,
1106 as far as I can tell the author originally intended to update it at the end
1107 of the loop, which is what I changed this code to do.
1108 * page/animation/ImplicitAnimation.cpp:
1109 (WebCore::ImplicitAnimation::animate):
1110 Make method signature match AnimationBase::animate
1111 * page/animation/ImplicitAnimation.h:
1112 * page/animation/KeyframeAnimation.cpp:
1113 (WebCore::KeyframeAnimation::animate):
1114 Make method signature match AnimationBase::animate
1115 * page/animation/KeyframeAnimation.h:
1116 * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
1117 (WebCore::PerspectiveTransformOperation::blend):
1118 if (blendToIdentity) already returned above.
1119 * platform/graphics/transforms/RotateTransformOperation.cpp:
1120 (WebCore::RotateTransformOperation::blend):
1121 if (blendToIdentity) already returned above.
1123 2009-03-25 Eli Fidler <eli.fidler@torchmobile.com>
1125 Reviewed by George Staikos.
1127 Fix compiler warnings regarding assignments in if statements.
1129 * html/HTMLFormElement.cpp:
1130 (WebCore::HTMLFormElement::createFormData):
1131 * plugins/PluginPackage.cpp:
1132 (WebCore::PluginPackage::compare):
1134 2009-03-25 Dan Bernstein <mitz@apple.com>
1136 Reviewed by Dave Hyatt.
1138 - fix <rdar://problem/6472150> repro crash in
1139 RenderBlock::rightmostPosition(bool, bool) const at mercotte.fr using
1142 Test: fast/inline/continuation-positioned-reparenting.html
1144 * rendering/RenderInline.cpp:
1145 (WebCore::RenderInline::splitFlow): When repurposing the existing
1146 container as the "pre" block, clear its positioned objects list, because
1147 positioned descendants may end up in a different block after the split.
1149 2009-03-24 Simon Fraser <simon.fraser@apple.com>
1151 Reviewed by Dave Hyatt
1153 https://bugs.webkit.org/show_bug.cgi?id=24784
1155 Length values in transform operations need to take zoom into account.
1157 Test: fast/transforms/transforms-with-zoom.html
1159 * css/CSSStyleSelector.cpp:
1160 (WebCore::CSSStyleSelector::createTransformOperations):
1162 2009-03-25 David Hyatt <hyatt@apple.com>
1164 Reviewed by Simon Fraser.
1166 https://bugs.webkit.org/show_bug.cgi?id=24809, background-clip/origin don't use the correct
1167 values. Add support for the new values (while preserving the old values for backwards
1170 Changed some existing test cases to use the new values.
1172 * css/CSSParser.cpp:
1173 (WebCore::CSSParser::parseFillProperty):
1174 * css/CSSPrimitiveValueMappings.h:
1175 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1176 (WebCore::CSSPrimitiveValue::operator EFillBox):
1177 * css/CSSValueKeywords.in:
1179 2009-03-25 Brett Wilson <brettw@dhcp-172-22-71-191.mtv.corp.google.com>
1181 Reviewed by Dimitri Glazkov.
1183 Fix complex text opacity on the Chromium Windows port.
1184 https://bugs.webkit.org/show_bug.cgi?id=24757
1186 Test: fast/text/complex-text-opacity.html
1188 * platform/graphics/chromium/FontChromiumWin.cpp:
1190 (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::TransparencyAwareFontPainter):
1191 (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::init):
1192 (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::initializeForGDI):
1193 (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter):
1194 (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::TransparencyAwareGlyphPainter):
1195 (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::~TransparencyAwareGlyphPainter):
1196 (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::estimateTextBounds):
1197 (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
1198 (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::hdc):
1199 (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::TransparencyAwareUniscribePainter):
1200 (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::~TransparencyAwareUniscribePainter):
1201 (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::estimateTextBounds):
1202 (WebCore::Font::drawGlyphs):
1203 (WebCore::Font::drawComplexText):
1205 2009-03-25 David Hyatt <hyatt@apple.com>
1207 Reviewed by Eric Seidel
1209 Fix for bug 23198, border images should not clip to border radii. The border-image should just ignore
1210 the border-radius, since the assumption is that any desired rounding will be built into the border-image
1213 Note that I do not agree with this change, but I am matching the spec.
1215 Added fast/borders/border-image-border-radius.html
1217 * rendering/RenderBoxModelObject.cpp:
1218 (WebCore::RenderBoxModelObject::paintNinePieceImage):
1220 2009-03-25 Gustavo Noronha Silva <gns@gnome.org>
1222 Reviewed by Holger Freyther.
1224 https://bugs.webkit.org/show_bug.cgi?id=24750
1225 [GTK] requests download instead of displaying page
1227 Fix the Content-Type headers we get from soup, so that we set a
1228 proper media type on the ResourceResponse.
1230 * platform/network/soup/ResourceHandleSoup.cpp:
1231 (WebCore::fillResponseFromMessage):
1233 2009-03-25 Gustavo Noronha Silva <gns@gnome.org>
1235 Reviewed by Holger Freyther.
1237 https://bugs.webkit.org/show_bug.cgi?id=24600
1238 [GTK] responses with status code >= 400 should not be given special treatment
1240 Do not special case requests that have HTTP responses >=
1241 400. Redirects are handled automatically by libsoup, but the rest
1242 of the responses should be treated like any other.
1244 * platform/network/soup/ResourceHandleSoup.cpp:
1246 (WebCore::gotHeadersCallback):
1247 (WebCore::gotChunkCallback):
1248 (WebCore::finishedCallback):
1250 2009-03-25 Darin Adler <darin@apple.com>
1252 Reviewed by John Sullivan.
1254 Tidy up LegacyWebArchive a bit. And don't include favicons in web archives when
1255 they are being used only for selections, not an entire document.
1257 * WebCore.base.exp: Remove exported function that's not used in WebKit.
1259 * loader/archive/cf/LegacyWebArchive.cpp:
1260 (WebCore::LegacyWebArchive::createPropertyListRepresentation): Made a static member
1261 function so it can share private things with other member functions. Added some FIXME
1262 comments to a branch of code I think is dead. Changed boolean argument into a named
1263 one. Renamed to match other similar functions.
1264 (WebCore::LegacyWebArchive::createResourceResponseFromPropertyListData): Ditto.
1265 (WebCore::LegacyWebArchive::createResource): Ditto.
1266 (WebCore::LegacyWebArchive::create): Merged the create and init functions.
1267 (WebCore::LegacyWebArchive::rawDataRepresentation): Added some assertions because
1268 we should never fail to write (we can fail to read).
1269 (WebCore::LegacyWebArchive::createResourceResponseFromMacArchivedData): Made a static
1270 member function as above.
1271 (WebCore::LegacyWebArchive::createFromSelection): Ditto.
1272 (WebCore::LegacyWebArchive::create): Iterate the vector with indices rather than
1273 iterators. Only include the favicon if the first node is the document since we don't
1274 want to include the favicon when copying and pasting.
1276 * loader/archive/cf/LegacyWebArchive.h: Made one of the create functions private.
1277 Made the Mac-specific functions be static member functions. Made other helpers be
1278 static member functions. Removed the nit function.
1280 * loader/archive/cf/LegacyWebArchiveMac.mm:
1281 (WebCore::LegacyWebArchive::createResourceResponseFromMacArchivedData): Updated
1282 comment and made this a static member function.
1283 (WebCore::LegacyWebArchive::createPropertyListRepresentation): Ditto. Also made
1284 it so we only type cast in one place.
1286 2009-03-25 Darin Adler <darin@apple.com>
1288 Reviewed by David Hyatt.
1290 Bug 24740: crash in RenderSlider::setPositionFromValue when calling pause() after setting <video> to display: none
1291 https://bugs.webkit.org/show_bug.cgi?id=24740
1292 rdar://problem/6679873
1294 Bug 12104: Native Slider: When the thumb's height is specified as a percentage, it is not centered properly
1295 https://bugs.webkit.org/show_bug.cgi?id=12104
1297 Test: media/video-display-none-crash.html
1299 The problem here was that RenderSlider was trying to position its thumb in a way that
1300 requires it to call updateLayout inside rendering code. The right way to position a
1301 child renderer is to do layout, so I had to write a layout function. And then fix a few
1302 other small problems shown by the same test case.
1304 * rendering/RenderSlider.cpp: Made defaultTrackLength have internal linkage.
1305 Renamed HTMLSliderThumbElement to SliderThumbElement because we only use the HTML
1306 prefix for public DOM classes, not elements used as implementation details.
1307 Made SliderThumbElement function members private and got rid of unneeded default
1308 argument value for shadowParent.
1309 (WebCore::SliderRange::SliderRange): Added. Parses precision, max, and min attributes.
1310 (WebCore::SliderRange::clampValue): Added. Does standard clamping based on the above.
1311 (WebCore::SliderRange::valueFromElement): Added. Reads the value from the element in
1312 a way that clamps to the range.
1313 (WebCore::sliderPosition): Added. Computes the slider position: a double.
1314 (WebCore::SliderThumbElement::SliderThumbElement): Removed unneeded explicit
1315 initialization of m_initialClickPoint.
1316 (WebCore::SliderThumbElement::defaultEventHandler): Call setValueForPosition instead
1317 of calling setCurrentPosition and valueChanged.
1318 (WebCore::RenderSlider::RenderSlider): Remove unneeded explicit initialization of m_thumb.
1319 (WebCore::RenderSlider::styleDidChange): Remove unneeded second argument to createThumbStyle.
1320 (WebCore::RenderSlider::createThumbStyle): Remove unneeded second argument. Get rid of code
1321 setting the position to relative and setting the left and top. We now handle positioning
1322 in a custom layout function.
1323 (WebCore::RenderSlider::layout): Rewrote to handle positioning of the thumb as layout.
1324 (WebCore::RenderSlider::updateFromElement): Added code to immediately update the value
1325 in the element if it's out of range. This clamping used to be done as a side effect of
1326 setPositionFromValue. Also, this has nothing to do with the renderer, so at some point
1327 it could be moved into HTMLInputElement. Removed call to setPositionFromValue
1328 and instead just rely on the call to setNeedsLayout. Fix the setNeedsLayout call to be
1329 a normal setNeedsLayout(true), not a setNeedsLayout(true, false), because we do want
1330 this to be propagated to the parent -- it's not called during layout.
1331 (WebCore::RenderSlider::setValueForPosition): Refactor to use the new SliderRange
1332 class. Also don't call setCurrentPosition; instead just call setNeedsLayout.
1333 (WebCore::RenderSlider::currentPosition): Use the actual position of the renderer rather
1334 than the style to find the position; that means this needs to be done after layout is done.
1335 Also removed unneeded runtime checks and replaced them with assertions, after checking
1336 all callers to see they already guarantee this.
1337 (WebCore::RenderSlider::trackSize): Removed unneeded runtime checks and replaced them
1338 with assertions, after checking all callers to see they already guarantee this.
1339 (WebCore::RenderSlider::inDragMode): Added a null check for m_thumb so this won't
1340 crash if called early on a brand new RenderSlider.
1342 * rendering/RenderSlider.h: Made all functions private except for forwardEvent and inDragMode.
1343 Renamed HTMLSliderThumbElement to SliderThumbElement because we only use the HTML
1344 prefix for public DOM classes, not elements used as implementation details. Made the
1345 mouseEventIsInThumb function non-virtual. Removed the return value and argument from
1346 setPositionFromValue. Removed valueChanged and setCurrentPosition. Removed the oldStyle
1347 argument to createThumbStyle (see above). Made SliderThumbElement a friend so it can use some
1348 private member functions.
1350 2009-03-25 Eli Fidler <eli.fidler@torchmobile.com>
1352 Reviewed by George Staikos.
1354 Fix ambiguous else cases by adding braces to nested if()s with elses.
1356 * loader/MainResourceLoader.cpp:
1357 (WebCore::MainResourceLoader::continueAfterContentPolicy):
1358 * page/EventHandler.cpp:
1359 (WebCore::EventHandler::updateDragAndDrop):
1360 * rendering/RenderListMarker.cpp:
1361 (WebCore::toArmenianUnder10000):
1362 * rendering/TextControlInnerElements.cpp:
1363 (WebCore::TextControlInnerTextElement::defaultEventHandler):
1365 2009-03-24 Eli Fidler <eli.fidler@torchmobile.com>
1367 Reviewed by George Staikos.
1369 Move variable into proper platform block to quiet warning.
1371 * html/CanvasRenderingContext2D.cpp:
1372 (WebCore::CanvasRenderingContext2D::drawTextInternal):
1374 2009-03-24 Eric Carlson <eric.carlson@apple.com>
1376 Reviewed by Antti Koivisto.
1378 Fix for <rdar://problem/6719375> Deal with QTKit loadstate changes when playing streaming movies
1380 * WebCore/html/HTMLMediaElement.cpp:
1381 (WebCore::HTMLMediaElement::setNetworkState): Deal with media engine reviving after having
1382 network state of NETWORK_NO_SOURCE.
1384 * WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1385 (WebCore::MediaPlayerPrivate::updateStates): Reset m_readyState at each state change since
1386 some types of movies currently cause QTKit's load state to bounce around. QTMovieLoadStatePlaythroughOK
1387 corresponds to HaveFutureData, not HaveEnoughData.
1389 2009-03-24 Adele Peterson <adele@apple.com>
1391 Reviewed by Darin Adler.
1393 Fix for https://bugs.webkit.org/show_bug.cgi?id=24707
1394 <rdar://problem/6593021> Deleting with a caret in a blank, quoted line decreases the quoting, but does not delete the line
1396 * editing/TypingCommand.cpp: (WebCore::TypingCommand::deleteKeyPressed):
1397 After breaking out of an empty mail blockquote, we still want continue with the deletion
1398 so actual content will get deleted, and not just the quote style.
1400 2009-03-24 Darin Adler <darin@apple.com>
1402 Reviewed by Brady Eidson.
1404 <rdar://problem/6624662> REGRESSION (r39904): can't save certain web pages as web archive (ones without favicons!)
1406 * loader/archive/cf/LegacyWebArchive.cpp:
1407 (WebCore::LegacyWebArchive::create): Added a null check.
1409 2009-03-24 Adam Langley <agl@google.com>
1411 Reviewed by Darin Fisher.
1413 https://bugs.webkit.org/show_bug.cgi?id=24685
1415 The Skia drawLine function takes subpixel values and attempts to draw
1416 a line with subpixel precision. This is complex and slow for drawing
1417 scrollbars which use only vertical and horizontal lines.
1419 This changes the Chromium Linux scrollbar code to use drawIRect.
1421 * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
1422 (WebCore::ScrollbarThemeChromium::invalidateOnMouseEnterExit):
1423 (WebCore::drawVertLine):
1424 (WebCore::drawHorizLine):
1426 (WebCore::ScrollbarThemeChromium::paintTrackPiece):
1427 (WebCore::ScrollbarThemeChromium::paintThumb):
1429 2009-03-24 David Kilzer <ddkilzer@apple.com>
1431 Bug 23310: Setting an absolute path (/abs) on an <iframe> with no src doesn't resolve the URL properly
1433 <https://bugs.webkit.org/show_bug.cgi?id=23310>
1435 Reviewed by Darin Adler.
1437 Test: fast/frames/iframe-no-src-set-location.html
1440 (WebCore::Document::completeURL): If m_baseURL is empty or is
1441 about:blank and we have a parent document, use the parent
1442 document's URL for the base when completing a new URL.
1444 2009-03-24 Simon Fraser <simon.fraser@apple.com>
1446 Reviewed by Dave Hyatt
1448 https://bugs.webkit.org/show_bug.cgi?id=24659
1450 When hit-testing 3d-transformed layers, it doesn't make sense to project the hitTestRect
1451 into the coordinate space of the layer, and doing so can result in pathalogical quads
1452 that break hit testing. In that case, simply use the same bounds as used for painting,
1453 which are the composited bounds for this layer.
1455 Test: transforms/3d/hit-testing/rotated-hit-test.html
1457 * rendering/RenderLayer.cpp:
1458 (WebCore::RenderLayer::hitTestLayer):
1460 2009-03-24 Simon Fraser <simon.fraser@apple.com>
1462 Reviewed by Dave Hyatt
1464 https://bugs.webkit.org/show_bug.cgi?id=24436
1466 When compositing is enabled, painting and hit testing end up using different
1467 clipping roots, because, for painting, every composited layer is a clipping root,
1468 but for hit testing only layers with transforms are. To fix this, we use
1469 temporary clip rects for hit testing, if the page is in compositing mode.
1471 * rendering/RenderLayer.cpp:
1472 (WebCore::RenderLayer::paintLayer):
1473 (WebCore::RenderLayer::hitTestLayer):
1474 (WebCore::RenderLayer::parentClipRects):
1475 (WebCore::RenderLayer::calculateRects):
1476 * rendering/RenderLayer.h:
1478 2009-03-24 Simon Fraser <simon.fraser@apple.com>
1480 Reviewed by Dan Bernstein
1482 https://bugs.webkit.org/show_bug.cgi?id=24782
1484 Fix regression with CSS clip rects with non-length values, by reverting to
1485 the original code, but passing the zoom multiplier through convertToLength().
1487 Also make stylistic change in createTransformOperations(), renaming 'inStyle'
1490 Tested by existing tests.
1492 * css/CSSStyleSelector.cpp:
1493 (WebCore::convertToLength):
1494 (WebCore::CSSStyleSelector::applyProperty):
1495 (WebCore::CSSStyleSelector::createTransformOperations):
1497 2009-03-24 David Hyatt <hyatt@apple.com>
1499 Reviewed by Simon Fraser
1501 https://bugs.webkit.org/show_bug.cgi?id=21789, overflow:hidden elements should clip their foreground contents
1504 This patch makes non-self-painting overflow layers and control clips work with border-radius. RenderLayers
1505 that should be clipped by overflow ancestors with border-radius are still broken.
1507 Added fast/clip/overflow-border-radius-clip.html
1509 * rendering/RenderBox.cpp:
1510 (WebCore::RenderBox::pushContentsClip):
1512 2009-03-24 David Hyatt <hyatt@apple.com>
1514 Reviewed by Simon Fraser
1516 https://bugs.webkit.org/show_bug.cgi?id=21789, overflow:hidden elements should clip their foreground contents.
1518 This first patch makes overflow:hidden properly clip the foreground contents of overflow:hidden replaced elements. Common
1519 replaced elements now default to overflow:hidden in the UA stylesheet (this is what the spec specifically recommends be
1522 Added fast/replaced/border-radius-clip.html
1525 * rendering/RenderReplaced.cpp:
1526 (WebCore::RenderReplaced::paint):
1527 * rendering/RenderWidget.cpp:
1528 (WebCore::RenderWidget::paint):
1530 2009-03-24 Adele Peterson <adele@apple.com>
1534 Only build these Mail quirks checks in on the Mac.
1536 * dom/Document.cpp: (WebCore::disableRangeMutation):
1537 * html/HTMLElement.cpp: (WebCore::HTMLElement::inEitherTagList):
1539 2009-03-24 Brent Fulgham <bfulgham@webkit.org>
1541 Build fix, no review.
1543 Remove ResourceLoaderCFNet.cpp from build list for Cairo Releas
1546 * WebCore.vcproj/WebCore.vcproj:
1548 2009-03-24 Eric Carlson <eric.carlson@apple.com>
1550 Fix layout tests broken by r41907.
1552 * html/HTMLMediaElement.cpp:
1553 (WebCore::HTMLMediaElement::setReadyState): Don't set "was playing" based on the new ready state
1555 2009-03-24 Dmitry Titov <dimich@chromium.org>
1557 Reviewed by Dimitri Glazkov.
1559 https://bugs.webkit.org/show_bug.cgi?id=24689
1560 Fix Chromium compilation errors.
1562 * bindings/v8/WorkerContextExecutionProxy.cpp:
1563 (WebCore::WorkerContextExecutionProxy::FindOrCreateEventListener):
1564 (WebCore::WorkerContextExecutionProxy::RemoveEventListener):
1566 2009-03-24 Yury Semikhatsky <yurys@chromium.org>
1568 Reviewed by Darin Adler.
1570 https://bugs.webkit.org/show_bug.cgi?id=24759
1571 Add missing methods Element.prototype.removeMatchingStyleClasses and
1572 Node.prototype.enclosingNodeOrSelfWithNodeNameInArray to SourceFrame content
1573 iframe. These methods are called by Element.prototype.removeStyleClass and
1574 Node.prototype.enclosingNodeOrSelfWithNodeName.
1576 * inspector/front-end/SourceFrame.js:
1577 (WebInspector.SourceFrame.prototype._loaded):
1579 2009-03-24 Mark Mentovai <mark@chromium.org>
1581 Reviewed by Mark Rowe.
1583 https://bugs.webkit.org/show_bug.cgi?id=24653
1584 WebKit should be buildable without prefix header injection.
1585 Adds missing #includes and forward declarations as needed.
1587 * editing/SmartReplaceCF.cpp:
1588 * platform/graphics/mac/ColorMac.mm:
1589 * platform/graphics/mac/FontCacheMac.mm:
1590 * platform/graphics/mac/FontCustomPlatformData.h:
1591 * platform/graphics/mac/FontMac.mm:
1592 * platform/graphics/mac/FontMacATSUI.mm:
1593 * platform/graphics/mac/FontPlatformData.h:
1594 * platform/graphics/mac/FontPlatformDataMac.mm:
1595 * platform/graphics/mac/GraphicsContextMac.mm:
1596 * platform/graphics/mac/SimpleFontDataMac.mm:
1597 * platform/mac/FoundationExtras.h:
1598 * platform/mac/LocalCurrentGraphicsContext.h:
1599 * platform/mac/WebCoreSystemInterface.h:
1600 * platform/mac/WebCoreSystemInterface.mm:
1601 * platform/mac/WebCoreTextRenderer.h:
1602 * platform/mac/WebCoreTextRenderer.mm:
1603 * platform/mac/WebFontCache.h:
1604 * platform/mac/WebFontCache.mm:
1605 * platform/text/PlatformString.h:
1606 * platform/text/mac/ShapeArabic.c:
1607 * platform/text/mac/StringMac.mm:
1608 * rendering/RenderThemeChromiumMac.h:
1610 2009-03-24 Dan Bernstein <mitz@apple.com>
1612 Reviewed by Darin Adler.
1614 - fix <rdar://problem/6107874> by capping the nesting depth of
1615 "block-level" elements generated by the parser
1617 Test: fast/parser/block-nesting-cap.html
1619 * html/HTMLParser.cpp:
1620 (WebCore::HTMLParser::HTMLParser):
1621 (WebCore::HTMLParser::insertNode):
1622 (WebCore::HTMLParser::pushBlock):
1623 (WebCore::HTMLParser::popOneBlockCommon):
1624 (WebCore::HTMLParser::freeBlock):
1625 * html/HTMLParser.h:
1627 2009-03-23 Greg Bolsinga <bolsinga@apple.com>
1629 Reviewed by David Kilzer.
1631 https://bugs.webkit.org/show_bug.cgi?id=24771
1633 DOMTimeStamps are based upon 1970.
1635 * platform/mac/GeolocationServiceMac.mm:
1636 (-[WebCoreCoreLocationObserver locationManager:didUpdateToLocation:fromLocation:]):
1638 2009-03-23 Eric Seidel <eric@webkit.org>
1640 Build fix, no review.
1642 * rendering/RenderObject.cpp:
1643 (WebCore::RenderObject::createVisiblePosition): change .container to .isNotNull()
1645 2009-03-23 Eric Seidel <eric@webkit.org>
1647 Reviewed by Darin Adler.
1649 Rename Position::container to m_anchorNode and make it private
1650 https://bugs.webkit.org/show_bug.cgi?id=24760
1652 More code cleanup for Position.
1654 Change all uses of m_container to node()
1655 Eventually most uses of node() should change to anchorNode() to designate
1656 that it's the node the Position is anchored to, but not necessarily the
1657 container of the position (it could be the before/after neighbor).
1659 Remove any code which sets m_container, and change it to use a new
1660 Position::moveToPosition function which takes a node and offset.
1661 It never makes sense to change the node and leave the offset.
1664 (WebCore::Position::Position):
1665 (WebCore::Position::clear):
1666 (WebCore::Position::anchorNode):
1667 (WebCore::Position::node):
1668 (WebCore::Position::moveToPosition):
1669 (WebCore::Position::moveToOffset):
1670 (WebCore::Position::isNull):
1671 (WebCore::Position::isNotNull):
1672 (WebCore::operator==):
1674 (WebCore::Range::create):
1675 (WebCore::Range::compareBoundaryPoints):
1676 * dom/RangeBoundaryPoint.h:
1677 (WebCore::RangeBoundaryPoint::container):
1678 (WebCore::RangeBoundaryPoint::set):
1679 (WebCore::RangeBoundaryPoint::setOffset):
1680 (WebCore::RangeBoundaryPoint::setToChild):
1681 (WebCore::RangeBoundaryPoint::setToStart):
1682 (WebCore::RangeBoundaryPoint::setToEnd):
1684 2009-03-17 Eric Seidel <eric@webkit.org>
1686 Reviewed by David Hyatt.
1688 document.write() should be able to make a document strict mode
1689 https://bugs.webkit.org/show_bug.cgi?id=24336
1691 Remove an implicit write of "<html>" on the first document.write call
1692 this was added as part of a KDE import http://trac.webkit.org/changeset/798
1693 with no layout test or explanation. I can't think of any reason why
1694 an implicit <html> write is necessary (or correct), so I'm removing it and
1695 adding a test for the correct behavior. The parser will add any necessary
1696 HTMLHTMLElements during the write() anyway.
1698 Our behavior is now tested by fast/dom/Document/document-write-doctype
1699 and matches IE, FF fails this new test. Mozilla bug filed:
1700 https://bugzilla.mozilla.org/show_bug.cgi?id=483908
1703 (WebCore::Document::write):
1705 2009-03-23 Sam Weinig <sam@webkit.org>
1707 Reviewed by Dan Bernstein.
1709 Fix for <rdar://problem/6140966>
1710 Empty Caches does not clear the Cross-site XMLHttpRequest preflight cache
1713 * WebCore.xcodeproj/project.pbxproj:
1714 * loader/CrossOriginPreflightResultCache.cpp:
1715 (WebCore::CrossOriginPreflightResultCache::empty):
1716 * loader/CrossOriginPreflightResultCache.h:
1718 2009-03-23 Darin Adler <darin@apple.com>
1720 Reviewed by Adele Peterson.
1722 Bug 24726: hit testing doesn't work right when the click is on anonymous content
1723 https://bugs.webkit.org/show_bug.cgi?id=24726
1724 rdar://problem/6696992
1726 Test: editing/selection/hit-test-anonymous.html
1728 * rendering/RenderBR.cpp:
1729 (WebCore::RenderBR::positionForPoint): Call createVisiblePosition instead of
1730 creating a VisiblePosition directly. It will handle finding non-anonymous
1731 content nearby if node() is 0.
1732 * rendering/RenderBlock.cpp:
1733 (WebCore::positionForPointRespectingEditingBoundaries): Ditto.
1734 (WebCore::positionForPointWithInlineChildren): Ditto.
1735 (WebCore::RenderBlock::positionForPoint): Ditto.
1736 * rendering/RenderBox.cpp:
1737 (WebCore::RenderBox::positionForPoint): Ditto.
1738 * rendering/RenderObject.cpp:
1739 (WebCore::RenderObject::positionForPoint): Ditto.
1740 (WebCore::RenderObject::createVisiblePosition): Added.
1741 * rendering/RenderObject.h: Added createVisiblePosition.
1742 * rendering/RenderReplaced.cpp:
1743 (WebCore::RenderReplaced::positionForPoint): Call createVisiblePosition.
1744 * rendering/RenderSVGInlineText.cpp:
1745 (WebCore::RenderSVGInlineText::positionForPoint): Ditto.
1746 * rendering/RenderText.cpp:
1747 (WebCore::RenderText::positionForPoint): Ditto.
1749 2009-03-23 Adele Peterson <adele@apple.com>
1751 Reviewed by Darin Adler & Dave Hyatt.
1753 Fix for <rdar://problem/6621310> REGRESSION(35185): Apple Travel HTML emails missing some style after Safari 4 upgrade
1755 Leopard Mail doesn't expect <style> to be in the body. This change reverts back to the old behavior of
1756 moving <style> to <head> for that version of Mail.
1758 * html/HTMLElement.cpp: (WebCore::HTMLElement::inEitherTagList):
1760 2009-03-23 Adele Peterson <adele@apple.com>
1762 Reviewed by Mark Rowe & Dave Hyatt.
1764 Merge some of the individual Mail quirks into two settings that we can check for future quirks.
1768 (WebCore::disableRangeMutation):
1769 (WebCore::Document::nodeChildrenChanged):
1770 (WebCore::Document::nodeWillBeRemoved):
1771 (WebCore::Document::textInserted):
1772 (WebCore::Document::textRemoved):
1773 (WebCore::Document::textNodesMerged):
1774 (WebCore::Document::textNodeSplit):
1775 * page/Settings.cpp:
1776 (WebCore::Settings::Settings):
1777 (WebCore::Settings::setNeedsLeopardMailQuirks):
1778 (WebCore::Settings::setNeedsTigerMailQuirks):
1780 (WebCore::Settings::needsLeopardMailQuirks):
1781 (WebCore::Settings::needsTigerMailQuirks):
1783 2009-03-23 Ada Chan <adachan@apple.com>
1785 https://bugs.webkit.org/show_bug.cgi?id=24762
1786 Support text-indent in <option> elements on windows platform.
1788 Reviewed by Adele Peterson.
1791 * platform/PopupMenuStyle.h: We don't honor font specified on <option> elements right now. Make this
1792 explicit via windows themed default stylesheet.
1793 (WebCore::PopupMenuStyle::PopupMenuStyle): Also store text-indent and text-direction.
1794 (WebCore::PopupMenuStyle::textIndent):
1795 (WebCore::PopupMenuStyle::textDirection):
1796 * platform/win/PopupMenuWin.cpp:
1797 (WebCore::PopupMenu::paint): Adjust the text's x-coordinate if text-indent is supported for options and
1798 text-indent is specified with LTR direction.
1799 * rendering/RenderMenuList.cpp:
1800 (WebCore::RenderMenuList::updateOptionsWidth): Take text-indent into account if theme supports text-indent for options.
1801 (WebCore::RenderMenuList::itemStyle): Use new PopupMenuStyle constructor on windows.
1802 (WebCore::RenderMenuList::menuStyle): Ditto.
1803 * rendering/RenderTextControlSingleLine.cpp:
1804 (WebCore::RenderTextControlSingleLine::menuStyle): Ditto.
1805 * rendering/RenderTheme.h:
1806 (WebCore::RenderTheme::popupOptionSupportsTextIndent): Added. Default is false since we are only supporting it in windows for now.
1807 * rendering/RenderThemeWin.h:
1808 (WebCore::RenderThemeWin::popupOptionSupportsTextIndent): Returns true for windows.
1810 2009-03-23 Sam Weinig <sam@webkit.org>
1812 Reviewed by Anders Carlsson.
1814 Fix for https://bugs.webkit.org/show_bug.cgi?id=24699
1815 REGRESSION: Java Applets broken
1816 <rdar://problem/6707494>
1818 Fix loading Java applets without a codeBase. Only pass the base (up to the
1819 the last path component) of the baseURL to the plug-in.
1821 * html/HTMLAppletElement.cpp:
1822 (WebCore::HTMLAppletElement::createRenderer):
1823 * platform/KURL.cpp:
1824 (WebCore::KURL::baseAsString):
1827 2009-03-23 Darin Adler <darin@apple.com>
1829 Reviewed by Sam Weinig.
1831 * platform/KURL.h: Removed now-incorrect comments.
1832 None of the parts include the separator characters any more, now that
1833 query doesn't include the "?", so the comments explaining which do and do
1834 not are no-longer helpful.
1836 2009-03-23 David Levin <levin@chromium.org>
1838 Reviewed by Dimitri Glazkov.
1840 https://bugs.webkit.org/show_bug.cgi?id=24764
1842 Renamed files V8NodeFilter -> V8NodeFilterCondition to reflect
1843 class names. Also fixed some headers that got mangled in search/replace
1846 No change in behavior, so no test.
1848 * bindings/v8/V8NodeFilter.h: Removed.
1849 * bindings/v8/V8NodeFilterCondition.cpp: Renamed from WebCore/bindings/v8/V8NodeFilter.cpp.
1850 * bindings/v8/V8NodeFilterCondition.h: Added.
1851 * bindings/v8/custom/V8ClipboardCustom.cpp:
1852 * bindings/v8/custom/V8DocumentCustom.cpp:
1853 * bindings/v8/custom/V8ElementCustom.cpp:
1854 * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
1855 * bindings/v8/custom/V8NavigatorCustom.cpp:
1857 2009-03-23 Darin Fisher <darin@chromium.org>
1859 Reviewed by Antti Koivisto.
1861 https://bugs.webkit.org/show_bug.cgi?id=24741
1863 Adds a unique across-browser-sessions identifier to FormData, which may
1864 be used by ResourceHandle as a secondary cache key to enable cached
1867 At issue: two otherwise identical form submissions may result in
1868 completely independent responses, which may each be appropriate to
1869 store and reuse from cache.
1871 * html/HTMLFormElement.cpp: Added call to FormData::setIdentifier so that
1872 we only enable cached form submissions for those generated by HTML. This
1873 way we do not bother with POSTs generated by XMLHttpRequest.
1874 (WebCore::generateFormDataIdentifier):
1875 (WebCore::HTMLFormElement::createFormData):
1876 * platform/network/FormData.cpp: Initialize m_identifier to 0, which means
1877 the unspecified identifier. So by default there is no identifier and
1879 (WebCore::FormData::FormData):
1880 * platform/network/FormData.h: Added m_identifier with setter and getter.
1881 (WebCore::FormData::setIdentifier):
1882 (WebCore::FormData::identifier):
1884 2009-03-23 Simon Fraser <simon.fraser@apple.com>
1886 Reviewed by Antti Koivisto
1888 https://bugs.webkit.org/show_bug.cgi?id=24733
1890 Fix media controller with full-page zoom. Previously, the media controller
1891 shadow nodes never saw style changes on the RenderMedia, so did not respond
1892 to zooming at all. Now, we update the style on the shadow renderers
1893 whenever RenderMedia gets a style change. Also fix the video thumb in
1894 the theme to be scaled properly.
1896 Test: media/video-controls-zoomed.html
1898 * rendering/MediaControlElements.cpp:
1899 (WebCore::MediaControlShadowRootElement::updateStyle):
1900 (WebCore::MediaTextDisplayElement::MediaTextDisplayElement):
1901 (WebCore::MediaTextDisplayElement::updateStyle):
1902 (WebCore::MediaControlInputElement::MediaControlInputElement):
1903 (WebCore::MediaControlInputElement::updateStyle):
1904 * rendering/MediaControlElements.h:
1905 * rendering/RenderMedia.cpp:
1906 (WebCore::RenderMedia::styleDidChange):
1907 * rendering/RenderMedia.h:
1908 * rendering/RenderThemeMac.mm:
1909 (WebCore::RenderThemeMac::adjustSliderThumbSize):
1911 2009-03-23 Mike Belshe <mike@belshe.com>
1913 Reviewed by Darin Adler.
1915 https://bugs.webkit.org/show_bug.cgi?id=24739
1917 Rework StringImpl::create methods to try to allocate a single buffer
1918 rather than allocating both the StringImpl class and a separate data
1921 * platform/text/StringImpl.cpp:
1922 * platform/text/StringImpl.h:
1924 2009-03-23 Darin Adler <darin@apple.com>
1926 Reviewed by Antti Koivisto.
1928 Based on a patch by Nico Weber <nicolasweber@gmx.de>
1930 Bug 24755: LayoutTests/http/tests/misc/url-in-utf16le.html regression
1931 https://bugs.webkit.org/show_bug.cgi?id=24755
1933 * platform/text/TextEncoding.cpp:
1934 (WebCore::TextEncoding::isUTF7Encoding): Added. Checks if the current encoding
1935 is UTF7 without loading extended codecs.
1936 (WebCore::TextEncoding::encodingForFormSubmission): Use isUTF7Encoding() instead
1937 of comparing with UTF7Encoding(). Eliminate the explicit check of
1938 noExtendedTextEncodingNameUsed() because that's now handled by the functions
1939 that this function calls instead.
1941 * platform/text/TextEncoding.h: Added isUTF7Encoding function.
1942 Also tweaked formatting a bit.
1944 2009-03-20 Peter Kasting <pkasting@google.com>
1946 Reviewed by Darin Fisher.
1948 https://bugs.webkit.org/show_bug.cgi?id=24720
1949 RenderThemeChromium should draw something for Slider parts instead of
1950 dropping them on the floor.
1952 * platform/chromium/ChromiumBridge.h:
1953 * rendering/RenderThemeChromiumWin.cpp:
1954 (WebCore::RenderThemeChromiumWin::adjustSliderThumbSize):
1955 (WebCore::RenderThemeChromiumWin::paintSliderTrack):
1956 (WebCore::RenderThemeChromiumWin::determineSliderThumbState):
1957 (WebCore::RenderThemeChromiumWin::getThemeData):
1958 * rendering/RenderThemeChromiumWin.h:
1959 (WebCore::RenderThemeChromiumWin::paintSliderThumb):
1961 2009-03-23 Glen Murphy <glen@chromium.org>
1963 Reviewed by Darin Fisher.
1965 https://bugs.webkit.org/show_bug.cgi?id=24657
1967 Fix Skia drawing of highly scaled bitmaps; the conversion to
1968 IntRect produced visible layout test failures in highly scaled
1971 Test: svg/custom/image-small-width-height.svg
1973 * WebCore\platform\graphics\skia\ImageSkia.cpp:
1975 2009-03-23 David Kilzer <ddkilzer@apple.com>
1977 Provide JavaScript exception information after slow script timeout
1979 Reviewed by Oliver Hunt.
1981 * bindings/js/ScriptController.cpp:
1982 (WebCore::ScriptController::evaluate): Changed to report
1983 exceptions for the Interrupted completion type as well.
1985 2009-03-23 Simon Fraser <simon.fraser@apple.com>
1987 Reviewed by Darin Adler
1989 https://bugs.webkit.org/show_bug.cgi?id=24736
1991 Fix three mostly-unrelated problems with full-page zoom:
1994 (WebCore::Document::elementFromPoint):
1995 Document::elementFromPoint() needs to take full-page zoom into account.
1997 * dom/MouseRelatedEvent.cpp:
1998 (WebCore::MouseRelatedEvent::receivedTarget):
1999 Take full-page zoom into account when computing offsetX/offsetY.
2001 * html/HTMLSelectElement.cpp:
2002 (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
2003 Don't use offsetX/offsetY when hit testing list boxes; offsets were broken
2004 with full-page zoom, and using pageX/pageY is easier because we don't
2005 have to worry about the event target, and we already have a point in
2006 absolute coordinates.
2008 Tests: fast/forms/listbox-hit-test-zoomed.html
2009 fast/forms/search-zoomed.html
2010 fast/forms/slider-zoomed.html
2012 2009-03-23 Simon Fraser <simon.fraser@apple.com>
2014 Reviewed by Dan Bernstein
2016 https://bugs.webkit.org/show_bug.cgi?id=24753
2018 The rect for CSS 'clip' needs to have zooming applied to it.
2020 Test: fast/css/clip-zooming.html
2022 * css/CSSStyleSelector.cpp:
2023 (WebCore::CSSStyleSelector::applyProperty):
2025 2009-03-23 Eric Carlson <eric.carlson@apple.com>
2027 Reviewed by Adam Roben.
2029 <rdar://problem/6704282>
2030 https://bugs.webkit.org/show_bug.cgi?id=24719
2031 QTMovieWinTimer logic inversion
2033 Fix logic inversion in the Win32 timer used by QTMovieWin that caused it to always
2034 use SetTimer, even when the intervals was below USER_TIMER_MINIMUM. A side effect of
2035 this was that a movie timer would sometimes be blocked for significant amounts of time
2036 because WM_TIMER messages are not processed when the thread's message queue has any
2037 higher priority messages, and WebCore/Win's timer uses PostMessage for low interval
2038 timers. Also change SetTimer call to use HWND and custom message instead of
2039 timer function since the timer already has an HWND for processing PostMessage.
2041 Not possible to make a test for this because it is so timing dependant.
2043 * platform/graphics/win/QTMovieWinTimer.cpp:
2044 (TimerWindowWndProc):
2045 (setSharedTimerFireDelay):
2047 2009-03-23 Eric Carlson <eric.carlson@apple.com>
2049 Reviewed by Adele Peterson.
2051 https://bugs.webkit.org/show_bug.cgi?id=24588
2053 Update media element implementation to current HTML5 spec
2056 media/media-constants.html
2057 media/video-seek-no-src-exception.html
2058 media/video-source-add-src.html
2059 media/video-src-invalid-remove.html
2060 media/video-src-plus-source.html
2061 media/video-timeupdate-during-playback.html
2063 * dom/EventNames.h: Remove obsolute events, add new ones.
2064 * html/HTMLMediaElement.cpp:
2065 (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize new member vars.
2066 (WebCore::HTMLMediaElement::attributeChanged): Trigger load() only when we don't
2068 (WebCore::HTMLMediaElement::removedFromDocument): Deal with state name changes.
2069 (WebCore::HTMLMediaElement::scheduleProgressEvent): New, create a progress event and
2070 add it to the event queue to be dispatch when the timer fires.
2071 (WebCore::HTMLMediaElement::scheduleEvent): New, create a generic event and add
2072 it to the event queue to be dispatch when the timer fires.
2073 (WebCore::HTMLMediaElement::enqueueEvent): Add an event to the queue and ticke the
2075 (WebCore::HTMLMediaElement::asyncEventTimerFired): Dispatch all pending events.
2076 (WebCore::HTMLMediaElement::loadTimerFired): Either trigger the initial load or
2077 try to load the next <source> url.
2078 (WebCore::HTMLMediaElement::load): Minor style change.
2079 (WebCore::HTMLMediaElement::loadInternal): The first part of the spec load algorithm, cleanup
2080 the current load (if any) and set up state for a new load.
2081 (WebCore::HTMLMediaElement::selectMediaResource): Deal with no 'src' or <source>, post 'loadstart'
2082 event, and initiate load from 'src' if present.
2083 (WebCore::HTMLMediaElement::loadNextSourceChild): Initiate load from next <source> url, or trigger
2084 noneSupported() if no more to consider.
2085 (WebCore::HTMLMediaElement::loadResource): Instantiate a new MediaPlayer and ask it to load a url.
2086 (WebCore::HTMLMediaElement::startProgressEventTimer): Start the repeating progress event timer.
2087 (WebCore::HTMLMediaElement::noneSupported): Post error event and set up state when no valid
2088 media url was found.
2089 (WebCore::HTMLMediaElement::mediaEngineError): Post error event and set up state when no valid
2090 media engine failed with a decode error or a network error.
2091 (WebCore::HTMLMediaElement::mediaPlayerNetworkStateChanged):
2092 (WebCore::HTMLMediaElement::setNetworkState): Updated for new spec network states.
2093 (WebCore::HTMLMediaElement::mediaPlayerReadyStateChanged):
2094 (WebCore::HTMLMediaElement::setReadyState): Updated for new spec ready state.
2095 (WebCore::HTMLMediaElement::progressEventTimerFired): Bail if the network is not active.
2096 (WebCore::HTMLMediaElement::seek): Return INVALID_STATE_ERR exception if state is too low or
2097 if player hasn't been set up yet. This is necessary becase load() is async. Clear the flag
2098 we use to guard against sending 'ended' more than once.
2099 (WebCore::HTMLMediaElement::duration): Don't bother calling media engine before it has metadata.
2100 (WebCore::HTMLMediaElement::setDefaultPlaybackRate): Remove exception param, 0 is no longer an
2102 (WebCore::HTMLMediaElement::setPlaybackRate): Remove exception param, 0 is no longer an
2103 invalid rate. Cache rate being set so we can use it later if media engine isn't ready now.
2104 (WebCore::HTMLMediaElement::play): Remove exception param, play() before load() now just
2105 starts loading asynchronously.
2106 (WebCore::HTMLMediaElement::playInternal): Remove exception param. Fire 'waiting' or 'playing'
2107 event depending on current state.
2108 (WebCore::HTMLMediaElement::pause): Remove exception param, pause() before load() now just
2109 starts loading asynchronously.
2110 (WebCore::HTMLMediaElement::pauseInternal): Remove exception param.
2111 (WebCore::HTMLMediaElement::setVolume): dispatchEventAsync -> scheduleEvent
2112 (WebCore::HTMLMediaElement::setMuted): dispatchEventAsync -> scheduleEvent
2113 (WebCore::HTMLMediaElement::togglePlayState): Remove exception param.
2114 (WebCore::HTMLMediaElement::beginScrubbing): pause() doesn't take an exception param.
2115 (WebCore::HTMLMediaElement::startPlaybackProgressTimer): New, starts timer that fires 4 times per
2116 second when the movie is playing to timeupdate so we can post 'timeupdate' events.
2117 (WebCore::HTMLMediaElement::playbackProgressTimerFired): Timer proc.
2118 (WebCore::HTMLMediaElement::scheduleTimeupdateEvent): Bottleneck around scheduling a 'timeupdate'
2119 event because we both fire them them when the spec says we should and when the media engine
2120 says that time has jumped, but we don't want to fire more than one at a given movie time. We also
2121 use this bottleneck to keep track of the last time one was posted so we won't fire too often
2123 (WebCore::HTMLMediaElement::canPlay): readyState now tracks whether or not we have metadata.
2124 (WebCore::HTMLMediaElement::havePotentialSourceChild): New, checks to see if there are a <source>
2125 element with a 'src' attribute that we have not tried to load yet.
2126 (WebCore::HTMLMediaElement::nextSourceChild): New, returns the url and content type of the next
2127 <source> element that we haven't tried to load.
2128 (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Schedule 'seeked' event when seeking completes.
2129 Set a flag when we post the 'ended' event, clear it when time changed and we aren't at the end since
2130 some media engines call this proc more than once when playback reaches the end and stops, but we
2131 don't want to post 'ended' more than once.
2132 (WebCore::HTMLMediaElement::mediaPlayerDurationChanged): New, added so media engine can inform
2133 when the movie duration changes and we can post 'durationchanged' event.
2134 (WebCore::HTMLMediaElement::mediaPlayerRateChanged): New, added so media engine can inform when
2135 the rate changed and we can updated our cached rate. This is useful because we only want to know
2136 post periodic 'timeupdate' events when the movie is actually playing, and because we want to know
2137 the actual playback rate when it differs from what we tried to set.
2138 (WebCore::HTMLMediaElement::mediaPlayerSizeChanged): New, added so media engine can inform when
2139 a movie's intrinsic size changes and we can inform the renderer.
2140 (WebCore::HTMLMediaElement::potentiallyPlaying): Renamed from activelyPlaying since the spec now
2141 uses "actively playing" for this concept. Update logic for new state names and un-comment calls
2142 to stoppedDueToErrors() and pausedForUserInteraction() since the spec says those condiditons
2143 are part of the answer.
2144 (WebCore::HTMLMediaElement::endedPlayback): Update logic for new state names.
2145 (WebCore::HTMLMediaElement::stoppedDueToErrors): New, spec says this logic should be part of
2146 the determination of "potentially playing".
2147 (WebCore::HTMLMediaElement::pausedForUserInteraction): New, placeholder for when (if) user
2148 agent supports this spec concept.
2149 (WebCore::HTMLMediaElement::updatePlayState): Stop timer used to fire periodic 'timeupdate'
2150 events when we pauses the movie. Set the media engine rate before calling play() in case it
2151 wasn't set up when the rate was changed.
2152 (WebCore::HTMLMediaElement::stopPeriodicTimers): New, stop the progress event and 'timeupate'
2154 (WebCore::HTMLMediaElement::userCancelledLoad): New, logic pulled out of documentWillBecomeInactive
2155 and updated for the current spec.
2156 (WebCore::HTMLMediaElement::documentWillBecomeInactive): Moved some logic to userCancelledLoad.
2157 (WebCore::HTMLMediaElement::documentDidBecomeActive): Update comments.
2158 (WebCore::HTMLMediaElement::initialURL): Update for refactoring of code that determines the
2160 * html/HTMLMediaElement.h: Change ReadyState and NetworkState enums to match names in the spec,
2161 update for changes in .cpp.
2162 (WebCore::HTMLMediaElement::):
2164 * html/HTMLMediaElement.idl: Update ready state and network state constants for spec changes.
2165 defaultPlaybackRate, playbackRate, play(), and pause() no longer raise exceptions.
2167 * html/HTMLSourceElement.cpp:
2168 (WebCore::HTMLSourceElement::insertedIntoDocument): Update for network state name changes.
2170 * html/HTMLVideoElement.cpp:
2171 (WebCore::HTMLVideoElement::updatePosterImage): Update for ready state name changes.
2173 * html/MediaError.h:
2174 (WebCore::MediaError::): add MEDIA_ERR_NONE_SUPPORTED.
2176 * html/MediaError.idl: add MEDIA_ERR_NONE_SUPPORTED.
2178 * loader/MediaDocument.cpp:
2179 (WebCore::MediaDocument::defaultEventHandler): play() and pause() don't take an exception.
2181 * platform/graphics/MediaPlayer.cpp:
2182 (WebCore::NullMediaPlayerPrivate::readyState): Update for newtork state name changes.
2183 (WebCore::MediaPlayer::sizeChanged): New, so engine can report intrinsic size changes.
2184 (WebCore::MediaPlayer::rateChanged): New, so engine can report rate changes.
2185 (WebCore::MediaPlayer::durationChanged): New, so engine can report duration changes.
2186 * platform/graphics/MediaPlayer.h: Update NetworkState and ReadyState enum names to match spec
2188 (WebCore::MediaPlayerClient::mediaPlayerDurationChanged): New.
2189 (WebCore::MediaPlayerClient::mediaPlayerRateChanged): New.
2190 (WebCore::MediaPlayerClient::mediaPlayerSizeChanged): New.
2191 (WebCore::MediaPlayer::):
2193 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
2194 (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Update for network/ready state name changes.
2195 (WebCore::MediaPlayerPrivate::load): Ditto.
2196 (WebCore::MediaPlayerPrivate::updateStates): Ditto.
2197 (WebCore::MediaPlayerPrivate::loadingFailed): Ditto.
2199 * platform/graphics/mac/MediaPlayerPrivateQTKit.h: Update for network/ready state name changes.
2200 Remove endPointTimer, it is no longer necessary. Add m_enabledTrackCount and m_duration.
2201 (WebCore::MediaPlayerPrivate::metaDataAvailable):
2202 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2203 (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): No more m_endPointTimer or m_endTime. Initialize
2204 m_enabledTrackCount and m_duration. Update for network/ready state name changes.
2205 (WebCore::MediaPlayerPrivate::load): Update for network/ready state name changes.
2206 (WebCore::MediaPlayerPrivate::play): No more m_endPointTimer.
2207 (WebCore::MediaPlayerPrivate::pause): Ditto.
2208 (WebCore::MediaPlayerPrivate::currentTime): No more m_endTime.
2209 (WebCore::MediaPlayerPrivate::seek): Ditto.
2210 (WebCore::MediaPlayerPrivate::doSeek): Ditto, plus don't call setRate(0) when the rate is
2212 (WebCore::MediaPlayerPrivate::setEndTime): No more m_endTime.
2213 (WebCore::MediaPlayerPrivate::updateStates): Update for network/ready state name changes. Return
2214 different errors depending on what causes a failure. Watch for and report duration changes.
2215 (WebCore::MediaPlayerPrivate::rateChanged): Report rate changes.
2216 (WebCore::MediaPlayerPrivate::sizeChanged): Report size changes.
2217 (WebCore::MediaPlayerPrivate::didEnd): No more endpoint timer.
2218 (WebCore::MediaPlayerPrivate::setVisible): Update for network/ready state name changes.
2219 (WebCore::MediaPlayerPrivate::disableUnsupportedTracks): Don't return number of unsupported
2220 tracks, store in m_enabledTrackCount so we can use it to help determine causes of failure.
2222 * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
2223 (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Update for network/ready state name changes.
2224 (WebCore::MediaPlayerPrivate::load): Ditto.
2225 (WebCore::MediaPlayerPrivate::duration): Ditto.
2226 (WebCore::MediaPlayerPrivate::updateStates): Ditto.
2227 (WebCore::MediaPlayerPrivate::naturalSize): Ditto.
2229 * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
2230 (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): No more m_endPointTimer. Update for
2231 network/ready state name changes.
2232 (WebCore::MediaPlayerPrivate::load): Update for network/ready state name changes. No more
2234 (WebCore::MediaPlayerPrivate::play): No more m_endPointTimer.
2235 (WebCore::MediaPlayerPrivate::pause): Ditto.
2236 (WebCore::MediaPlayerPrivate::setEndTime): Ditto.
2237 (WebCore::MediaPlayerPrivate::updateStates): Update for network/ready state name changes.
2238 (WebCore::MediaPlayerPrivate::didEnd): No more m_endPointTimer.
2239 * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
2241 * rendering/MediaControlElements.cpp:
2242 (WebCore::MediaControlPlayButtonElement::defaultEventHandler): Update for network/ready state
2244 (WebCore::MediaControlSeekButtonElement::defaultEventHandler): Ditto.
2246 2009-03-22 Kevin Ollivier <kevino@theolliviers.com>
2248 wxGTK build fix. Add missing header.
2250 * platform/wx/wxcode/gtk/non-kerned-drawing.cpp:
2252 2009-03-22 Simon Fraser <simon.fraser@apple.com>
2254 Reviewed by Dan Bernstein
2256 https://bugs.webkit.org/show_bug.cgi?id=24665
2258 Image-map code in RenderImage could result in RenderImage::nodeAtPoint()
2259 setting HitTestResult::innerNode(), but returning false, which violates
2260 hit testing rules. Use a temporary HitTestResult so that we only fill in
2261 result when we know we've hit.
2263 * rendering/RenderImage.cpp:
2264 (WebCore::RenderImage::nodeAtPoint):
2266 2009-03-22 Simon Fraser <simon.fraser@apple.com>
2268 Reviewed by Dan Bernstein
2270 https://bugs.webkit.org/show_bug.cgi?id=24743
2272 Fix hit testing regression from r41840. We need to pass the temporary
2273 HitTestResult when testing sublayers, then only copy to 'result' when
2274 the layer is known to have been hit.
2276 Test: fast/layers/zindex-hit-test.html
2278 * rendering/RenderLayer.cpp:
2279 (WebCore::RenderLayer::hitTestLayer):
2281 2009-03-20 Simon Fraser <simon.fraser@apple.com>
2283 Reviewed by Darin Adler
2285 https://bugs.webkit.org/show_bug.cgi?id=24733
2287 Fix hit testing on video controls after full page zoom by fixing wider issue
2288 with event->pageX(), pageY() with zooming. pageX and pageY are "fixed" to be
2289 invariant under zooming (for JavaScript), so we keep an actual page point around
2290 in MouseEvent::absoluteLocation() to avoid the need to factor in zooming everywhere.
2292 * dom/MouseRelatedEvent.cpp:
2293 (WebCore::MouseRelatedEvent::initCoordinates):
2294 (WebCore::MouseRelatedEvent::computePageLocation):
2295 * dom/MouseRelatedEvent.h:
2296 (WebCore::MouseRelatedEvent::absoluteLocation):
2297 (WebCore::MouseRelatedEvent::setAbsoluteLocation):
2298 Member var, and getter and setter for absoluteLocation.
2299 New method, computePageLocation(), to compute the actual page point,
2300 and call it when creating and initting mouse-related events.
2303 (WebCore::Node::dispatchMouseEvent):
2304 (WebCore::Node::dispatchWheelEvent):
2305 Keep non-adjusted pageX and pageY around, and call setAbsoluteLocation()
2306 on the event to replace a potentially rounded point.
2308 * html/HTMLInputElement.cpp:
2309 (WebCore::HTMLInputElement::defaultEventHandler):
2310 Clean up slider handling code.
2312 * html/HTMLSelectElement.cpp:
2313 (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
2314 Add FIXME comment for use of offsetX/offsetY.
2316 * page/ContextMenuController.cpp:
2317 (WebCore::ContextMenuController::handleContextMenuEvent):
2318 Use absoluteLocation() when hit testing for context menus.
2320 * rendering/RenderFrameSet.cpp:
2321 (WebCore::RenderFrameSet::userResize):
2322 Use absoluteLocation() when resizing frames.
2324 * rendering/RenderMedia.cpp:
2325 (WebCore::RenderMedia::forwardEvent):
2326 Use absoluteLocation() when hit testing media controls.
2328 * rendering/RenderSlider.cpp:
2329 (WebCore::HTMLSliderThumbElement::defaultEventHandler):
2330 (WebCore::RenderSlider::mouseEventIsInThumb):
2331 Use absoluteLocation() when handling slider events.
2333 (WebCore::RenderSlider::forwardEvent):
2334 Factor some code out of HTMLInputElement::defaultEventHandler().
2336 * rendering/RenderTextControlSingleLine.cpp:
2337 (WebCore::RenderTextControlSingleLine::forwardEvent):
2338 Use absoluteLocation() when hit testing search field buttons, which fixees
2339 bugs in the search field with zooming.
2341 2009-03-21 David Levin <levin@chromium.org>
2343 Reviewed by Dimitri Glazkov.
2345 https://bugs.webkit.org/show_bug.cgi?id=24727
2346 Add V8XMLHttpRequest*.
2348 * bindings/v8/V8XMLHttpRequestUtilities.cpp: Added.
2349 * bindings/v8/V8XMLHttpRequestUtilities.h: Added.
2350 * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp: Added.
2351 * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: Added.
2352 * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp: Added.
2354 2009-03-21 David Levin <levin@chromium.org>
2356 Reviewed by Dimitri Glazkov.
2358 https://bugs.webkit.org/show_bug.cgi?id=24725
2361 * bindings/v8/V8NodeFilter.cpp: Added.
2362 * bindings/v8/V8NodeFilter.h: Added.
2364 2009-03-21 Dan Bernstein <mitz@apple.com>
2366 Rubber-stamped by Kevin Decker
2368 - remove some redundant #include statements
2370 * bindings/js/JSDOMWindowBase.cpp:
2372 2009-03-20 Dan Bernstein <mitz@apple.com>
2374 Reviewed by Mark Rowe.
2376 - fix <rdar://problem/6574185> REGRESSION (3.2.2-TOT): hang in text drawing code
2378 * platform/graphics/win/FontCGWin.cpp:
2379 (WebCore::drawGDIGlyphs): Changed glyph stroking to fill and stroke each
2380 glyph as a separate path, instead of all glyphs as a single path. This
2381 matches what CGContextShowGlyphsWithAdvances() does, and has comparable
2384 2009-03-20 Dean Jackson <dino@apple.com>
2386 Reviewed by Simon Fraser
2388 Build fix for ENABLE(3D_RENDERING)
2390 * rendering/RenderObject.h:
2391 (WebCore::makeMatrixRenderable):
2393 2009-03-20 Dave Moore <davemoore@google.com>
2395 Reviewed by Dimitri Glazkov.
2397 https://bugs.webkit.org/show_bug.cgi?id=24705
2399 A bug in the V8 bindings is preventing chromium from setting the href on the
2400 location object...any attempt throws a security error, not just for javascript
2403 * page/Location.idl:
2405 2009-03-20 Craig Schlenter <craig.schlenter@gmail.com>
2407 Reviewed by Dimitri Glazkov.
2409 https://bugs.webkit.org/show_bug.cgi?id=24608
2411 Include stdio.h needed for printf on gcc 4.4.0
2413 * platform/KURLGoogle.cpp:
2415 2009-03-20 Mike Belshe <mike@belshe.com>
2417 Reviewed by Darin Fisher.
2419 https://bugs.webkit.org/show_bug.cgi?id=24577
2421 Don't let comments at the end of an event handler
2422 break the event handler.
2424 No change in behavior, so no test.
2426 * bindings/v8/V8LazyEventListener.cpp:
2427 (WebCore::V8LazyEventListener::getWrappedListenerFunction):
2429 2009-03-20 Norbert Leser <norbert.leser@nokia.com>
2431 Reviewed by Darin Adler.
2433 https://bugs.webkit.org/show_bug.cgi?id=24535
2435 Fixes missing line terminator character (;) after macro call.
2436 It is common practice to add the trailing ";" where macros are substituted
2437 and not where they are defined with #define.
2438 This change is consistent with other macro declarations across webkit,
2439 and it also solves compilation failure with symbian compilers.
2441 No change in behavior, so no test.
2443 * bindings/js/JSDOMWindowShell.cpp:
2444 * bindings/js/JSEventListener.cpp:
2445 * bindings/js/JSImageConstructor.cpp:
2446 * bindings/js/JSInspectedObjectWrapper.cpp:
2447 * bindings/js/JSInspectorCallbackWrapper.cpp:
2448 * bindings/js/JSNamedNodesCollection.cpp:
2449 * bindings/js/JSNodeFilterCondition.cpp:
2450 * bindings/js/JSOptionConstructor.cpp:
2451 * bindings/js/JSQuarantinedObjectWrapper.cpp:
2452 * bindings/js/JSRGBColor.cpp:
2453 * bindings/js/JSWorkerContextBase.cpp:
2454 * bindings/js/JSXMLHttpRequestConstructor.cpp:
2455 * bindings/js/JSXSLTProcessorConstructor.cpp:
2456 * bindings/scripts/CodeGeneratorJS.pm:
2458 2009-03-20 Mike Belshe <mike@belshe.com>
2460 Reviewed by Dimitri Glazkov and Dave Hyatt.
2462 https://bugs.webkit.org/show_bug.cgi?id=24324
2464 Make the minimum timer configurable for different platforms.
2466 * page/DOMTimer.cpp:
2467 (WebCore::DOMTimer::DOMTimer):
2468 (WebCore::DOMTimer::fired):
2470 (WebCore::DOMTimer::minTimerInterval):
2471 (WebCore::DOMTimer::setMinTimerInterval):
2473 2009-03-20 Dean McNamee <deanm@chromium.org>
2475 Reviewed by Darin Adler.
2477 https://bugs.webkit.org/show_bug.cgi?id=22834
2479 Make sure to consistently match new/delete and fastMalloc/fastFree.
2481 * css/CSSSelectorList.cpp:
2482 (WebCore::CSSSelectorList::adoptSelectorVector):
2483 (WebCore::CSSSelectorList::deleteSelectors):
2485 2009-03-20 Dan Bernstein <mitz@apple.com>
2487 Reviewed by Dave Hyatt.
2489 - fix https://bugs.webkit.org/show_bug.cgi?id=23739
2490 <rdar://problem/6556371> REGRESSION (r36513): iframe isn't sized properly upon load
2492 * rendering/RenderBlock.cpp:
2493 (WebCore::RenderBlock::percentHeightDescendants): Added this accessor.
2494 * rendering/RenderBlock.h:
2495 * rendering/RenderTableSection.cpp:
2496 (WebCore::RenderTableSection::layoutRows): Extended the check for
2497 children that flex to include other descendants with percent height
2498 which is relative to the cell.
2500 2009-03-20 Dmitry Titov <dimich@chromium.org>
2502 Reviewed by Alexey Proskuryakov.
2504 https://bugs.webkit.org/show_bug.cgi?id=24706
2505 Remove ScriptExecutionContext::encoding() since Workers do not need it.
2506 WorkerContext::encoding() is simply removed, while Document::encoding()
2507 made non-virtual and private. Workers use UTF-8 now except when instructed
2508 otherwise by http header. Also updated test.
2510 * dom/Document.h: Made encoding() non-virtual and private.
2511 * dom/ScriptExecutionContext.h: removed encoding().
2513 * workers/Worker.cpp:
2514 (WebCore::Worker::Worker):
2515 (WebCore::Worker::notifyFinished):
2516 * workers/WorkerContext.cpp: removed encoding() implementation.
2517 (WebCore::WorkerContext::WorkerContext):
2518 (WebCore::WorkerContext::completeURL):
2519 * workers/WorkerContext.h: removed encoding()
2520 (WebCore::WorkerContext::create):
2521 * workers/WorkerContextProxy.h:
2522 * workers/WorkerImportScriptsClient.cpp:
2523 (WebCore::WorkerImportScriptsClient::didReceiveData):
2524 * workers/WorkerMessagingProxy.cpp:
2525 (WebCore::WorkerMessagingProxy::startWorkerContext):
2526 * workers/WorkerMessagingProxy.h:
2527 * workers/WorkerThread.cpp:
2528 (WebCore::WorkerThreadStartupData::create):
2529 (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
2530 (WebCore::WorkerThread::create):
2531 (WebCore::WorkerThread::WorkerThread):
2532 (WebCore::WorkerThread::workerThread):
2533 * workers/WorkerThread.h:
2534 In all these, removed storing encoding and 'inheriting' it from the parent.
2535 Instead, they are all using UTF-8 now.
2537 2009-03-20 Timothy Hatcher <timothy@apple.com>
2539 Change how threading exceptions are checked so they are reported
2540 by what round they were added. That way WebKit can decided the
2541 behavior per-round based on linked-on-or-after checks.
2543 <rdar://problem/6626741&6648478&6635474&6674079>
2545 Reviewed by Darin Adler.
2547 * WebCore.base.exp: Export the new symbols.
2548 * bindings/objc/DOMAbstractView.mm: Use the new WebCoreThreadViolationCheckRoundOne macro.
2549 * bindings/scripts/CodeGeneratorObjC.pm: Ditto.
2550 * platform/ThreadCheck.h:
2551 * platform/mac/ThreadCheck.mm:
2552 (WebCore::readThreadViolationBehaviorFromUserDefaults): Refactor how the default is read.
2553 (WebCore::setDefaultThreadViolationBehavior): Take a round argument.
2554 (WebCore::reportThreadViolation): Ditto.
2555 (WebCoreReportThreadViolation): Ditto.
2557 2009-03-20 Geoffrey Garen <ggaren@apple.com>
2559 Reviewed by Sam Weinig.
2561 Fixed up an out-of-date comment.
2563 * bindings/js/JSDOMWindowCustom.h:
2564 (WebCore::JSDOMWindow::customPut):
2566 2009-03-20 Beth Dakin <bdakin@apple.com>
2568 Reviewed by Dave Hyatt.
2570 Fix for https://bugs.webkit.org/show_bug.cgi?id=20909 REGRESSION
2571 (r35318): A press release at pfizer.com does not display correctly
2572 - and corresponding -
2573 <rdar://problem/6680073>
2575 * rendering/RenderObject.cpp:
2576 (WebCore::RenderObject::invalidateContainerPrefWidths):
2577 * rendering/RenderObject.h:
2578 (WebCore::RenderObject::markContainingBlocksForLayout):
2580 2009-03-20 Eric Seidel <eric@webkit.org>
2582 Reviewed by Justin Garcia.
2584 maxDeepOffset is confusing and should be removed
2585 https://bugs.webkit.org/show_bug.cgi?id=24586
2587 Abstract some hard-to-read (but shared) logic into a new renderedAsNonInlineTableOrHR function.
2588 Add first/lastDeepEditingPositionForNode Position creation functions
2589 and deploy them to places we used to call maxDeepOffset.
2591 Rename Position::atStart and atEnd to atStartOfTree atEndOfTree
2592 Add a new Position::atFirst/atLastEditingPositionForNode() and use these
2593 to replace a few more callers for maxDeepOffset()
2595 Rename maxDeepOffset to lastEditingOffsetForNode (so that we mere mortals have some clue what it does)
2597 "Editing positions" are confusing because they have one
2598 of two behaviors, depending on if the container node is ignored
2599 by editing (if editingIgnoresContent(node) returns true) or not.
2600 Positions referring to nodes ignored by editing are
2601 neighbor-relative (they are before or after the node) where as
2602 positions reffering to other nodes are container-relative
2603 (they are between two child nodes of the container, identified
2604 by the offset() member). I will be fixing this confusion in
2605 future patches. These renames hopefully make the current behavior clearer.
2608 (WebCore::Position::previous):
2609 (WebCore::Position::next):
2610 (WebCore::Position::atFirstEditingPositionForNode):
2611 (WebCore::Position::atLastEditingPositionForNode):
2612 (WebCore::Position::atStartOfTree):
2613 (WebCore::Position::atEndOfTree):
2614 (WebCore::Position::previousCharacterPosition):
2615 (WebCore::Position::nextCharacterPosition):
2616 (WebCore::Position::upstream):
2617 (WebCore::Position::isCandidate):
2618 (WebCore::firstDeepEditingPositionForNode):
2619 (WebCore::lastDeepEditingPositionForNode):
2621 * dom/PositionIterator.cpp:
2622 (WebCore::PositionIterator::operator Position):
2623 (WebCore::PositionIterator::increment):
2624 (WebCore::PositionIterator::decrement):
2625 (WebCore::PositionIterator::atEnd):
2626 (WebCore::PositionIterator::atEndOfNode):
2627 * editing/CompositeEditCommand.cpp:
2628 (WebCore::CompositeEditCommand::positionAvoidingSpecialElementBoundary):
2629 * editing/DeleteSelectionCommand.cpp:
2630 (WebCore::isTableCellEmpty):
2631 (WebCore::DeleteSelectionCommand::removeNode):
2632 (WebCore::DeleteSelectionCommand::handleGeneralDelete):
2633 * editing/Editor.cpp:
2634 (WebCore::Editor::advanceToNextMisspelling):
2635 * editing/InsertLineBreakCommand.cpp:
2636 (WebCore::InsertLineBreakCommand::doApply):
2637 * editing/InsertListCommand.cpp:
2638 (WebCore::InsertListCommand::doApply):
2639 * editing/ReplaceSelectionCommand.cpp:
2640 (WebCore::ReplaceSelectionCommand::positionAtEndOfInsertedContent):
2641 * editing/TypingCommand.cpp:
2642 (WebCore::TypingCommand::forwardDeleteKeyPressed):
2643 * editing/VisiblePosition.cpp:
2644 (WebCore::VisiblePosition::previous):
2645 (WebCore::VisiblePosition::leftVisuallyDistinctCandidate):
2646 (WebCore::VisiblePosition::left):
2647 (WebCore::VisiblePosition::rightVisuallyDistinctCandidate):
2648 (WebCore::VisiblePosition::right):
2649 * editing/VisibleSelection.cpp:
2650 (WebCore::VisibleSelection::selectionFromContentsOfNode):
2651 (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries):
2652 * editing/htmlediting.cpp:
2653 (WebCore::nextVisuallyDistinctCandidate):
2654 (WebCore::previousVisuallyDistinctCandidate):
2655 (WebCore::firstEditablePositionAfterPositionInRoot):
2656 (WebCore::lastEditablePositionBeforePositionInRoot):
2657 (WebCore::lastOffsetForEditing):
2658 (WebCore::isFirstPositionAfterTable):
2659 (WebCore::isLastPositionBeforeTable):
2660 (WebCore::positionBeforeNode):
2661 (WebCore::positionAfterNode):
2662 (WebCore::enclosingEmptyListItem):
2663 (WebCore::caretMaxOffset):
2664 * editing/htmlediting.h:
2665 * editing/visible_units.cpp:
2666 (WebCore::renderedAsNonInlineTableOrHR):
2667 (WebCore::startOfParagraph):
2668 (WebCore::endOfParagraph):
2669 (WebCore::startOfEditableContent):
2670 (WebCore::endOfEditableContent):
2671 * page/AccessibilityObject.cpp:
2672 (WebCore::endOfStyleRange):
2673 * page/AccessibilityRenderObject.cpp:
2674 (WebCore::AccessibilityRenderObject::visiblePositionRange):
2675 * rendering/RenderBox.cpp:
2676 (WebCore::RenderBox::positionForPoint):
2678 2009-03-20 Dmitry Titov <dimich@chromium.org>
2680 Reviewed by Dimitri Glazkov.
2682 https://bugs.webkit.org/show_bug.cgi?id=24689
2683 Add (upstream) V8 bindings for Workers. Mostly style cleaning.
2685 * bindings/v8/WorkerContextExecutionProxy.cpp: Added.
2686 * bindings/v8/WorkerContextExecutionProxy.h: Added.
2687 * bindings/v8/WorkerScriptController.cpp: Added.
2688 * bindings/v8/WorkerScriptController.h: Added.
2689 * bindings/v8/V8Index.h: Added. This is just a wrapper for v8_index.h, like V8Proxy.h
2690 * bindings/v8/V8Proxy.h: Added domObjectMap() function that wraps GetDOMObjectMap().
2691 * bindings/v8/V8WorkerContextEventListener.cpp:
2692 (WebCore::V8WorkerContextEventListener::callListenerFunction): TrackEvent() renamed trackEvent()
2694 2009-03-20 Stephen White <senorblanco@chromium.org>
2696 Reviewed by Eric Seidel.
2698 Fix for LayoutTests/fast/canvas/canvas-text-alignment.html
2699 on chromium/skia. The problem was that the gradient matrix
2700 for text was being applied twice. Fixed by reverting some of
2701 https://bugs.webkit.org/show_bug.cgi?id=23957, so that skiaDrawText
2702 is no longer responsible for measuring the text and scaling up
2703 the gradient matrix. Instead, the text bounding box is passed
2704 in from SVGPaintServerGradient. I didn't make this change for CG,
2705 since it uses a different method (the gradient is drawn using the
2706 text as a pre-rendered mask).
2707 https://bugs.webkit.org/show_bug.cgi?id=24687
2709 * platform/graphics/skia/SkiaFontWin.cpp:
2710 (WebCore::skiaDrawText):
2711 * svg/graphics/SVGPaintServerGradient.cpp:
2712 (WebCore::SVGPaintServerGradient::setup):
2714 2009-03-20 Xan Lopez <xlopez@igalia.com>
2716 Rubber-stamped by Holger Freyther.
2718 There seems to be some rounding error in cairo (or in how we use
2719 cairo) with some fonts, like DejaVu Sans Mono, which makes cairo
2720 report a height smaller than ascent + descent, which is wrong and
2721 confuses WebCore's layout system. Workaround this while we figure
2722 out what's going on.
2724 * platform/graphics/gtk/SimpleFontDataGtk.cpp:
2725 (WebCore::SimpleFontData::platformInit):
2726 * platform/graphics/gtk/SimpleFontDataPango.cpp:
2727 (WebCore::SimpleFontData::platformInit):
2729 2009-03-19 Alexey Proskuryakov <ap@webkit.org>
2731 Reviewed by Darin Adler.
2733 https://bugs.webkit.org/show_bug.cgi?id=24122
2734 <rdar://problem/6674179>
2735 REGRESSION: DOM Range extractContents/deleteContents failures seen on Moxiecode tests
2737 Test: fast/dom/Range/deleted-range-endpoints.html
2739 * dom/Range.cpp: (WebCore::Range::processContents): Set the final range in accordance
2740 to the specification.
2742 2009-03-19 Anders Carlsson <andersca@apple.com>
2744 Reviewed by Dan Bernstein.
2746 <rdar://problem/6682554> Flash content not being rendered (Shockwave Flash 10.0 r22)
2748 If calling updateWidget for some reason resulted in another widget being added to m_widgetUpdateSet, then
2749 that object would never be updated.
2751 * page/FrameView.cpp:
2752 (WebCore::FrameView::updateWidgets):
2753 Factor the widget updating code out into this method. Return true if the update set is empty.
2755 (WebCore::FrameView::performPostLayoutTasks):
2756 Loop over the update set multiple times until all widgets have been updated or until we reach the cap.
2760 2009-03-18 Timothy Hatcher <timothy@apple.com>
2762 Make the defered data loading timer honor the Page's scheduled runloop pairs.
2763 Introduces a new RunLoopTimer class that has an API mimicking Timer but
2764 allows it to be scheduled with one or more SchedulePairs.
2766 <rdar://problem/6687342> -[WebView scheduleInRunLoop:forMode:] has no affect on timers
2768 Reviewed by Darin Adler.
2770 * WebCore.xcodeproj/project.pbxproj: Adds the new RunLoopTimer.{cpp,h} files.
2771 * loader/MainResourceLoader.cpp:
2772 (WebCore::MainResourceLoader::handleDataLoadNow): Use the MainResourceLoaderTimer typedef.
2773 (WebCore::MainResourceLoader::startDataLoadTimer): Added. Start the timer and on
2774 Mac platforms also schedule with the Page's SchedulePairs.
2775 (WebCore::MainResourceLoader::handleDataLoadSoon): Call startDataLoadTimer().
2776 (WebCore::MainResourceLoader::setDefersLoading): Ditto.
2777 * loader/MainResourceLoader.h:
2778 * platform/cf/RunLoopTimerCF.cpp: Added.
2779 (WebCore::RunLoopTimerBase::~RunLoopTimerBase):
2780 (WebCore::timerFired):
2781 (WebCore::RunLoopTimerBase::start):
2782 (WebCore::RunLoopTimerBase::schedule):
2783 (WebCore::RunLoopTimerBase::stop):
2784 (WebCore::RunLoopTimerBase::isActive):
2785 * platform/RunLoopTimer.h: Added.
2786 (WebCore::RunLoopTimerBase::RunLoopTimerBase):
2787 (WebCore::RunLoopTimerBase::startRepeating):
2788 (WebCore::RunLoopTimerBase::startOneShot):
2789 (WebCore::RunLoopTimer::RunLoopTimer):
2790 (WebCore::RunLoopTimer::fired):
2792 2009-03-19 Dimitri Glazkov <dglazkov@chromium.org>
2794 Reviewed by Darin Fisher.
2796 https://bugs.webkit.org/show_bug.cgi?id=24702
2797 Upstream miscellaneous bindings changes.
2799 * bindings/v8/ScheduledAction.cpp:
2800 (WebCore::ScheduledAction::execute): Changed to call lower-case evaluate.
2801 * bindings/v8/ScriptCallStack.h: Added an extra include.
2803 2009-03-19 Simon Fraser <simon.fraser@apple.com>
2805 Reviewed by Dave Hyatt
2807 https://bugs.webkit.org/show_bug.cgi?id=24686
2809 When hit testing a RenderLayer whose parent lives in a preserves-3D hierarchy,
2810 we need to compare the computed z-offset with the depth-test z-offset before
2811 deciding that such a RenderLayer was hit. This fixes an issue, tested by the
2812 3d-point-mapping-overlapping.html test, where the child of a transformed element
2813 is found by hit testing, even when some other element with greater Z overlaps
2816 Improved the code by adding a utility method, isHitCandidate(), which computes and tests
2817 z-depth when necessary.
2819 Tests: transforms/3d/point-mapping/3d-point-mapping-coplanar.html
2820 transforms/3d/point-mapping/3d-point-mapping-overlapping.html
2822 * rendering/RenderLayer.cpp:
2823 (WebCore::isHitCandidate):
2824 (WebCore::RenderLayer::hitTestLayer):
2826 2009-03-19 Jeremy Moskovich <jeremy@chromium.org>
2828 Reviewed by Dimitri Glazkov.
2830 https://bugs.webkit.org/show_bug.cgi?id=24456
2831 Split ColorChromium.cpp into Mac & Windows variants.
2832 Remove Chromium Dependency on platform/graphics/mac/ColorMac.mm since we
2833 ultimately need to take a different approach. For now, createCGColor()
2834 is copied from ColorMac.mm.
2836 No observable change in behavior, so no test.
2838 * platform/graphics/chromium/ColorChromium.cpp:
2839 (WebCore::focusRingColor):
2840 * platform/graphics/chromium/ColorChromiumMac.mm: Added.
2842 2009-03-19 Pavel Feldman <pfeldman@chromium.org>
2844 Reviewed by Dimitri Glazkov.
2846 https://bugs.webkit.org/show_bug.cgi?id=24675
2847 Unforking frontend: add custom InspectorController methods
2850 * bindings/v8/custom/V8InspectorControllerCustom.cpp: Added.
2852 2009-03-19 Jay Campan <jcampan@google.com>
2854 Reviewed by Dimitri Glazkov.
2856 https://bugs.webkit.org/show_bug.cgi?id=24625
2857 Adding an accessor to the currently selected index in the PopupMenuChromium.
2858 This is required for implementing the deletion of an autocomplete entry in Chromium.
2860 * platform/chromium/PopupMenuChromium.cpp:
2861 (WebCore::PopupContainer::selectedIndex):
2862 * platform/chromium/PopupMenuChromium.h:
2864 2009-03-19 Evan Stade <estade@chromium.org>
2866 Reviewed by Dimitri Glazkov.
2868 https://bugs.webkit.org/show_bug.cgi?id=24526
2869 Improve windows skia text stroking.
2871 Test: LayoutTests/svg/custom/struct-use-09-b.svg
2873 * platform/graphics/skia/SkiaFontWin.cpp: Close the path representing
2874 each font glyph polygon, rather than only closing the path once per
2875 letter. This fixes stroking for letters with multiple polygons, such
2877 (WebCore::getPathForGlyph):
2878 (WebCore::skiaDrawText):
2880 2009-03-19 Simon Hausmann <simon.hausmann@nokia.com>
2882 Reviewed by Tor Arne Vestbø.
2884 Fixed support for doing calls from JavaScript into NPAPI Plugins for the Qt port on Windows.
2886 Removed dead code for distinguishing between Widget and PluginView in the Qt port.
2888 * bindings/js/ScriptControllerQt.cpp:
2889 (WebCore::ScriptController::createScriptInstanceForWidget): Removed incorrect isNPAPI check.
2890 * plugins/PluginView.cpp:
2891 (WebCore::PluginView::PluginView): Removed m_isNPAPIPlugin variable.
2892 * plugins/PluginView.h: Removed setter/getter.
2893 * plugins/mac/PluginViewMac.cpp:
2894 (WebCore::PluginView::init): Removed call to setIsNPAPIPlugin.
2895 * plugins/qt/PluginViewQt.cpp:
2896 (WebCore::PluginView::init): Ditto.
2898 2009-03-19 Cameron Zwarich <cwzwarich@uwaterloo.ca>
2900 Reviewed by Oliver Hunt.
2902 Bug 24596: ASSERT in JSC::PropertySlot::slotBase @ iGoogle homepage
2903 <https://bugs.webkit.org/show_bug.cgi?id=24596>
2904 <rdar://problem/6686493>
2906 JSDOMWindow::customGetOwnPropertySlot() does an access check after calling
2907 JSGlobalObject::getOwnPropertySlot(). This causes the PropertySlot to be
2908 set twice, once to the value that is illegal to access, and then to undefined
2909 This causes an assertion failure in property access caching code.
2911 The fix is to do the access check before calling JSGlobalObject::getOwnPropertySlot().
2913 * bindings/js/JSDOMWindowCustom.h:
2914 (WebCore::JSDOMWindow::customGetOwnPropertySlot):
2916 2009-03-18 Alexey Proskuryakov <ap@webkit.org>
2918 Reviewed by Sam Weinig.
2920 https://bugs.webkit.org/show_bug.cgi?id=24676
2921 Simple cross-origin requests shouldn't dispatch upload progress events
2923 Test: http/tests/xmlhttprequest/simple-cross-origin-progress-events.html
2925 * loader/CrossOriginAccessControl.cpp: (WebCore::passesAccessControlCheck): Added a comment
2926 explaining the somewhat unexpected behavior of this function.
2928 * xml/XMLHttpRequestUpload.cpp: (WebCore::XMLHttpRequestUpload::hasListeners):
2929 * xml/XMLHttpRequestUpload.h:
2930 Report whether there are any event listeners registered.
2932 * xml/XMLHttpRequest.h: Added m_uploadEventsAllowed.
2934 * xml/XMLHttpRequest.cpp:
2935 (WebCore::XMLHttpRequest::createRequest): Set m_uploadEventsAllowed flag.
2936 (WebCore::XMLHttpRequest::makeSameOriginRequest): Ditto.
2937 (WebCore::XMLHttpRequest::makeCrossOriginAccessRequest): Ditto.
2938 (WebCore::XMLHttpRequest::makeSimpleCrossOriginAccessRequest): Set request body - it can be
2939 non-empty for POST requests.
2940 (WebCore::XMLHttpRequest::makeCrossOriginAccessRequestWithPreflight): Set m_uploadEventsAllowed flag.
2941 (WebCore::XMLHttpRequest::handleAsynchronousPreflightResult): Ditto.
2942 (WebCore::XMLHttpRequest::abort): Only dispatch upload progress events if allowed.
2943 (WebCore::XMLHttpRequest::networkError): Ditto.
2944 (WebCore::XMLHttpRequest::abortError): Ditto.
2945 (WebCore::XMLHttpRequest::didSendData): Ditto.
2947 2009-03-18 Marc-Antoine Ruel <maruel@chromium.org>
2949 Reviewed by Darin Fisher.
2951 https://bugs.webkit.org/show_bug.cgi?id=24398
2952 Fix a crash when loading a svg file in Chromium's test_shell and
2953 then reloading the page.
2955 * history/BackForwardListChromium.cpp:
2956 (WebCore::BackForwardList::BackForwardList):
2957 (WebCore::BackForwardList::close):
2959 2009-03-18 Eric Carlson <eric.carlson@apple.com>
2961 Reviewed by Simon Fraser.
2963 Fix for <rdar://problem/6685235>
2964 <video> element poster cannot be set dynamically if not originally set up in HTML
2966 Allocate the media engine immediately so the plug-in proxy is available for
2967 scripting right away.
2969 * platform/graphics/MediaPlayer.cpp:
2970 (WebCore::MediaPlayer::MediaPlayer):
2972 2009-03-18 Beth Dakin <bdakin@apple.com>
2974 Reviewed by Dave Hyatt.
2976 Fix for <rdar://problem/6636747> REGRESSION (Safari 4 PB-r41326):
2977 Popup menu appears at the wrong location on page at http://
2978 www.signonsandiego.com/
2980 This was a regression from http://trac.webkit.org/changeset/40769,
2981 which changed the base class of RenderInline to
2982 RenderBoxModelObject rather than RenderBox.
2984 * rendering/RenderObject.cpp:
2985 (WebCore::RenderObject::offsetParent): offsetParent should return a
2986 RenderBoxModelObject rather than just a RenderBox, which is more
2989 2009-03-18 Anders Carlsson <andersca@apple.com>
2991 Reviewed by Darin Adler.
2993 <rdar://problem/6504776>
2994 CrashTracer: [USER] 188 crashes in Safari at com.apple.WebCore • WTF::HashTableIterator<WTF::RefPtr<WebCore::ResourceLoader>, ...
2996 Return early in case calling the client ends up spinning the run loop and completing/cancelling the load.
2998 * loader/NetscapePlugInStreamLoader.cpp:
2999 (WebCore::NetscapePlugInStreamLoader::didCancel):
3001 2009-03-18 David Levin <levin@chromium.org>
3003 Reviewed by Dimitri Glazkov.
3005 https://bugs.webkit.org/show_bug.cgi?id=24664
3006 Upstreaming v8 collection.h
3008 No change in behavior, so no test.
3010 * bindings/v8/V8Collection.h: Added.
3012 2009-03-18 Sam Weinig <sam@webkit.org>
3014 Reviewed by Simon Fraser.
3016 Fix for https://bugs.webkit.org/show_bug.cgi?id=23966
3017 REGRESSION: Custom arrow navigation functionality doesn't work at dropular.net
3018 <rdar://problem/6589657>
3020 Match the CSSOM spec for getClientRects and getBoundingClientRect by
3021 returning a 0x0 rect at the correct top/left position for empty inline
3024 * rendering/RenderInline.cpp:
3025 (WebCore::RenderInline::absoluteRects):
3026 (WebCore::RenderInline::absoluteQuads):
3028 2009-03-18 David Levin <levin@chromium.org>
3030 Reviewed by Eric Seidel.
3032 Match the changes done for windows in the bug
3033 https://bugs.webkit.org/show_bug.cgi?id=24530.
3035 No change in behavior, so no test.
3037 * rendering/RenderThemeChromiumLinux.cpp:
3038 (WebCore::RenderThemeChromiumLinux::extraDefaultStyleSheet):
3040 2009-03-18 Dirk Schulze <krit@webkit.org>
3042 Reviewed by Holger Freyther.
3044 Added support for SVG's stroked texts to Qt.
3046 [Qt] SVGs stroked text support missing
3047 https://bugs.webkit.org/show_bug.cgi?id=24262
3049 * platform/graphics/qt/FontQt.cpp:
3050 (WebCore::Font::drawComplexText):
3052 2009-03-18 Mark Rowe <mrowe@apple.com>
3054 Reviewed by Alexey Proskuryakov.
3056 Fix fast/encoding/char-decoding.html with recent ICU.
3058 * platform/text/TextCodecICU.cpp:
3059 (WebCore::TextCodecICU::decode): Look for gb18030 case-insensitively,
3060 as newer versions of ICU use GB18030 as the canonical name.
3062 2009-03-17 David Levin <levin@chromium.org>
3064 Reviewed by Dimitri Glazkov.
3066 https://bugs.webkit.org/show_bug.cgi?id=24662
3067 Chromium build fixes.
3069 Bug https://bugs.webkit.org/show_bug.cgi?id=24663 tracks
3070 the invalid implementation of ScriptCallStack.
3072 No change in behavior, so no test.
3074 * bindings/v8/ScriptCallStack.h:
3075 (WebCore::ScriptCallStack::state):
3076 * platform/graphics/skia/PlatformContextSkia.cpp:
3077 (PlatformContextSkia::drawRect):
3079 2009-03-17 David Carson <dacarson@apple.com>
3081 Reviewed by David Hyatt.
3083 Add anchor elements to the simple style sheet so that applications that
3084 are using WebKit just for simple text and links will also take advantage
3087 * css/CSSStyleSelector.cpp:
3088 (WebCore::elementCanUseSimpleDefaultStyle):
3090 2009-03-17 Darin Adler <darin@apple.com>
3092 Reviewed by Adele Peterson.
3094 <rdar://problem/6687005> Need support for new move-left/right selectors.
3096 * editing/EditorCommand.cpp:
3097 (WebCore::executeMoveToLeftEndOfLine): Added.
3098 (WebCore::executeMoveToLeftEndOfLineAndModifySelection): Added.
3099 (WebCore::executeMoveToRightEndOfLine): Added.
3100 (WebCore::executeMoveToRightEndOfLineAndModifySelection): Added.
3101 Added command entries for the functions above.
3103 2009-03-17 Ojan Vafai <ojan@chromium.org>
3105 Reviewed by Adele Peterson.
3107 Put the padding inside scrollbars on textareas.
3108 https://bugs.webkit.org/show_bug.cgi?id=24370
3110 Put the padding inside the scrollbars on textareas. This is done by moving the
3111 overflow from the shadowNode to the RenderTextControlMultiline. As a result,
3112 all of the scroll handing methods that RenderTextControl overrides can be moved
3113 down into RenderTextControlSingleLine since RenderTextControlMultiline can now
3114 just use RenderBlock's versions. This also allows RenderTextControlMultiLine to
3115 no longer need a custom layout method since the shadowNode can now just size
3118 * css/CSSStyleSelector.cpp:
3119 (WebCore::CSSStyleSelector::adjustRenderStyle):
3120 * rendering/RenderTextControl.cpp:
3121 (WebCore::RenderTextControl::styleDidChange):
3122 (WebCore::RenderTextControl::selection):
3123 (WebCore::RenderTextControl::calcHeight):
3124 (WebCore::RenderTextControl::hitInnerTextElement):
3125 * rendering/RenderTextControl.h:
3126 * rendering/RenderTextControlMultiLine.cpp:
3127 (WebCore::RenderTextControlMultiLine::nodeAtPoint):
3128 (WebCore::RenderTextControlMultiLine::createInnerTextStyle):
3129 * rendering/RenderTextControlMultiLine.h:
3130 * rendering/RenderTextControlSingleLine.cpp:
3131 (WebCore::RenderTextControlSingleLine::styleDidChange):
3132 (WebCore::RenderTextControlSingleLine::autoscroll):
3133 (WebCore::RenderTextControlSingleLine::scrollWidth):
3134 (WebCore::RenderTextControlSingleLine::scrollHeight):
3135 (WebCore::RenderTextControlSingleLine::scrollLeft):
3136 (WebCore::RenderTextControlSingleLine::scrollTop):
3137 (WebCore::RenderTextControlSingleLine::setScrollLeft):
3138 (WebCore::RenderTextControlSingleLine::setScrollTop):
3139 (WebCore::RenderTextControlSingleLine::scroll):
3140 * rendering/RenderTextControlSingleLine.h:
3141 * rendering/TextControlInnerElements.cpp:
3142 (WebCore::RenderTextControlInnerBlock::RenderTextControlInnerBlock):
3143 (WebCore::RenderTextControlInnerBlock::positionForPoint):
3144 (WebCore::TextControlInnerTextElement::createRenderer):
3146 2009-03-17 Darin Adler <darin@apple.com>
3148 Reviewed by David Hyatt.
3150 Bug 24517: REGRESSION (r41552): innerHTML does an updateLayout -- unneeded and can be slow
3151 https://bugs.webkit.org/show_bug.cgi?id=24517
3153 * editing/DeleteButtonController.cpp:
3154 (WebCore::DeleteButtonController::enable): Added a call to updateRendering, since
3155 determining whether to display the delete button involves style and updateRendering
3156 also updates style (should probably be named updateStyle, in fact). Not needed to fix
3157 this bug, but would have prevented the crash that led to this bug in the first place.
3159 * editing/EditCommand.cpp:
3160 (WebCore::EditCommand::EditCommand): Get rid of unneeded null check. All frames have
3161 delete button controllers.
3162 * editing/Editor.cpp:
3163 (WebCore::Editor::rangeForPoint): Ditto.
3165 * editing/markup.cpp:
3166 (WebCore::appendStartMarkup): Changed a "&" to a "&&" so that generating markup
3167 doesn't depend on renderers at all when the convertBlocksToInlines boolean is false.
3168 This allows us to omit the call to updateLayoutIgnorePendingStylesheets in the
3169 createMarkup function that's called by innerHTML.
3170 (WebCore::MarkupAccumulator::appendMarkup): Turned this into a class with a member
3171 function. Added a feature where the accumulator will skip a node. Moved arguments
3172 that don't change during recursion into an object. This function still is a bit
3173 inefficient, since it creates a new HashMap at every level as it recurses, but for now
3174 I did not tackle that. Also replaced the onlyIncludeChildren boolean with EChildrenOnly
3175 for consistency and clarity.
3176 (WebCore::createMarkup): Removed the call to updateLayoutIgnorePendingStylesheets.
3177 Instead of calling disable/enable on the delete button controller's container element,
3178 pass it in to the markup accumulator as a node to skip.
3180 2009-03-17 Scott Violet <sky@google.com>
3182 Reviewed by Eric Seidel.
3184 https://bugs.webkit.org/show_bug.cgi?id=24651
3185 Skia does not always render text fill/stroke pattern/gradient/color correctly
3187 Changes Skia's font rendering to only render gradient/pattern if current
3188 color space indicates the gradient/pattern should be used.
3189 This is covered by LayoutTests/fast/canvas/canvas-text-alignment.html .
3191 * platform/graphics/GraphicsContext.cpp:
3192 (WebCore::GraphicsContext::strokeColorSpace):
3193 (WebCore::GraphicsContext::fillColorSpace):
3194 * platform/graphics/GraphicsContext.h:
3196 * platform/graphics/GraphicsContextPrivate.h:
3197 * platform/graphics/skia/SkiaFontWin.cpp:
3198 (WebCore::paintSkiaText):
3200 2009-03-17 Adele Peterson <adele@apple.com>
3202 Reviewed by Darin Adler.
3204 Fix for https://bugs.webkit.org/show_bug.cgi?id=24655
3205 <rdar://problem/6633727> Hitting return at the end of a line with an anchor jumps me to the bottom of the message
3207 Test: editing/inserting/6633727.html
3209 This changes does a few things:
3210 1) Renames pos to insertionPosition.
3211 2) Eliminates "startNode". It doesn't work well to consider the node separately from the insertionPosition.
3212 The insertionPosition gets updated at various times, and it seems likely that startNode can get out of sync.
3213 3) Before building up a list of ancestors to move around when we insert the new block, make sure to use the deepest
3214 representation of the insertionPosition, so all ancestor nodes are correctly included.
3216 * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply):
3218 2009-03-17 Laszlo Gombos <laszlo.1.gombos@nokia.com>
3220 Reviewed by Kevin Ollivier.
3222 https://bugs.webkit.org/show_bug.cgi?id=24115
3223 Introduce platform independent stubs for plugins.
3225 * plugins/PluginDataNone.cpp: Copied from WebCore/plugins/wx/PluginDataWx.cpp.
3226 * plugins/PluginPackageNone.cpp: Copied from WebCore/plugins/wx/PluginPackageWx.cpp.
3227 * plugins/PluginViewNone.cpp: Copied from WebCore/plugins/wx/PluginViewWx.cpp.
3228 * plugins/wx/PluginDataWx.cpp: Removed.
3229 * plugins/wx/PluginPackageWx.cpp: Removed.
3230 * plugins/wx/PluginViewWx.cpp: Removed.
3233 2009-03-17 Darin Adler <darin@apple.com>
3235 Earlier version reviewed by Adele Peterson.
3237 Bug 24304: REGRESSION (r39864): Hitting the space bar to select an <input type=radio>
3238 or push an <input type=button> or <button> causes the page to scroll down.
3240 Would be best to add a regression test for Windows eventually; tested that this has
3241 no effect on the Mac OS X platform.
3243 * html/HTMLInputElement.cpp:
3244 (WebCore::HTMLInputElement::defaultEventHandler): Added FIXMEs and tweaked formatting.
3245 Use the code that calls the base class's defaultEventHandler early only in the cases
3246 where it's needed: keydown and keypress events in text fields. In other cases, do the
3247 more typical thing and call the default handler only at the end of the function.
3248 This function already had code to make sure the keypress event for space never gets
3249 through, but it was running too late since the scrolling code was moved into the
3250 base class default event handler.
3252 2009-03-17 Simon Fraser <simon.fraser@apple.com>
3254 Reviewed by Dave Hyatt
3256 https://bugs.webkit.org/show_bug.cgi?id=24632
3258 Fix repaint issues when composited layers come and go (only applies
3259 when ACCELERATED_COMPOSITING is turned on).
3261 * rendering/RenderLayer.cpp:
3262 (WebCore::RenderLayer::RenderLayer):
3263 * rendering/RenderLayer.h:
3264 (WebCore::RenderLayer::mustOverlayCompositedLayers):
3265 (WebCore::RenderLayer::setMustOverlayCompositedLayers):
3266 * rendering/RenderLayerBacking.cpp:
3267 (WebCore::RenderLayerBacking::RenderLayerBacking):
3268 * rendering/RenderLayerBacking.h:
3270 Move what used to be the 'forceCompositingLayer' flag from RenderLayerBacking
3271 to RenderLayer, because we don't want the side-effects of creating RenderLayerBacking
3272 when setting this flag.
3274 * rendering/RenderLayerCompositor.cpp:
3275 (WebCore::RenderLayerCompositor::updateLayerCompositingState):
3276 When a RenderLayer flips into or out of compositing mode, compute a repaint
3277 rect relative to the containerForRepaint, and repaint it.
3279 (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3280 Call layer->setMustOverlayCompositedLayers() rather than setForcedCompositingLayer().
3282 (WebCore::RenderLayerCompositor::needsToBeComposited):
3283 (WebCore::RenderLayerCompositor::requiresCompositingLayer):
3284 (WebCore::RenderLayerCompositor::requiresCompositingForTransform):
3285 (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
3286 * rendering/RenderLayerCompositor.h:
3288 Rename requiresCompositingLayerForTransform() to requiresCompositingForTransform()
3289 and make it a class static method to match requiresCompositingForAnimation(). Both
3290 now take RenderObjects, rathern than RenderLayers.
3292 * rendering/style/RenderStyle.h:
3293 (WebCore::InheritedFlags::hasTransformRelatedProperty):
3294 Minor tidyup using convenience methods added in an earlier commit.
3296 2009-03-17 Simon Fraser <simon.fraser@apple.com>
3298 Reviewed by Darin Adler
3300 https://bugs.webkit.org/show_bug.cgi?id=24396
3303 Add WTF_USE_ACCELERATED_COMPOSITING, defined to 0 for now, and add some
3304 comments to make the #ifdefs more readable.
3306 * css/CSSComputedStyleDeclaration.cpp:
3307 (WebCore::computedTransform):
3308 Add a comment to mention that we don't flatten the matrix.
3310 * css/MediaQueryEvaluator.cpp:
3311 (WebCore::transform_3dMediaFeatureEval):
3312 Have the 'transform-3d' media query evaluate to 'true' if 3d-rendering
3315 * platform/graphics/mac/GraphicsLayerCA.mm:
3316 (WebCore::GraphicsLayerCA::animateTransform):
3317 No need for the #ifdef here. If we don't support 3d, we will have already flattened
3320 * platform/graphics/transforms/TransformationMatrix.cpp:
3321 (WebCore::TransformationMatrix::makeAffine):
3322 * platform/graphics/transforms/TransformationMatrix.h:
3323 New method to convert the matrix to an affine matrix by throwing a way the non-affine
3326 * rendering/RenderLayer.cpp:
3327 (WebCore::RenderLayer::updateTransform):
3328 (WebCore::RenderLayer::currentTransform):
3329 * rendering/RenderLayerBacking.cpp:
3330 (WebCore::RenderLayerBacking::updateLayerTransform):
3331 If 3d rendering is not supported, convert the matrix to an affine matrix
3332 which can be rendered, and used for hit testing.
3334 * rendering/RenderLayerCompositor.cpp:
3335 Change the name of the exported symbol that webkitdirs.pm uses to know if
3336 3d rendering is supported. There is no other 3d-rendering-specific symbol we can sniff.
3338 * rendering/RenderObject.cpp:
3339 (WebCore::RenderObject::transformFromContainer):
3340 Only take perspective into account if 3d rendering is supported.
3342 * rendering/RenderObject.h:
3343 (WebCore::makeMatrixRenderable):
3344 Utility method that flattens a matrix if 3d rendering is not supported.
3346 2009-03-17 Kevin Ollivier <kevino@theolliviers.com>
3348 wx build fix. Fix typo after mouse wheel changes.
3350 * platform/wx/MouseWheelEventWx.cpp:
3351 (WebCore::PlatformWheelEvent::PlatformWheelEvent):
3353 2009-03-17 Darin Adler <darin@apple.com>
3355 * inspector/ConsoleMessage.cpp:
3356 (WebCore::ConsoleMessage::isEqual): Fix build, remove stray parenthesis.
3358 2009-03-17 Darin Adler <darin@apple.com>
3360 Fix crash seen right away when running run-webkit-tests.
3362 * inspector/ConsoleMessage.cpp:
3363 (WebCore::ConsoleMessage::isEqual): Restore assertion to its behavior pre-refactoring.
3364 Also tweaked formatting a bit.
3366 2009-03-17 Alexey Proskuryakov <ap@webkit.org>
3368 Reviewed by Darin Adler.
3370 HTMLSelectElement::add() doesn't look at exception code returned from insertBefore(), so
3371 it doesn't need to zero it out before calling.
3373 * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::add): Removed "ec = 0" line.
3375 2009-03-17 Dan Bernstein <mitz@apple.com>
3377 Reviewed by Adam Roben.
3379 - WebCore part of adding a mechanism for controlling the caching of
3380 responses through WebFrameLoaderClient
3382 Mac already has such a mechanism, and this adds one for CFNetwork ports.
3384 * WebCore.vcproj/WebCore.vcproj: Added EmptyClients.h
3385 and ResourceLoaderCFNet.cpp.
3387 * loader/EmptyClients.h:
3388 (WebCore::EmptyFrameLoaderClient::shouldCacheResponse): Added an
3389 implementation that always returns true.
3391 * loader/FrameLoaderClient.h: Declared shouldCacheResponse().
3393 * loader/ResourceLoader.h: Ditto.
3395 * loader/cf/ResourceLoaderCFNet.cpp: Added.
3396 (WebCore::ResourceLoader::shouldCacheResponse): Added. Calls through to
3397 FrameLoaderClient::shouldCacheResponse().
3399 * platform/network/ResourceHandleClient.h:
3400 (WebCore::ResourceHandleClient::shouldCacheResponse): Added an
3401 implementation that always returns true.
3403 * platform/network/cf/ResourceHandleCFNet.cpp:
3404 (WebCore::willCacheResponse): Added a call to
3405 ResourceHandleClient::shouldCacheResponse(). If the client returns
3406 false, return 0, which will prevent CFNetwork from caching the response.
3408 2009-03-17 Alexey Proskuryakov <ap@webkit.org>
3410 Reviewed by Darin Adler.
3412 https://bugs.webkit.org/show_bug.cgi?id=13287
3413 Cannot change SELECT to a dynamically created option
3415 Tests: fast/forms/add-and-remove-option.html
3416 fast/forms/add-remove-option-modification-event.html
3417 fast/forms/add-selected-option.html
3418 fast/forms/select-cache-desynchronization.html
3420 * dom/ContainerNode.cpp:
3421 (WebCore::dispatchChildInsertionEvents): Increment DOM tree version. This will happen when
3422 dispatching DOMSubtreeModified again, but the version should be incremented for event
3423 listeners to have an up to date view of the DOM.
3424 (WebCore::dispatchChildRemovalEvents): Ditto.
3426 * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::insertedIntoTree):
3427 Make sure that the select element knows about its new selected option.
3429 * html/HTMLOptionElement.h: Use insertedIntoTree() instead of insertedIntoDocument(),
3430 because DOM also needs to be updated for forms that are not in document yet. Similar
3431 problems exist for node removing, but removedFromTree() is called at a wrong time, so
3432 those problems cannot be fixed without deeper refactoring.
3434 * html/HTMLSelectElement.cpp:
3435 (WebCore::HTMLSelectElement::setRecalcListItems): Reset m_activeSelectionAnchorIndex - it
3436 doesn't make sense to keep the anchor after programmatically changing the selection, and
3437 keeping it was causing a failure in fast/forms/listbox-selection.html.
3439 * html/HTMLSelectElement.h: Removed overrides for ContainerNode methods that only called
3440 base class versions.
3442 2009-03-17 Steve Falkenburg <sfalken@apple.com>
3444 <rdar://problem/6690324> Accessing FTP sites reads unallocated memory, can result in garbled entries or crashes
3446 Reviewed by Darin Adler.
3448 * loader/FTPDirectoryDocument.cpp:
3449 (WebCore::FTPDirectoryTokenizer::parseAndAppendOneLine): Assign CString to a local while we hold pointers into it.
3451 2009-03-16 David Hyatt <hyatt@apple.com>
3453 <rdar://problem/6648411> REGRESSION: Layout of page is wrong at http://www.popcap.com/
3455 Make sure that the initial shouldPaint check that looks at enclosingLayers properly skips over
3456 layers that don't paint themselves. This is done by adding a new enclosingSelfPaintingLayer method
3457 so that RenderObjects can walk up the enclosing layer chain and skip any layers that don't paint
3460 Reviewed by Darin Adler.
3462 Added fast/block/float/overlapping-floats-with-overflow-hidden.html
3465 * rendering/RenderBlock.cpp:
3466 (WebCore::RenderBlock::addOverhangingFloats):
3467 * rendering/RenderObject.cpp:
3468 (WebCore::RenderObject::enclosingSelfPaintingLayer):
3469 * rendering/RenderObject.h:
3471 2009-03-17 Xan Lopez <xlopez@igalia.com>
3473 Reviewed by Holger Freyther.
3475 https://bugs.webkit.org/show_bug.cgi?id=24592
3476 [GTK] Crash in FcPatternHash
3480 * platform/graphics/gtk/FontPlatformDataGtk.cpp:
3481 (WebCore::FontPlatformData::operator=):
3482 * platform/graphics/gtk/FontPlatformDataPango.cpp:
3484 2009-03-17 Xan Lopez <xlopez@igalia.com>
3486 Reviewed by Holger Freyther.
3488 https://bugs.webkit.org/show_bug.cgi?id=24592
3489 [GTK] Crash in FcPatternHash
3491 Sanitize memory management in pango fonts.
3493 Release memory allocated by FontPlatformDataPango in its own
3494 destructor instead of doing it from other classes, and add copy
3495 constructor and '=' operator to be able to track referenced
3498 * platform/graphics/gtk/FontPlatformDataPango.cpp:
3499 (WebCore::FontPlatformData::~FontPlatformData):
3500 (WebCore::FontPlatformData::operator=):
3501 (WebCore::FontPlatformData::FontPlatformData):
3502 * platform/graphics/gtk/SimpleFontDataPango.cpp:
3504 2009-03-17 Darin Adler <darin@apple.com>
3506 Reviewed by Alexey Proskuryakov.
3508 Bug 24624: Crash in imageLoadEventTimerFired after adoptNode used on <img>,
3509 seen with inspector, which uses adoptNode
3510 https://bugs.webkit.org/show_bug.cgi?id=24624
3511 rdar://problem/6422850
3513 Test: fast/dom/HTMLImageElement/image-load-cross-document.html
3516 (WebCore::Document::Document): Removed m_imageLoadEventTimer.
3517 (WebCore::Document::detach): Removed m_imageLoadEventDispatchSoonList and
3518 m_imageLoadEventDispatchingList.
3519 (WebCore::Document::implicitClose): Called ImageLoader::dispatchPendingLoadEvents