1 2012-07-25 Andrey Adaikin <aandrey@chromium.org>
3 Web Inspector: Add more jsdocs to InjectedScriptSource.js
4 https://bugs.webkit.org/show_bug.cgi?id=92255
6 Reviewed by Pavel Feldman.
8 * inspector/InjectedScriptSource.js:
10 2012-07-24 Dana Jansens <danakj@chromium.org>
12 [chromium] Turn the debug HUD into a layer so that it can be drawn as a WebCompositorQuad
13 https://bugs.webkit.org/show_bug.cgi?id=92182
15 Reviewed by Adrienne Walker.
17 By changing the HUD into a quad, we are able to create a HUD and pass
18 it to the host compositor, allowing the HUD to be used for renderers
21 This also removes the special drawing code for the HUD from
22 LayerRendererChromium, allowing us to move finishDrawingFrame
23 into LayerRendererChromium as a private method and remove it
24 from the CCRenderer interface.
26 Finally, we can remove the CCFontAtlas transport code from CCProxy
27 and its implementations as the atlas can be synced to impl thread
28 through the usual layer commit mechanism.
30 The debug HUD is not covered by tests.
33 * platform/graphics/chromium/HeadsUpDisplayLayerChromium.cpp: Added.
35 (WebCore::HeadsUpDisplayLayerChromium::create):
36 (WebCore::HeadsUpDisplayLayerChromium::HeadsUpDisplayLayerChromium):
37 (WebCore::HeadsUpDisplayLayerChromium::~HeadsUpDisplayLayerChromium):
38 (WebCore::HeadsUpDisplayLayerChromium::createCCLayerImpl):
39 * platform/graphics/chromium/HeadsUpDisplayLayerChromium.h: Added.
41 (HeadsUpDisplayLayerChromium):
42 * platform/graphics/chromium/LayerRendererChromium.cpp:
43 (WebCore::LayerRendererChromium::drawFrame):
44 (WebCore::LayerRendererChromium::cleanupSharedObjects):
45 * platform/graphics/chromium/LayerRendererChromium.h:
46 (LayerRendererChromium):
47 * platform/graphics/chromium/cc/CCDebugRectHistory.cpp:
48 (WebCore::CCDebugRectHistory::savePropertyChangedRects):
49 * platform/graphics/chromium/cc/CCDebugRectHistory.h:
50 * platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp.
52 (WebCore::CCHeadsUpDisplayLayerImpl::CCHeadsUpDisplayLayerImpl):
53 (WebCore::CCHeadsUpDisplayLayerImpl::~CCHeadsUpDisplayLayerImpl):
54 (WebCore::CCHeadsUpDisplayLayerImpl::willDraw):
55 (WebCore::CCHeadsUpDisplayLayerImpl::appendQuads):
56 (WebCore::CCHeadsUpDisplayLayerImpl::didDraw):
57 (WebCore::CCHeadsUpDisplayLayerImpl::didLoseContext):
58 (WebCore::CCHeadsUpDisplayLayerImpl::drawHudContents):
59 (WebCore::CCHeadsUpDisplayLayerImpl::drawFPSCounter):
60 (WebCore::CCHeadsUpDisplayLayerImpl::drawFPSCounterText):
61 (WebCore::CCHeadsUpDisplayLayerImpl::drawDebugRects):
62 * platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.h: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.h.
64 (CCHeadsUpDisplayLayerImpl):
65 (WebCore::CCHeadsUpDisplayLayerImpl::create):
66 * platform/graphics/chromium/cc/CCLayerImpl.h:
67 (WebCore::CCLayerImpl::layerIsAlwaysDamaged):
68 This flag is used to mark the HUD as always damaged, so that it is
69 continually drawn on the impl thread. It is also used as a hint by
70 the CCDebugRectHistory class to not include the layer in the display
71 of damage, since always damaged is not interesting damage.
73 * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
74 (WebCore::CCLayerTreeHost::create):
75 (WebCore::CCLayerTreeHost::CCLayerTreeHost):
76 (WebCore::CCLayerTreeHost::initialize):
77 (WebCore::CCLayerTreeHost::willCommit):
78 (WebCore::CCLayerTreeHost::didCommit):
79 * platform/graphics/chromium/cc/CCLayerTreeHost.h:
80 (CCLayerTreeSettings):
81 (WebCore::CCLayerTreeSettings::showDebugInfo):
82 (WebCore::CCLayerTreeSettings::showDebugRects):
84 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
85 (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
86 (WebCore::CCLayerTreeHostImpl::drawLayers):
87 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
89 (CCLayerTreeHostImpl):
90 * platform/graphics/chromium/cc/CCProxy.h:
92 * platform/graphics/chromium/cc/CCRenderer.h:
94 * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
95 * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
96 * platform/graphics/chromium/cc/CCThreadProxy.cpp:
97 * platform/graphics/chromium/cc/CCThreadProxy.h:
100 2012-07-25 'Pavel Feldman' <pfeldman@chromium.org>
102 Web Inspector: follow up to r123612, fixing CSS value suggest.
104 Not reviewed, minor JS fix.
106 * inspector/front-end/CSSCompletions.js:
107 (WebInspector.CSSCompletions):
108 * inspector/front-end/StylesSidebarPane.js:
109 (WebInspector.StylePropertyTreeElement.prototype):
111 2012-07-25 Michael Saboff <msaboff@apple.com>
113 Unreviewed build fix after r123624.
115 * inspector/InspectorPageAgent.cpp:
116 (WebCore::InspectorPageAgent::clearGeolocationOverride):
117 Changed ASSERT_UNUSED() to UNUSED_PARAM().
119 2012-07-25 Pavel Feldman <pfeldman@chromium.org>
121 Web inspector auto-completes "optimizequality" but then complains
122 https://bugs.webkit.org/show_bug.cgi?id=92262
124 Reviewed by Timothy Hatcher.
126 Fixed optimizeSpeed, optimizeLegibility, geometricPrecision.
128 * inspector/front-end/CSSKeywordCompletions.js:
130 2012-07-25 Beth Dakin <bdakin@apple.com>
132 https://bugs.webkit.org/show_bug.cgi?id=89114
133 REGRESSION (r112919): Setting scrollTop after setting display from none to block
136 <rdar://problem/11656050>
138 Reviewed by Simon Fraser.
140 ScrollAnimatorMac::immediateScrollTo() and ScrollAnimatorMac::immediateScrollBy()
141 both have an optimization in place so that they do not call
142 notifyPositionChanged() if the new scroll offset matches the ScrollAnimator's
143 cached m_currentPosX and m_currentPosY. So revision 112919 caused troubled with
144 this optimization because it allowed RenderLayers to restore a scrollOffset from
145 the Element if there is one cached there. This caused the RenderLayer to have a
146 scrollOffset that is improperly out-of-synch with the ScrollAnimator's
147 currentPosition (which will just be 0,0 since it is being re-created like the
148 RenderLayer). This fix makes sure they are in synch by calling
149 setCurrentPosition() on the ScrollAnimator when the cached position is non-zero.
150 * rendering/RenderLayer.cpp:
151 (WebCore::RenderLayer::RenderLayer):
153 2012-07-25 Andreas Kling <kling@webkit.org>
155 Make ElementAttributeData a variable-sized object to reduce memory use.
156 <http://webkit.org/b/88240>
158 Reviewed by Ryosuke Niwa.
160 Take advantage of the fact that we know at ElementAttributeData construction time how many attributes
161 it needs to accomodate and allocate exactly as much space as needed instead of using a Vector.
162 For elements that never have their attribute list mutated (the vast majority), this saves a lot of
163 memory and removes the indirection to Vector<Attribute>'s heap-allocated storage.
165 Introduced a mutability flag to ElementAttributeData and sprinkled assertions all over to make sure
166 that nothing tries to mutate an element with a raw attribute array.
168 When an Element's attribute(s) are mutated, we reconstruct the ElementAttributeData, this time using
169 a Vector as backing instead. This is triggered when calling Element::mutableAttributeData().
171 This reduces memory consumption by 3.2MB when viewing the full HTML5 spec at <http://whatwg.org/c/>.
172 That is a ~35% reduction in DOM attribute memory use.
174 Furthermore, that page ends up promoting 27% of the elements to mutable attribute storage due to dynamic
175 adding of "class" attributes. For more static pages, savings are even greater.
177 Also did away with ElementAttributeData::removeAttribute(name) and do separate index lookup where
178 needed. Not a big deal but avoids double lookup of attributes when removing them.
181 (WebCore::Element::detachAttribute):
182 (WebCore::Element::removeAttribute):
183 (WebCore::Element::attributes):
184 (WebCore::Element::setAttributeInternal):
185 (WebCore::Element::parserSetAttributes):
186 (WebCore::Element::hasEquivalentAttributes):
187 (WebCore::Element::setAttributeNode):
188 (WebCore::Element::removeAttributeNode):
189 (WebCore::Element::getAttributeNode):
190 (WebCore::Element::getAttributeNodeNS):
191 (WebCore::Element::hasAttribute):
192 (WebCore::Element::hasAttributeNS):
193 (WebCore::Element::cloneAttributesFromElement):
195 Sprinkle const on ElementAttributeData* pointers.
196 Switch to using mutableAttributeData() in code paths that modify attributes.
198 (WebCore::Element::normalizeAttributes):
200 Cleaner iteration over attributes, I removed ElementAttributeData::attributeVector() since that
201 was just incurring a bunch of extra Vector copying. Since ElementAttributeData already exposes
202 length() and attributeItem(index), use those to iterate directly over the attributes.
204 (WebCore::Element::createMutableAttributeData):
206 Added, converts existing ElementAttributeData to a mutable object. Otherwise creates a new
207 ElementAttributeData (mutable and empty.)
210 (WebCore::Element::attributeData):
211 (WebCore::Element::updatedAttributeData):
212 (WebCore::Element::ensureAttributeData):
213 (WebCore::Element::ensureUpdatedAttributeData):
215 Made all of these return "const ElementAttributeData*" to ensure at compile-time that nothing
216 attempts to modify an ElementAttributeData that may be immutable.
218 ensureUpdatedAttributeData() is still const, despite possibly calling mutableAttributeData().
219 The goal of having methods be const is to prevent conversion from one ElementAttributeData
220 object to another, so that pointers remain intact and no unnecessary work gets done.
222 (WebCore::Element::mutableAttributeData):
224 Added, returns a guaranteed mutable ElementAttributeData* pointer.
226 * dom/ElementAttributeData.cpp:
227 (WebCore::ElementAttributeData::createImmutable):
229 Creates a new ElementAttributeData tailored to fit the provided Vector<Attribute>.
231 (WebCore::ElementAttributeData::ElementAttributeData):
233 Moved constructors out-of-line, getting too complex for header files.
235 ElementAttributeData(const Vector<Attribute>&) creates an immutable ElementAttributeData
236 containing the provided attributes in an array tacked onto the end of the object.
238 (WebCore::ElementAttributeData::~ElementAttributeData):
240 Free the attribute vector if mutable.
241 For immutable objects, manually invoke destructor on each Attribute object,
242 since these won't be destroyed automatically by ~ElementAttributeData.
244 (WebCore::ElementAttributeData::attrIfExists):
246 (WebCore::ElementAttributeData::ensureAttr):
247 (WebCore::ElementAttributeData::setAttr):
248 (WebCore::ElementAttributeData::removeAttr):
250 Make these const, as they should always have been- they don't affect the ElementAttributeData,
251 only the global DOM Attr <-> ElementAttributeData mappings.
253 (WebCore::ElementAttributeData::ensureInlineStyle):
254 (WebCore::ElementAttributeData::ensureMutableInlineStyle):
256 Sprinkle ASSERT(isMutable()). This doesn't mean that all Elements with inline styles automatically
257 have mutable attribute data. There's still inlineStyle() for that, which may return null.
258 These are only for use where you need a valid StylePropertySet*, even if there is no inline style
259 attribute, e.g in editing code that wants to add style.
261 (WebCore::ElementAttributeData::updateInlineStyleAvoidingMutation):
262 (WebCore::ElementAttributeData::destroyInlineStyle):
264 Make these const. While destroyInlineStyle() doesn't sound very const-y, immutable objects that
265 contain a style attribute will have a valid inlineStyle() with that style data. This is just
266 an interface for ~StyledElement to destroy the style object.
267 It'd be nice to do that in ~ElementAttributeData(), but we need a StyledElement* pointer to
268 clean up properly and we don't store one in this class.
270 (WebCore::ElementAttributeData::addAttribute):
271 (WebCore::ElementAttributeData::removeAttribute):
272 (WebCore::ElementAttributeData::clearAttributes):
273 (WebCore::ElementAttributeData::replaceAttribute):
275 Sprinkle ASSERT(isMutable()).
276 Always go straight for m_mutableAttributeVector since we know that's the storage being used.
278 (WebCore::ElementAttributeData::isEquivalent):
279 (WebCore::ElementAttributeData::detachAttrObjectsFromElement):
280 (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase):
281 (WebCore::ElementAttributeData::removeAttribute):
282 (WebCore::ElementAttributeData::getAttributeItem):
283 (WebCore::ElementAttributeData::getAttributeItemIndex):
285 Use length() and attributeItem(index) to iterate over the attributes.
287 (WebCore::ElementAttributeData::cloneDataFrom):
289 Sprinkle ASSERT(isMutable()). Added a FIXME that cloning elements could create immutable
290 attribute data. I'm not sure this optimization is worthwhile, as cloning elements is already
291 a semi-rare occurrence.
293 Updated code to handle both immutable and mutable source objects. This could
295 (WebCore::ElementAttributeData::getAttributeNode):
299 * dom/ElementAttributeData.h:
300 (ElementAttributeData):
302 Turn attribute storage into what's effectively union { OwnPtr<Vector<Attribute>>; Attribute[]; }
303 The new m_isMutable bit determines which union member should be used for access.
305 (WebCore::ElementAttributeData::create):
306 (WebCore::ElementAttributeData::createImmutable):
308 Added createImmutable(const Vector<Attribute>&) as a complement to create().
310 (WebCore::ElementAttributeData::setClass):
311 (WebCore::ElementAttributeData::setIdForStyleResolution):
312 (WebCore::ElementAttributeData::inlineStyle):
313 (WebCore::ElementAttributeData::setAttributeStyle):
315 Make these const, and their data member counterparts 'mutable'.
316 An immutable ElementAttributeData object still has m_classNames, m_idForStyleResolution,
317 m_inlineStyleDecl and m_attributeStyle.
319 (WebCore::ElementAttributeData::reportMemoryUsage):
321 Updated for isMutable().
323 (WebCore::ElementAttributeData::makeMutable):
325 Returns a mutable clone of itself.
327 (WebCore::ElementAttributeData::isEmpty):
328 (WebCore::ElementAttributeData::length):
329 (WebCore::ElementAttributeData::attributeItem):
331 Check isMutable() to know how to access attribute storage.
333 * dom/StyledElement.cpp:
334 (WebCore::StyledElement::style):
335 (WebCore::StyledElement::setInlineStyleProperty):
337 Simplify by using StyledElement::ensureInlineStyle().
339 (WebCore::StyledElement::classAttributeChanged):
341 Use mutableAttributeData() if the attribute is being removed completely.
342 In other cases, tiptoe around without causing the attribute data to go mutable.
344 (WebCore::StyledElement::removeInlineStyleProperty):
346 Use mutableAttributeData() if/when actually removing something.
348 (WebCore::StyledElement::addSubresourceAttributeURLs):
352 * dom/StyledElement.h:
353 (WebCore::StyledElement::ensureInlineStyle):
355 This now implies conversion to mutable attribute data. Used by codepaths that add/remove
356 properties, so conversion is inevitable.
358 * html/parser/HTMLConstructionSite.cpp:
359 (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
360 (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
361 * svg/properties/SVGAnimatedPropertyMacros.h:
362 (WebCore::SVGSynchronizableAnimatedProperty::synchronize):
364 Use mutableAttributeData() as appropriate.
366 * xml/parser/XMLDocumentParserQt.cpp:
367 (WebCore::XMLDocumentParser::XMLDocumentParser):
371 2012-07-25 Andrew Wilson <atwilson@chromium.org>
373 Unreviewed, rolling out r123560.
374 http://trac.webkit.org/changeset/123560
375 https://bugs.webkit.org/show_bug.cgi?id=90321
377 Breaks chromium valgrind tests.
379 * html/FTPDirectoryDocument.cpp:
380 (WebCore::FTPDirectoryDocumentParser::append):
381 * html/parser/HTMLEntityParser.cpp:
382 (WebCore::HTMLEntityParser::consumeNamedEntity):
383 * html/parser/HTMLParserIdioms.cpp:
384 (WebCore::stripLeadingAndTrailingHTMLSpaces):
385 * html/parser/HTMLSourceTracker.cpp:
386 (WebCore::HTMLSourceTracker::sourceForToken):
387 * loader/cache/CachedScript.cpp:
388 (WebCore::CachedScript::script):
389 * platform/text/SegmentedString.cpp:
390 (WebCore::SegmentedString::SegmentedString):
391 (WebCore::SegmentedString::operator=):
392 (WebCore::SegmentedString::clear):
393 (WebCore::SegmentedString::append):
394 (WebCore::SegmentedString::prepend):
395 (WebCore::SegmentedString::advanceSubstring):
396 (WebCore::SegmentedString::advance):
397 (WebCore::SegmentedString::advanceSlowCase):
398 (WebCore::SegmentedString::advanceAndUpdateLineNumberSlowCase):
399 * platform/text/SegmentedString.h:
400 (WebCore::SegmentedSubstring::SegmentedSubstring):
401 (WebCore::SegmentedSubstring::clear):
402 (WebCore::SegmentedSubstring::appendTo):
403 (SegmentedSubstring):
404 (WebCore::SegmentedString::SegmentedString):
405 (WebCore::SegmentedString::push):
406 (WebCore::SegmentedString::isEmpty):
407 (WebCore::SegmentedString::lookAhead):
408 (WebCore::SegmentedString::lookAheadIgnoringCase):
409 (WebCore::SegmentedString::advance):
410 (WebCore::SegmentedString::advanceAndASSERT):
411 (WebCore::SegmentedString::advanceAndASSERTIgnoringCase):
412 (WebCore::SegmentedString::advancePastNewlineAndUpdateLineNumber):
414 (WebCore::SegmentedString::advancePastNonNewline):
415 (WebCore::SegmentedString::advanceAndUpdateLineNumber):
416 (WebCore::SegmentedString::operator*):
417 (WebCore::SegmentedString::operator->):
418 (WebCore::SegmentedString::current):
419 (WebCore::SegmentedString::equalsLiterally):
420 (WebCore::SegmentedString::equalsIgnoringCase):
421 (WebCore::SegmentedString::lookAheadInline):
422 (WebCore::SegmentedString::lookAheadSlowCase):
423 * xml/parser/CharacterReferenceParserInlineMethods.h:
424 (WebCore::consumeCharacterReference):
425 * xml/parser/MarkupTokenizerBase.h:
426 (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::nextInputCharacter):
427 (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::peek):
428 (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::advance):
430 2012-07-25 Konrad Piascik <kpiascik@rim.com>
432 Web Inspector: Geolocation override
433 https://bugs.webkit.org/show_bug.cgi?id=89365
435 Reviewed by Pavel Feldman.
437 Re-added the m_page member variable for GeolocationController since
438 it's now being used by InspectorInstrumentaiton.
440 Added a way to override the GeolocationPosition and GeolocationError
441 using Web Inspector. Curretnly only PositionError can be set.
443 This will be hidden behind the experiments flag for now.
445 Tests: inspector/geolocation-error.html
446 inspector/geolocation-success.html
447 inspector/geolocation-watchPosition.html
449 * English.lproj/localizedStrings.js:
450 * Modules/geolocation/GeolocationController.cpp:
451 (WebCore::GeolocationController::GeolocationController):
452 (WebCore::GeolocationController::positionChanged):
453 * Modules/geolocation/GeolocationController.h:
454 (GeolocationController):
455 * inspector/Inspector.json:
456 * inspector/InspectorInstrumentation.cpp:
458 (WebCore::InspectorInstrumentation::overrideGeolocationPositionImpl):
459 * inspector/InspectorInstrumentation.h:
461 (InspectorInstrumentation):
462 (WebCore::InspectorInstrumentation::overrideGeolocationPosition):
463 * inspector/InspectorPageAgent.cpp:
464 (WebCore::InspectorPageAgent::InspectorPageAgent):
465 (WebCore::InspectorPageAgent::setGeolocationOverride):
467 (WebCore::InspectorPageAgent::clearGeolocationOverride):
468 (WebCore::InspectorPageAgent::canOverrideGeolocation):
469 (WebCore::InspectorPageAgent::overrideGeolocationPosition):
470 * inspector/InspectorPageAgent.h:
471 * inspector/front-end/Settings.js:
472 * inspector/front-end/SettingsScreen.js:
473 (WebInspector.UserAgentSettingsTab):
474 (WebInspector.UserAgentSettingsTab.prototype._createDeviceMetricsElement):
475 (WebInspector.UserAgentSettingsTab.prototype._onGeolocationOverrideCheckboxClicked):
476 (WebInspector.UserAgentSettingsTab.prototype._applyGeolocationUserInput):
477 (WebInspector.UserAgentSettingsTab.prototype._setGeolocationPosition.set if):
478 (WebInspector.UserAgentSettingsTab.prototype._setGeolocationPosition):
479 (WebInspector.UserAgentSettingsTab.prototype._createGeolocationOverrideElement.createInput):
480 (WebInspector.UserAgentSettingsTab.prototype._createGeolocationOverrideElement):
481 * inspector/front-end/UserAgentSupport.js:
482 (WebInspector.UserAgentSupport.GeolocationPosition):
483 (WebInspector.UserAgentSupport.GeolocationPosition.prototype.toSetting):
484 (WebInspector.UserAgentSupport.GeolocationPosition.parseSetting):
485 (WebInspector.UserAgentSupport.GeolocationPosition.parseUserInput):
486 (WebInspector.UserAgentSupport.GeolocationPosition.clearGeolocationOverride):
487 * inspector/front-end/inspector.js:
488 (WebInspector.doLoadedDone):
490 2012-07-25 Shawn Singh <shawnsingh@chromium.org>
492 [chromium] Build fix for clang builds after r123628
493 https://bugs.webkit.org/show_bug.cgi?id=92266
495 Reviewed by Adrienne Walker.
497 An un-used variable was causing build failures for clang builds
498 after the refactoring in r123628. It is correct to simply remove
501 * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
502 (WebCore::calculateDrawTransformsInternal):
504 2012-07-25 Hans Wennborg <hans@chromium.org>
506 Speech JavaScript API: extract function from SpeechRecognitionResult::emma()
507 https://bugs.webkit.org/show_bug.cgi?id=92232
509 Reviewed by Adam Barth.
511 Extract code for creating emma-qualified names to a helper function.
513 Just a refactoring; covered by the existing test.
515 * Modules/speech/SpeechRecognitionResult.cpp:
516 (WebCore::emmaQualifiedName):
518 (WebCore::SpeechRecognitionResult::emma):
520 2012-07-25 Adrienne Walker <enne@google.com>
522 [chromium] Unify compositor quadTransform/drawTransform/originTransform
523 https://bugs.webkit.org/show_bug.cgi?id=91417
525 Reviewed by Kenneth Russell.
527 drawTransform used to operate on centered layer rects. To unify quad
528 transforms, draw transforms, and origin transforms, make draw
529 transforms operate on content rects with the origin in the top left.
531 This essentially eliminates the need for surface origin transforms,
532 which will be eliminated in a future patch.
534 Also, remove the unused CCLayerImpl::getDrawRect function.
536 No-op refactoring. Tested by existing tests.
538 * platform/graphics/chromium/LayerRendererChromium.cpp:
539 (WebCore::LayerRendererChromium::drawRenderPassQuad):
540 * platform/graphics/chromium/RenderSurfaceChromium.cpp:
541 (WebCore::RenderSurfaceChromium::drawableContentRect):
542 * platform/graphics/chromium/cc/CCDamageTracker.cpp:
543 (WebCore::CCDamageTracker::extendDamageForLayer):
544 * platform/graphics/chromium/cc/CCLayerImpl.cpp:
545 (WebCore::CCLayerImpl::createSharedQuadState):
546 * platform/graphics/chromium/cc/CCLayerImpl.h:
548 * platform/graphics/chromium/cc/CCLayerSorter.cpp:
549 (WebCore::CCLayerSorter::LayerShape::LayerShape):
550 (WebCore::CCLayerSorter::createGraphNodes):
551 * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
552 (WebCore::calculateVisibleContentRect):
553 (WebCore::calculateDrawTransformsInternal):
554 * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
555 (WebCore::::markOccludedBehindLayer):
556 (WebCore::::occluded):
557 (WebCore::::unoccludedContentRect):
558 * platform/graphics/chromium/cc/CCRenderPass.cpp:
559 (WebCore::CCRenderPass::appendQuadsToFillScreen):
560 * platform/graphics/chromium/cc/CCRenderSurface.cpp:
561 (WebCore::CCRenderSurface::drawableContentRect):
563 2012-07-25 Tommy Widenflycht <tommyw@google.com>
565 MediaStream API: Update MediaStreamTrack to match the specification
566 https://bugs.webkit.org/show_bug.cgi?id=90180
568 Reviewed by Adam Barth.
570 MediaStreamTracks are now required to show the status of the underlying source,
571 and trigger events when that status changes.
573 Test: fast/mediastream/MediaStreamTrack.html
575 * GNUmakefile.list.am:
576 * Modules/mediastream/MediaStream.cpp:
577 (WebCore::MediaStream::MediaStream):
578 (WebCore::MediaStream::addTrack):
579 * Modules/mediastream/MediaStreamTrack.cpp:
580 (WebCore::MediaStreamTrack::create):
581 (WebCore::MediaStreamTrack::MediaStreamTrack):
582 (WebCore::MediaStreamTrack::~MediaStreamTrack):
583 (WebCore::MediaStreamTrack::setEnabled):
584 (WebCore::MediaStreamTrack::readyState):
586 (WebCore::MediaStreamTrack::sourceChangedState):
587 (WebCore::MediaStreamTrack::stop):
588 (WebCore::MediaStreamTrack::interfaceName):
589 (WebCore::MediaStreamTrack::scriptExecutionContext):
590 (WebCore::MediaStreamTrack::eventTargetData):
591 (WebCore::MediaStreamTrack::ensureEventTargetData):
592 * Modules/mediastream/MediaStreamTrack.h:
593 * Modules/mediastream/MediaStreamTrack.idl:
597 * dom/EventTargetFactory.in:
598 * platform/chromium/support/WebMediaStreamDescriptor.cpp:
599 * platform/chromium/support/WebMediaStreamSource.cpp:
600 (WebKit::WebMediaStreamSource::setReadyState):
602 (WebKit::WebMediaStreamSource::readyState):
603 * platform/mediastream/MediaStreamSource.cpp: Copied from Source/WebCore/platform/mediastream/MediaStreamSource.h.
605 (WebCore::MediaStreamSource::create):
606 (WebCore::MediaStreamSource::MediaStreamSource):
607 (WebCore::MediaStreamSource::setReadyState):
608 (WebCore::MediaStreamSource::addObserver):
609 (WebCore::MediaStreamSource::removeObserver):
610 * platform/mediastream/MediaStreamSource.h:
612 (WebCore::MediaStreamSource::Observer::~Observer):
614 (WebCore::MediaStreamSource::readyState):
615 * platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
616 (WebCore::MediaStreamCenterChromium::queryMediaStreamSources):
617 (WebCore::MediaStreamCenterChromium::didCreateMediaStream):
619 2012-07-25 Allan Sandfeld Jensen <allan.jensen@nokia.com>
621 Incorrect rounding in ceiledLayoutUnit and roundedLayoutUnit.
622 https://bugs.webkit.org/show_bug.cgi?id=91061
624 Reviewed by Adam Barth.
626 The two functions are currently both returning the flooredLayoutUnit when subpixel
627 layout is enabled. This patch changes them to return the correct fractional rounded
630 * platform/FractionalLayoutUnit.h:
631 (WebCore::FractionalLayoutUnit::fromFloatCeil):
632 (FractionalLayoutUnit):
633 (WebCore::FractionalLayoutUnit::fromFloatRound):
634 * rendering/LayoutTypes.h:
635 (WebCore::roundedLayoutUnit):
636 (WebCore::ceiledLayoutUnit):
637 * rendering/RenderBlock.cpp:
638 (WebCore::updatePreferredWidth):
640 2012-07-25 Gyuyoung Kim <gyuyoung.kim@samsung.com>
642 Add *explicit* keyword to constructors in WebCore/platform
643 https://bugs.webkit.org/show_bug.cgi?id=92238
645 Reviewed by Kentaro Hara.
647 As a step to let *explicit* keyword add to constructors which have a parameter,
648 *explicit* keyword is added to Source/WebCore/platform in order to avoid implicit
651 Some files in platform directory can't use explicit keyword because of build breaks.
653 No new tests. Covered by existing tests.
655 * platform/AutodrainedPool.h:
657 * platform/ContentType.h:
659 * platform/ContextMenu.h:
661 * platform/ContextMenuItem.h:
664 (WebCore::SharedCursor::SharedCursor):
667 (WebCore::KURL::KURL):
669 * platform/KURLGooglePrivate.h:
671 * platform/PODRedBlackTree.h:
672 (WebCore::PODRedBlackTree::PODRedBlackTree):
673 * platform/Pasteboard.h:
675 * platform/PlatformEvent.h:
676 (WebCore::PlatformEvent::PlatformEvent):
677 * platform/PlatformKeyboardEvent.h:
678 (PlatformKeyboardEvent):
679 * platform/PlatformMouseEvent.h:
680 (PlatformMouseEvent):
681 * platform/PlatformPasteboard.h:
682 (PlatformPasteboard):
683 * platform/PlatformTouchEvent.h:
684 (PlatformTouchEvent):
685 * platform/PlatformWheelEvent.h:
686 (PlatformWheelEvent):
687 * platform/RunLoop.h:
689 * platform/ScrollAnimator.h:
691 * platform/ScrollAnimatorNone.h:
692 (ScrollAnimatorNone):
693 * platform/SharedBuffer.h:
695 * platform/WheelFlingPlatformGestureCurve.h:
696 (WheelFlingPlatformGestureCurve):
700 2012-07-25 Allan Sandfeld Jensen <allan.jensen@nokia.com>
702 NodesFromRect and area-based hit-testing can not handle CSS transforms.
703 https://bugs.webkit.org/show_bug.cgi?id=85792
705 Reviewed by Eric Seidel.
707 To support the combination of CSS transforms and rect based hit testing,
708 we need to test against the transformed rect, instead of the original rect.
710 This patch makes HitTestPoint store the exact transformed FloatPoint and
711 FloatQuad, and modifies the intersection methods so that they will use a
712 new FloatQuad based intersection when transforms requires it.
714 Tests: fast/dom/nodesFromRect/nodesFromRect-rotate.html
715 fast/dom/nodesFromRect/nodesFromRect-scale.html
717 * platform/graphics/FloatQuad.cpp:
718 (WebCore::determinant):
719 (WebCore::rightMostCornerToVector):
720 (WebCore::FloatQuad::intersectsRect):
721 (WebCore::FloatQuad::isCounterclockwise):
722 * platform/graphics/FloatQuad.h:
724 * rendering/HitTestResult.cpp:
725 (WebCore::HitTestPoint::HitTestPoint):
726 (WebCore::HitTestPoint::operator=):
727 (WebCore::HitTestPoint::move):
728 (WebCore::HitTestPoint::intersectsRect):
729 (WebCore::HitTestPoint::intersects):
730 * rendering/HitTestResult.h:
732 (WebCore::HitTestPoint::isRectilinear):
733 (WebCore::HitTestPoint::transformedPoint):
734 (WebCore::HitTestPoint::transformedRect):
735 * rendering/HitTestingTransformState.cpp:
736 (WebCore::HitTestingTransformState::flattenWithTransform):
737 (WebCore::HitTestingTransformState::mappedArea):
738 (WebCore::HitTestingTransformState::boundsOfMappedArea):
739 * rendering/HitTestingTransformState.h:
740 (WebCore::HitTestingTransformState::create):
741 (WebCore::HitTestingTransformState::HitTestingTransformState):
742 * rendering/RenderFlowThread.cpp:
743 (WebCore::RenderFlowThread::hitTestRegion):
744 * rendering/RenderLayer.cpp:
745 (WebCore::RenderLayer::hitTest):
746 (WebCore::RenderLayer::createLocalTransformState):
747 (WebCore::RenderLayer::hitTestLayer):
748 (WebCore::RenderLayer::hitTestChildLayerColumns):
749 * rendering/RenderLayer.h:
750 * rendering/svg/RenderSVGText.cpp:
751 (WebCore::RenderSVGText::nodeAtFloatPoint):
753 2012-07-25 Kwang Yul Seo <skyul@company100.net>
755 Add HTMLStackItem.h to project files
756 https://bugs.webkit.org/show_bug.cgi?id=92221
758 Reviewed by Adam Barth.
760 Added HTMLStackItem.h introduced in r123399 to project files.
762 Project file changes only, no change in behavior thus no new tests.
764 * GNUmakefile.list.am:
766 * WebCore.vcproj/WebCore.vcproj:
767 * WebCore.xcodeproj/project.pbxproj:
769 2012-07-25 Sheriff Bot <webkit.review.bot@gmail.com>
771 Unreviewed, rolling out r123606.
772 http://trac.webkit.org/changeset/123606
773 https://bugs.webkit.org/show_bug.cgi?id=92247
775 broke Windows build of Chromium (Requested by tomhudson on
778 * Resources/colorSuggestionPicker.css: Removed.
779 * Resources/colorSuggestionPicker.js: Removed.
780 * WebCore.gyp/WebCore.gyp:
782 2012-07-25 Pavel Feldman <pfeldman@chromium.org>
784 Web Inspector: disabling property should remove "overriden" decoration from overriden UA shorthand.
785 https://bugs.webkit.org/show_bug.cgi?id=92253
787 Reviewed by Vsevolod Vlasov.
789 Bug fix with a test and more compilation markup.
791 Test: inspector/styles/styles-disable-then-enable-overriden-ua.html
793 * inspector/front-end/StylesSidebarPane.js:
794 (WebInspector.StylePropertiesSection.prototype.update):
795 (WebInspector.StylePropertyTreeElement):
796 (WebInspector.StylePropertyTreeElement.prototype):
798 2012-07-25 Vsevolod Vlasov <vsevik@chromium.org>
800 Web Inspector: Improve ObjectPropertiesSection UI by adding a tooltip for the value.
801 https://bugs.webkit.org/show_bug.cgi?id=92225
803 Reviewed by Pavel Feldman.
805 Added tooltip with property value description on the property's valueElement.
807 * inspector/front-end/ObjectPropertiesSection.js:
808 (WebInspector.ObjectPropertyTreeElement.prototype.update):
810 2012-07-25 Pavel Feldman <pfeldman@chromium.org>
812 https://bugs.webkit.org/show_bug.cgi?id=91931
814 Reviewed by Vsevolod Vlasov.
816 - Synthetic shorthand values are now only returned for source-less styles
817 - CSSAgents reports longhands along with the property names in getSupportedCSSProperties
818 - StylesSidebarPane now has two paths: for source-enabled styles and for CSSOM-based ones (UA styles)
819 - CSSStyleModel uses style metainfo as a source of shorthand / longhand relationship now
821 Test: inspector/styles/styles-overriden-properties.html
823 * inspector/Inspector.json:
824 * inspector/InspectorCSSAgent.cpp:
825 (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
826 * inspector/InspectorCSSAgent.h:
828 * inspector/InspectorStyleSheet.cpp:
829 (WebCore::InspectorStyle::styleWithProperties):
830 * inspector/front-end/CSSCompletions.js:
831 (WebInspector.CSSCompletions):
832 (WebInspector.CSSCompletions.requestCSSNameCompletions):
833 (WebInspector.CSSCompletions.prototype._closest):
834 (WebInspector.CSSCompletions.prototype.longhands):
835 (WebInspector.CSSCompletions.prototype.shorthands):
836 * inspector/front-end/CSSStyleModel.js:
837 (WebInspector.CSSStyleDeclaration):
838 (WebInspector.CSSStyleDeclaration.prototype.longhandProperties):
839 (WebInspector.CSSStyleDeclaration.prototype.shorthandValue):
840 (WebInspector.CSSStyleDeclaration.prototype.newBlankProperty):
841 (WebInspector.CSSProperty):
842 (WebInspector.CSSProperty.parsePayload):
843 * inspector/front-end/SourceCSSTokenizer.js:
844 (WebInspector.SourceCSSTokenizer):
845 * inspector/front-end/SourceCSSTokenizer.re2js:
846 * inspector/front-end/StylesSidebarPane.js:
847 (WebInspector.StylePropertiesSection.prototype.isPropertyOverloaded):
848 (WebInspector.StylePropertiesSection.prototype.update):
849 (WebInspector.StylePropertiesSection.prototype.onpopulate):
850 (WebInspector.StylePropertyTreeElement.prototype):
852 2012-07-25 Keishi Hattori <keishi@webkit.org>
854 Implement ColorSuggestionPicker page popup
855 https://bugs.webkit.org/show_bug.cgi?id=92109
857 Reviewed by Kent Tamura.
859 Implements ColorSuggestionPicker page popup. This will be used in
860 certain ports as the datalist UI for <input type=color>.
862 No new tests because there is no way to open the popup yet.
864 * Resources/colorSuggestionPicker.css: Added.
868 (.color-swatch:hover):
869 (.color-swatch-container):
871 * Resources/colorSuggestionPicker.js: Added.
872 (getScrollbarWidth):When there are more than 20 colors we need to
873 increase the window width to accommodate the scroll bar.
877 (handleArgumentsTimeout):
879 (submitValue): Calls setValueAndClosePopup with a numValue of 0.
880 (handleCancel): Calls setValueAndClosePopup with a numValue of -1.
881 (chooseOtherColor): Calls setValueAndClosePopup with a numValue of -2.
883 (ColorPicker.prototype._layout): Lays out the color swatches in a 5x4
885 (ColorPicker.prototype._handleSwatchClick):
886 * WebCore.gyp/WebCore.gyp:
888 2012-07-25 Allan Sandfeld Jensen <allan.jensen@nokia.com>
890 Fix arithmetic composite filter for auto-vectorization
891 https://bugs.webkit.org/show_bug.cgi?id=92123
893 Reviewed by Nikolas Zimmermann.
895 Since only clamping of the result prevents GCC from auto-vectorizing the inner loop, this patch
896 adds a faster version of the inner loop to handle cases where clamping is unnecessary,
898 * platform/graphics/filters/FEComposite.cpp:
899 (WebCore::computeArithmeticPixelsUnclamped):
900 (WebCore::arithmeticSoftware):
902 2012-07-25 Allan Sandfeld Jensen <allan.jensen@nokia.com>
904 Fix blend filter for autovectorizing
905 https://bugs.webkit.org/show_bug.cgi?id=91398
907 Reviewed by Nikolas Zimmermann.
909 Get rid of wrapper classes, and use functions directly as template argument.
911 * platform/graphics/filters/FEBlend.cpp:
912 (WebCore::feBlendNormal):
913 (WebCore::feBlendMultiply):
914 (WebCore::feBlendScreen):
915 (WebCore::feBlendDarken):
916 (WebCore::feBlendLighten):
917 (WebCore::feBlendUnknown):
918 (WebCore::platformApply):
919 (WebCore::FEBlend::platformApplyGeneric):
921 2012-07-25 Keishi Hattori <keishi@webkit.org>
923 Add methods to ColorChooserClient so the color chooser can show suggestions
924 https://bugs.webkit.org/show_bug.cgi?id=92114
926 Reviewed by Kent Tamura.
928 Added methods to ColorChooserClient so the color chooser can ask the
929 client for suggestions and current color.
931 No new tests. The methods are not used yet.
933 * html/ColorInputType.cpp:
934 (WebCore::ColorInputType::currentColor): Returns what color the color
935 chooser should display.
937 (WebCore::ColorInputType::shouldShowSuggestions): Returns if the UI for
938 suggestions should be shown.
939 (WebCore::ColorInputType::suggestions): Returns a list of colors to be
940 suggested to the user.
941 * html/ColorInputType.h:
943 * html/HTMLInputElement.h:
944 (HTMLInputElement): Made dataList() public.
945 * platform/ColorChooserClient.h:
946 (ColorChooserClient):
948 2012-07-25 Kentaro Hara <haraken@chromium.org>
950 Replace int with long in test IDL files
951 https://bugs.webkit.org/show_bug.cgi?id=92181
953 Reviewed by Adam Barth.
955 int is not a valid type in WebIDL. It should be long.
956 We should replace int with long in bindings/scripts/test/*.idl.
957 This is a follow-up patch for r123550.
959 Test: bindings/scripts/test/TestObj.idl
961 * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
962 (WebDOMTestObj::readOnlyLongAttr):
963 (WebDOMTestObj::Attr):
964 (WebDOMTestObj::setAttr):
965 (WebDOMTestObj::voidMethodWithArgs):
966 (WebDOMTestObj::Method):
967 (WebDOMTestObj::MethodWithArgs):
968 (WebDOMTestObj::objMethodWithArgs):
969 * bindings/scripts/test/CPP/WebDOMTestObj.h:
970 * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
971 (webkit_dom_test_obj_set_property):
972 (webkit_dom_test_obj_get_property):
973 (webkit_dom_test_obj_class_init):
974 (webkit_dom_test_obj_void_method_with_args):
975 (webkit_dom_test_obj_method):
976 (webkit_dom_test_obj_method_with_args):
977 (webkit_dom_test_obj_obj_method_with_args):
978 (webkit_dom_test_obj_get_read_only_long_attr):
979 (webkit_dom_test_obj_get_attr):
980 (webkit_dom_test_obj_set_attr):
981 (webkit_dom_test_obj_get_strawberry):
982 (webkit_dom_test_obj_set_strawberry):
983 * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
984 * bindings/scripts/test/JS/JSTestObj.cpp:
986 (WebCore::jsTestObjReadOnlyLongAttr):
987 (WebCore::jsTestObjConstructorStaticReadOnlyLongAttr):
988 (WebCore::jsTestObjAttr):
989 (WebCore::setJSTestObjAttr):
990 (WebCore::setJSTestObjStrawberry):
991 (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
992 (WebCore::jsTestObjPrototypeFunctionMethod):
993 (WebCore::jsTestObjPrototypeFunctionMethodWithArgs):
994 (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
995 (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
996 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
997 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
998 * bindings/scripts/test/JS/JSTestObj.h:
1000 * bindings/scripts/test/ObjC/DOMTestObj.h:
1001 * bindings/scripts/test/ObjC/DOMTestObj.mm:
1002 (-[DOMTestObj readOnlyLongAttr]):
1003 (-[DOMTestObj Attr]):
1004 (-[DOMTestObj setAttr:]):
1005 (-[DOMTestObj voidMethodWithArgs:strArg:objArg:]):
1006 (-[DOMTestObj Method]):
1007 (-[DOMTestObj MethodWithArgs:strArg:objArg:]):
1008 (-[DOMTestObj objMethodWithArgs:strArg:objArg:]):
1009 (-[DOMTestObj customMethodWithArgs:strArg:objArg:]):
1010 * bindings/scripts/test/TestObj.idl:
1011 * bindings/scripts/test/V8/V8TestObj.cpp:
1012 (WebCore::TestObjV8Internal::readOnlyLongAttrAttrGetter):
1013 (WebCore::TestObjV8Internal::staticReadOnlyLongAttrAttrGetter):
1014 (WebCore::TestObjV8Internal::AttrAttrGetter):
1015 (WebCore::TestObjV8Internal::AttrAttrSetter):
1016 (WebCore::TestObjV8Internal::strawberryAttrSetter):
1017 (WebCore::TestObjV8Internal::voidMethodWithArgsCallback):
1018 (WebCore::TestObjV8Internal::MethodCallback):
1019 (WebCore::TestObjV8Internal::MethodWithArgsCallback):
1020 (WebCore::TestObjV8Internal::objMethodWithArgsCallback):
1021 (WebCore::TestObjV8Internal::methodReturningSequenceCallback):
1022 (WebCore::TestObjV8Internal::overloadedMethod2Callback):
1023 (WebCore::TestObjV8Internal::overloadedMethod4Callback):
1025 (WebCore::ConfigureV8TestObjTemplate):
1027 2012-07-25 Shinya Kawanaka <shinyak@chromium.org>
1029 A validation bubble should not be modifiable.
1030 https://bugs.webkit.org/show_bug.cgi?id=92217
1032 Reviewed by Kent Tamura.
1034 A user can set -webkit-user-modify: read-write to validation message elements.
1035 This might cause a undesired crash like Bug 65738. They should be unmodifiable.
1037 Test: fast/forms/validation-user-modify.html
1040 Added -webkit-user-modify: read-only !important; for these elements so that they won't be
1042 (::-webkit-validation-bubble):
1043 (::-webkit-validation-bubble-message):
1044 (::-webkit-validation-bubble-text-block):
1045 (::-webkit-validation-bubble-heading):
1046 (::-webkit-validation-bubble-arrow):
1047 (::-webkit-validation-bubble-arrow-clipper):
1049 2012-07-25 Zeno Albisser <zeno@webkit.org>
1051 [Qt][WK2] Disable CopyToTexture for GraphicsSurfaceMac.
1052 https://bugs.webkit.org/show_bug.cgi?id=92159
1054 Disable CopyToTexture feature for GraphicsSurface on Mac.
1055 While this is actually working, it is currently used for Tiles
1056 that are single buffered, and therefore requires a call to glFlush.
1057 This call blocks the GPU for about 40ms which would make smooth animations impossible.
1059 Reviewed by Noam Rosenthal.
1061 * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
1062 (WebCore::GraphicsSurface::platformCreate):
1063 (WebCore::GraphicsSurface::platformImport):
1065 2012-07-25 Kenichi Ishibashi <bashi@chromium.org>
1067 [Chromium] Fix up includes in HarfBuzzNGFace.h
1068 https://bugs.webkit.org/show_bug.cgi?id=92127
1070 Reviewed by Hajime Morita.
1072 Move constructors of FontPlatformData from headers to corresponding cpp files
1073 so that we can use forward declaration for HarfBuzzNGFace instead of including HarfBuzzNGFace.h.
1074 This way we can include hb.h in HarfBuzzNGFace.h.
1076 No new tests. No changes in behavior.
1078 * platform/graphics/FontPlatformData.cpp:
1079 (WebCore::FontPlatformData::FontPlatformData): Moved from header file.
1081 * platform/graphics/FontPlatformData.h:
1083 (FontPlatformData): Moved to cpp file.
1084 * platform/graphics/cocoa/FontPlatformDataCocoa.mm: Include HarfBuzzNGFace.h
1085 * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
1086 (WebCore::FontPlatformData::FontPlatformData): Moved from header file.
1088 * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h:
1090 (FontPlatformData): Moved to cpp file.
1091 * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h: Include hb.h.
1093 2012-07-24 Benjamin Poulain <bpoulain@apple.com> && Joseph Pecoraro <pecoraro@apple.com>
1095 QualifiedName's HashSet should be big enough to hold at least all the static names
1096 https://bugs.webkit.org/show_bug.cgi?id=91891
1098 Reviewed by Darin Adler.
1100 QualifiedName's table has a standard size of 64 buckets. When initializing WebKit,
1101 we create 850 static QualifiedName for the standard names (HTMLNames, SVGNames etc).
1103 The small base size forces us to grow and rehash the table several time on startup.
1105 This patch solves the issue by defining the initial table size to the minimum size that
1106 can hold all the static QualifiedName.
1108 * dom/QualifiedName.cpp:
1109 (QualifiedNameHashTraits):
1110 * dom/make_names.pl:
1111 (printNamesHeaderFile):
1113 2012-07-24 Kwang Yul Seo <skyul@company100.net>
1115 Remove anonymous namespace and make functions static.
1116 https://bugs.webkit.org/show_bug.cgi?id=92214
1118 Reviewed by Adam Barth.
1120 Mark functions as static instead of enclosing them in anonymous namespaces.
1121 One exception to this rule is when a function is passed as a template argument.
1122 In this case, the function must have an external linkage.
1124 No functional change. Covered by existing tests.
1126 * html/parser/HTMLConstructionSite.cpp:
1127 (WebCore::hasImpliedEndTag):
1128 (WebCore::causesFosterParenting):
1129 (WebCore::isAllWhitespace):
1130 * html/parser/HTMLDocumentParser.cpp:
1132 (WebCore::tokenizerStateForContextElement):
1133 * html/parser/HTMLElementStack.cpp:
1134 (WebCore::isNumberedHeaderElement):
1135 (WebCore::isRootNode):
1137 * html/parser/HTMLEntityParser.cpp:
1138 (WebCore::isAlphaNumeric):
1139 * html/parser/HTMLEntitySearch.cpp:
1141 * html/parser/HTMLPreloadScanner.cpp:
1143 * html/parser/HTMLTokenizer.cpp:
1144 (WebCore::toLowerCase):
1145 (WebCore::vectorEqualsString):
1146 (WebCore::isEndTagBufferingState):
1147 * html/parser/HTMLTreeBuilder.cpp:
1149 (WebCore::uninitializedPositionValue1):
1150 (WebCore::isAllWhitespace):
1151 (WebCore::isAllWhitespaceOrReplacementCharacters):
1152 (WebCore::isNumberedHeaderTag):
1153 (WebCore::isCaptionColOrColgroupTag):
1154 (WebCore::isTableCellContextTag):
1155 (WebCore::isTableBodyContextTag):
1156 (WebCore::isSpecialNode):
1157 (WebCore::isNonAnchorNonNobrFormattingTag):
1158 (WebCore::isNonAnchorFormattingTag):
1159 (WebCore::isFormattingTag):
1160 (WebCore::closestFormAncestor):
1161 (WebCore::mapLoweredLocalNameToName):
1162 (WebCore::adjustSVGTagNameCase):
1163 (WebCore::adjustAttributes):
1164 (WebCore::adjustSVGAttributes):
1165 (WebCore::adjustMathMLAttributes):
1166 (WebCore::addNamesWithPrefix):
1167 (WebCore::adjustForeignAttributes):
1169 2012-07-24 Vsevolod Vlasov <vsevik@chromium.org>
1171 Unreviewed r123494 follow-up: fixed inspector undock icon.
1173 * inspector/front-end/Images/statusbarButtonGlyphs.png:
1175 2012-07-24 Kwang Yul Seo <skyul@company100.net>
1177 Read tag names and attributes from the saved tokens where possible.
1178 https://bugs.webkit.org/show_bug.cgi?id=92079
1180 Reviewed by Adam Barth.
1182 Read tag names and attributes from the saved tokens, not from the DOM.
1183 Also added convenient methods such as hasLocalName, hasTagName, localName,
1184 isElementNode and isDocumentFragmentNode to HTMLStackItem class.
1186 No new tests, covered by existing tests.
1188 * html/parser/HTMLConstructionSite.cpp:
1189 (WebCore::HTMLNames::hasImpliedEndTag):
1190 (WebCore::HTMLNames::causesFosterParenting):
1191 (WebCore::HTMLConstructionSite::generateImpliedEndTagsWithExclusion):
1192 (WebCore::HTMLConstructionSite::generateImpliedEndTags):
1193 (WebCore::HTMLConstructionSite::shouldFosterParent):
1194 * html/parser/HTMLConstructionSite.h:
1195 (WebCore::HTMLConstructionSite::currentStackItem):
1196 * html/parser/HTMLElementStack.cpp:
1197 (WebCore::HTMLNames::isNumberedHeaderElement):
1198 (WebCore::HTMLNames::isRootNode):
1199 (WebCore::HTMLNames::isScopeMarker):
1200 (WebCore::HTMLNames::isListItemScopeMarker):
1201 (WebCore::HTMLNames::isTableScopeMarker):
1202 (WebCore::HTMLNames::isTableBodyScopeMarker):
1203 (WebCore::HTMLNames::isTableRowScopeMarker):
1204 (WebCore::HTMLNames::isForeignContentScopeMarker):
1205 (WebCore::HTMLNames::isButtonScopeMarker):
1206 (WebCore::HTMLNames::isSelectScopeMarker):
1207 (WebCore::HTMLElementStack::ElementRecord::replaceElement):
1208 (WebCore::HTMLElementStack::popUntilNumberedHeaderElementPopped):
1209 (WebCore::HTMLElementStack::popUntilTableScopeMarker):
1210 (WebCore::HTMLElementStack::popUntilTableBodyScopeMarker):
1211 (WebCore::HTMLElementStack::popUntilTableRowScopeMarker):
1212 (WebCore::HTMLElementStack::isMathMLTextIntegrationPoint):
1213 (WebCore::HTMLElementStack::isHTMLIntegrationPoint):
1214 (WebCore::HTMLElementStack::popUntilForeignContentScopeMarker):
1215 (WebCore::HTMLElementStack::pushRootNode):
1216 (WebCore::HTMLElementStack::oneBelowTop):
1217 (WebCore::HTMLElementStack::topmost):
1219 (WebCore::inScopeCommon):
1220 (WebCore::HTMLElementStack::hasNumberedHeaderElementInScope):
1221 (WebCore::HTMLElementStack::inScope):
1222 * html/parser/HTMLElementStack.h:
1223 (WebCore::HTMLElementStack::topStackItem):
1225 (WebCore::isInHTMLNamespace):
1226 * html/parser/HTMLStackItem.h:
1227 (WebCore::HTMLStackItem::isDocumentFragmentNode):
1228 (WebCore::HTMLStackItem::isElementNode):
1230 (WebCore::HTMLStackItem::hasLocalName):
1231 (WebCore::HTMLStackItem::hasTagName):
1232 (WebCore::HTMLStackItem::HTMLStackItem):
1233 * html/parser/HTMLTreeBuilder.cpp:
1235 (WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken):
1236 (WebCore::HTMLTreeBuilder::processFakeEndTag):
1237 (WebCore::HTMLTreeBuilder::processCloseWhenNestedTag):
1238 (WebCore::HTMLTreeBuilder::processStartTagForInBody):
1239 (WebCore::HTMLTreeBuilder::processStartTag):
1240 (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
1241 (WebCore::HTMLTreeBuilder::furthestBlockForFormattingElement):
1242 (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
1243 (WebCore::HTMLTreeBuilder::processEndTagForInTableBody):
1244 (WebCore::HTMLTreeBuilder::processEndTagForInCell):
1245 (WebCore::HTMLTreeBuilder::processEndTagForInBody):
1246 (WebCore::HTMLTreeBuilder::processCaptionEndTagForInCaption):
1247 (WebCore::HTMLTreeBuilder::processTrEndTagForInRow):
1248 (WebCore::HTMLTreeBuilder::processEndTag):
1249 (WebCore::HTMLTreeBuilder::processCharacterBuffer):
1250 (WebCore::HTMLTreeBuilder::processEndOfFile):
1251 (WebCore::HTMLTreeBuilder::shouldProcessTokenInForeignContent):
1252 (WebCore::HTMLTreeBuilder::processTokenInForeignContent):
1253 * html/parser/HTMLTreeBuilder.h:
1255 2012-07-24 Hironori Bono <hbono@chromium.org>
1257 Avoid moving child objects multiple times when vertical scrollbar are shown at the left side.
1258 https://bugs.webkit.org/show_bug.cgi?id=91756
1260 Reviewed by Tony Chang.
1262 My r123067 moves the top-left origin of an RTL element right when its vertical
1263 scrollbar is shown at its left side. (That is, r123067 moves all child objects
1264 in the RTL element right.) This change also increases RenderBox::clientLeft()
1265 at the same time, i.e. it also moves child objects right. Furthermore, my r109512
1266 moves positioned objects in an RTL element right at the same time. This makes
1267 WebKit move objects in an RTL element up to three times by the scrollbar width.
1268 (Moving an absolute object right increases the scrollWidth value and it causes
1269 this bug.) This change removes unnecessary code that moves objects right in my
1270 r109512 and RenderBox::clientLeft().
1272 Test: scrollbars/rtl/div-absolute.html
1273 fast/block/float/026.html
1274 fast/block/float/028.html
1275 fast/overflow/unreachable-overflow-rtl-bug.html
1278 (WebCore::Element::clientLeft): Increase clientLeft value by the width of a vertical scrollbar as written in the CSSOM specification.
1279 * rendering/RenderBlock.cpp:
1280 (WebCore::RenderBlock::addOverflowFromPositionedObjects): Removed unnecessary code.
1281 (WebCore::RenderBlock::determineLogicalLeftPositionForChild): Removed unnecessary code.
1282 * rendering/RenderBox.h:
1283 (WebCore::RenderBox::clientLeft): Removed unnecessary code.
1285 2012-07-24 Dan Bernstein <mitz@apple.com>
1287 RenderBlock::positionForPoint can fail when the block or its children have a vertical writing mode
1288 https://bugs.webkit.org/show_bug.cgi?id=92202
1290 Reviewed by Beth Dakin.
1292 Test: fast/writing-mode/positionForPoint.html
1294 * rendering/RenderBlock.cpp:
1295 (WebCore::RenderBlock::positionForPoint): Fixed two issues, each of which are covered by
1296 one of the sub-tests in the new regression test: (1) changed to compare children’s logical
1297 bounds against pointInLogicalContents, i.e. compare childern’s horizontal bounds to the
1298 point’s horizontal component; and (2) changed to use logicalTopForChild and
1299 logicalHeightForChild, which account for this block’s writing mode, instead of logicalTop
1300 and logicalBottom, which are based on the child’s writing mode.
1302 2012-07-24 MORITA Hajime <morrita@google.com>
1304 https://bugs.webkit.org/show_bug.cgi?id=89179
1305 Rendering LI having Shadow DOM seems weird
1307 Reviewed by Dimitri Glazkov.
1309 This incorrect rendering happend because HTMLLIElement::attach()
1310 wasn't aware of composed shadow subtree. This change makes it
1311 aware of that using ComposedShadowTreeParentWalker.
1313 Test: fast/dom/shadow/shadow-and-list-elements.html
1315 * html/HTMLLIElement.cpp:
1316 (WebCore::HTMLLIElement::attach):
1318 2012-07-24 Alec Flett <alecflett@chromium.org>
1320 IndexedDB: fix #include dependencies so IDBRequest isn't an include root
1321 https://bugs.webkit.org/show_bug.cgi?id=92167
1323 Reviewed by Tony Chang.
1325 Remove implicit dependencies due to using IDBRequest.h, and fix all
1326 places that break as a result.
1328 * Modules/indexeddb/IDBCallbacks.h:
1330 * Modules/indexeddb/IDBObjectStore.cpp:
1331 * Modules/indexeddb/IDBRequest.h:
1332 * inspector/InspectorIndexedDBAgent.cpp:
1334 2012-07-24 Keishi Hattori <keishi@webkit.org>
1336 Move PagePopupClient helper functions so they can be shared
1337 https://bugs.webkit.org/show_bug.cgi?id=92096
1339 Reviewed by Kent Tamura.
1341 Move PagePopupClient helper functions to a separate file,
1342 so they can be shared with new PagePopupClients.
1344 No new tests. Covered by fast/forms/date/calendar-picker-appearance.html
1346 * WebCore.gypi: Added PagePopupClient.cpp
1347 * html/shadow/CalendarPickerElement.cpp:
1348 (WebCore::CalendarPickerElement::writeDocument): Modified to use PagePopupClient.
1349 * page/PagePopupClient.cpp: Added.
1351 (WebCore::PagePopupClient::addJavaScriptString):
1352 (WebCore::PagePopupClient::addProperty):
1353 * page/PagePopupClient.h:
1354 (WebCore::PagePopupClient::addString):
1356 2012-07-24 Jer Noble <jer.noble@apple.com>
1358 setting playbackRate on a MediaController doesn't change the playbackRate for slaved media
1359 https://bugs.webkit.org/show_bug.cgi?id=92035
1361 Reviewed by Darin Adler.
1363 Allow updatePlaybackRate() to change the MediaPlayer rate when the media element has a
1364 current media controller.
1366 Test: media/media-controller-playbackrate.html
1368 * html/HTMLMediaElement.cpp:
1369 (WebCore::HTMLMediaElement::updatePlaybackRate):
1371 2012-07-24 Hayato Ito <hayato@chromium.org>
1373 Rename FocusScope to FocusNavigationScope.
1374 https://bugs.webkit.org/show_bug.cgi?id=92062
1376 Reviewed by Dimitri Glazkov.
1378 FocusNavagationScope is better name than FocusScope since the
1379 class is only used for controlling focus navigation.
1381 No new tests - no functional changes.
1383 * page/FocusController.cpp:
1384 (WebCore::FocusNavigationScope::FocusNavigationScope):
1385 (WebCore::FocusNavigationScope::rootNode):
1386 (WebCore::FocusNavigationScope::owner):
1387 (WebCore::FocusNavigationScope::focusNavigationScopeOf):
1388 (WebCore::FocusNavigationScope::focusNavigationScopeOwnedByShadowHost):
1389 (WebCore::FocusNavigationScope::focusNavigationScopeOwnedByIFrame):
1390 (WebCore::FocusController::findFocusableNodeDecendingDownIntoFrameDocument):
1391 (WebCore::FocusController::advanceFocusInDocumentOrder):
1392 (WebCore::FocusController::findFocusableNodeAcrossFocusScope):
1393 (WebCore::FocusController::findFocusableNodeRecursively):
1394 (WebCore::FocusController::findFocusableNode):
1395 (WebCore::FocusController::nextFocusableNode):
1396 (WebCore::FocusController::previousFocusableNode):
1397 * page/FocusController.h:
1398 (FocusNavigationScope):
1401 2012-07-24 Michael Saboff <msaboff@apple.com>
1403 Convert HTML parser to handle 8-bit resources without converting to UChar*
1404 https://bugs.webkit.org/show_bug.cgi?id=90321
1406 Reviewed by Geoffrey Garen.
1408 No new tests, no new functionality therefore covered by existing tests.
1410 Changed the parsing of HTML to handle 8-bit strings without converting the
1411 whole string to 16-bits. Primary change was to use the appropriate
1412 character pointer type (LChar* or UChar*) depending on the source string.
1413 This access is abstracted in SegmentedSubstring by getCurrentChar{8,16} and
1414 incrementAndGetCurrentChar{8,16} methods. In SegmentedString, the advance()
1415 and advanceAndUpdateLineNumber() methods have been refactored into a
1416 state machine managed pair of function pointers. The possible functions
1417 have not only the 8 and 16 bitness factored out, they also have the
1418 "exclude line numbers" logic factored out for advanceAndUpdateLineNumber().
1419 This provides a net speed-up even with the 8/16 bit testing.
1420 Other changes involve using String methods to access and compare with the
1423 * html/FTPDirectoryDocument.cpp:
1424 (WebCore::FTPDirectoryDocumentParser::append): Changed to use currentChar()
1425 instead of SegmentedString '*' operator.
1426 * html/parser/HTMLEntityParser.cpp: Changed to use currentChar() instead of
1427 SegmentedString '*' operator.
1428 * html/parser/HTMLParserIdioms.cpp:
1429 (WebCore::stripLeadingAndTrailingHTMLSpaces): Added 8-bit fast path.
1430 * html/parser/HTMLSourceTracker.cpp:
1431 (WebCore::HTMLSourceTracker::sourceForToken): Changed to use currentChar() instead of
1432 SegmentedString '*' operator.
1433 * loader/cache/CachedScript.cpp:
1434 (WebCore::CachedScript::script): Updated to use new String::dataSize() method.
1435 * platform/text/SegmentedString.cpp:
1436 (WebCore::SegmentedString::SegmentedString):
1437 (WebCore::SegmentedString::operator=):
1438 (WebCore::SegmentedString::clear):
1439 (WebCore::SegmentedString::append):
1440 (WebCore::SegmentedString::prepend):
1441 (WebCore::SegmentedString::advanceSubstring):
1442 (WebCore::SegmentedString::advance): Changed to be a wrapper that invokes current
1444 (WebCore::SegmentedString::advance8): Fast path advance function for 8 bit data.
1445 (WebCore::SegmentedString::advance16): Fast path advance function for 16 bit data.
1446 (WebCore::SegmentedString::advanceAndUpdateLineNumber8IncludeLineNumbers): Fast
1447 path advanceAndUpdateLineNumber for 8 bit data when we need to update the line number.
1448 (WebCore::SegmentedString::advanceAndUpdateLineNumber16IncludeLineNumbers): Fast
1449 path advanceAndUpdateLineNumber for 16 bit data when we need to update the line number.
1450 (WebCore::SegmentedString::advanceSlowCase): Slow case advance function for both
1451 8 and 16 bit advance.
1452 (WebCore::SegmentedString::advanceAndUpdateLineNumberSlowCase): Slow case
1453 advanceAndUpdateLineNumber function for both 8 and 16 bit data.
1454 (WebCore::SegmentedString::advanceEmpty): Advance function when input has been exhausted.
1455 * platform/text/SegmentedString.h:
1456 (WebCore::SegmentedSubstring::SegmentedSubstring):
1457 (WebCore::SegmentedSubstring::clear):
1458 (SegmentedSubstring):
1459 (WebCore::SegmentedSubstring::is8Bit): New getter.
1460 (WebCore::SegmentedSubstring::appendTo):
1461 (WebCore::SegmentedSubstring::getCurrentChar8): New getter for the 8 bit case.
1462 (WebCore::SegmentedSubstring::getCurrentChar16): New getter for the 16 bit case.
1463 (WebCore::SegmentedSubstring::incrementAndGetCurrentChar8): New wrapper functions
1464 that pre-increments the 8 bit pointer and returns the next character.
1465 (WebCore::SegmentedSubstring::incrementAndGetCurrentChar16): New wrapper functions
1466 that pre-increments the 16 bit pointer and returns the next character.
1467 (WebCore::SegmentedSubstring::currentSubString):
1468 (WebCore::SegmentedSubstring::getCurrentChar):
1469 (WebCore::SegmentedSubstring::incrementAndGetCurrentChar):
1470 (WebCore::SegmentedString::SegmentedString):
1471 (WebCore::SegmentedString::push):
1472 (WebCore::SegmentedString::isEmpty):
1473 (WebCore::SegmentedString::lookAhead):
1474 (WebCore::SegmentedString::lookAheadIgnoringCase):
1475 (WebCore::SegmentedString::advance):
1476 (WebCore::SegmentedString::advanceAndUpdateLineNumber):
1477 (WebCore::SegmentedString::advanceAndASSERT):
1478 (WebCore::SegmentedString::advanceAndASSERTIgnoringCase):
1479 (WebCore::SegmentedString::advancePastNonNewline):
1480 (WebCore::SegmentedString::advancePastNewlineAndUpdateLineNumber):
1481 (WebCore::SegmentedString::currentChar):
1482 (WebCore::SegmentedString::setSlowCase): Set advance function pointers to slow case
1484 (WebCore::SegmentedString::decrementAndCheckLength): Decrement substring length and
1485 change to slow case functions when only one character left.
1486 (WebCore::SegmentedString::setAdvanceFunctionPointers): Select appropriate advance
1487 functions based on current substring.
1488 (WebCore::SegmentedString::lookAheadInline): Changed to use String::startsWith().
1489 (WebCore::SegmentedString::lookAheadSlowCase):
1490 * xml/parser/CharacterReferenceParserInlineMethods.h:
1491 (WebCore::consumeCharacterReference): Changed to use currentChar() instead of
1492 SegmentedString '*' operator.
1493 * xml/parser/MarkupTokenizerBase.h:
1494 (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::nextInputCharacter):
1495 (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::peek): Changed to use
1496 currentChar() instead of SegmentedString '*' operator.
1497 (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::advance):
1499 2012-07-24 Kenneth Russell <kbr@google.com>
1501 [chromium] Hint garbage collector to run if page uses Canvas contexts
1502 https://bugs.webkit.org/show_bug.cgi?id=76225
1504 Reviewed by Kentaro Hara.
1506 Upon creating a canvas context, set a hint in the current isolate
1507 indicating that a full GC should be done upon the next page
1510 This improves Chrome's robustness on some WebGL stress tests which
1511 simulate real-world behavior by repeatedly navigating among
1512 several samples. More general measures are being investigated, but
1513 this change makes V8 behave the same as JSC on these stress tests.
1514 JSC doesn't currently use generational garbage collection, so it
1515 has more opportunities to discover unreferenced canvas contexts.
1517 Test: fast/canvas/webgl/context-creation-and-destruction.html
1519 * bindings/v8/V8Binding.cpp:
1520 (WebCore::V8BindingPerIsolateData::V8BindingPerIsolateData):
1521 Initialize per-isolate low memory hint.
1522 * bindings/v8/V8Binding.h:
1523 (V8BindingPerIsolateData):
1524 (WebCore::V8BindingPerIsolateData::setLowMemoryNotificationHint):
1525 Set a per-isolate hint to signal a low memory condition upon the next page navigation.
1526 (WebCore::V8BindingPerIsolateData::clearLowMemoryNotificationHint):
1527 Clear the previously set hint.
1528 (WebCore::V8BindingPerIsolateData::isLowMemoryNotificationHint):
1529 Get the previously set hint.
1530 * bindings/v8/V8Proxy.cpp:
1531 (WebCore::V8Proxy::hintForGCIfNecessary):
1532 If necessary, send V8 a hint that it should GC.
1534 (WebCore::V8Proxy::clearForClose):
1535 (WebCore::V8Proxy::clearForNavigation):
1536 Call hintForGCIfNecessary.
1537 * bindings/v8/V8Proxy.h:
1539 * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
1540 (WebCore::V8HTMLCanvasElement::getContextCallback):
1541 Set a hint that we should GC upon the next page navigation.
1543 2012-07-24 Dave Tu <dtu@chromium.org>
1545 [chromium] Add time spent painting to GPU benchmarking renderingStats() API.
1546 https://bugs.webkit.org/show_bug.cgi?id=90019
1548 Reviewed by Adrienne Walker.
1550 * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp:
1551 (WebCore::BitmapCanvasLayerTextureUpdater::prepareToUpdate):
1552 * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h:
1553 (BitmapCanvasLayerTextureUpdater):
1554 * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp:
1555 (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::prepareRect):
1556 (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::prepareToUpdate):
1557 (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::paintContentsRect):
1558 * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
1560 (BitmapSkPictureCanvasLayerTextureUpdater):
1561 * platform/graphics/chromium/CanvasLayerTextureUpdater.cpp:
1562 (WebCore::CanvasLayerTextureUpdater::paintContents):
1563 * platform/graphics/chromium/CanvasLayerTextureUpdater.h:
1564 (CanvasLayerTextureUpdater):
1565 * platform/graphics/chromium/ContentLayerChromium.cpp:
1566 (WebCore::ContentLayerChromium::update):
1567 * platform/graphics/chromium/ContentLayerChromium.h:
1568 (ContentLayerChromium):
1569 * platform/graphics/chromium/ImageLayerChromium.cpp:
1570 (WebCore::ImageLayerChromium::update):
1571 * platform/graphics/chromium/ImageLayerChromium.h:
1572 (ImageLayerChromium):
1573 * platform/graphics/chromium/LayerChromium.h:
1575 (WebCore::LayerChromium::update):
1576 * platform/graphics/chromium/LayerTextureUpdater.h:
1578 (WebCore::LayerTextureUpdater::Texture::prepareRect):
1579 (WebCore::LayerTextureUpdater::prepareToUpdate):
1580 * platform/graphics/chromium/ScrollbarLayerChromium.cpp:
1581 (WebCore::ScrollbarLayerChromium::updatePart):
1582 (WebCore::ScrollbarLayerChromium::update):
1583 * platform/graphics/chromium/ScrollbarLayerChromium.h:
1584 (ScrollbarLayerChromium):
1585 * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp:
1586 (WebCore::SkPictureCanvasLayerTextureUpdater::prepareToUpdate):
1587 * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.h:
1588 (SkPictureCanvasLayerTextureUpdater):
1589 * platform/graphics/chromium/TiledLayerChromium.cpp:
1590 (WebCore::TiledLayerChromium::updateTiles):
1591 (WebCore::TiledLayerChromium::updateContentRect):
1592 * platform/graphics/chromium/TiledLayerChromium.h:
1593 (TiledLayerChromium):
1594 * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1595 (WebCore::CCLayerTreeHost::CCLayerTreeHost):
1596 (WebCore::CCLayerTreeHost::updateAnimations):
1597 (WebCore::CCLayerTreeHost::renderingStats):
1598 (WebCore::CCLayerTreeHost::paintMasksForRenderSurface):
1599 (WebCore::CCLayerTreeHost::paintLayerContents):
1600 * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1603 * platform/graphics/chromium/cc/CCRenderingStats.h:
1605 (WebCore::CCRenderingStats::CCRenderingStats):
1607 2012-07-24 Jian Li <jianli@chromium.org>
1609 [V8] Correct WebIDL type should be used in the testing IDL file
1610 https://bugs.webkit.org/show_bug.cgi?id=92168
1612 Reviewed by Kentaro Hara.
1614 Updated bindings test.
1616 * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1617 (webkit_dom_test_obj_strict_function):
1618 * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1619 * bindings/scripts/test/JS/JSTestObj.cpp:
1620 (WebCore::jsTestObjPrototypeFunctionStrictFunction):
1621 * bindings/scripts/test/TestObj.idl:
1622 * bindings/scripts/test/V8/V8TestObj.cpp:
1623 (WebCore::TestObjV8Internal::enabledAtRuntimeMethod1Callback):
1624 (WebCore::TestObjV8Internal::enabledAtRuntimeMethod2Callback):
1625 (WebCore::TestObjV8Internal::enabledPerContextMethod1Callback):
1626 (WebCore::TestObjV8Internal::enabledPerContextMethod2Callback):
1627 (WebCore::TestObjV8Internal::strictFunctionCallback):
1629 2012-07-24 Kent Tamura <tkent@chromium.org>
1631 Unreviewed, rolling out r123191.
1632 http://trac.webkit.org/changeset/123191
1633 https://bugs.webkit.org/show_bug.cgi?id=91804
1635 It might cause another performance regression.
1636 http://code.google.com/p/chromium/issues/detail?id=138410
1638 * html/FormController.cpp:
1640 (WebCore::createKey):
1641 (WebCore::FormKeyGenerator::formKey):
1642 (WebCore::FormKeyGenerator::willDeleteForm):
1644 2012-07-24 Vineet Chaudhary <rgf748@motorola.com>
1646 [JSBinding] Merging jsUnsignedLongArrayToVector() to toNativeArray() using traits.
1647 https://bugs.webkit.org/show_bug.cgi?id=90381
1649 Reviewed by Kentaro Hara.
1651 We can remove jsUnsignedLongArrayToVector() implementaion
1652 merging it to current and toNativeArray() traits.
1655 There should be no behavoiral changes as just refactoring.
1657 * Modules/vibration/NavigatorVibration.idl: Use sequence<T> as method param than T[]
1658 * bindings/js/JSDOMBinding.cpp: Moved toJSSequence() to header file.
1659 * bindings/js/JSDOMBinding.h:
1660 (WebCore::toJSSequence): Moved toJSSequence() to header file.
1661 (WebCore::jsArray): Renamed Traits to JSValueTraits
1662 (WebCore::toNativeArray): Using traits.
1663 * bindings/js/JSDictionary.cpp:
1664 (WebCore::JSDictionary::convertValue):
1665 * bindings/js/JSMessagePortCustom.cpp:
1666 (WebCore::fillMessagePortArray):
1667 * bindings/scripts/CodeGeneratorJS.pm: Removed unsigned long[] specific binding code.
1668 (AddIncludesForType):
1669 (GenerateParametersCheckExpression):
1672 * bindings/scripts/CodeGeneratorV8.pm:
1673 (GenerateParametersCheckExpression): Added check sequence<T> check for overloaded methods.
1674 * bindings/scripts/test/JS/JSTestObj.cpp: Rebased binding test.
1675 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
1676 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
1677 (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
1678 * bindings/scripts/test/JS/JSTestObj.h: Rebased binding test.
1679 * bindings/scripts/test/TestObj.idl: Added test for sequence<T> as method parameter.
1680 * bindings/scripts/test/V8/V8TestObj.cpp: Rebased binding test.
1681 (WebCore::TestObjV8Internal::overloadedMethod10Callback):
1682 (TestObjV8Internal):
1683 (WebCore::TestObjV8Internal::overloadedMethodCallback):
1685 2012-07-24 Kwang Yul Seo <skyul@company100.net>
1687 Remove an invalid assertion introduced in r123536. Unreviewed.
1689 * xml/parser/MarkupTokenBase.h:
1690 (WebCore::AtomicMarkupTokenBase::clearExternalCharacters):
1692 2012-07-24 Sheriff Bot <webkit.review.bot@gmail.com>
1694 Unreviewed, rolling out r123504.
1695 http://trac.webkit.org/changeset/123504
1696 https://bugs.webkit.org/show_bug.cgi?id=92169
1698 broke a bunch of text-related tests in chromium mac debug
1699 (Requested by zhenyao on #webkit).
1701 * platform/text/cf/StringCF.cpp:
1702 (WTF::String::createCFString):
1703 * platform/text/cf/StringImplCF.cpp:
1704 (WTF::StringImpl::createCFString):
1706 2012-07-24 Kwang Yul Seo <skyul@company100.net>
1708 Ensure Noah's ark without reading the DOM tree.
1709 https://bugs.webkit.org/show_bug.cgi?id=92065
1711 Reviewed by Adam Barth.
1713 Technically we shouldn't read attributes back from the DOM. If JavaScript changes
1714 the attributes values, we could get a slightly wrong output here.
1716 Read attributes from tokens saved in the active formatting element list.
1718 No new tests, covered by existing tests.
1720 * html/parser/HTMLFormattingElementList.cpp:
1721 (WebCore::attributeCount):
1722 (WebCore::HTMLFormattingElementList::append):
1723 (WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly):
1724 (WebCore::HTMLFormattingElementList::ensureNoahsArkCondition):
1725 * html/parser/HTMLFormattingElementList.h:
1726 (HTMLFormattingElementList):
1727 * html/parser/HTMLStackItem.h:
1728 (WebCore::HTMLStackItem::localName):
1731 2012-07-23 Kwang Yul Seo <skyul@company100.net>
1733 Clear the external characters pointer of an AtomicHTMLToken before the raw token is cleared.
1734 https://bugs.webkit.org/show_bug.cgi?id=92056
1736 Reviewed by Adam Barth.
1738 AtomicHTMLToken keeps a pointer to the HTMLToken's buffer instead of copying the
1739 characters for performance. Clear the external characters pointer before the raw token
1740 is cleared to make sure that we won't have a dangling pointer.
1742 No new tests - no functional changes.
1744 * html/parser/HTMLTreeBuilder.cpp:
1745 (WebCore::HTMLTreeBuilder::constructTreeFromToken):
1746 * xml/parser/MarkupTokenBase.h:
1747 (WebCore::AtomicMarkupTokenBase::clearExternalCharacters):
1748 (AtomicMarkupTokenBase):
1750 2012-07-24 Jian Li <jianli@chromium.org>
1752 Add per-context setting for html notifications
1753 https://bugs.webkit.org/show_bug.cgi?id=91295
1755 Reviewed by Adam Barth.
1757 Added a new per-context setting to control the enabling of html notifications.
1758 For chromium port, we're going to disable html notifications for web
1759 pages, but still keep it enabled for extensions.
1761 Also enhance V8 code generator to support V8EnabledPerContext attribute
1764 Updated the binding tests.
1766 * Modules/notifications/NotificationCenter.cpp:
1767 (WebCore::NotificationCenter::document): Expose document for being used by installPerContextProperties.
1769 * Modules/notifications/NotificationCenter.h:
1770 (NotificationCenter):
1771 * Modules/notifications/NotificationCenter.idl: Add V8EnabledPerContext attribute.
1772 * bindings/scripts/CodeGeneratorV8.pm: V8EnabledPerContext now supports methods.
1774 (IsStandardFunction):
1775 (GenerateNonStandardFunction):
1776 (GenerateImplementation):
1777 (GenerateToV8Converters):
1778 (GetContextEnableFunction):
1779 * bindings/scripts/test/TestObj.idl: Add test case for V8EnabledPerContext methods.
1780 * bindings/scripts/test/V8/V8TestObj.cpp: Update test result.
1781 (WebCore::TestObjV8Internal::enabledAtContextMethod1Callback):
1782 (TestObjV8Internal):
1783 (WebCore::TestObjV8Internal::enabledAtContextMethod2Callback):
1784 (WebCore::V8TestObj::installPerContextProperties):
1785 (WebCore::V8TestObj::wrapSlow):
1786 * dom/ContextFeatures.cpp: Add a new per-context feature.
1787 (WebCore::ContextFeatures::htmlNotificationsEnabled):
1789 * dom/ContextFeatures.h: Add a new per-context feature.
1791 2012-07-24 Sheriff Bot <webkit.review.bot@gmail.com>
1793 Unreviewed, rolling out r123499.
1794 http://trac.webkit.org/changeset/123499
1795 https://bugs.webkit.org/show_bug.cgi?id=92161
1797 Android fails to compile (Requested by zhenyao on #webkit).
1799 * GNUmakefile.list.am:
1800 * Modules/mediastream/MediaStream.cpp:
1801 (WebCore::MediaStream::MediaStream):
1802 (WebCore::MediaStream::addTrack):
1803 * Modules/mediastream/MediaStreamTrack.cpp:
1804 (WebCore::MediaStreamTrack::create):
1805 (WebCore::MediaStreamTrack::MediaStreamTrack):
1806 (WebCore::MediaStreamTrack::~MediaStreamTrack):
1807 (WebCore::MediaStreamTrack::setEnabled):
1808 * Modules/mediastream/MediaStreamTrack.h:
1810 * Modules/mediastream/MediaStreamTrack.idl:
1814 * dom/EventTargetFactory.in:
1815 * platform/chromium/support/WebMediaStreamDescriptor.cpp:
1817 (WebKit::WebMediaStreamDescriptor::sources):
1818 * platform/chromium/support/WebMediaStreamSource.cpp:
1819 * platform/mediastream/MediaStreamSource.cpp: Removed.
1820 * platform/mediastream/MediaStreamSource.h:
1821 (WebCore::MediaStreamSource::create):
1822 (WebCore::MediaStreamSource::muted):
1823 (WebCore::MediaStreamSource::setMuted):
1824 (WebCore::MediaStreamSource::MediaStreamSource):
1825 (MediaStreamSource):
1826 * platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
1827 (WebCore::MediaStreamCenterChromium::queryMediaStreamSources):
1828 (WebCore::MediaStreamCenterChromium::didCreateMediaStream):
1830 2012-07-24 Julien Chaffraix <jchaffraix@webkit.org>
1832 Crash in RenderTableSection::layoutRows
1833 https://bugs.webkit.org/show_bug.cgi?id=92145
1835 Reviewed by Abhishek Arya.
1837 The crash came from the insertChildNode logic being confused and choosing the wrong
1838 renderer for insertion. This is because after r123159, table anonymous wrappers can
1839 be created as 'inline-table' and wouldn't pass the isAnonymousBlock() check.
1841 This change also aligns the ancestor iteration with RenderBlock::addChildToAnonymousColumnBlocks.
1843 Test: fast/table/crash-table-section-layoutRows.html
1845 * rendering/RenderObjectChildList.cpp:
1846 (WebCore::RenderObjectChildList::insertChildNode):
1847 Changed the code to always get the right child. There is no justification to not
1848 walking up to the |owner|'s direct child in all cases.
1850 2012-07-24 Tony Chang <tony@chromium.org>
1852 Make RenderBlock::paintChildren virtual so sub classes can change the paint order
1853 https://bugs.webkit.org/show_bug.cgi?id=92042
1855 Reviewed by Ojan Vafai.
1857 The flexbox spec says that the order property should change the paint order of flex children.
1858 To make that possible, make paintChildren virtual so RenderFlexibleBox can override it.
1860 No new tests, this is just a refactoring.
1862 * rendering/RenderBlock.cpp:
1863 (WebCore::RenderBlock::paintContents): Move some code out of paintChildren into paintContents.
1864 (WebCore::RenderBlock::paintChildren): Make virtual and just have it be a simple for loop.
1865 (WebCore::RenderBlock::paintChild): Move code out of paintChildren so subclasses can reuse.
1866 * rendering/RenderBlock.h:
1867 (RenderBlock): Make paintChildren virtual and protected so sub classes can call paintChild.
1869 2012-07-24 Anna Cavender <annacc@chromium.org>
1871 Create SourceBuffer and SourceBufferList objects
1872 https://bugs.webkit.org/show_bug.cgi?id=91771
1874 Reviewed by Eric Carlson.
1876 SourceBuffer and SourceBufferList objects are needed in order to
1877 implement the new object-oriented MediaSource API:
1878 http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html
1880 No new tests - will be able to test after landing BUGWK91775
1882 Adding new files to build files:
1884 * DerivedSources.cpp:
1885 * DerivedSources.make:
1886 * DerivedSources.pri:
1888 * GNUmakefile.list.am:
1890 * WebCore.gyp/WebCore.gyp:
1892 * WebCore.vcproj/WebCore.vcproj:
1893 * WebCore.vcproj/WebCoreCommon.vsprops:
1894 * WebCore.vcproj/copyForwardingHeaders.cmd:
1895 * WebCore.xcodeproj/project.pbxproj:
1898 * Modules/mediasource/SourceBuffer.cpp: Added.
1899 * Modules/mediasource/SourceBuffer.h: Added.
1900 * Modules/mediasource/SourceBuffer.idl: Added.
1901 * Modules/mediasource/SourceBufferList.cpp: Added.
1902 * Modules/mediasource/SourceBufferList.h: Added.
1903 * Modules/mediasource/SourceBufferList.idl: Added.
1908 * dom/EventTarget.h:
1910 * dom/EventTargetFactory.in:
1912 Object constructors:
1913 * page/DOMWindow.idl:
1915 2012-07-24 Patrick Gansterer <paroga@webkit.org>
1917 Store the full year in GregorianDateTime
1918 https://bugs.webkit.org/show_bug.cgi?id=92067
1920 Reviewed by Geoffrey Garen.
1922 Use the full year instead of the offset from year 1900
1923 for the year member variable of GregorianDateTime.
1925 * bridge/qt/qt_runtime.cpp:
1926 (JSC::Bindings::convertValueToQVariant):
1927 (JSC::Bindings::convertQVariantToValue):
1928 * bridge/qt/qt_runtime_qt4.cpp:
1929 (JSC::Bindings::convertValueToQVariant):
1930 (JSC::Bindings::convertQVariantToValue):
1932 2012-07-24 Benjamin Poulain <bpoulain@apple.com>
1934 Do not perform 8 to 16bits characters conversion when converting a WTFString to NSString/CFString
1935 https://bugs.webkit.org/show_bug.cgi?id=90720
1937 Reviewed by Geoffrey Garen.
1939 In most String to CFString conversion, we should be able to use the "NoCopy" constructor and have
1940 a relatively cheap conversion from WTF::String to CFString.
1942 When the String is 8 bits, it was converted to 16 bits by getData16SlowCase() because of the call
1943 to String::characters().
1945 This patch adds a path for creating a CFString from a 8bits string using CFStringCreateWithBytes.
1947 This is covered by existing tests.
1949 * platform/text/cf/StringCF.cpp:
1950 (WTF::String::createCFString): CFSTR() create static CFString, it is unecessary to retain it.
1951 * platform/text/cf/StringImplCF.cpp:
1952 (WTF::StringImpl::createCFString): The logic to avoid the StringWrapperCFAllocator has also been simplified.
1953 The allocator creation is now closer to where it is useful.
1955 2012-07-24 Kentaro Hara <haraken@chromium.org>
1957 [V8] String wrappers should be marked Independent
1958 https://bugs.webkit.org/show_bug.cgi?id=91251
1960 Reviewed by Adam Barth.
1962 Currently V8 String wrappers are not marked Independent.
1963 By marking them Independent, they can be reclaimed by the scavenger GC.
1964 Although I couldn't find a case where this change reduces memory usage,
1965 this change would be important for upcoming changes in string conversion
1966 between V8 and WebKit (https://bugs.webkit.org/show_bug.cgi?id=91850).
1968 'm_lastStringImpl = 0' in StringCache::remove() is important.
1969 Look at the following code:
1971 static void cachedStringCallback(v8::Persistent<v8::Value> wrapper, void* parameter)
1974 stringCache()->remove(stringImpl);
1978 void StringCache::remove(StringImpl* stringImpl)
1981 if (m_lastStringImpl.get() == stringImpl)
1982 m_lastStringImpl = 0;
1985 v8::Local<v8::String> v8ExternalString(StringImpl* stringImpl, v8::Isolate* isolate)
1987 if (m_lastStringImpl.get() == stringImpl) {
1988 return v8::Local<v8::String>::New(m_lastV8String); // m_lastV8String points to a wrapper object that was accessed most recently.
1990 return v8ExternalStringSlow(stringImpl, isolate);
1993 Without 'm_lastStringImpl = 0', already disposed m_lastV8String can be used
1994 in v8ExternalString(). This was a cause of the crashes of r122614.
1996 Tests: At the initial commit of this patch (r122614),
1997 the following tests had been broken due to missing 'm_lastStringImpl = 0'.
1998 fast/workers/worker-location.html
1999 Dromaeo/cssquery-jquery.html
2000 Dromaeo/jslib-event-jquery.html
2001 Dromaeo/jslib-style-jquery.html
2002 Dromaeo/jslib-style-prototype.html
2004 * bindings/v8/V8Binding.cpp:
2005 (WebCore::StringCache::remove):
2006 (WebCore::StringCache::v8ExternalStringSlow):
2008 2012-07-24 Tommy Widenflycht <tommyw@google.com>
2010 MediaStream API: Update MediaStreamTrack to match the specification
2011 https://bugs.webkit.org/show_bug.cgi?id=90180
2013 Reviewed by Adam Barth.
2015 MediaStreamTracks are now required to show the status of the underlying source,
2016 and trigger events when that status changes.
2018 Test: fast/mediastream/MediaStreamTrack.html
2020 * GNUmakefile.list.am:
2021 * Modules/mediastream/MediaStream.cpp:
2022 (WebCore::MediaStream::MediaStream):
2023 (WebCore::MediaStream::addTrack):
2024 * Modules/mediastream/MediaStreamTrack.cpp:
2025 (WebCore::MediaStreamTrack::create):
2026 (WebCore::MediaStreamTrack::MediaStreamTrack):
2027 (WebCore::MediaStreamTrack::~MediaStreamTrack):
2028 (WebCore::MediaStreamTrack::setEnabled):
2029 (WebCore::MediaStreamTrack::readyState):
2031 (WebCore::MediaStreamTrack::sourceChangedState):
2032 (WebCore::MediaStreamTrack::stop):
2033 (WebCore::MediaStreamTrack::interfaceName):
2034 (WebCore::MediaStreamTrack::scriptExecutionContext):
2035 (WebCore::MediaStreamTrack::eventTargetData):
2036 (WebCore::MediaStreamTrack::ensureEventTargetData):
2037 * Modules/mediastream/MediaStreamTrack.h:
2038 * Modules/mediastream/MediaStreamTrack.idl:
2042 * dom/EventTargetFactory.in:
2043 * platform/chromium/support/WebMediaStreamDescriptor.cpp:
2044 * platform/chromium/support/WebMediaStreamSource.cpp:
2045 (WebKit::WebMediaStreamSource::setReadyState):
2047 (WebKit::WebMediaStreamSource::readyState):
2048 * platform/mediastream/MediaStreamSource.cpp: Copied from Source/WebCore/platform/mediastream/MediaStreamSource.h.
2050 (WebCore::MediaStreamSource::create):
2051 (WebCore::MediaStreamSource::MediaStreamSource):
2052 (WebCore::MediaStreamSource::setReadyState):
2053 (WebCore::MediaStreamSource::addObserver):
2054 (WebCore::MediaStreamSource::removeObserver):
2055 * platform/mediastream/MediaStreamSource.h:
2057 (WebCore::MediaStreamSource::Observer::~Observer):
2058 (MediaStreamSource):
2059 (WebCore::MediaStreamSource::readyState):
2060 * platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
2061 (WebCore::MediaStreamCenterChromium::queryMediaStreamSources):
2062 (WebCore::MediaStreamCenterChromium::didCreateMediaStream):
2064 2012-07-24 Scott Graham <scottmg@chromium.org>
2066 Use native (non-cygwin) binaries for perl, gperf, and bison in Chromium
2067 https://bugs.webkit.org/show_bug.cgi?id=91667
2069 Reviewed by Tony Chang.
2071 Using native tools instead of cygwin version improves build time
2072 performance by roughly 50% (on top of previous cl-instead-of-gcc
2075 Also, use - instead of / for cl flags, otherwise preprocessing fails
2076 very slowly (due to retry loop). And, replace \ with / in gperf
2077 command line. Without this, gperf emits the filename literally in
2078 #line directives which causes VS to error with "unescaped \ in
2079 string". Bizarrely, building ColorData.cpp with those \ in place
2080 causes the IDE to exit with no error message, which was the cause of
2081 the previous canary failures.
2085 * WebCore.gyp/WebCore.gyp:
2086 * WebCore.gyp/scripts/rule_bison.py:
2087 * bindings/scripts/preprocessor.pm:
2088 (applyPreprocessor):
2089 * make-hash-tools.pl:
2091 2012-07-24 Daniel Cheng <dcheng@chromium.org>
2093 Files from drag and file <input> should use getMIMETypeForExtension to determine content type.
2094 https://bugs.webkit.org/show_bug.cgi?id=91702
2096 Reviewed by Jian Li.
2098 Awhile back, we changed File to only use getWellKnownMIMETypeForExtension to prevent web
2099 pages from being able to detect what applications a user has installed indirectly through
2100 the MIME types. However, some sites like YouTube's drag and drop uploader use MIME types
2101 that aren't in WebKit's internal list, so we relax the restriction for Files that originate
2102 from an user action.
2105 (WebCore::getContentTypeFromFileName):
2106 (WebCore::createBlobDataForFile):
2107 (WebCore::createBlobDataForFileWithName):
2108 (WebCore::createBlobDataForFileWithMetadata):
2109 (WebCore::File::createWithRelativePath):
2110 (WebCore::File::File):
2113 (WebCore::File::create):
2114 (WebCore::File::createWithName):
2115 * html/FileInputType.cpp:
2116 (WebCore::FileInputType::createFileList):
2117 * platform/chromium/ChromiumDataObject.cpp:
2118 (WebCore::ChromiumDataObject::addFilename):
2119 * platform/gtk/ClipboardGtk.cpp:
2120 (WebCore::ClipboardGtk::files):
2121 * platform/mac/ClipboardMac.mm:
2122 (WebCore::ClipboardMac::files):
2123 * platform/qt/ClipboardQt.cpp:
2124 (WebCore::ClipboardQt::files):
2125 * platform/win/ClipboardWin.cpp:
2126 (WebCore::ClipboardWin::files):
2128 2012-07-24 Vsevolod Vlasov <vsevik@chromium.org>
2130 Web Inspector: Snippets UI polish
2131 https://bugs.webkit.org/show_bug.cgi?id=92142
2133 Reviewed by Pavel Feldman.
2135 Changed snippets context menu items.
2136 Added run snippet status bar button.
2137 Removed unused edit source button.
2139 * English.lproj/localizedStrings.js:
2140 * inspector/front-end/Images/statusbarButtonGlyphs.png:
2141 * inspector/front-end/ScriptSnippetModel.js:
2142 (WebInspector.SnippetJavaScriptSourceFrame):
2143 (WebInspector.SnippetJavaScriptSourceFrame.prototype.statusBarItems):
2144 (WebInspector.SnippetJavaScriptSourceFrame.prototype._runButtonClicked):
2145 * inspector/front-end/ScriptsNavigator.js:
2146 (WebInspector.SnippetsNavigatorView.prototype.getOrCreateFolderTreeElement):
2147 (WebInspector.SnippetsNavigatorView.prototype.handleContextMenu):
2148 * inspector/front-end/ScriptsPanel.js:
2149 (WebInspector.ScriptsPanel.prototype._updateScriptViewStatusBarItems):
2150 (WebInspector.ScriptsPanel.prototype._createSourceFrame):
2151 * inspector/front-end/SourceFrame.js:
2152 (WebInspector.SourceFrame.prototype.statusBarItems):
2153 * inspector/front-end/inspector.css:
2154 * inspector/front-end/scriptsPanel.css:
2155 (.evaluate-snippet-status-bar-item .glyph):
2156 (.evaluate-snippet-status-bar-item.toggled .glyph):
2158 2012-07-24 Nico Weber <thakis@chromium.org>
2160 [chromium/mac] Remove webcore_resource_files from WebCore.gypi
2161 https://bugs.webkit.org/show_bug.cgi?id=92129
2163 Reviewed by Adam Barth.
2165 It was added in http://trac.webkit.org/changeset/81706/trunk/Source/WebCore/WebCore.gypi .
2166 The changes in that revision were mostly reverted in http://trac.webkit.org/changeset/119921 ,
2167 but this block was forgotten. Since it just confused me for a bit, remove it.
2169 * WebCore.gyp/WebCore.gyp:
2171 2012-07-24 Julien Chaffraix <jchaffraix@webkit.org>
2173 inline-table wrapper should be generated for display: inline element only
2174 https://bugs.webkit.org/show_bug.cgi?id=92054
2176 Reviewed by Abhishek Arya.
2178 CSS 2.1 only takes into account the display when determining if we should generate
2179 an inline-table. My misreading of the spec would make us generate an inline-table
2180 wrapper for any inline formatting context.
2182 Test: fast/table/inline-block-generates-table-wrapper.html
2184 * rendering/RenderTable.cpp:
2185 (WebCore::RenderTable::createAnonymousWithParentRenderer):
2186 Changed to use display instead of isInline to properly match the spec.
2188 2012-07-24 Alec Flett <alecflett@chromium.org>
2190 IndexedDB: Temporarily continue generating backend keys for empty key lists
2191 https://bugs.webkit.org/show_bug.cgi?id=92012
2193 Reviewed by Tony Chang.
2195 Temporarily change key behavior to allow chromium in_process_webkit
2196 to call putWithIndexKeys without inadvertently preventing index
2197 key generation. Note this is temporary until frontend key generation
2200 No new tests, this is part of a refactor that doesn't change behavior.
2202 * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2203 (WebCore::IDBObjectStoreBackendImpl::putInternal):
2205 2012-07-24 Pavel Feldman <pfeldman@chromium.org>
2207 Web Inspector: introduce UISourceCodeFrame.
2208 https://bugs.webkit.org/show_bug.cgi?id=92124
2210 Reviewed by Vsevolod Vlasov.
2212 Generic implementation of SourceFrame over UISourceCode added.
2215 * WebCore.vcproj/WebCore.vcproj:
2216 * inspector/compile-front-end.py:
2217 * inspector/front-end/ScriptsPanel.js:
2218 (WebInspector.ScriptsPanel.prototype._createSourceFrame):
2219 * inspector/front-end/StylesPanel.js:
2220 * inspector/front-end/UISourceCodeFrame.js: Added.
2221 (WebInspector.UISourceCodeFrame):
2222 (WebInspector.UISourceCodeFrame.prototype.canEditSource):
2223 (WebInspector.UISourceCodeFrame.prototype.commitEditing):
2224 (WebInspector.UISourceCodeFrame.prototype.afterTextChanged):
2225 (WebInspector.UISourceCodeFrame.prototype._didEditContent):
2226 (WebInspector.UISourceCodeFrame.prototype._onContentChanged):
2227 (WebInspector.UISourceCodeFrame.prototype.populateTextAreaContextMenu):
2228 * inspector/front-end/WebKit.qrc:
2229 * inspector/front-end/inspector.html:
2231 2012-07-24 Dan Bernstein <mitz@apple.com>
2233 <rdar://problem/11945102> REGRESSION (r109451): Overlay scrollbars always use the default style, regardless of background color
2234 https://bugs.webkit.org/show_bug.cgi?id=92115
2236 Reviewed by Mark Rowe.
2238 * platform/Scrollbar.cpp:
2239 (WebCore::Scrollbar::scrollbarOverlayStyle): Reversed an incorrect null check.
2241 2012-07-24 Andrew Wilson <atwilson@chromium.org>
2243 Another prospective build fix for Chromium. Unreviewed.
2245 * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
2247 2012-07-24 Andrew Wilson <atwilson@chromium.org>
2249 Unreviewed prospective build fix for Chromium. Changed include of hb.h in HarfBuzzNGFace.h
2251 * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
2253 2012-07-24 Dominik Röttsches <dominik.rottsches@intel.com>
2255 HarfBuzzFaceNG.h forward declarations conflict with newer versions of Harfbuzz
2256 https://bugs.webkit.org/show_bug.cgi?id=92103
2258 Reviewed by Philippe Normand.
2260 As preparation for enabling harfbuzz-ng for EFL, I would like to include the header
2261 here since the forward declarations are conflicting with the harfbuzz version
2262 we will use for EFL.
2264 No new tests, no change in behavior.
2266 * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
2268 2012-07-24 Allan Sandfeld Jensen <allan.jensen@nokia.com>
2270 Fix blend filter for autovectorizing
2271 https://bugs.webkit.org/show_bug.cgi?id=91398
2273 Reviewed by Nikolas Zimmermann.
2275 To support auto-vectorizing, the loop had to be unswitched, and regular arrays used that
2276 did not do boundary-checks in the inner loop. Finally the integer division by 255
2277 was optimized not use integer division intrinsics.
2279 On a X86-64 architechture using GCC -O3 on the file, this gives a speed-up of 2.9x.
2281 * platform/graphics/filters/FEBlend.cpp:
2282 (WebCore::fastDivideBy255):
2284 (WebCore::BlendNormal::apply):
2286 (WebCore::BlendMultiply::apply):
2288 (WebCore::BlendScreen::apply):
2290 (WebCore::BlendDarken::apply):
2292 (WebCore::BlendLighten::apply):
2294 (WebCore::BlendUnknown::apply):
2295 (WebCore::platformApply):
2296 (WebCore::FEBlend::platformApplyGeneric):
2297 (WebCore::FEBlend::platformApplySoftware):
2298 * platform/graphics/filters/FEBlend.h:
2301 2012-07-23 Hans Wennborg <hans@chromium.org>
2303 Speech JavaScript API: Add the SpeechRecognitionResult.emma attribute
2304 https://bugs.webkit.org/show_bug.cgi?id=91743
2306 Reviewed by Adam Barth.
2308 Implement the 'emma' attribute as described in the spec draft at
2309 http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
2311 Test: fast/speech/scripted/emma.html
2313 * Modules/speech/SpeechRecognitionResult.cpp:
2314 (WebCore::SpeechRecognitionResult::~SpeechRecognitionResult):
2316 (WebCore::SpeechRecognitionResult::emma):
2317 * Modules/speech/SpeechRecognitionResult.h:
2319 (SpeechRecognitionResult):
2320 * Modules/speech/SpeechRecognitionResult.idl:
2322 * bindings/v8/custom/V8SpeechRecognitionResultCustom.cpp:
2324 (WebCore::V8SpeechRecognitionResult::visitDOMWrapper):
2325 We need to add an implicit reference from the result object to the
2326 emma object to keep the latters DOM tree alive across
2329 2012-07-24 Andrei Poenaru <poenaru@adobe.com>
2331 Web Inspector: Protocol Extension: add getFlowByName command
2332 https://bugs.webkit.org/show_bug.cgi?id=91855
2334 Reviewed by Pavel Feldman.
2336 The "getFlowByName" command should return a NamedFlow for a given document and name.
2338 Test: inspector/styles/protocol-css-regions-commands.html
2340 * inspector/Inspector.json:
2341 * inspector/InspectorCSSAgent.cpp:
2342 (WebCore::InspectorCSSAgent::getFlowByName):
2344 * inspector/InspectorCSSAgent.h:
2345 (InspectorCSSAgent):
2346 * inspector/front-end/CSSStyleModel.js:
2347 (WebInspector.CSSStyleModel.prototype.getNamedFlowCollectionAsync):
2348 (WebInspector.CSSStyleModel.prototype.getFlowByNameAsync):
2349 (WebInspector.NamedFlow):
2350 (WebInspector.NamedFlow.parsePayload):
2352 2012-07-23 Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2354 [Qt] Fix compilation against namespaced Qt
2356 Reviewed by Simon Hausmann.
2358 * platform/graphics/Font.h:
2359 * platform/network/ResourceHandleInternal.h:
2360 * platform/qt/ThirdPartyCookiesQt.h:
2362 2012-07-24 Anthony Scian <ascian@rim.com>
2364 Web Inspector [JSC]: Enable initiator column in network panel.
2365 https://bugs.webkit.org/show_bug.cgi?id=65533
2367 Reviewed by Vsevolod Vlasov.
2369 With 40118 fixed for webkit, Preferences.displayInitiator should be set to true.
2370 Removed references to it since the optionality is no longer required.
2372 Test: http/tests/inspector/network/network-initiator.html
2374 * inspector/front-end/NetworkPanel.js:
2375 (WebInspector.NetworkLogView.prototype._createTable):
2376 (WebInspector.NetworkLogView.prototype.switchToDetailedView):
2377 (WebInspector.NetworkLogView.prototype.switchToBriefView):
2378 (WebInspector.NetworkDataGridNode.prototype.createCells):
2379 (WebInspector.NetworkDataGridNode.prototype.refreshRequest):
2380 * inspector/front-end/Settings.js:
2382 2012-07-24 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2384 Missing *explicit* keyword in dom and page.
2385 https://bugs.webkit.org/show_bug.cgi?id=92074
2387 Reviewed by Kentaro Hara.
2389 Some constructors missed to use *explicit* keyword. They need to be added
2390 *explicit* keyword to contructor which has a parameter in order to avoid
2391 implicit type conversion.
2393 Some files in dom directory can't use explicit keyword because of build breaks.
2395 No new tests. Covered by existing tests.
2397 * dom/BeforeLoadEvent.h:
2398 (WebCore::BeforeLoadEvent::BeforeLoadEvent):
2399 * dom/BeforeTextInsertedEvent.h:
2400 (BeforeTextInsertedEvent):
2401 * dom/ChildListMutationScope.h:
2402 (WebCore::ChildListMutationScope::ChildListMutationScope):
2403 * dom/ChildNodeList.h:
2407 * dom/ClientRectList.h:
2409 * dom/ComposedShadowTreeWalker.h:
2410 (ComposedShadowTreeParentWalker):
2411 * dom/DOMCoreException.h:
2412 (WebCore::DOMCoreException::DOMCoreException):
2413 * dom/DOMImplementation.h:
2414 (DOMImplementation):
2415 * dom/DatasetDOMStringMap.h:
2416 (WebCore::DatasetDOMStringMap::DatasetDOMStringMap):
2417 * dom/DeviceMotionController.h:
2418 (DeviceMotionController):
2419 * dom/DeviceOrientationController.h:
2420 (DeviceOrientationController):
2421 * dom/DocumentParser.h:
2423 * dom/EventException.h:
2424 (WebCore::EventException::EventException):
2425 * dom/EventListener.h:
2426 (WebCore::EventListener::EventListener):
2427 * dom/ExceptionBase.h:
2429 * dom/GenericEventQueue.h:
2430 (GenericEventQueue):
2431 * dom/KeyboardEvent.h:
2432 (WebCore::KeypressCommand::KeypressCommand):
2433 * dom/MemoryInstrumentation.h:
2434 (WebCore::MemoryObjectInfo::MemoryObjectInfo):
2435 * dom/MessageChannel.h:
2437 * dom/MessagePort.h:
2439 * dom/MessagePortChannel.h:
2440 (MessagePortChannel):
2441 * dom/MutationObserver.h:
2442 * dom/NamedNodeMap.h:
2443 (WebCore::NamedNodeMap::NamedNodeMap):
2445 (WebCore::NodeFilter::NodeFilter):
2446 * dom/NodeWithIndex.h:
2447 (WebCore::NodeWithIndex::NodeWithIndex):
2449 * dom/RangeException.h:
2450 (WebCore::RangeException::RangeException):
2451 * dom/RawDataDocumentParser.h:
2452 (WebCore::RawDataDocumentParser::RawDataDocumentParser):
2453 * dom/ScriptRunner.h:
2455 * dom/SelectorQuery.h:
2459 * dom/SpaceSplitString.h:
2460 (SpaceSplitStringData):
2461 * dom/StaticHashSetNodeList.h:
2462 (StaticHashSetNodeList):
2463 * dom/StaticNodeList.h:
2464 (WebCore::StaticNodeList::StaticNodeList):
2465 * dom/TransformSource.h:
2469 * dom/WebKitNamedFlowCollection.h:
2470 (WebKitNamedFlowCollection):
2471 * page/EventHandler.h:
2473 * page/FocusController.h:
2477 * page/MemoryInfo.h:
2483 * page/PrintContext.h:
2487 * page/SpeechInput.h:
2489 * page/SpeechInputResultList.h:
2490 (SpeechInputResultList):
2491 * page/WebKitAnimation.h:
2492 * page/WindowFeatures.h:
2494 * page/WorkerNavigator.h:
2497 2012-07-24 Kent Tamura <tkent@chromium.org>
2499 Replace some callsites of shadowAncestorNode() with shadowHost()
2500 https://bugs.webkit.org/show_bug.cgi?id=92060
2502 Reviewed by Hajime Morita.
2504 shadowAncestorNode() is deprecated.
2506 No new tests. This shouldn't change behaviors.
2508 * html/shadow/MediaControlElements.cpp:
2509 (WebCore::toParentMediaElement):
2510 * html/shadow/TextControlInnerElements.h:
2511 (WebCore::SpinButtonElement::isEnabledFormControl):
2512 (WebCore::SpinButtonElement::isReadOnlyFormControl):
2513 * platform/efl/RenderThemeEfl.cpp:
2514 (WebCore::RenderThemeEfl::paintMediaFullscreenButton):
2515 (WebCore::RenderThemeEfl::paintMediaMuteButton):
2516 * platform/gtk/RenderThemeGtk.cpp:
2517 (WebCore::getMediaElementFromRenderObject):
2518 (WebCore::centerRectVerticallyInParentInputElement):
2519 * platform/qt/RenderThemeQt.cpp:
2520 (WebCore::RenderThemeQt::paintSearchFieldCancelButton):
2521 (WebCore::RenderThemeQt::paintMediaSliderThumb):
2522 Removed an ASSERT() because nullness of o->node() is already asserted.
2523 * rendering/RenderInputSpeech.cpp:
2524 (WebCore::RenderInputSpeech::paintInputFieldSpeechButton):
2525 * rendering/RenderMediaControlsChromium.cpp:
2526 (WebCore::paintMediaSliderThumb):
2527 Passing shadowHost() to toParentMediaElement(), which accepts 0 and will return 0.
2528 (WebCore::paintMediaVolumeSliderThumb): ditto.
2529 * rendering/RenderThemeChromiumSkia.cpp:
2530 (WebCore::RenderThemeChromiumSkia::paintSearchFieldCancelButton):
2531 (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsDecoration):
2532 (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton):
2533 * rendering/RenderThemeMac.mm:
2534 (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
2535 Remove an ASSERT(input) because input never be null unless o->node() is
2536 null. If o->node() is null, this function crashes.
2537 (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration):
2538 (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
2539 (WebCore::RenderThemeMac::paintMediaMuteButton):
2540 It's ok to ignore "node is a media element" case because this function
2541 works only if node->isMediaControlElement().
2542 (WebCore::RenderThemeMac::paintMediaPlayButton): ditto.
2543 (WebCore::RenderThemeMac::paintMediaSliderTrack): ditto.
2544 * rendering/RenderThemeSafari.cpp:
2545 (WebCore::RenderThemeSafari::paintSearchFieldCancelButton):
2546 Remove an ASSERT(input) because input never be null unless o->node() is
2547 null. If o->node() is null, this function crashes.
2548 (WebCore::RenderThemeSafari::paintSearchFieldResultsDecoration): ditto.
2549 (WebCore::RenderThemeSafari::paintSearchFieldResultsButton): ditto.
2550 * rendering/RenderThemeWinCE.cpp:
2551 (WebCore::mediaElementParent):
2553 2012-07-24 Peter Beverloo <peter@chromium.org>
2555 [Chromium] Build fix for Android after r123424
2556 https://bugs.webkit.org/show_bug.cgi?id=92082
2558 Unreviewed build fix.
2560 Mark removed the PlatformSupport.h header from ScrollbarThemeChromiumAndroid.cpp
2561 in r123424, while there still are two references left to another method and a
2562 constant. Re-add the include directive.
2564 * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
2566 2012-07-24 Kentaro Hara <haraken@chromium.org>
2568 [JSC] REGRESSION(r122912): CodeGeneratorJS.pm generates wrong code
2569 for static attributes in supplemental IDL files
2570 https://bugs.webkit.org/show_bug.cgi?id=91925
2572 Reviewed by Adam Barth.
2574 r122912 implemented static attributes in CodeGeneratorJS.pm.
2575 However, it generates wrong code for static attributes in supplemental
2576 IDL files. This patch fixes it as shown in JSTestInterface.cpp.
2577 This fix aligns with the fix in CodeGeneratorV8.pm (r123308).
2579 Test: bindings/scripts/test/TestSupplemental.idl
2581 * bindings/scripts/CodeGeneratorJS.pm:
2582 (GenerateImplementation):
2583 * bindings/scripts/test/JS/JSTestInterface.cpp:
2584 (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
2585 (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
2586 (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
2588 2012-07-24 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2590 Add *explicit* keyword to constructor which has a parameter in bridge, history, loader and plugins.
2591 https://bugs.webkit.org/show_bug.cgi?id=92064
2593 Reviewed by Kentaro Hara.
2595 Some constructors missed to use *explicit* keyword. They need to be added
2596 *explicit* keyword to contructor which has a parameter in order to avoid
2597 implicit type conversion.
2599 No new tests. Covered by existing tests.
2601 * bridge/IdentifierRep.h:
2602 (WebCore::IdentifierRep::IdentifierRep):
2603 * history/BackForwardListImpl.h:
2604 (BackForwardListImpl):
2605 * history/CachedFrame.h:
2607 * history/HistoryItem.h:
2609 * loader/DocumentWriter.h:
2611 * loader/FrameNetworkingContext.h:
2612 (WebCore::FrameNetworkingContext::FrameNetworkingContext):
2613 * loader/HistoryController.h:
2614 * loader/ImageLoader.h:
2616 * loader/LinkLoader.h:
2618 * loader/MainResourceLoader.h:
2619 (MainResourceLoader):
2620 * loader/NavigationAction.h:
2622 * loader/NavigationScheduler.h:
2623 (NavigationScheduler):
2624 * loader/PolicyChecker.h:
2626 * loader/SubframeLoader.h:
2628 * loader/ThreadableLoaderClientWrapper.h:
2629 (WebCore::ThreadableLoaderClientWrapper::ThreadableLoaderClientWrapper):
2630 * plugins/PluginData.h:
2632 * plugins/PluginViewBase.h:
2633 (WebCore::PluginViewBase::PluginViewBase):
2635 2012-07-24 Patrick Gansterer <paroga@webkit.org>
2637 [Qt] Fix conversion from GregorianDateTime to QTime
2638 https://bugs.webkit.org/show_bug.cgi?id=92068
2640 Reviewed by Simon Hausmann.
2642 * bridge/qt/qt_runtime.cpp:
2643 (JSC::Bindings::convertValueToQVariant):
2644 * bridge/qt/qt_runtime_qt4.cpp:
2645 (JSC::Bindings::convertValueToQVariant):
2647 2012-07-24 Arko Saha <arko@motorola.com>
2649 Microdata: Implement PropertyNodeList interface.
2650 https://bugs.webkit.org/show_bug.cgi?id=80269
2652 Reviewed by Ryosuke Niwa.
2654 Added support for PropertyNodeList interface. Currently HTMLPropertiesCollection.namedItem(name)
2655 returns NodeList object. Made changes so that it will return PropertyNodeList object.
2657 Implemented propertyNodeList.getValues() method. It returns an array of various values. Its
2658 values are obtained from the "itemValue" DOM property of each of the elements represented by
2659 the object, in tree order.
2661 Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#propertynodelist
2663 Tests: fast/dom/MicroData/nameditem-returns-propertynodelist.html
2664 fast/dom/MicroData/propertynodelist-getvalues-array-values-obtained-from-itemvalue-of-each-element.html
2665 fast/dom/MicroData/propertynodelist-getvalues-test.html
2666 fast/dom/MicroData/propertynodelist-test-add-remove-element.html
2669 * DerivedSources.cpp:
2670 * DerivedSources.make:
2671 * DerivedSources.pri:
2672 * GNUmakefile.list.am:
2677 * WebCore.vcproj/WebCore.vcproj:
2678 * WebCore.xcodeproj/project.pbxproj:
2679 * bindings/gobject/GNUmakefile.am:
2680 * bindings/js/JSBindingsAllInOne.cpp:
2681 * bindings/js/JSMicroDataItemValueCustom.cpp: Added.
2683 (WebCore::toJS): Added toJS() custom method. Returns Node if itemValue is node else returns String.
2684 * bindings/v8/custom/V8MicroDataItemValueCustom.cpp: Added.
2686 (WebCore::toV8): Added toV8 custom code.
2687 * dom/DynamicNodeList.cpp:
2688 (WebCore::DynamicNodeListCacheBase::rootNode): Return document if owner node has itemref attribute specified.
2690 (WebCore::DynamicNodeListCacheBase::ownerNodeHasItemRefAttribute): Returns true if owner node has itemref attribute
2691 specified with root type NodeListRootedAtDocumentIfOwnerHasItemrefAttr.
2692 (WebCore::DynamicNodeListCacheBase::invalidateCache):
2693 (WebCore::DynamicNodeList::itemWithName): Update itemrefElements cache if root type is
2694 NodeListIsRootedAtDocumentIfOwnerHasItemrefAttr.
2695 * dom/DynamicNodeList.h: Added m_hasItemRefElements in DynamicNodeListCacheBase to check if itemRefElmenets cache
2697 (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase):
2698 (WebCore::DynamicNodeListCacheBase::isRootedAtDocument):
2699 (DynamicNodeListCacheBase):
2700 (WebCore::DynamicNodeListCacheBase::isItemRefElementsCacheValid):
2701 (WebCore::DynamicNodeListCacheBase::setItemRefElementsCacheValid):
2702 (WebCore::DynamicNodeListCacheBase::rootType): Returns cached root type.
2703 (WebCore::DynamicNodeListCacheBase::shouldInvalidateTypeOnAttributeChange): Invalidate NodeListCache on itemref
2706 (WebCore::Node::propertyNodeList):
2710 * dom/PropertyNodeList.cpp: Added.
2712 (WebCore::PropertyNodeList::PropertyNodeList):
2713 (WebCore::PropertyNodeList::~PropertyNodeList):
2714 (WebCore::PropertyNodeList::elementIsPropertyOfRefElement): Checks if the testElement is a property of Microdata
2716 (WebCore::PropertyNodeList::updateRefElements):
2717 (WebCore::PropertyNodeList::nodeMatches):
2718 (WebCore::PropertyNodeList::getValues): Returns PropertyValueArray whose values are obtained from the
2719 itemValue DOM property of each of the elements represented by the object, in tree order.
2720 * dom/PropertyNodeList.h: Added.
2723 (WebCore::PropertyNodeList::create):
2724 * dom/PropertyNodeList.idl: Added.
2725 * html/HTMLCollection.cpp:
2726 (WebCore::DynamicNodeListCacheBase::itemCommon): Update itemrefElements cache if its a NodeListCollectionType with
2727 root type NodeListIsRootedAtDocumentIfOwnerHasItemrefAttr.
2728 * html/HTMLElement.cpp:
2729 (WebCore::HTMLElement::properties):
2731 (WebCore::HTMLElement::getItemRefElements): Returns the ItemRefElements list of given element. Added this
2732 method to share the code between HTMLPropertiesCollection and PropertyNodeList to update itemRefElements.
2733 * html/HTMLElement.h:
2735 * html/HTMLPropertiesCollection.cpp:
2736 (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection):
2737 (WebCore::HTMLPropertiesCollection::updateRefElements):
2738 (WebCore::HTMLPropertiesCollection::updateNameCache):
2739 (WebCore::HTMLPropertiesCollection::namedItem): Return PropertyNodeList object instead of NodeList.
2740 (WebCore::HTMLPropertiesCollection::hasNamedItem): Return true if it finds an item with given
2741 name in the properties collection.
2742 * html/HTMLPropertiesCollection.h: Removed m_hasItemRefElements member variable, now DynamicNodeListCacheBase
2743 has isItemRefElementsCacheValid. Also removed m_hasPropertyNameCache, as DynamicNodeListCacheBase already has
2744 hasNameCache() and setHasNameCache().
2746 (HTMLPropertiesCollection):
2747 (WebCore::HTMLPropertiesCollection::invalidateCache):
2748 (WebCore::HTMLPropertiesCollection::updatePropertyCache):
2749 * html/HTMLPropertiesCollection.idl:
2750 * html/MicroDataItemValue.idl: Added.
2751 * page/DOMWindow.idl:
2753 2012-07-24 Kentaro Hara <haraken@chromium.org>
2755 [JSC] REGRESSION(r122912): CodeGeneratorJS.pm should not
2756 implicitly assume ScriptExecutionContext for static attributes
2757 https://bugs.webkit.org/show_bug.cgi?id=91924
2759 Reviewed by Adam Barth.
2761 r122912 implemented static attributes in CodeGeneratorJS.pm.
2762 However, the generated code assumes that static attributes
2763 always require ScriptExecutionContext, which is wrong.
2764 If we need a ScriptExecutionContext, we should specify
2765 [CallWith=ScriptExecutionContext].
2767 This patch fixes CodeGeneratorJS.pm so that static attributes
2768 do not assume ScriptExecutionContext. This fix aligns with
2769 the fix in CodeGeneratorV8.pm in r123308.
2771 Test: bindings/scripts/test/TestObj.idl
2773 * bindings/scripts/CodeGeneratorJS.pm:
2774 (GenerateImplementation):
2775 * bindings/scripts/test/JS/JSTestInterface.cpp:
2776 (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
2777 (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
2778 (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
2779 * bindings/scripts/test/JS/JSTestObj.cpp:
2780 (WebCore::jsTestObjConstructorStaticReadOnlyIntAttr):
2781 (WebCore::jsTestObjConstructorStaticStringAttr):
2782 (WebCore::setJSTestObjConstructorStaticStringAttr):
2784 2012-07-23 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2786 Missing *explicit* keyword in editing.
2787 https://bugs.webkit.org/show_bug.cgi?id=92055
2789 Reviewed by Ryosuke Niwa.
2791 Some constructors missed to use *explicit* keyword. They need to be added
2792 *explicit* keyword to contructor which has a parameter in order to avoid
2793 implicit type conversion.
2795 No new tests. Covered by existing tests.
2797 * editing/AlternativeTextController.h:
2798 (WebCore::AlternativeTextController::UNLESS_ENABLED):
2799 * editing/BreakBlockquoteCommand.h:
2800 (BreakBlockquoteCommand):
2801 * editing/DeleteButton.h:
2803 * editing/DeleteButtonController.h:
2804 (DeleteButtonController):
2805 * editing/EditCommand.h:
2807 (WebCore::SimpleEditCommand::SimpleEditCommand):
2808 * editing/EditingBehavior.h:
2809 (WebCore::EditingBehavior::EditingBehavior):
2810 * editing/EditingStyle.h:
2814 * editing/FrameSelection.h:
2816 * editing/InsertLineBreakCommand.h:
2817 (InsertLineBreakCommand):
2818 * editing/ModifySelectionListLevel.h:
2819 (ModifySelectionListLevelCommand):
2820 (DecreaseSelectionListLevelCommand):
2821 * editing/RemoveFormatCommand.h:
2822 (RemoveFormatCommand):
2823 * editing/RemoveNodeCommand.h:
2824 (RemoveNodeCommand):
2825 * editing/RemoveNodePreservingChildrenCommand.h:
2826 (RemoveNodePreservingChildrenCommand):
2827 * editing/ReplaceNodeWithSpanCommand.h:
2828 (ReplaceNodeWithSpanCommand):
2829 * editing/TextInsertionBaseCommand.h:
2830 (TextInsertionBaseCommand):
2831 * editing/UndoManager.h:
2833 * editing/UnlinkCommand.h:
2835 * editing/WrapContentsInDummySpanCommand.h:
2836 (WrapContentsInDummySpanCommand):
2838 2012-07-23 Dominic Mazzoni <dmazzoni@google.com>
2840 AX: Need AccessibilityObjects for nodes without renderers in canvas subtree
2841 https://bugs.webkit.org/show_bug.cgi?id=87899
2843 Reviewed by Chris Fleizach.
2845 Refactors AccessibilityRenderObject so that it inherits from a new class,
2846 AccessibilityNodeObject, that can be constructed from a Node without a
2847 renderer. Modifies AXObjectCache so that it automatically creates an
2848 AccessibilityNodeObject for elements in a canvas subtree but not otherwise.
2849 A new layout test verifies that this correctly exposes an accessibility
2850 tree with appropriate roles for elements in a canvas subtree.
2852 This patch does not try to complete the implementation of
2853 AccessibilityNodeObject. Most AX methods are still unimplemented and need
2854 to be migrated from AccessibilityRenderObject to AccessibilityNodeObject
2857 This patch also doesn't change anything outside of WebCore/accessibility, so
2858 the rest of WebCore only calls AXObjectCache when there are changes to a
2859 RenderObject, not to a Node. Accessible notifications on nodes without
2860 renderers need to be implemented in a future patch.
2862 Test: accessibility/canvas-accessibilitynodeobject.html
2865 * GNUmakefile.list.am:
2868 * accessibility/AXObjectCache.cpp:
2869 (WebCore::AXObjectCache::get):
2871 (WebCore::createFromNode):
2872 (WebCore::AXObjectCache::getOrCreate):
2873 (WebCore::AXObjectCache::remove):
2874 * accessibility/AXObjectCache.h:
2876 (WebCore::AXObjectCache::get):
2877 (WebCore::AXObjectCache::getOrCreate):
2878 (WebCore::AXObjectCache::remove):
2879 * accessibility/AccessibilityARIAGrid.cpp:
2880 (WebCore::AccessibilityARIAGrid::AccessibilityARIAGrid):
2882 (WebCore::AccessibilityARIAGrid::~AccessibilityARIAGrid):
2883 (WebCore::AccessibilityARIAGrid::init):
2884 (WebCore::AccessibilityARIAGrid::create):
2885 * accessibility/AccessibilityARIAGrid.h:
2886 (AccessibilityARIAGrid):
2887 * accessibility/AccessibilityARIAGridCell.cpp:
2888 (WebCore::AccessibilityARIAGridCell::create):
2889 * accessibility/AccessibilityARIAGridRow.cpp:
2890 (WebCore::AccessibilityARIAGridRow::create):
2891 * accessibility/AccessibilityAllInOne.cpp:
2892 * accessibility/AccessibilityList.cpp:
2893 (WebCore::AccessibilityList::create):
2894 * accessibility/AccessibilityListBox.cpp:
2895 (WebCore::AccessibilityListBox::create):
2896 * accessibility/AccessibilityMediaControls.cpp:
2897 (WebCore::AccessibilityMediaControl::create):
2898 (WebCore::AccessibilityMediaControlsContainer::create):
2899 (WebCore::AccessibilityMediaTimeline::create):
2900 (WebCore::AccessibilityMediaTimeDisplay::create):
2901 * accessibility/AccessibilityMenuList.cpp:
2902 (WebCore::AccessibilityMenuList::create):
2904 * accessibility/AccessibilityMenuList.h:
2905 (AccessibilityMenuList):
2906 * accessibility/AccessibilityNodeObject.cpp: Added.
2908 (WebCore::AccessibilityNodeObject::AccessibilityNodeObject):
2909 (WebCore::AccessibilityNodeObject::~AccessibilityNodeObject):
2910 (WebCore::AccessibilityNodeObject::init):
2911 (WebCore::AccessibilityNodeObject::create):
2912 (WebCore::AccessibilityNodeObject::detach):
2913 (WebCore::AccessibilityNodeObject::childrenChanged):
2914 (WebCore::AccessibilityNodeObject::updateAccessibilityRole):
2915 (WebCore::AccessibilityNodeObject::firstChild):
2916 (WebCore::AccessibilityNodeObject::lastChild):
2917 (WebCore::AccessibilityNodeObject::previousSibling):
2918 (WebCore::AccessibilityNodeObject::nextSibling):
2919 (WebCore::AccessibilityNodeObject::parentObjectIfExists):
2920 (WebCore::AccessibilityNodeObject::parentObject):
2921 (WebCore::AccessibilityNodeObject::elementRect):
2922 (WebCore::AccessibilityNodeObject::setNode):
2923 (WebCore::AccessibilityNodeObject::document):
2924 (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
2925 (WebCore::AccessibilityNodeObject::addChildren):
2926 (WebCore::AccessibilityNodeObject::accessibilityIsIgnored):
2927 (WebCore::AccessibilityNodeObject::canSetFocusAttribute):
2928 (WebCore::AccessibilityNodeObject::determineAriaRoleAttribute):
2929 (WebCore::AccessibilityNodeObject::ariaRoleAttribute):
2930 (WebCore::AccessibilityNodeObject::remapAriaRoleDueToParent):
2931 * accessibility/AccessibilityNodeObject.h: Added.
2933 (AccessibilityNodeObject):
2934 (WebCore::AccessibilityNodeObject::isAccessibilityNodeObject):
2935 (WebCore::AccessibilityNodeObject::node):
2936 (WebCore::AccessibilityNodeObject::isDetached):
2937 (WebCore::toAccessibilityNodeObject):
2938 * accessibility/AccessibilityObject.h:
2939 (WebCore::AccessibilityObject::isAccessibilityNodeObject):
2940 * accessibility/AccessibilityProgressIndicator.cpp:
2941 (WebCore::AccessibilityProgressIndicator::create):
2942 * accessibility/AccessibilityRenderObject.cpp:
2943 (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
2944 (WebCore::AccessibilityRenderObject::init):
2946 (WebCore::AccessibilityRenderObject::create):
2947 (WebCore::AccessibilityRenderObject::detach):
2948 (WebCore::AccessibilityRenderObject::setRenderer):
2949 (WebCore::AccessibilityRenderObject::canHaveChildren):
2950 (WebCore::AccessibilityRenderObject::addCanvasChildren):
2951 (WebCore::AccessibilityRenderObject::addChildren):
2952 * accessibility/AccessibilityRenderObject.h:
2953 (AccessibilityRenderObject):
2954 * accessibility/AccessibilitySlider.cpp:
2955 (WebCore::AccessibilitySlider::create):
2956 * accessibility/AccessibilityTable.cpp:
2957 (WebCore::AccessibilityTable::AccessibilityTable):
2959 (WebCore::AccessibilityTable::~AccessibilityTable):
2960 (WebCore::AccessibilityTable::init):
2961 (WebCore::AccessibilityTable::create):
2962 * accessibility/AccessibilityTable.h:
2963 (AccessibilityTable):
2964 * accessibility/AccessibilityTableCell.cpp:
2965 (WebCore::AccessibilityTableCell::create):
2966 * accessibility/AccessibilityTableRow.cpp:
2967 (WebCore::AccessibilityTableRow::create):
2969 2012-07-23 David Barr <davidbarr@chromium.org>
2971 Fix ENABLE_CSS_IMAGE_ORIENTATION compile flag
2972 https://bugs.webkit.org/show_bug.cgi?id=91961
2974 Reviewed by Tony Chang.
2976 https://bugs.webkit.org/show_bug.cgi?id=89055
2977 A rule was missed implementing the ENABLE_CSS_IMAGE_ORIENTATION compile flag.
2979 https://bugs.webkit.org/show_bug.cgi?id=90046
2980 Half of the missing rule was inadvertently added together with ENABLE_CSS_STICKY_POSITION.
2982 No new tests; build configuration fix.
2984 * Configurations/FeatureDefines.xcconfig:
2986 2012-07-23 Douglas Stockwell <dstockwell@chromium.org>
2988 Null-pointer crash when a derived color like -webkit-activelink is set in a gradient stop
2989 https://bugs.webkit.org/show_bug.cgi?id=89148
2991 Reviewed by Simon Fraser.
2993 CSSGradientValue attempted to resolve colors during paint, this crashed
2994 when a derived color like -webkit-activelink was encountered because the
2995 corresponding element was no longer available in the StyleResolver.
2996 Instead, by adding a field to CSSGradientColorStop we can resolve and
2997 then cache the resolved colors at the correct time. To avoid sharing
2998 cached derived colors between elements we clone the gradient values when
3001 Test: fast/css/crash-on-gradient-with-derived-color.html
3003 * css/CSSGradientValue.cpp:
3004 (WebCore::CSSGradientValue::gradientWithStylesResolved): Added. Resolve and cache
3005 resolved colors, clone if colors are derived from the element.
3007 (WebCore::CSSGradientValue::addStops):
3008 (WebCore::CSSGradientValue::isCacheable): Defer to new logic in
3010 * css/CSSGradientValue.h:
3011 (CSSGradientColorStop): Added cache of resolved color.
3013 (CSSLinearGradientValue):
3014 (CSSRadialGradientValue):
3015 * css/CSSImageGeneratorValue.h:
3018 (WebCore::CSSValue::isGradientValue):
3019 * css/StyleResolver.cpp:
3020 (WebCore::StyleResolver::collectMatchingRulesForList):
3021 * css/StyleResolver.h:
3023 * rendering/style/StyleGeneratedImage.cpp:
3024 (WebCore::StyleGeneratedImage::image): Revert change from r96449. This
3025 is no longer necessary as the gradient colors are now resolved at a
3026 time when the style is set on StyleResolver.
3028 2012-07-23 Patrick Gansterer <paroga@webkit.org>
3030 Move GregorianDateTime from JSC to WTF namespace
3031 https://bugs.webkit.org/show_bug.cgi?id=91948
3033 Reviewed by Geoffrey Garen.
3035 Moving GregorianDateTime into the WTF namespace allows us to us to
3036 use it in WebCore too. The new class has the same behaviour as the
3037 old struct. Only the unused timeZone member has been removed.
3039 * bridge/qt/qt_runtime.cpp:
3040 (JSC::Bindings::convertValueToQVariant):
3041 (JSC::Bindings::convertQVariantToValue):
3042 * bridge/qt/qt_runtime_qt4.cpp:
3043 (JSC::Bindings::convertValueToQVariant):
3044 (JSC::Bindings::convertQVariantToValue):
3046 2012-07-23 Mark Pilgrim <pilgrim@chromium.org>
3048 [Chromium] Move layoutTestMode to WebCore
3049 https://bugs.webkit.org/show_bug.cgi?id=92010
3051 Reviewed by Adam Barth.
3053 Part of a refactoring series. See tracking bug 82948.
3056 * GNUmakefile.list.am:
3059 * WebCore.vcproj/WebCore.vcproj:
3060 * WebCore.xcodeproj/project.pbxproj:
3061 * bindings/generic/RuntimeEnabledFeatures.h:
3062 (RuntimeEnabledFeatures):
3063 * platform/LayoutTestSupport.cpp: Added.
3065 (WebCore::isRunningLayoutTest):
3066 (WebCore::setIsRunningLayoutTest):
3067 * platform/LayoutTestSupport.h: Added.
3069 * platform/chromium/PlatformSupport.h:
3071 * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
3072 (WebCore::ScrollbarThemeChromiumAndroid::scrollbarThickness):
3073 (WebCore::ScrollbarThemeChromiumAndroid::paintScrollbarBackground):
3074 * platform/chromium/ScrollbarThemeChromiumWin.cpp:
3075 (WebCore::ScrollbarThemeChromiumWin::scrollbarThickness):
3076 (WebCore::ScrollbarThemeChromiumWin::buttonSize):
3077 * platform/graphics/chromium/FontCacheChromiumWin.cpp:
3079 (WebCore::LookupAltName):
3080 (WebCore::fontContainsCharacter):
3081 (WebCore::FillLogFont):
3082 (WebCore::FontCache::getFontDataForCharacters):
3083 (WebCore::FontCache::createFontPlatformData):
3084 * platform/graphics/skia/FontCustomPlatformData.cpp:
3085 (WebCore::FontCustomPlatformData::fontPlatformData):
3086 * platform/graphics/skia/FontSkia.cpp:
3087 (WebCore::Font::drawGlyphs):
3088 * rendering/RenderThemeChromiumAndroid.cpp:
3089 (WebCore::RenderThemeChromiumAndroid::systemColor):
3090 (WebCore::RenderThemeChromiumAndroid::adjustInnerSpinButtonStyle):
3091 * rendering/RenderThemeChromiumMac.mm:
3092 (WebCore::RenderThemeChromiumMac::usesTestModeFocusRingColor):
3093 * rendering/RenderThemeChromiumSkia.cpp:
3094 (WebCore::RenderThemeChromiumSkia::caretBlinkInterval):
3095 * rendering/RenderThemeChromiumWin.cpp:
3097 (WebCore::RenderThemeChromiumWin::platformActiveSelectionBackgroundColor):
3098 (WebCore::RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor):
3099 (WebCore::RenderThemeChromiumWin::platformActiveSelectionForegroundColor):
3100 (WebCore::RenderThemeChromiumWin::systemColor):
3101 (WebCore::menuListButtonWidth):
3102 (WebCore::RenderThemeChromiumWin::determineClassicState):
3104 2012-07-23 Dave Tu <dtu@chromium.org>
3106 [chromium] Add droppedFrameCount to renderingStats.
3107 https://bugs.webkit.org/show_bug.cgi?id=91694
3109 Reviewed by Adrienne Walker.
3111 * platform/graphics/chromium/cc/CCFrameRateCounter.cpp:
3113 (WebCore::CCFrameRateCounter::frameInterval):
3114 (WebCore::CCFrameRateCounter::frameIndex):
3115 (WebCore::CCFrameRateCounter::CCFrameRateCounter):
3116 (WebCore::CCFrameRateCounter::markBeginningOfFrame):
3117 (WebCore::CCFrameRateCounter::isBadFrame):
3118 * platform/graphics/chromium/cc/CCFrameRateCounter.h:
3119 (WebCore::CCFrameRateCounter::droppedFrameCount):
3120 (CCFrameRateCounter):
3121 * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3122 (WebCore::CCLayerTreeHost::renderingStats):
3123 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3124 (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
3125 (WebCore::CCLayerTreeHostImpl::drawLayers):
3126 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3127 (CCLayerTreeHostImpl):
3128 * platform/graphics/chromium/cc/CCRenderingStats.h:
3130 (WebCore::CCRenderingStats::CCRenderingStats):
3131 * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
3132 (WebCore::CCSingleThreadProxy::implSideRenderingStats):
3133 * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3134 (WebCore::CCThreadProxy::implSideRenderingStatsOnImplThread):
3136 2012-07-23 Dan Bernstein <mitz@apple.com>
3138 Fixed the build after r123418.
3140 * WebCore.exp.in: Added DocumentMarkerController::addTextMatchMarker.
3142 2012-07-23 Mike Lawther <mikelawther@chromium.org>
3144 CSS3 calc: optimise blending expression
3145 https://bugs.webkit.org/show_bug.cgi?id=90037
3147 Reviewed by Tony Chang.
3149 Introduce a new calc expression node - a BlendLength node. Given two Lengths and a progress
3150 this blends them together when evaluated.
3152 An alternative and more general approach of being able to blend two CalcExpressionNodes was
3153 tested, but involves more memory allocations, was measurably slower, and nothing currently
3154 would make use of the generality.
3156 No functional change. Covered by existing tests.
3158 * platform/CalculationValue.h:
3159 (CalcExpressionBlendLength):
3160 (WebCore::CalcExpressionBlendLength::CalcExpressionBlendLength):
3161 (WebCore::CalcExpressionBlendLength::operator==):
3162 (WebCore::CalcExpressionBlendLength::evaluate):
3164 * platform/Length.cpp:
3165 (WebCore::Length::blendCalculation):
3167 2012-07-23 Nico Weber <thakis@chromium.org>
3169 [chromium] Show search tickmarks on css-styled scrollbars
3170 https://bugs.webkit.org/show_bug.cgi?id=91949
3172 Reviewed by Adrienne Walker.
3174 This is done by letting RenderScrollbarTheme::paintTickmarks()
3175 delegate to the native ScrollbarTheme. To make this possible,
3176 move paintTickmarks() from ScrollbarThemeComposite to the
3177 superclass ScrollbarTheme.
3179 For testing, add internals.addTextMatchMarker() and add a pixel test.
3181 * platform/ScrollbarTheme.h:
3182 (WebCore::ScrollbarTheme::paintTickmarks):
3183 Moved paintTickmarks() from ScrollbarThemeComposite to here.
3184 * platform/ScrollbarThemeComposite.h:
3185 Remove paintTickmarks().
3186 * platform/chromium/ScrollbarThemeChromium.cpp:
3187 (WebCore::ScrollbarThemeChromium::paintTickmarks):
3188 Switch to drawing tickmarks as vectors, so they can be arbitrarily wide.
3189 * platform/chromium/ScrollbarThemeChromiumMac.h:
3190 (ScrollbarThemeChromiumMac):
3191 Implement paintTickmarks(), so that css-styled scrollbars get tickmarks on mac.
3192 * platform/chromium/ScrollbarThemeChromiumMac.mm:
3193 (WebCore::ScrollbarThemeChromiumMac::paint):
3194 (WebCore::ScrollbarThemeChromiumMac::paintTickmarks):
3195 Implement paintTickmarks(), so that css-styled scrollbars get tickmarks on mac.
3196 * rendering/RenderScrollbarTheme.cpp:
3197 (WebCore::RenderScrollbarTheme::paintTickmarks):
3198 Delegate to the native ScrollbarTheme for tickmark drawing.
3200 * rendering/RenderScrollbarTheme.h:
3201 (RenderScrollbarTheme):
3202 Override paintTickmarks().
3204 2012-07-23 Brian Anderson <brianderson@chromium.org>
3206 [chromium] Use shallow flushes that don't glFlush
3207 https://bugs.webkit.org/show_bug.cgi?id=90325
3209 Reviewed by Kenneth Russell.
3211 Adds plumbing for the shallowFlushCHROMIUM extension and uses
3212 shallow flushes instead of normal flushes when uploading textures.
3213 Shallow flushes allow us to initiate command buffer flushes to
3214 the GPU thread/process without the overhead of a true glFlush.
3216 CCTextureUpdaterTest updated to recognize shallow flushes.
3218 * platform/chromium/support/Extensions3DChromium.cpp:
3219 (WebCore::Extensions3DChromium::shallowFlushCHROMIUM):
3221 * platform/graphics/chromium/Extensions3DChromium.h:
3222 (Extensions3DChromium):
3223 * platform/graphics/chromium/cc/CCGraphicsContext.h:
3224 * platform/graphics/chromium/cc/CCResourceProvider.cpp:
3225 (WebCore::CCResourceProvider::shallowFlushIfSupported):
3227 (WebCore::CCResourceProvider::CCResourceProvider):
3228 (WebCore::CCResourceProvider::initialize):
3229 * platform/graphics/chromium/cc/CCResourceProvider.h:
3230 (CCResourceProvider):
3231 * platform/graphics/chromium/cc/CCTextureUpdater.cpp:
3232 (WebCore::CCTextureUpdater::update):
3234 2012-07-23 Hanyee Kim <choco@company100.net>
3236 When using TextureMapper, WebKit does not retain final value of opacity in animations, unless it is specified on the last key frame.
3237 https://bugs.webkit.org/show_bug.cgi?id=91322
3239 Reviewed by Noam Rosenthal.
3241 When -webkit-fill-mode is forwards, GraphicsLayerAnimation::apply does not apply
3242 the property values defined in the last executing keyframe after the final iteration of animation.
3244 This patch does not return right after the end of animation, but it keeps applying
3245 the property values defined in the last executing keyframe.
3246 Add normalizedAnimationValueForFillsForwards function that returns a normalized value of the
3247 last executing keyframe.
3249 Link to CSS Animations spec: http://www.w3.org/TR/css3-animations/#animation-fill-mode-property
3251 Test: animations/fill-mode-forwards2.html
3253 * platform/graphics/GraphicsLayerAnimation.cpp:
3254 (WebCore::normalizedAnimationValueForFillsForwards):
3256 (WebCore::GraphicsLayerAnimation::apply):
3258 2012-07-23 Sheriff Bot <webkit.review.bot@gmail.com>
3260 Unreviewed, rolling out r123184, r123195, and r123197.
3261 http://trac.webkit.org/changeset/123184
3262 http://trac.webkit.org/changeset/123195
3263 http://trac.webkit.org/changeset/123197
3264 https://bugs.webkit.org/show_bug.cgi?id=92049
3266 pagecycler regression (Requested by morrita on #webkit).
3270 (WebCore::Document::Document):
3271 (WebCore::Document::~Document):
3272 (WebCore::Document::suggestedMIMEType):
3275 (WebCore::Node::isDocumentNode):
3276 (WebCore::Node::Node):
3278 (WebCore::Node::~Node):
3279 (WebCore::Node::setDocument):
3281 (WebCore::Node::setTreeScope):
3282 (WebCore::Node::treeScope):
3283 (WebCore::Node::isInShadowTree):
3284 (WebCore::Node::reportMemoryUsage):
3287 (WebCore::Node::document):
3288 (WebCore::Node::inDocument):
3289 * dom/NodeRareData.h:
3290 (WebCore::NodeRareData::NodeRareData):
3291 (WebCore::NodeRareData::treeScope):
3292 (WebCore::NodeRareData::setTreeScope):
3294 * dom/ShadowRoot.cpp:
3295 (WebCore::ShadowRoot::ShadowRoot):
3296 * dom/TreeScope.cpp:
3297 (WebCore::TreeScope::TreeScope):
3298 (WebCore::TreeScope::setParentTreeScope):
3301 (WebCore::TreeScope::idTargetObserverRegistry):
3303 * dom/TreeScopeAdopter.cpp:
3304 (WebCore::TreeScopeAdopter::moveTreeToNewScope):
3305 (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
3306 * editing/MoveSelectionCommand.cpp:
3307 * editing/RemoveNodeCommand.cpp:
3308 * editing/RemoveNodePreservingChildrenCommand.cpp:
3309 * inspector/PageConsoleAgent.cpp:
3311 2012-07-23 Roger Fong <roger_fong@apple.com>
3313 On Windows, if select element is off screen horizontally,
3314 menu is either inappropriately resized or positioned offscreen.
3315 https://bugs.webkit.org/show_bug.cgi?id=91913
3316 <rdar://problem/7611229>
3318 Reviewed by Tim Horton.
3320 If the select element is positioned off the edge of the screen to the left,
3321 the menu is resized. It should not be resized, just shifted to remain on the screen.
3322 If the select element is positioned off the edge of the screen to the right,
3323 the menu goes off screen instead of being shifted over to appear on screen.
3324 This problem only occurs on Windows.
3326 Test: ManualTests/win/select-menu-off-screen.html
3328 * platform/win/PopupMenuWin.cpp:
3329 (WebCore::PopupMenuWin::calculatePositionAndSize):
3330 Modified final horizontal position calculation code to position
3331 popup menu on screen if it would otherwise go off.
3333 2012-07-23 David Dorwin <ddorwin@chromium.org>
3335 Fixed crash in webkitAddKey() when key parameter is null.
3336 https://bugs.webkit.org/show_bug.cgi?id=85444
3338 Reviewed by Kentaro Hara.
3340 Reference: Step 1 of http://dvcs.w3.org/hg/html-media/raw-file/5f76a0b43836/encrypted-media/encrypted-media.html#dom-addkey
3342 Tests: media/encrypted-media/encrypted-media-syntax.html
3344 * html/HTMLMediaElement.cpp:
3345 (WebCore::HTMLMediaElement::webkitAddKey):
3347 2012-07-23 Hayato Ito <hayato@chromium.org>
3349 A FocusScope for a distributed node should not be its TreeScope.
3350 https://bugs.webkit.org/show_bug.cgi?id=91829
3352 Reviewed by Dimitri Glazkov.
3354 Current implementation of FocusScope::focusScopeOf(Node*) returns
3355 the given node's treeScope(). That does not apply if the node is
3356 a distributed node. We should calculate a FocusScope for a
3357 distributed node by traversing ancestor nodes in Composed Shadow
3360 Test: fast/dom/shadow/focus-navigation-with-distributed-nodes.html
3362 * page/FocusController.cpp:
3363 (WebCore::FocusScope::focusScopeOf):
3365 2012-07-23 Douglas Stockwell <dstockwell@google.com>
3367 Null-pointer crash when parsing border-image
3368 https://bugs.webkit.org/show_bug.cgi?id=91963
3370 Reviewed by Darin Adler.
3372 Test: fast/css/border-image-fill-crash.html
3374 * css/CSSParser.cpp:
3375 (WebCore::CSSParser::parseBorderImageRepeat): Handle the case where
3376 parseBorderImageRepeat is called when the value list is empty.
3378 2012-07-23 Bem Jones-Bey <bjonesbe@adobe.com>
3380 [CSS Exclusions] SVG shape errors should invalidate exclusion shapes
3381 https://bugs.webkit.org/show_bug.cgi?id=91761
3383 Reviewed by Andreas Kling.
3385 CSS exclusion shapes that are specified with negative radiuses or
3386 height/width are now considered invalid and ignored.
3389 LayoutTests/fast/exclusions/parsing-wrap-shape-lengths.html
3391 * css/CSSParser.cpp:
3392 (WebCore::CSSParser::parseExclusionShapeRectangle):
3393 (WebCore::CSSParser::parseExclusionShapeCircle):
3394 (WebCore::CSSParser::parseExclusionShapeEllipse):
3396 2012-07-23 Tien-Ren Chen <trchen@chromium.org>
3398 [chromium] Implement scrollbar theme for Android
3399 https://bugs.webkit.org/show_bug.cgi?id=91674
3401 Reviewed by Adam Barth.
3403 Previously the scrollbar for Android was implemented as an extra
3404 drawing pass in the compositor. Now we switch to use the standard
3405 ScrollbarTheme mechanism.
3407 No new tests. We use mock scrollbars during layout test to share
3408 pixel results with Linux.
3410 * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
3411 (WebCore::ScrollbarThemeChromiumAndroid::scrollbarThickness):
3412 (WebCore::ScrollbarThemeChromiumAndroid::thumbPosition):
3413 (WebCore::ScrollbarThemeChromiumAndroid::thumbLength):
3414 (WebCore::ScrollbarThemeChromiumAndroid::backButtonRect):
3415 (WebCore::ScrollbarThemeChromiumAndroid::forwardButtonRect):
3416 (WebCore::ScrollbarThemeChromiumAndroid::trackRect):
3418 (WebCore::ScrollbarThemeChromiumAndroid::paintThumb):
3419 (WebCore::ScrollbarThemeChromiumAndroid::paintScrollbarBackground):
3420 * platform/chromium/ScrollbarThemeChromiumAndroid.h:
3421 (WebCore::ScrollbarThemeChromiumAndroid::usesOverlayScrollbars):
3422 (ScrollbarThemeChromiumAndroid):
3423 (WebCore::ScrollbarThemeChromiumAndroid::hasButtons):
3424 (WebCore::ScrollbarThemeChromiumAndroid::hasThumb):
3426 2012-07-23 Kwang Yul Seo <skyul@company100.net>
3428 Use the original token to create an element in "reconstruct the active formatting elements" and "call the adoption agency"
3429 https://bugs.webkit.org/show_bug.cgi?id=91703
3431 Reviewed by Adam Barth.
3433 The current WebKit HTML5 parser implementation does not hold the original token
3434 in the stack of open elements and the active formatting elements. This is
3435 problematic because the original token is used to create an element in
3436 "reconstruct the active formatting elements" and "call the adoption agency".
3438 As a workaround, WebKit uses the saved element instead of the original token
3439 to create an element. But this causes us to fail examples like this:
3440 <b id="1"><p><script>document.getElementById("1").id = "2"</script></p>TEXT</b>
3441 reconstructTheActiveFormattingElements calls this method to open a second <b>
3442 tag to wrap TEXT, it will have id "2", even though the HTML5 spec implies it
3445 Created a ref-counted container class, HTMLStackItem to hold the original token
3446 and the namespace URI as well as the element. Changed HTMLElementStack and
3447 HTMLFormattingElementList to use HTMLStackItem.
3448 Changed HTMLConstructionSite::reconstructTheActiveFormattingElements and
3449 HTMLTreeBuilder::callTheAdoptionAgency to create an element from the saved token
3450 instead of the saved element.
3452 Updated test expectation for html5lib/runner-expected.txt
3453 because now resources/scripted/adoption01.dat passes.
3455 * html/parser/HTMLConstructionSite.cpp:
3456 (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
3457 (WebCore::HTMLConstructionSite::insertHTMLHeadElement):
3458 (WebCore::HTMLConstructionSite::insertHTMLBodyElement):
3459 (WebCore::HTMLConstructionSite::insertHTMLFormElement):
3460 (WebCore::HTMLConstructionSite::insertHTMLElement):
3461 (WebCore::HTMLConstructionSite::insertFormattingElement):
3462 (WebCore::HTMLConstructionSite::insertScriptElement):
3463 (WebCore::HTMLConstructionSite::insertForeignElement):
3464 (WebCore::HTMLConstructionSite::createElementFromSavedToken):
3465 (WebCore::HTMLConstructionSite::reconstructTheActiveFormattingElements):
3466 * html/parser/HTMLConstructionSite.h:
3467 (HTMLConstructionSite):
3468 (WebCore::HTMLConstructionSite::currentElementRecord):
3469 * html/parser/HTMLElementStack.cpp:
3470 (WebCore::HTMLElementStack::ElementRecord::ElementRecord):
3471 (WebCore::HTMLElementStack::ElementRecord::replaceElement):
3472 (WebCore::HTMLElementStack::pushRootNode):
3473 (WebCore::HTMLElementStack::pushHTMLHtmlElement):
3474 (WebCore::HTMLElementStack::pushRootNodeCommon):
3475 (WebCore::HTMLElementStack::pushHTMLHeadElement):
3476 (WebCore::HTMLElementStack::pushHTMLBodyElement):
3477 (WebCore::HTMLElementStack::push):
3478 (WebCore::HTMLElementStack::insertAbove):
3479 (WebCore::HTMLElementStack::pushCommon):
3480 * html/parser/HTMLElementStack.h:
3481 (WebCore::HTMLElementStack::ElementRecord::element):
3482 (WebCore::HTMLElementStack::ElementRecord::node):
3483 (WebCore::HTMLElementStack::ElementRecord::stackItem):
3486 * html/parser/HTMLFormattingElementList.cpp:
3487 (WebCore::HTMLFormattingElementList::swapTo):
3488 (WebCore::HTMLFormattingElementList::append):
3489 * html/parser/HTMLFormattingElementList.h:
3490 (WebCore::HTMLFormattingElementList::Entry::Entry):
3491 (WebCore::HTMLFormattingElementList::Entry::isMarker):
3492 (WebCore::HTMLFormattingElementList::Entry::stackItem):
3493 (WebCore::HTMLFormattingElementList::Entry::element):
3494 (WebCore::HTMLFormattingElementList::Entry::replaceElement):
3495 (WebCore::HTMLFormattingElementList::Entry::operator==):
3496 (WebCore::HTMLFormattingElementList::Entry::operator!=):
3498 (HTMLFormattingElementList):
3499 * html/parser/HTMLStackItem.h: Added.
3502 (WebCore::HTMLStackItem::create):
3503 (WebCore::HTMLStackItem::element):
3504 (WebCore::HTMLStackItem::node):
3505 (WebCore::HTMLStackItem::token):
3506 (WebCore::HTMLStackItem::namespaceURI):
3507 (WebCore::HTMLStackItem::HTMLStackItem):
3508 * html/parser/HTMLTreeBuilder.cpp:
3509 (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
3510 (WebCore::HTMLTreeBuilder::processStartTag):
3511 (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
3513 2012-07-23 Andreas Kling <kling@webkit.org>
3515 Report the extra memory used by immutable StylePropertySet objects.
3516 <http://webkit.org/b/92032>
3518 Reviewed by Anders Carlsson.
3520 Add an optional parameter to the MemoryClassInfo constructor for passing in additional base object
3521 size on top of sizeof(T).
3523 Use this in StylePropertySet::reportMemoryUsage() to properly account for the CSSProperty array
3524 tacked onto the end of the object when m_isMutable == false.
3526 * css/StylePropertySet.h:
3527 (WebCore::StylePropertySet::reportMemoryUsage):
3528 * dom/MemoryInstrumentation.h:
3529 (WebCore::MemoryObjectInfo::reportObjectInfo):
3530 (WebCore::MemoryClassInfo::MemoryClassInfo):
3532 2012-07-23 Gregg Tavares <gman@google.com>
3534 Fix WebGL texSubImage2D for cube maps
3535 https://bugs.webkit.org/show_bug.cgi?id=91927
3537 Reviewed by Kenneth Russell.
3539 Fixes texSubImage2D so any size rectangle can be passed in
3542 Test: fast/canvas/webgl/tex-sub-image-cube-maps.html
3544 * html/canvas/WebGLRenderingContext.cpp:
3546 (WebCore::WebGLRenderingContext::copyTexImage2D):
3547 (WebCore::WebGLRenderingContext::texImage2DBase):
3548 (WebCore::WebGLRenderingContext::texSubImage2DBase):
3549 (WebCore::WebGLRenderingContext::validateTexFuncParameters):
3550 * html/canvas/WebGLRenderingContext.h:
3551 (WebGLRenderingContext):
3553 2012-07-23 Sheriff Bot <webkit.review.bot@gmail.com>
3555 Unreviewed, rolling out r123387.
3556 http://trac.webkit.org/changeset/123387
3557 https://bugs.webkit.org/show_bug.cgi?id=92036
3559 Broke chromium win build (Requested by tony^work on #webkit).
3561 * WebCore.gyp/WebCore.gyp:
3562 * WebCore.gyp/scripts/rule_bison.py:
3563 * bindings/scripts/preprocessor.pm:
3564 (applyPreprocessor):
3565 * make-hash-tools.pl:
3567 2012-07-23 Kwang Yul Seo <skyul@company100.net>
3569 Ref-count AtomicHTMLToken
3570 https://bugs.webkit.org/show_bug.cgi?id=91981
3572 Reviewed by Adam Barth.
3574 Ref-count AtomicHTMLToken to avoid copying AtomicHTMLToken in Bug 91703.
3576 No new tests - no functional changes.
3578 * html/parser/HTMLConstructionSite.cpp:
3579 (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
3580 (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
3581 (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagInBody):
3582 (WebCore::HTMLConstructionSite::insertHTMLBodyStartTagInBody):
3583 (WebCore::HTMLConstructionSite::insertDoctype):
3584 (WebCore::HTMLConstructionSite::insertComment):
3585 (WebCore::HTMLConstructionSite::insertCommentOnDocument):
3586 (WebCore::HTMLConstructionSite::insertCommentOnHTMLHtmlElement):
3587 (WebCore::HTMLConstructionSite::insertHTMLHeadElement):
3588 (WebCore::HTMLConstructionSite::insertHTMLBodyElement):
3589 (WebCore::HTMLConstructionSite::insertHTMLFormElement):
3590 (WebCore::HTMLConstructionSite::insertHTMLElement):
3591 (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement):
3592 (WebCore::HTMLConstructionSite::insertFormattingElement):
3593 (WebCore::HTMLConstructionSite::insertScriptElement):
3594 (WebCore::HTMLConstructionSite::insertForeignElement):
3595 (WebCore::HTMLConstructionSite::createElement):
3596 (WebCore::HTMLConstructionSite::createHTMLElement):
3597 (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
3598 * html/parser/HTMLConstructionSite.h:
3599 (HTMLConstructionSite):
3600 * html/parser/HTMLToken.h:
3601 (WebCore::AtomicHTMLToken::create):
3603 (WebCore::AtomicHTMLToken::AtomicHTMLToken):
3604 * html/parser/HTMLTreeBuilder.cpp:
3605 (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::ExternalCharacterTokenBuffer):
3606 (WebCore::HTMLTreeBuilder::constructTreeFromToken):
3607 (WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken):
3608 (WebCore::HTMLTreeBuilder::processToken):
3609 (WebCore::HTMLTreeBuilder::processDoctypeToken):
3610 (WebCore::HTMLTreeBuilder::processFakeStartTag):
3611 (WebCore::HTMLTreeBuilder::processFakeEndTag):
3612 (WebCore::HTMLTreeBuilder::processFakePEndTagIfPInButtonScope):
3613 (WebCore::HTMLTreeBuilder::attributesForIsindexInput):
3614 (WebCore::HTMLTreeBuilder::processIsindexStartTagForInBody):
3616 (WebCore::HTMLTreeBuilder::processCloseWhenNestedTag):
3617 (WebCore::HTMLTreeBuilder::processStartTagForInBody):
3618 (WebCore::HTMLTreeBuilder::processStartTagForInTable):
3619 (WebCore::HTMLTreeBuilder::processStartTag):
3620 (WebCore::HTMLTreeBuilder::processHtmlStartTagForInBody):
3621 (WebCore::HTMLTreeBuilder::processBodyEndTagForInBody):
3622 (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
3623 (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
3624 (WebCore::HTMLTreeBuilder::processEndTagForInTableBody):
3625 (WebCore::HTMLTreeBuilder::processEndTagForInRow):
3626 (WebCore::HTMLTreeBuilder::processEndTagForInCell):
3627 (WebCore::HTMLTreeBuilder::processEndTagForInBody):
3628 (WebCore::HTMLTreeBuilder::processEndTagForInTable):
3629 (WebCore::HTMLTreeBuilder::processEndTag):
3630 (WebCore::HTMLTreeBuilder::processComment):
3631 (WebCore::HTMLTreeBuilder::processCharacter):
3632 (WebCore::HTMLTreeBuilder::processEndOfFile):
3633 (WebCore::HTMLTreeBuilder::defaultForBeforeHTML):
3634 (WebCore::HTMLTreeBuilder::defaultForBeforeHead):
3635 (WebCore::HTMLTreeBuilder::defaultForInHead):
3636 (WebCore::HTMLTreeBuilder::defaultForInHeadNoscript):
3637 (WebCore::HTMLTreeBuilder::defaultForAfterHead):
3638 (WebCore::HTMLTreeBuilder::processStartTagForInHead):
3639 (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag):
3640 (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag):
3641 (WebCore::HTMLTreeBuilder::processScriptStartTag):
3642 (WebCore::HTMLTreeBuilder::shouldProcessTokenInForeignContent):
3643 (WebCore::HTMLTreeBuilder::processTokenInForeignContent):
3644 (WebCore::HTMLTreeBuilder::parseError):
3645 * html/parser/HTMLTreeBuilder.h:
3647 * html/parser/TextDocumentParser.cpp:
3648 (WebCore::TextDocumentParser::insertFakePreElement):
3650 2012-07-23 Scott Graham <scottmg@google.com>
3652 Use native (non-cygwin) binaries for perl, gperf, and bison in Chromium
3653 https://bugs.webkit.org/show_bug.cgi?id=91667
3655 Reviewed by Tony Chang.
3657 Using native tools instead of cygwin version improves build time
3658 performance by roughly 50% (on top of previous cl-instead-of-gcc
3661 Also, use - instead of / for cl flags because a layer of project
3662 generator converts them to \ otherwise, which causes the preprocessing
3663 to fail (very slowly because of the cygwin-loop with a sleep 1).
3667 * WebCore.gyp/WebCore.gyp:
3668 * WebCore.gyp/scripts/rule_bison.py:
3669 * bindings/scripts/preprocessor.pm:
3670 (applyPreprocessor):
3671 * make-hash-tools.pl:
3673 2012-06-12 Jer Noble <jer.noble@apple.com>
3675 MediaController.currentTime should be kept stable during script execution.
3676 https://bugs.webkit.org/show_bug.cgi?id=88555
3678 Reviewed by Eric Carlson.
3680 Test: media/media-controller-time-constant.html
3682 To keep MediaController.currentTime stable, add a new m_position variable and
3683 a new m_clearPositionTimer timer. Both must be mutable variables as they will
3684 be updated from within const functions. Calls to currentTime() will result in
3685 stable values until the next runloop iteration.
3687 * html/MediaController.cpp:
3688 (MediaController::MediaController):
3689 (MediaController::currentTime):
3690 (MediaController::setCurrentTime):
3691 (MediaController::clearPositionTimerFired):
3692 * html/MediaController.h:
3694 2012-07-23 Huang Dongsung <luxtella@company100.net>
3696 Destroy CSS decoded data more eagerly once they become dead caches.
3697 https://bugs.webkit.org/show_bug.cgi?id=91733
3699 Reviewed by Geoffrey Garen.
3701 Internal review by Kwang Yul Seo.
3703 There are three CachedResources with decoded data: CachedImage, CachedScript
3704 and CachedCSSStyleSheet. In the cases of CachedImage and CachedScript, we
3705 eagerly destroy the decoded data using Timer in CacehdResource::allClientsRemoved().
3706 We must apply the same policy here in CachedCSSStyleSheet because priority
3707 inversion can occur. For example, we can't destroy the decoded data of CachedImages
3708 when they are referenced by CachedCSSStyleSheet as background, mask or border
3711 No new tests - no new testable functionality.
3713 * loader/cache/CachedCSSStyleSheet.cpp:
3714 (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
3715 (WebCore::CachedCSSStyleSheet::didAddClient):
3716 (WebCore::CachedCSSStyleSheet::allClientsRemoved):
3717 (WebCore::CachedCSSStyleSheet::destroyDecodedData):
3719 (WebCore::CachedCSSStyleSheet::decodedDataDeletionTimerFired):
3720 * loader/cache/CachedCSSStyleSheet.h:
3721 (CachedCSSStyleSheet):
3723 2012-07-23 Simon Fraser <simon.fraser@apple.com>
3725 Part 2 of: Implement sticky positioning
3726 https://bugs.webkit.org/show_bug.cgi?id=90046
3728 Reviewed by Ojan Vafai.
3730 Turn on ENABLE_CSS_STICKY_POSITION. Add support for parsing the new '-webkit-sticky'
3731 value for position, returning it from getComputedStyle(), and storing it in RenderStyle.
3733 Test: fast/css/sticky/parsing-position-sticky.html
3735 * Configurations/FeatureDefines.xcconfig:
3736 * css/CSSComputedStyleDeclaration.cpp:
3737 (WebCore::getPositionOffsetValue):
3738 * css/CSSParser.cpp:
3739 (WebCore::isValidKeywordPropertyAndValue):
3740 * css/CSSPrimitiveValueMappings.h:
3741 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3742 (WebCore::CSSPrimitiveValue::operator EPosition):
3743 * css/CSSValueKeywords.in:
3744 * rendering/style/RenderStyle.h:
3745 * rendering/style/RenderStyleConstants.h:
3747 2012-07-23 Stephen Chenney <schenney@chromium.org>
3749 Crash when setting empty class name on a new element
3750 https://bugs.webkit.org/show_bug.cgi?id=92024
3752 Reviewed by Andreas Kling.
3754 Add a check for null attributeData() when setting the className to an
3755 empty string on a newly created element. New SVG elements have null
3756 attributeData() on baseVal upon creation.
3758 Test: svg/custom/empty-className-baseVal-crash.html
3760 * dom/StyledElement.cpp:
3761 (WebCore::StyledElement::classAttributeChanged): Add check for null attributeData()
3763 2012-07-23 Shawn Singh <shawnsingh@chromium.org>
3765 [chromium] Refactor CCLayerTreeHostCommon: clean up clipRect and drawableContentRect design
3766 https://bugs.webkit.org/show_bug.cgi?id=80622
3768 Reviewed by Adrienne Walker.
3770 clipRect(), usesLayerClipping(), and drawableContentRect() have been
3771 very confusing in CCLayerTreeHostCommon for a while. This patch
3772 refactors it so that (1) clipping is only done locally in
3773 calcDrawTransforms, and (2) the layer's drawableContentRect value
3774 is now meaningful value outside of calcDrawTransforms.
3775 Additionally, the layer is now always clipped to the root
3776 surface's contentBounds (which are set to the viewport bounds).
3777 This refactor not only makes calcDrawTransforms far more readable and intuitive, but
3778 this patch enables more upcoming beneficial refactors, including
3779 the pending refactor in https://bugs.webkit.org/show_bug.cgi?id=88953.
3781 Tests are also significantly updated to keep up with this refactoring change.
3783 * platform/graphics/chromium/LayerChromium.cpp:
3784 (WebCore::LayerChromium::LayerChromium):
3785 * platform/graphics/chromium/LayerChromium.h:
3787 Removed m_usesLayerClipping and m_clipRect and associated accessors.
3789 * platform/graphics/chromium/RenderSurfaceChromium.h:
3790 (RenderSurfaceChromium):
3793 * platform/graphics/chromium/cc/CCLayerImpl.cpp:
3794 (WebCore::CCLayerImpl::CCLayerImpl):
3795 * platform/graphics/chromium/cc/CCLayerImpl.h:
3797 Removed m_usesLayerClipping and m_clipRect and associated accessors.
3799 * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3800 (WebCore::CCLayerTreeHost::updateLayers):
3801 removed setClipRect code that no longer applies
3803 * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
3804 (WebCore::calculateLayerScissorRect):
3805 scissor rect is now a little bit tighter, the intersection between damage and layer's new drawableContentRect.
3807 (WebCore::calculateSurfaceScissorRect):
3808 scissor rect is now a little bit tighter, except when filters are involved.
3810 (WebCore::layerClipsSubtree):
3814 (WebCore::calculateVisibleContentRect):
3815 (WebCore::subtreeShouldRenderToSeparateSurface):
3816 (WebCore::calculateDrawTransformsInternal):
3817 - added drawableContentRectOfSubtree to the function args, it is valid only after recursion returns,
3818 - added clipRectFromAncestor and bool ancestorClipsSubtree to function args, this replaces the layer's clipRect and usesLayerClipping.
3819 - removed the boolean return value, which was redundant with drawableContentRectOfSubtree.
3820 - replaced all the "setDrawableContentRect" logic with more intuitive, clear logic.
3821 - now, layer's drawableContentRect represents the clipped bounds of the layer expressed in the target surface space.
3823 (WebCore::CCLayerTreeHostCommon::calculateDrawTransforms):
3824 (WebCore::pointIsClippedBySurfaceOrClipRect):
3825 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3826 (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList):
3827 * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
3828 (WebCore::::layerScissorRectInTargetSurface):
3829 Updated this accessor. It could be removed in the future, but not appropriate for this patch.
3831 * platform/graphics/chromium/cc/CCRenderSurface.h:
3833 2012-07-23 Patrick Gansterer <paroga@webkit.org>
3835 [CMAKE] Added missing RenderLayerFilterInfo.cpp to build system.
3839 2012-07-23 Ryosuke Niwa <rniwa@webkit.org>
3841 REGRESSION(r123281): childNodes sometimes returns wrong nodes
3842 https://bugs.webkit.org/show_bug.cgi?id=92014
3844 Reviewed by Anders Carlsson.
3846 The bug was caused by a typo in itemBeforeOrAfter. Namely, it should have been calling firstNode as
3847 firstNode(forward, rootNode(), shouldOnlyIncludeDirectChildren()),
3848 NOT firstNode(forward, rootNode(), previous)
3849 as evident from the argument list of the function.
3851 Test: fast/dom/NodeList/childNodes-reverse-iteration.html
3853 * html/HTMLCollection.cpp:
3854 (WebCore::DynamicNodeListCacheBase::itemBeforeOrAfter):
3856 2012-07-23 Steve VanDeBogart <vandebo@chromium.org>
3858 Chrome/Skia: PDF print output does not have clickable links.
3859 https://bugs.webkit.org/show_bug.cgi?id=91171
3861 Reviewed by Stephen White.
3863 Connect GraphicsContext::setURLForRect to Skia's new API for annotations.
3865 Printing is not generally testable.
3867 * platform/graphics/skia/GraphicsContextSkia.cpp:
3868 (WebCore::GraphicsContext::setURLForRect):
3870 2012-07-23 Pierre Rossi <pierre.rossi@gmail.com>
3872 Unify numTouchEventHandlersChanged and needTouchEvents in the chrome client
3873 https://bugs.webkit.org/show_bug.cgi?id=91006
3875 Reviewed by Ryosuke Niwa.
3877 The rationale here is that the client doesn't need to know about the touch
3878 event handler count. needTouchEvents was already used for that purpose.
3880 Test: fast/events/touch/touch-handler-count.html
3883 (WebCore::Document::Document):
3884 (WebCore::Document::didAddTouchEventHandler): Only notify the client if needed.
3885 (WebCore::Document::didRemoveTouchEventHandler): Ditto. Also unset the TOUCH_LISTENER
3886 flag for the document if we reach a count of zero. The rationale being that
3887 hasListenerType() is relied upon in other places in combination with TOUCH_LISTENER for
3891 (WebCore::Document::touchEventHandlerCount):
3892 * loader/EmptyClients.h:
3893 * page/ChromeClient.h:
3895 * page/Frame.cpp: Removed notifyChromeClientTouchEventHandlerCountChanged.
3896 (WebCore::Frame::setDocument): call needsTouchEvents directly.
3897 * page/Frame.h: Ditto.
3899 * testing/Internals.cpp:
3900 (WebCore::Internals::hasTouchEventListener): expose Document::hasListenerType indirectly
3901 for additional testing.
3903 * testing/Internals.h:
3905 * testing/Internals.idl:
3907 2012-07-23 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
3909 [Qt] RenderThemeQtMobile highlight colors are not being used
3910 https://bugs.webkit.org/show_bug.cgi?id=92004
3912 Reviewed by Noam Rosenthal.
3914 The issue here is that setPaletteFromPageClientIfExists() is being used as a
3915 virtual function, but it isn't, so when platformActiveSelectionBackgroundColor()
3916 runs, it doesn't pick the right palette.
3918 Besides fixing this virtual behavior, the patch changes the structure a bit,
3919 because setPaletteFromPageClientIfExists() was being "overriden" in mobile theme
3920 to set the palette, which isn't exactly what the function name says.
3922 * platform/qt/RenderThemeQt.cpp:
3923 (WebCore::RenderThemeQt::platformActiveSelectionBackgroundColor):
3924 (WebCore::RenderThemeQt::platformInactiveSelectionBackgroundColor):
3925 (WebCore::RenderThemeQt::platformActiveSelectionForegroundColor):
3926 (WebCore::RenderThemeQt::platformInactiveSelectionForegroundColor):
3927 (WebCore::RenderThemeQt::platformFocusRingColor):
3928 (WebCore::RenderThemeQt::systemColor):
3929 (WebCore::RenderThemeQt::getMediaControlForegroundColor):
3930 (WebCore::RenderThemeQt::paintMediaVolumeSliderTrack):
3931 Use the virtual colorPalette() to get the palette.
3933 (WebCore::RenderThemeQt::colorPalette):
3934 (WebCore): Removed the code for getting the page client from here since it is
3935 used only by the QStyle variant.
3937 * platform/qt/RenderThemeQt.h:
3939 * platform/qt/RenderThemeQtMobile.cpp:
3940 (WebCore::RenderThemeQtMobile::colorPalette):
3942 * platform/qt/RenderThemeQtMobile.h:
3943 (RenderThemeQtMobile):
3945 2012-07-23 Simon Fraser <simon.fraser@apple.com>
3947 Part 1 of: Implement sticky positioning
3948 https://bugs.webkit.org/show_bug.cgi?id=90046
3950 Reviewed by Ojan Vafai.
3952 Add ENABLE_CSS_STICKY_POSITION, defaulting to off initially.
3954 Sort the ENABLE_CSS lines in the file. Make sure all the flags
3955 are in FEATURE_DEFINES.
3957 * Configurations/FeatureDefines.xcconfig:
3959 2012-07-23 Sheriff Bot <webkit.review.bot@gmail.com>
3961 Unreviewed, rolling out r123339.
3962 http://trac.webkit.org/changeset/123339
3963 https://bugs.webkit.org/show_bug.cgi?id=92006
3965 massive media tests failure (Requested by philn on #webkit).
3967 * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
3969 * platform/graphics/gstreamer/GStreamerVersioning.cpp:
3970 (setGstElementClassMetadata):
3971 * platform/graphics/gstreamer/GStreamerVersioning.h:
3973 2012-07-21 Vincent Scheib <scheib@chromium.org>
3975 webkitFullscreenElement, webkitCurrentFullScreenElement, webkitPointerLockElement block cross origin access.
3976 https://bugs.webkit.org/show_bug.cgi?id=91892
3978 Reviewed by Adam Barth.
3980 PointerLockElement only returned when requested from the document that owns it.
3982 Tests: http/tests/fullscreen/fullscreenelement-different-origin.html
3983 http/tests/fullscreen/fullscreenelement-same-origin.html
3984 http/tests/pointer-lock/pointerlockelement-different-origin.html
3985 http/tests/pointer-lock/pointerlockelement-same-origin.html
3988 (WebCore::Document::webkitPointerLockElement):
3990 2012-07-23 Philippe Normand <pnormand@igalia.com>
3992 [GTK][jhbuild] Switch to GStreamer 0.11 build
3993 https://bugs.webkit.org/show_bug.cgi?id=91727
3995 Reviewed by Gustavo Noronha Silva.
3997 Add a new function to encapsulate the GStreamer API removal of
3998 GST_OBJECT_IS_FLOATING in the upcoming 1.0 release. Use of this
3999 macro can now be replaced by calling the g_object_is_floating
4002 * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
4004 * platform/graphics/gstreamer/GStreamerVersioning.cpp:
4005 (gstObjectIsFloating):
4006 * platform/graphics/gstreamer/GStreamerVersioning.h:
4008 2012-07-23 Christophe Dumez <christophe.dumez@intel.com>
4010 [EFL] media/controls-styling.html is failing
4011 https://bugs.webkit.org/show_bug.cgi?id=91984
4013 Reviewed by Eric Carlson.
4015 Make sure that the CSS properties letter-spacing, word-spacing,
4016 line-height, text-transform, text-indent, text-shadow,
4017 text-decoration and color do not affect the media element controls,
4020 No new tests. Already tested by media/controls-styling.html and
4021 media/controls-styling-strict.html
4023 * css/mediaControlsEfl.css:
4024 (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
4026 2012-07-23 Carlos Garcia Campos <cgarcia@igalia.com>
4028 Unreviewed. Fix make distcheck.
4030 * GNUmakefile.list.am: Add missing header files.
4032 2012-07-23 Kent Tamura <tkent@chromium.org>
4034 Replace some instances of shadowAncestorNode() with shadowHost()
4035 https://bugs.webkit.org/show_bug.cgi?id=91966
4037 Reviewed by Hajime Morita.
4039 shadowAncestorNode() is deprecated. We should use shadowHost().