1 2013-02-12 Raymond Toy <rtoy@google.com>
3 Synchronize setting of panner node model and processing
4 https://bugs.webkit.org/show_bug.cgi?id=109599
6 Reviewed by Chris Rogers.
10 * Modules/webaudio/PannerNode.cpp:
11 (WebCore::PannerNode::process):
12 (WebCore::PannerNode::setPanningModel):
13 * Modules/webaudio/PannerNode.h:
15 2013-02-12 Dean Jackson <dino@apple.com>
17 Add class name for snapshotted plugin based on dimensions
18 https://bugs.webkit.org/show_bug.cgi?id=108369
20 Reviewed by Simon Fraser.
22 As the size of the plugin changes, the Shadow Root for the snapshot
23 might want to toggle different interfaces. Expose "tiny", "small",
24 "medium" and "large" classes on the Shadow. (The dimensions are
25 currently chosen fairly arbitrarily).
27 Because we only know the dimensions after layout, we set up
28 a post layout task to add the class. Luckily there already was
29 a post layout task for plugins - I just updated it to handle
30 both real and snapshotted plugins. This involved modifying
31 the list of RenderEmbeddedObjects in FrameView to take generic
32 RenderObjects, and decide which type they are when calling
35 * html/HTMLPlugInImageElement.cpp: Some new dimensions for the various size thresholds.
36 (WebCore::classNameForShadowRootSize): New static function that returns a class name
37 after examining the size of the object.
38 (WebCore::HTMLPlugInImageElement::updateSnapshotInfo): Sets the class name for
39 the shadow root. This is called in the post layout task.
40 (WebCore::shouldPlugInShowLabelAutomatically): Use new size names.
41 (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Ditto.
42 * html/HTMLPlugInImageElement.h:
43 (HTMLPlugInImageElement): New method updateSnapshotInfo.
46 (WebCore::FrameView::addWidgetToUpdate): Change RenderEmbeddedObject* to RenderObject*.
47 (WebCore::FrameView::removeWidgetToUpdate): Ditto
48 (WebCore::FrameView::updateWidget): Branch based on EmbeddedObject vs SnapshottedPlugIn. Call
49 plugin snapshot update if necessary.
50 (WebCore::FrameView::updateWidgets): Handle both EmbeddedObject and SnapshottedPlugIn cases.
51 * page/FrameView.h: Change RenderEmbeddedObject* to RenderObject* for post layout widget updates.
53 * rendering/RenderSnapshottedPlugIn.cpp:
54 (WebCore::RenderSnapshottedPlugIn::layout): New virtual override. If size has changed, ask the
55 FrameView to recalculate size after layout.
56 * rendering/RenderSnapshottedPlugIn.h: New layout() method.
58 2013-02-12 Mike West <mkwst@chromium.org>
60 Implement script MIME restrictions for X-Content-Type-Options: nosniff
61 https://bugs.webkit.org/show_bug.cgi?id=71851
63 Reviewed by Adam Barth.
65 This patch adds support for 'X-Content-Type-Options: nosniff' when
66 deciding whether or not to execute a given chunk of JavaScript. If the
67 header is present, script will only execute if it matches a predefined
68 set of MIME types[1] that are deemed "executable". Scripts served with
69 types that don't match the list will not execute.
71 IE introduced this feature, and Gecko is working on an implementation[2]
72 now. There's been some discussion on the WHATWG list about formalizing
73 the specification for this feature[3], but nothing significant has been
76 This implementation's list of acceptible MIME types differs from IE's:
77 it matches the list of supported JavaScript MIME types defined in
78 MIMETypeRegistry::initializeSupportedJavaScriptMIMETypes()[4]. In
79 particular, the VBScript types are not accepted, and
80 'text/javascript1.{1,2,3}' are accepted, along with 'text/livescript'.
82 This feature is locked tightly behind the ENABLE_NOSNIFF flag, which is
83 currently only enabled on the Chromium port.
85 [1]: http://msdn.microsoft.com/en-us/library/gg622941(v=vs.85).aspx
86 [2]: https://bugzilla.mozilla.org/show_bug.cgi?id=471020
87 [3]: http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-November/037974.html
88 [4]: http://trac.webkit.org/browser/trunk/Source/WebCore/platform/MIMETypeRegistry.cpp?rev=142086#L307
90 Tests: http/tests/security/contentTypeOptions/invalid-content-type-options-allowed.html
91 http/tests/security/contentTypeOptions/nosniff-script-allowed.html
92 http/tests/security/contentTypeOptions/nosniff-script-blocked.html
93 http/tests/security/contentTypeOptions/nosniff-script-without-content-type-allowed.html
95 * dom/ScriptElement.cpp:
96 (WebCore::ScriptElement::executeScript):
97 Before executing script, ensure that it shouldn't be blocked due to
98 its MIME type. If it is blocked, write an error message to the
100 * loader/cache/CachedScript.cpp:
101 (WebCore::CachedScript::mimeType):
102 Make scripts' MIME type available outside the context of
103 CachedScript in order to correctly populate error messages we write
104 to the console in ScriptElement::executeScript
106 (WebCore::CachedScript::mimeTypeAllowedByNosniff):
107 * loader/cache/CachedScript.h:
109 A new method which checks the resource's HTTP headers to set the
110 'nosniff' disposition, and compares the resource's MIME type against
111 the list of allowed executable types. Returns true iff the script
113 * platform/network/HTTPParsers.cpp:
115 (WebCore::parseContentTypeOptionsHeader):
116 * platform/network/HTTPParsers.h:
117 Adds a new enum which relates the sniffable status of the resource,
118 and a method to parse the HTTP header.
120 2013-02-12 Adam Barth <abarth@webkit.org>
122 Threaded HTML parser should pass the remaining fast/tokenizer tests
123 https://bugs.webkit.org/show_bug.cgi?id=109607
125 Reviewed by Eric Seidel.
127 This patch fixes some edge cases involving document.write. Previously,
128 we would drop input characters on the floor if the tokenizer wasn't
129 able to consume them synchronously. In this patch, we send the unparsed
130 characters to the background thread for consumption after rewinding the
133 * html/parser/BackgroundHTMLInputStream.cpp:
134 (WebCore::BackgroundHTMLInputStream::rewindTo):
135 * html/parser/BackgroundHTMLInputStream.h:
136 (BackgroundHTMLInputStream):
137 * html/parser/BackgroundHTMLParser.cpp:
138 (WebCore::BackgroundHTMLParser::resumeFrom):
139 * html/parser/BackgroundHTMLParser.h:
141 * html/parser/HTMLDocumentParser.cpp:
142 (WebCore::HTMLDocumentParser::canTakeNextToken):
143 (WebCore::HTMLDocumentParser::didFailSpeculation):
144 (WebCore::HTMLDocumentParser::pumpTokenizer):
145 (WebCore::HTMLDocumentParser::finish):
146 * html/parser/HTMLInputStream.h:
147 (WebCore::HTMLInputStream::closeWithoutMarkingEndOfFile):
150 2013-02-12 Csaba Osztrogonác <ossy@webkit.org>
152 Unreviewed buildfix for !ENABLE(INSPECTOR) platforms after r142654.
154 * inspector/InspectorInstrumentation.h:
155 (WebCore::InspectorInstrumentation::scriptsEnabled):
157 2013-02-12 Christophe Dumez <ch.dumez@sisa.samsung.com>
159 Remove remaining traces of Web Intents
160 https://bugs.webkit.org/show_bug.cgi?id=109586
162 Reviewed by Eric Seidel.
164 Remove remaining traces of Web Intents as the functionality was
167 No new tests, no behavior change for layout tests.
169 * GNUmakefile.features.am.in:
170 * html/HTMLTagNames.in:
172 2013-02-12 Robert Hogan <robert@webkit.org>
174 REGRESSION(r136967): Combination of float and clear yields to bad layout
175 https://bugs.webkit.org/show_bug.cgi?id=109476
177 Reviewed by Levi Weintraub.
179 Test: fast/block/margin-collapse/self-collapsing-block-with-float-children.html
181 The change made at http://trac.webkit.org/changeset/136967 only needs to worry about the first floated
182 child of a self-collapsing block. The ones that follow are not affected by its margins.
184 * rendering/RenderBlockLineLayout.cpp:
185 (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
187 2013-02-12 Levi Weintraub <leviw@chromium.org>
189 ASSERTION FAILED: !object || object->isBox(), UNKNOWN in WebCore::RenderListItem::positionListMarker
190 https://bugs.webkit.org/show_bug.cgi?id=108699
192 Reviewed by Abhishek Arya.
194 RenderListItems performs special management of its children to maintain list markers. Splitting a flow
195 through a list item results in assumptions made inside RenderListItem failing, so for now, avoid splitting
196 flows when inside one.
198 Test: fast/multicol/span/list-multi-column-crash.html
200 * rendering/RenderBlock.cpp:
201 (WebCore::RenderBlock::containingColumnsBlock):
203 2013-02-12 Roger Fong <roger_fong@apple.com>
205 Unreviewed Windows build fix.
207 * testing/Internals.cpp:
208 (WebCore::Internals::resetToConsistentState):
209 (WebCore::Internals::Internals):
211 2013-02-12 Vivek Galatage <vivek.vg@samsung.com>
213 Web Inspector: JavaScript execution disabled by browser/UA should be notified to the front-end
214 https://bugs.webkit.org/show_bug.cgi?id=109402
216 Reviewed by Yury Semikhatsky.
218 Whenever the UA/Browser changes the Script Execution state of a page, it should notify the
219 inspector front-end. Added the InspectorInstrumentation method didScriptExecutionStateChange
220 to achieve this. Also the state change triggered by the inspector should be ignored to avoid
223 Test: inspector/script-execution-state-change-notification.html
225 * inspector/Inspector.json:
226 * inspector/InspectorInstrumentation.cpp:
228 (WebCore::InspectorInstrumentation::scriptsEnabledImpl):
229 * inspector/InspectorInstrumentation.h:
230 (InspectorInstrumentation):
231 (WebCore::InspectorInstrumentation::scriptsEnabled):
233 * inspector/InspectorPageAgent.cpp:
234 (WebCore::InspectorPageAgent::InspectorPageAgent):
235 (WebCore::InspectorPageAgent::setScriptExecutionDisabled):
236 (WebCore::InspectorPageAgent::scriptsEnabled):
238 * inspector/InspectorPageAgent.h:
239 (InspectorPageAgent):
240 * inspector/front-end/ResourceTreeModel.js:
241 (WebInspector.PageDispatcher.prototype.javascriptDialogClosed):
242 (WebInspector.PageDispatcher.prototype.scriptsEnabled):
244 (WebCore::Settings::setScriptEnabled):
246 2013-02-12 Antti Koivisto <antti@apple.com>
248 Cache timer heap pointer to timers
249 https://bugs.webkit.org/show_bug.cgi?id=109597
251 Reviewed by Andreas Kling.
253 Accessing timer heap through thread global storage is slow (~0.1% in PLT3). We can cache the heap pointer to
254 each TimerBase. There are not huge numbers of timers around so memory is not an issue and many timers are heavily reused.
256 * platform/Timer.cpp:
257 (WebCore::threadGlobalTimerHeap):
258 (WebCore::TimerHeapReference::operator=):
259 (WebCore::TimerHeapIterator::checkConsistency):
260 (WebCore::TimerBase::TimerBase):
261 (WebCore::TimerBase::checkHeapIndex):
262 (WebCore::TimerBase::setNextFireTime):
264 (WebCore::TimerBase::timerHeap):
267 2013-02-12 Adam Barth <abarth@webkit.org>
269 BackgroundHTMLParser::resumeFrom should take a struct
270 https://bugs.webkit.org/show_bug.cgi?id=109598
272 Reviewed by Eric Seidel.
274 This patch is purely a syntatic change that paves the way for fixing
275 the partial-entity document.write tests. To fix those tests, we'll need
276 to pass more information to resumeFrom, but we're hitting the argument
277 limits in Functional.h. Rather than adding yet more arguments, this
278 patch moves to a single argument that's a struct.
280 * html/parser/BackgroundHTMLParser.cpp:
281 (WebCore::BackgroundHTMLParser::resumeFrom):
282 * html/parser/BackgroundHTMLParser.h:
284 (BackgroundHTMLParser):
285 * html/parser/HTMLDocumentParser.cpp:
286 (WebCore::HTMLDocumentParser::didFailSpeculation):
288 2013-02-12 Elliott Sprehn <esprehn@chromium.org>
290 rootRenderer in FrameView is really RenderView
291 https://bugs.webkit.org/show_bug.cgi?id=109510
293 Reviewed by Eric Seidel.
295 The global function rootRenderer(FrameView*) is really just a way
296 to get the RenderView from the Frame so replace it with a renderView()
297 method and replace usage of the word "root" with renderView so it's
298 obvious the root we're talking about is the renderView. This is an
299 important distinction to make since we also have rootRenderer in the code
300 for the documentElement()'s renderer and we also have a "layout root" which
301 is entirely different.
303 No new tests, just refactoring.
305 * page/FrameView.cpp:
306 (WebCore::FrameView::rootRenderer): Removed.
307 (WebCore::FrameView::setFrameRect):
308 (WebCore::FrameView::adjustViewSize):
309 (WebCore::FrameView::updateCompositingLayersAfterStyleChange):
310 (WebCore::FrameView::updateCompositingLayersAfterLayout):
311 (WebCore::FrameView::clearBackingStores):
312 (WebCore::FrameView::restoreBackingStores):
313 (WebCore::FrameView::usesCompositedScrolling):
314 (WebCore::FrameView::layerForHorizontalScrollbar):
315 (WebCore::FrameView::layerForVerticalScrollbar):
316 (WebCore::FrameView::layerForScrollCorner):
317 (WebCore::FrameView::tiledBacking):
318 (WebCore::FrameView::scrollLayerID):
319 (WebCore::FrameView::layerForOverhangAreas):
320 (WebCore::FrameView::flushCompositingStateForThisFrame):
321 (WebCore::FrameView::hasCompositedContent):
322 (WebCore::FrameView::enterCompositingMode):
323 (WebCore::FrameView::isSoftwareRenderable):
324 (WebCore::FrameView::didMoveOnscreen):
325 (WebCore::FrameView::willMoveOffscreen):
326 (WebCore::FrameView::layout):
327 (WebCore::FrameView::embeddedContentBox):
328 (WebCore::FrameView::contentsInCompositedLayer):
329 (WebCore::FrameView::scrollContentsFastPath):
330 (WebCore::FrameView::scrollContentsSlowPath):
331 (WebCore::FrameView::maintainScrollPositionAtAnchor):
332 (WebCore::FrameView::scrollPositionChanged):
333 (WebCore::FrameView::repaintFixedElementsAfterScrolling):
334 (WebCore::FrameView::updateFixedElementsAfterScrolling):
335 (WebCore::FrameView::visibleContentsResized):
336 (WebCore::FrameView::scheduleRelayoutOfSubtree):
337 (WebCore::FrameView::needsLayout):
338 (WebCore::FrameView::setNeedsLayout):
339 (WebCore::FrameView::performPostLayoutTasks):
340 (WebCore::FrameView::updateControlTints):
341 (WebCore::FrameView::paintContents):
342 (WebCore::FrameView::forceLayoutForPagination):
343 (WebCore::FrameView::adjustPageHeightDeprecated):
344 (WebCore::FrameView::resetTrackedRepaints):
345 (WebCore::FrameView::isVerticalDocument):
346 (WebCore::FrameView::isFlippedDocument):
348 (WebCore::FrameView::renderView): Added.
350 2013-02-12 Tomas Popela <tpopela@redhat.com>
352 [GTK][Introspection] GObject bindings for DataTransferItemList - one add() method must be removed from .idl
353 https://bugs.webkit.org/show_bug.cgi?id=109180
355 Reviewed by Xan Lopez.
357 When compiling WebKit with --enable-introspection and generating GObject bindings
358 for DataTransferItemList we must disable one add() method, because GObject is
359 based on C and C does not allow two functions with the same name.
363 * bindings/scripts/CodeGeneratorGObject.pm:
365 2013-02-12 Uday Kiran <udaykiran@motorola.com>
367 Background size width specified in viewport percentage units not working
368 https://bugs.webkit.org/show_bug.cgi?id=109536
370 Reviewed by Antti Koivisto.
372 Corrected the check for viewport percentage unit while calculating
373 background image width.
375 Test: fast/backgrounds/size/backgroundSize-viewportPercentage-width.html
377 * rendering/RenderBoxModelObject.cpp:
378 (WebCore::RenderBoxModelObject::calculateFillTileSize):
380 2013-02-12 Abhishek Arya <inferno@chromium.org>
382 Heap-use-after-free in WebCore::DeleteButtonController::enable
383 https://bugs.webkit.org/show_bug.cgi?id=109447
385 Reviewed by Ryosuke Niwa.
387 RefPtr frame pointer since it can get deleted due to mutation events
388 fired inside AppendNodeCommand::doUnapply.
390 No new tests. Testcase is hard to minimize due to recursive
391 calls with DOMNodeRemovedFromDocument mutation event.
393 * editing/CompositeEditCommand.cpp:
394 (WebCore::EditCommandComposition::unapply):
395 (WebCore::EditCommandComposition::reapply):
397 2013-02-12 Eric Seidel <eric@webkit.org>
399 Remove HTMLTokenTypes header (and split out AtomicHTMLToken.h from HTMLToken.h)
400 https://bugs.webkit.org/show_bug.cgi?id=109525
402 Reviewed by Adam Barth.
404 We no longer need a separate HTMLTokenTypes class now that NEW_XML is gone.
405 However, to remove HTMLTokenTypes, I had to split AtomicHTMLToken.h from
406 HTMLToken.h (to fix a circular dependancy).
408 * GNUmakefile.list.am:
411 * WebCore.vcproj/WebCore.vcproj:
412 * WebCore.vcxproj/WebCore.vcxproj:
413 * WebCore.vcxproj/WebCore.vcxproj.filters:
414 * WebCore.xcodeproj/project.pbxproj:
415 * html/HTMLViewSourceDocument.cpp:
416 (WebCore::HTMLViewSourceDocument::addSource):
417 * html/parser/AtomicHTMLToken.h: Added.
420 (WebCore::AtomicHTMLToken::create):
421 (WebCore::AtomicHTMLToken::forceQuirks):
422 (WebCore::AtomicHTMLToken::type):
423 (WebCore::AtomicHTMLToken::name):
424 (WebCore::AtomicHTMLToken::setName):
425 (WebCore::AtomicHTMLToken::selfClosing):
426 (WebCore::AtomicHTMLToken::getAttributeItem):
427 (WebCore::AtomicHTMLToken::attributes):
428 (WebCore::AtomicHTMLToken::characters):
429 (WebCore::AtomicHTMLToken::charactersLength):
430 (WebCore::AtomicHTMLToken::isAll8BitData):
431 (WebCore::AtomicHTMLToken::comment):
432 (WebCore::AtomicHTMLToken::publicIdentifier):
433 (WebCore::AtomicHTMLToken::systemIdentifier):
434 (WebCore::AtomicHTMLToken::clearExternalCharacters):
435 (WebCore::AtomicHTMLToken::AtomicHTMLToken):
436 (WebCore::AtomicHTMLToken::initializeAttributes):
437 * html/parser/BackgroundHTMLParser.cpp:
438 (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
439 * html/parser/CompactHTMLToken.cpp:
440 (WebCore::CompactHTMLToken::CompactHTMLToken):
441 * html/parser/CompactHTMLToken.h:
442 (WebCore::CompactHTMLToken::type):
443 * html/parser/HTMLConstructionSite.cpp:
444 (WebCore::HTMLConstructionSite::insertDoctype):
445 (WebCore::HTMLConstructionSite::insertComment):
446 (WebCore::HTMLConstructionSite::insertCommentOnDocument):
447 (WebCore::HTMLConstructionSite::insertCommentOnHTMLHtmlElement):
448 (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement):
449 (WebCore::HTMLConstructionSite::insertForeignElement):
450 * html/parser/HTMLDocumentParser.cpp:
451 (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
452 (WebCore::HTMLDocumentParser::constructTreeFromHTMLToken):
453 * html/parser/HTMLDocumentParser.h:
454 * html/parser/HTMLMetaCharsetParser.cpp:
455 (WebCore::HTMLMetaCharsetParser::checkForMetaCharset):
456 * html/parser/HTMLPreloadScanner.cpp:
457 (WebCore::isStartTag):
458 (WebCore::isStartOrEndTag):
459 (WebCore::HTMLPreloadScanner::processToken):
460 * html/parser/HTMLSourceTracker.cpp:
461 (WebCore::HTMLSourceTracker::start):
462 (WebCore::HTMLSourceTracker::sourceForToken):
463 * html/parser/HTMLStackItem.h:
464 (WebCore::HTMLStackItem::HTMLStackItem):
465 * html/parser/HTMLToken.h:
466 (WebCore::HTMLToken::clear):
467 (WebCore::HTMLToken::isUninitialized):
468 (WebCore::HTMLToken::type):
469 (WebCore::HTMLToken::makeEndOfFile):
470 (WebCore::HTMLToken::data):
471 (WebCore::HTMLToken::name):
472 (WebCore::HTMLToken::appendToName):
473 (WebCore::HTMLToken::forceQuirks):
474 (WebCore::HTMLToken::setForceQuirks):
475 (WebCore::HTMLToken::beginDOCTYPE):
476 (WebCore::HTMLToken::publicIdentifier):
477 (WebCore::HTMLToken::systemIdentifier):
478 (WebCore::HTMLToken::setPublicIdentifierToEmptyString):
479 (WebCore::HTMLToken::setSystemIdentifierToEmptyString):
480 (WebCore::HTMLToken::appendToPublicIdentifier):
481 (WebCore::HTMLToken::appendToSystemIdentifier):
482 (WebCore::HTMLToken::selfClosing):
483 (WebCore::HTMLToken::setSelfClosing):
484 (WebCore::HTMLToken::beginStartTag):
485 (WebCore::HTMLToken::beginEndTag):
486 (WebCore::HTMLToken::addNewAttribute):
487 (WebCore::HTMLToken::appendToAttributeName):
488 (WebCore::HTMLToken::appendToAttributeValue):
489 (WebCore::HTMLToken::attributes):
490 (WebCore::HTMLToken::eraseValueOfAttribute):
491 (WebCore::HTMLToken::ensureIsCharacterToken):
492 (WebCore::HTMLToken::characters):
493 (WebCore::HTMLToken::appendToCharacter):
494 (WebCore::HTMLToken::comment):
495 (WebCore::HTMLToken::beginComment):
496 (WebCore::HTMLToken::appendToComment):
497 (WebCore::HTMLToken::eraseCharacters):
499 * html/parser/HTMLTokenTypes.h: Removed.
500 * html/parser/HTMLTokenizer.cpp:
501 (WebCore::AtomicHTMLToken::usesName):
502 (WebCore::AtomicHTMLToken::usesAttributes):
503 (WebCore::HTMLTokenizer::flushBufferedEndTag):
504 (WebCore::HTMLTokenizer::nextToken):
505 * html/parser/HTMLTokenizer.h:
506 (WebCore::HTMLTokenizer::saveEndTagNameIfNeeded):
507 (WebCore::HTMLTokenizer::haveBufferedCharacterToken):
508 * html/parser/HTMLTreeBuilder.cpp:
509 (WebCore::HTMLTreeBuilder::processToken):
510 (WebCore::HTMLTreeBuilder::processDoctypeToken):
511 (WebCore::HTMLTreeBuilder::processFakeStartTag):
512 (WebCore::HTMLTreeBuilder::processFakeEndTag):
513 (WebCore::HTMLTreeBuilder::processFakePEndTagIfPInButtonScope):
514 (WebCore::HTMLTreeBuilder::processIsindexStartTagForInBody):
516 (WebCore::HTMLTreeBuilder::processStartTagForInBody):
517 (WebCore::HTMLTreeBuilder::processStartTagForInTable):
518 (WebCore::HTMLTreeBuilder::processStartTag):
519 (WebCore::HTMLTreeBuilder::processBodyEndTagForInBody):
520 (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
521 (WebCore::HTMLTreeBuilder::processEndTagForInTableBody):
522 (WebCore::HTMLTreeBuilder::processEndTagForInRow):
523 (WebCore::HTMLTreeBuilder::processEndTagForInCell):
524 (WebCore::HTMLTreeBuilder::processEndTagForInBody):
525 (WebCore::HTMLTreeBuilder::processEndTagForInTable):
526 (WebCore::HTMLTreeBuilder::processEndTag):
527 (WebCore::HTMLTreeBuilder::processComment):
528 (WebCore::HTMLTreeBuilder::processCharacter):
529 (WebCore::HTMLTreeBuilder::defaultForBeforeHTML):
530 (WebCore::HTMLTreeBuilder::defaultForBeforeHead):
531 (WebCore::HTMLTreeBuilder::defaultForInHead):
532 (WebCore::HTMLTreeBuilder::defaultForInHeadNoscript):
533 (WebCore::HTMLTreeBuilder::defaultForAfterHead):
534 (WebCore::HTMLTreeBuilder::processStartTagForInHead):
535 (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag):
536 (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag):
537 (WebCore::HTMLTreeBuilder::processScriptStartTag):
538 (WebCore::HTMLTreeBuilder::shouldProcessTokenInForeignContent):
539 (WebCore::HTMLTreeBuilder::processTokenInForeignContent):
540 * html/parser/HTMLViewSourceParser.cpp:
541 (WebCore::HTMLViewSourceParser::updateTokenizerState):
542 * html/parser/TextDocumentParser.cpp:
543 (WebCore::TextDocumentParser::insertFakePreElement):
544 * html/parser/XSSAuditor.cpp:
545 (WebCore::XSSAuditor::filterToken):
546 (WebCore::XSSAuditor::filterScriptToken):
547 (WebCore::XSSAuditor::filterObjectToken):
548 (WebCore::XSSAuditor::filterParamToken):
549 (WebCore::XSSAuditor::filterEmbedToken):
550 (WebCore::XSSAuditor::filterAppletToken):
551 (WebCore::XSSAuditor::filterIframeToken):
552 (WebCore::XSSAuditor::filterMetaToken):
553 (WebCore::XSSAuditor::filterBaseToken):
554 (WebCore::XSSAuditor::filterFormToken):
556 2013-02-12 Pablo Flouret <pablof@motorola.com>
558 Handle error recovery in @supports
559 https://bugs.webkit.org/show_bug.cgi?id=103934
561 Reviewed by Antti Koivisto.
563 Tests 021, 024, 031, and 033 in
564 http://hg.csswg.org/test/file/5f94e4b03ed9/contributors/opera/submitted/css3-conditional
565 fail because there's no explicit error recovery in @support's grammar.
566 Opera and Firefox pass the tests.
568 No new tests, modified css3/supports{,-cssom}.html
570 * css/CSSGrammar.y.in:
572 (WebCore::CSSParser::createSupportsRule):
573 (WebCore::CSSParser::markSupportsRuleHeaderEnd):
574 (WebCore::CSSParser::popSupportsRuleData):
577 2013-02-12 Eric Carlson <eric.carlson@apple.com>
579 [Mac] guard against NULL languages array
580 https://bugs.webkit.org/show_bug.cgi?id=109595
582 Reviewed by Dean Jackson.
584 No new tests, existing tests won't crash if this is correct.
586 * page/CaptionUserPreferencesMac.mm:
587 (WebCore::CaptionUserPreferencesMac::preferredLanguages):
589 2013-02-12 Emil A Eklund <eae@chromium.org>
591 TransformState::move should not round offset to int
592 https://bugs.webkit.org/show_bug.cgi?id=108266
594 Reviewed by Simon Fraser.
596 Currently TransformState::move rounds the offset to the nearest
597 integer values, this results in operations using TransformState
598 to compute a position to misreport the location, specifically
599 Element:getBoundingClientRect and repaint rects. Sizes are
600 handled correctly and do not have the same problem.
602 Tests: fast/sub-pixel/boundingclientrect-subpixel-margin.html
603 fast/sub-pixel/clip-rect-box-consistent-rounding.html
605 * page/FrameView.cpp:
606 (WebCore::FrameView::convertFromRenderer):
607 Change to use pixel snapping instead of enclosing box. All other
608 code paths use pixelSnappedIntRect to align the rects to device
609 pixels however this used enclosingIntRect (indirectly through
610 the FloatQuad::enclosingBoundingBox call).
611 Without the rounding in TransformState this causes repaint rects
612 for elements on subpixel bounds to be too large by up to one
613 pixel on each axis. For normal repaints this isn't really a
614 problem but in scrollContentsSlowPath it can result in moving
617 * platform/graphics/transforms/TransformState.cpp:
618 (WebCore::TransformState::translateTransform):
619 (WebCore::TransformState::translateMappedCoordinates):
620 Change to take a LayoutSize instead of an IntSize.
622 (WebCore::TransformState::move):
623 (WebCore::TransformState::applyAccumulatedOffset):
624 * platform/graphics/transforms/TransformState.h:
625 Remove rounding logic and use original, more precise, value.
627 * rendering/RenderGeometryMap.cpp:
628 (WebCore::RenderGeometryMap::mapToContainer):
629 Remove rounding logic and use original, more precise, value.
631 2013-02-12 Jessie Berlin <jberlin@apple.com>
633 Rollout r142618, it broke all the Mac builds.
635 * inspector/HeapGraphSerializer.cpp:
636 (WebCore::HeapGraphSerializer::HeapGraphSerializer):
637 (WebCore::HeapGraphSerializer::pushUpdate):
638 (WebCore::HeapGraphSerializer::reportNode):
639 (WebCore::HeapGraphSerializer::toNodeId):
640 (WebCore::HeapGraphSerializer::addRootNode):
641 * inspector/HeapGraphSerializer.h:
643 (HeapGraphSerializer):
644 * inspector/InspectorMemoryAgent.cpp:
645 (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
647 2013-02-12 Rafael Weinstein <rafaelw@chromium.org>
649 [HTMLTemplateElement] <template> inside of <head> may not create <body> if EOF is hit
650 https://bugs.webkit.org/show_bug.cgi?id=109338
652 Reviewed by Adam Barth.
654 This patch adds the logic to clear the stack of open elements back to the first <template> when EOF
655 is hit. This allows a <body> to be generated if the initial <template> was opened inside of <head>.
657 Tests added to html5lib.
659 * html/parser/HTMLTreeBuilder.cpp:
661 (WebCore::HTMLTreeBuilder::popAllTemplates):
662 (WebCore::HTMLTreeBuilder::processEndTag):
663 (WebCore::HTMLTreeBuilder::processEndOfFile):
664 * html/parser/HTMLTreeBuilder.h:
667 2013-02-12 Dominic Mazzoni <dmazzoni@google.com>
669 ASSERTION FAILED: i < size(), UNKNOWN in WebCore::AccessibilityMenuListPopup::didUpdateActiveOption
670 https://bugs.webkit.org/show_bug.cgi?id=109452
672 Reviewed by Chris Fleizach.
674 Send the accessibility childrenChanged notification in
675 HTMLSelectElement::setRecalcListItems instead of in childrenChanged
676 so that all possible codepaths are caught.
678 Test: accessibility/insert-selected-option-into-select-causes-crash.html
680 * html/HTMLSelectElement.cpp:
681 (WebCore::HTMLSelectElement::childrenChanged):
682 (WebCore::HTMLSelectElement::setRecalcListItems):
684 2013-02-12 Peter Rybin <prybin@chromium.org>
686 Web Inspector: for event listener provide handler function value in protocol and in UI
687 https://bugs.webkit.org/show_bug.cgi?id=109284
689 Reviewed by Yury Semikhatsky.
691 The feature implies that we include a real handler function value into event listener description.
692 Protocol description, inspector DOM agent (with V8 and JSC backends) and front-end is patched accordingly.
694 * bindings/js/ScriptEventListener.cpp:
695 (WebCore::eventListenerHandler):
697 (WebCore::eventListenerHandlerScriptState):
698 * bindings/js/ScriptEventListener.h:
700 * bindings/v8/ScriptEventListener.cpp:
701 (WebCore::eventListenerHandler):
703 (WebCore::eventListenerHandlerScriptState):
704 * bindings/v8/ScriptEventListener.h:
706 * inspector/Inspector.json:
707 * inspector/InspectorDOMAgent.cpp:
708 (WebCore::InspectorDOMAgent::getEventListenersForNode):
709 (WebCore::InspectorDOMAgent::buildObjectForEventListener):
710 * inspector/InspectorDOMAgent.h:
712 * inspector/front-end/DOMAgent.js:
713 (WebInspector.DOMNode.prototype.eventListeners):
714 * inspector/front-end/EventListenersSidebarPane.js:
715 (WebInspector.EventListenersSidebarPane.prototype.update):
718 2013-02-12 Yury Semikhatsky <yurys@chromium.org>
720 Web Inspector: add initial implementation of native memory graph to Timeline
721 https://bugs.webkit.org/show_bug.cgi?id=109578
723 Reviewed by Alexander Pavlov.
725 This change adds inital implementation of native memory graph UI. The graph
726 will be shown in the same place as DOM counters graph on the Timeline panel.
728 Added NativeMemoryGraph.js that reuses parts of DOM counters graph
729 implementation. MemoryStatistics.js was refactor to allow sharing
730 more code between DOM counters and native memory graph.
733 * WebCore.vcproj/WebCore.vcproj:
734 * inspector/compile-front-end.py:
735 * inspector/front-end/MemoryStatistics.js:
736 (WebInspector.MemoryStatistics):
737 (WebInspector.MemoryStatistics.prototype._createCurrentValuesBar):
738 (WebInspector.MemoryStatistics.prototype._createCounterUIList):
739 (WebInspector.MemoryStatistics.prototype._createCounterUIList.getNodeCount):
740 (WebInspector.MemoryStatistics.prototype._createCounterUIList.getListenerCount):
741 (WebInspector.MemoryStatistics.prototype._canvasHeight):
742 (WebInspector.MemoryStatistics.prototype._updateSize):
743 (WebInspector.MemoryStatistics.prototype._highlightCurrentPositionOnGraphs):
744 (WebInspector.MemoryStatistics.prototype._drawMarker):
745 * inspector/front-end/NativeMemoryGraph.js: Added.
746 (WebInspector.NativeMemoryGraph):
747 (WebInspector.NativeMemoryCounterUI):
748 (WebInspector.NativeMemoryCounterUI.prototype._hslToString):
749 (WebInspector.NativeMemoryCounterUI.prototype.updateCurrentValue):
750 (WebInspector.NativeMemoryCounterUI.prototype.clearCurrentValueAndMarker):
751 (WebInspector.NativeMemoryGraph.prototype._createCurrentValuesBar):
752 (WebInspector.NativeMemoryGraph.prototype._createCounterUIList.getCounterValue):
753 (WebInspector.NativeMemoryGraph.prototype._createCounterUIList):
754 (WebInspector.NativeMemoryGraph.prototype._canvasHeight):
755 (WebInspector.NativeMemoryGraph.prototype._onRecordAdded.addStatistics):
756 (WebInspector.NativeMemoryGraph.prototype._onRecordAdded):
757 (WebInspector.NativeMemoryGraph.prototype._draw):
758 (WebInspector.NativeMemoryGraph.prototype._clearCurrentValueAndMarker):
759 (WebInspector.NativeMemoryGraph.prototype._updateCurrentValue):
760 (WebInspector.NativeMemoryGraph.prototype._restoreImageUnderMarker):
761 (WebInspector.NativeMemoryGraph.prototype._saveImageUnderMarker):
762 (WebInspector.NativeMemoryGraph.prototype._drawMarker):
763 (WebInspector.NativeMemoryGraph.prototype._maxCounterValue):
764 (WebInspector.NativeMemoryGraph.prototype._resetTotalValues):
765 (WebInspector.NativeMemoryGraph.prototype.valueGetter):
766 (WebInspector.NativeMemoryGraph.prototype._drawGraph):
767 (WebInspector.NativeMemoryGraph.prototype._discardImageUnderMarker):
768 * inspector/front-end/TimelinePanel.js:
769 * inspector/front-end/WebKit.qrc:
770 * inspector/front-end/timelinePanel.css:
771 (#memory-graphs-canvas-container.dom-counters .resources-dividers):
772 (.memory-category-value):
774 2013-02-12 Andrey Lushnikov <lushnikov@chromium.org>
776 Web Inspector: refactor some reusable functionality from BraceHighlighter
777 https://bugs.webkit.org/show_bug.cgi?id=109574
779 Reviewed by Pavel Feldman.
781 New test: inspector/editor/text-editor-brace-highlighter.html
783 Extract functionality which, for given line and cursor position, will
784 return position for a brace that should be highlighted. Add a layout
785 test to verify brace highlighter funcionality.
787 * inspector/front-end/DefaultTextEditor.js:
788 (WebInspector.TextEditorMainPanel.BraceHighlightController.prototype.activeBraceColumnForCursorPosition):
789 (WebInspector.TextEditorMainPanel.BraceHighlightController.prototype.handleSelectionChange):
790 * inspector/front-end/TextUtils.js:
791 (WebInspector.TextUtils.isOpeningBraceChar):
792 (WebInspector.TextUtils.isClosingBraceChar):
793 (WebInspector.TextUtils.isBraceChar):
795 2013-02-12 Ilya Tikhonovsky <loislo@chromium.org>
797 Web Inspector: Native Memory Instrumentation: reportLeaf method doesn't report the leaf node properly.
798 https://bugs.webkit.org/show_bug.cgi?id=109554
800 In some cases leaves have no pointer so with the old schema we can't generate nodeId for them because we
801 can't insert 0 into hashmap. It happens when we call addPrivateBuffer method.
803 Drive by fix: I introduced a client interface for the HeapGraphSerializer.
804 It helps me to do the tests for the serializer.
806 Reviewed by Yury Semikhatsky.
808 It is covered by newly added tests in TestWebKitAPI.
810 * inspector/HeapGraphSerializer.cpp:
811 (WebCore::HeapGraphSerializer::HeapGraphSerializer):
812 (WebCore::HeapGraphSerializer::pushUpdate):
813 (WebCore::HeapGraphSerializer::reportNode):
814 (WebCore::HeapGraphSerializer::toNodeId):
815 (WebCore::HeapGraphSerializer::addRootNode):
816 * inspector/HeapGraphSerializer.h:
817 (HeapGraphSerializerClient):
818 (WebCore::HeapGraphSerializerClient::~HeapGraphSerializerClient):
819 (HeapGraphSerializer):
820 * inspector/InspectorMemoryAgent.cpp:
821 (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
823 2013-02-12 Vsevolod Vlasov <vsevik@chromium.org>
825 Web Inspector: Introduce version controller to migrate settings versions.
826 https://bugs.webkit.org/show_bug.cgi?id=109553
828 Reviewed by Yury Semikhatsky.
830 This patch introduces version controller that could be used to migrate inspector settings.
832 Test: inspector/version-controller.html
834 * inspector/front-end/Settings.js:
835 (WebInspector.Settings):
836 (WebInspector.VersionController):
837 (WebInspector.VersionController.prototype.set _methodsToRunToUpdateVersion):
838 (WebInspector.VersionController.prototype._updateVersionFrom0To1):
839 * inspector/front-end/inspector.js:
841 2013-02-12 Vsevolod Vlasov <vsevik@chromium.org>
843 Web Inspector: File system should produce more verbose error messages and recover from errors
844 https://bugs.webkit.org/show_bug.cgi?id=109571
846 Reviewed by Alexander Pavlov.
848 Error handler prints original file system call params now.
849 Added callbacks to error handler to recover from errors.
851 * inspector/front-end/FileSystemProjectDelegate.js:
852 (WebInspector.FileSystemProjectDelegate.prototype.contentCallback):
853 (WebInspector.FileSystemProjectDelegate.prototype.searchInFileContent):
854 (WebInspector.FileSystemUtils.errorMessage):
858 (WebInspector.FileSystemUtils.requestFileContent):
859 (WebInspector.FileSystemUtils.setFileContent):
860 (WebInspector.FileSystemUtils._readDirectory):
862 (WebInspector.FileSystemUtils._requestEntries):
864 2013-02-12 Vsevolod Vlasov <vsevik@chromium.org>
866 Web Inspector: Get rid of unnecessary complexity in FileSystemUtil: remove _getDirectory() method.
867 https://bugs.webkit.org/show_bug.cgi?id=109567
869 Reviewed by Alexander Pavlov.
871 The code in this method was redundant as the same result could be achieved by using File System API directly.
873 * inspector/front-end/FileSystemProjectDelegate.js:
875 2013-02-12 Alexander Pavlov <apavlov@chromium.org>
877 Web Inspector: [SuggestBox] SuggestBox not hidden when prefix is empty and there is preceding input
878 https://bugs.webkit.org/show_bug.cgi?id=109568
880 Reviewed by Vsevolod Vlasov.
882 The suggestbox would get hidden in the case of empty input, yet it should get hidden
883 in the case of empty user-entered prefix (which is a wider notion.)
885 * inspector/front-end/TextPrompt.js:
886 (WebInspector.TextPrompt.prototype.complete):
888 2013-02-12 Andrey Lushnikov <lushnikov@chromium.org>
890 Web Inspector: separate SuggestBox from TextPrompt
891 https://bugs.webkit.org/show_bug.cgi?id=109430
893 Reviewed by Alexander Pavlov.
895 Create WebInspector.SuggestBoxDelegate interface and
896 refactor TextPrompt to use this interface. Separate SuggestBox into
897 WebInspector.SuggestBox namespace and put it into its own file.
899 No new tests: no change in behaviour.
902 * WebCore.vcproj/WebCore.vcproj:
903 * inspector/compile-front-end.py:
904 * inspector/front-end/SuggestBox.js: Added.
905 (WebInspector.SuggestBoxDelegate):
906 (WebInspector.SuggestBoxDelegate.prototype.applySuggestion):
907 (WebInspector.SuggestBoxDelegate.prototype.acceptSuggestion):
908 (WebInspector.SuggestBoxDelegate.prototype.userEnteredText):
909 (WebInspector.SuggestBox):
910 (WebInspector.SuggestBox.prototype.get visible):
911 (WebInspector.SuggestBox.prototype.get hasSelection):
912 (WebInspector.SuggestBox.prototype._onscrollresize):
913 (WebInspector.SuggestBox.prototype._updateBoxPositionWithExistingAnchor):
914 (WebInspector.SuggestBox.prototype._updateBoxPosition):
915 (WebInspector.SuggestBox.prototype._onboxmousedown):
916 (WebInspector.SuggestBox.prototype.hide):
917 (WebInspector.SuggestBox.prototype.removeFromElement):
918 (WebInspector.SuggestBox.prototype._applySuggestion):
919 (WebInspector.SuggestBox.prototype.acceptSuggestion):
920 (WebInspector.SuggestBox.prototype._selectClosest):
921 (WebInspector.SuggestBox.prototype.updateSuggestions):
922 (WebInspector.SuggestBox.prototype._onItemMouseDown):
923 (WebInspector.SuggestBox.prototype._createItemElement):
924 (WebInspector.SuggestBox.prototype._updateItems):
925 (WebInspector.SuggestBox.prototype._selectItem):
926 (WebInspector.SuggestBox.prototype._canShowBox):
927 (WebInspector.SuggestBox.prototype._rememberRowCountPerViewport):
928 (WebInspector.SuggestBox.prototype._completionsReady):
929 (WebInspector.SuggestBox.prototype.upKeyPressed):
930 (WebInspector.SuggestBox.prototype.downKeyPressed):
931 (WebInspector.SuggestBox.prototype.pageUpKeyPressed):
932 (WebInspector.SuggestBox.prototype.pageDownKeyPressed):
933 (WebInspector.SuggestBox.prototype.enterKeyPressed):
934 (WebInspector.SuggestBox.prototype.tabKeyPressed):
935 * inspector/front-end/TextPrompt.js:
936 (WebInspector.TextPrompt.prototype.userEnteredText):
937 (WebInspector.TextPrompt.prototype._attachInternal):
938 (WebInspector.TextPrompt.prototype._completionsReady):
939 (WebInspector.TextPrompt.prototype.applySuggestion):
940 (WebInspector.TextPrompt.prototype._applySuggestion):
941 (WebInspector.TextPrompt.prototype.enterKeyPressed):
942 (WebInspector.TextPrompt.prototype.upKeyPressed):
943 (WebInspector.TextPrompt.prototype.downKeyPressed):
944 (WebInspector.TextPrompt.prototype.pageUpKeyPressed):
945 (WebInspector.TextPrompt.prototype.pageDownKeyPressed):
946 * inspector/front-end/WebKit.qrc:
947 * inspector/front-end/inspector.html:
949 2013-02-12 Bruno de Oliveira Abinader <bruno.abinader@basyskom.com>
951 [TexMap] Apply frames-per-second debug counter to WK1.
952 https://bugs.webkit.org/show_bug.cgi?id=109540
954 Reviewed by Noam Rosenthal.
956 Adds basysKom copyright info to TextureMapperFPSCounter header.
958 * platform/graphics/texmap/TextureMapperFPSCounter.cpp:
959 * platform/graphics/texmap/TextureMapperFPSCounter.h:
961 2013-02-12 Sheriff Bot <webkit.review.bot@gmail.com>
963 Unreviewed, rolling out r142531.
964 http://trac.webkit.org/changeset/142531
965 https://bugs.webkit.org/show_bug.cgi?id=109569
967 Causes html5lib/run-template layout test to crash. (Requested
968 by atwilson_ on #webkit).
970 * html/parser/HTMLTreeBuilder.cpp:
971 (WebCore::HTMLTreeBuilder::processTemplateEndTag):
972 (WebCore::HTMLTreeBuilder::processColgroupEndTagForInColumnGroup):
973 (WebCore::HTMLTreeBuilder::processEndOfFile):
974 * html/parser/HTMLTreeBuilder.h:
977 2013-02-12 Zan Dobersek <zdobersek@igalia.com>
979 [GTK] Enable CSS image-set support in development builds
980 https://bugs.webkit.org/show_bug.cgi?id=109475
982 Reviewed by Martin Robinson.
984 No new tests - majority of the related tests now passes.
986 * GNUmakefile.features.am.in: Add the feature define for the CSS image-set feature
987 with the define value defaulting to 0. The value gets overridden with 1 in development
988 builds, meaning the feature is enabled under that configuration.
990 2013-02-12 Zan Dobersek <zdobersek@igalia.com>
992 [GTK] Enable DOM4 events constructors in development builds
993 https://bugs.webkit.org/show_bug.cgi?id=109471
995 Reviewed by Martin Robinson.
997 No new tests - the related tests now pass.
999 * GNUmakefile.features.am.in: Add the feature define for the DOM4 events
1000 constructors feature, its value defaulting to 0. This value is overridden
1001 with 1 in development builds, effectively enabling the feature.
1003 2013-02-12 Zan Dobersek <zdobersek@igalia.com>
1005 Unreviewed build fix for the GTK port after r142595.
1006 Adding the TextureMapperFPSCounter files to the list of build targets
1007 in case of using the OpenGL texture mapper.
1009 * GNUmakefile.list.am:
1011 2013-02-12 Andrey Kosyakov <caseq@chromium.org>
1013 Web Inspector: fix closure compiler warnings in extension server and API
1014 https://bugs.webkit.org/show_bug.cgi?id=109563
1016 Reviewed by Vsevolod Vlasov.
1018 * inspector/front-end/ExtensionAPI.js: drive-by: make sure we fail if extensionServer is not defined in outer scope.
1019 * inspector/front-end/ExtensionServer.js:
1020 (WebInspector.ExtensionServer.prototype.):
1021 (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
1022 * inspector/front-end/externs.js: add extensionServer
1024 2013-02-12 Zoltan Arvai <zarvai@inf.u-szeged.hu>
1026 Unreviewed. Fix !ENABLE(INSPECTOR) builds after r142575
1028 * inspector/InspectorInstrumentation.h:
1029 (WebCore::InspectorInstrumentation::willDispatchEvent):
1031 2013-02-12 Andrey Lushnikov <lushnikov@chromium.org>
1033 Web Inspector: move showWhitespace option into experiments
1034 https://bugs.webkit.org/show_bug.cgi?id=109552
1036 Reviewed by Vsevolod Vlasov.
1038 Remove "show whitespace" setting and add it to experiments.
1040 No new tests: fixed an existing test to verify changes.
1042 * English.lproj/localizedStrings.js:
1043 * inspector/front-end/DefaultTextEditor.js:
1044 (WebInspector.TextEditorMainPanel):
1045 (WebInspector.TextEditorMainPanel.prototype.wasShown):
1046 (WebInspector.TextEditorMainPanel.prototype.willHide):
1047 * inspector/front-end/Settings.js:
1048 (WebInspector.ExperimentsSettings):
1049 * inspector/front-end/SettingsScreen.js:
1050 (WebInspector.GenericSettingsTab):
1052 2013-02-12 Tamas Czene <tczene@inf.u-szeged.hu>
1054 Add error checking into OpenCL version of SVG filters.
1055 https://bugs.webkit.org/show_bug.cgi?id=107444
1057 Reviewed by Zoltan Herczeg.
1059 In case of an error the program runs through all the remaining filters by doing nothing.
1060 After that deletes the results of every filter and starts software rendering.
1062 * platform/graphics/filters/FilterEffect.cpp:
1064 (WebCore::FilterEffect::applyAll): At software rendering this is a simple inline methode, but at OpenCL rendering it releases OpenCL things. If we have an error remove filter's results and start software rendering.
1065 (WebCore::FilterEffect::clearResultsRecursive):
1066 (WebCore::FilterEffect::openCLImageToImageBuffer):
1067 (WebCore::FilterEffect::createOpenCLImageResult):
1068 (WebCore::FilterEffect::transformResultColorSpace):
1069 * platform/graphics/filters/FilterEffect.h:
1071 (WebCore::FilterEffect::applyAll):
1072 * platform/graphics/gpu/opencl/FilterContextOpenCL.cpp:
1073 (WebCore::FilterContextOpenCL::isFailed):
1075 (WebCore::FilterContextOpenCL::freeResources):
1076 (WebCore::FilterContextOpenCL::destroyContext):
1077 (WebCore::FilterContextOpenCL::compileTransformColorSpaceProgram):
1078 (WebCore::FilterContextOpenCL::openCLTransformColorSpace):
1079 (WebCore::FilterContextOpenCL::compileProgram):
1080 (WebCore::FilterContextOpenCL::freeResource):
1081 * platform/graphics/gpu/opencl/FilterContextOpenCL.h:
1082 (WebCore::FilterContextOpenCL::FilterContextOpenCL):
1083 (WebCore::FilterContextOpenCL::setInError):
1084 (WebCore::FilterContextOpenCL::inError):
1085 (FilterContextOpenCL):
1086 (WebCore::FilterContextOpenCL::RunKernel::RunKernel):
1087 (WebCore::FilterContextOpenCL::RunKernel::addArgument):
1088 (WebCore::FilterContextOpenCL::RunKernel::run):
1090 * platform/graphics/gpu/opencl/OpenCLFEColorMatrix.cpp:
1091 (WebCore::FilterContextOpenCL::compileFEColorMatrix):
1092 (WebCore::FEColorMatrix::platformApplyOpenCL):
1093 * platform/graphics/gpu/opencl/OpenCLFETurbulence.cpp:
1094 (WebCore::FilterContextOpenCL::compileFETurbulence):
1095 (WebCore::FETurbulence::platformApplyOpenCL):
1096 * rendering/svg/RenderSVGResourceFilter.cpp:
1097 (WebCore::RenderSVGResourceFilter::postApplyResource):
1099 2013-02-12 Huang Dongsung <luxtella@company100.net>
1101 [TexMap] Apply frames-per-second debug counter to WK1.
1102 https://bugs.webkit.org/show_bug.cgi?id=109540
1104 Reviewed by Noam Rosenthal.
1106 r142524 implemented frames-per-second debug counter on WK2. This patch
1107 applies frames-per-second debug counter to WK1 also.
1109 Visual debugging feature, no need for new tests.
1112 * GNUmakefile.list.am:
1114 * platform/graphics/texmap/TextureMapper.h:
1115 * platform/graphics/texmap/TextureMapperFPSCounter.cpp: Added.
1117 (WebCore::TextureMapperFPSCounter::TextureMapperFPSCounter):
1118 (WebCore::TextureMapperFPSCounter::updateFPSAndDisplay):
1119 * platform/graphics/texmap/TextureMapperFPSCounter.h: Added.
1121 (TextureMapperFPSCounter):
1122 * platform/graphics/texmap/TextureMapperGL.cpp:
1124 (WebCore::TextureMapperGL::drawNumber):
1125 Rename from drawRepaintCounter to drawNumber.
1126 * platform/graphics/texmap/TextureMapperGL.h:
1127 * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
1128 (WebCore::TextureMapperImageBuffer::drawNumber):
1129 * platform/graphics/texmap/TextureMapperImageBuffer.h:
1130 (TextureMapperImageBuffer):
1131 * platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
1132 (WebCore::TextureMapperTiledBackingStore::drawRepaintCounter):
1133 * platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
1134 (WebCore::CoordinatedBackingStore::drawRepaintCounter):
1135 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1136 Move frames-per-second debug counter code to TextureMapperFPSCounter.
1137 (WebCore::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
1138 (WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
1139 (WebCore::CoordinatedGraphicsScene::paintToGraphicsContext):
1140 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
1142 2013-02-11 Yury Semikhatsky <yurys@chromium.org>
1144 Web Inspector: stack trace is cut at native bind if inspector is closed
1145 https://bugs.webkit.org/show_bug.cgi?id=109427
1147 Reviewed by Pavel Feldman.
1149 Only top frame is collected instead of full stack trace when inspector
1150 front-end is closed to avoid expensive operations when exceptions are
1153 Test: http/tests/inspector-enabled/console-exception-while-no-inspector.html
1155 * inspector/InspectorConsoleAgent.cpp:
1156 (WebCore::InspectorConsoleAgent::addMessageToConsole):
1158 2013-02-12 Kent Tamura <tkent@chromium.org>
1160 INPUT_MULTIPLE_FIELDS_UI: Mouse click not on sub-fields in multiple fields input should not move focus
1161 https://bugs.webkit.org/show_bug.cgi?id=109544
1163 Reviewed by Kentaro Hara.
1165 This is similar to Bug 108914, "Should not move focus if the element
1166 already has focus." We fixed a focus() case in Bug 108914. However we
1167 still have the problem in a case of focusing by mouse click.
1169 The fix for Bug 108914 intercepted focus() function to change the
1170 behavior. However focus-by-click doesn't call focus(), but calls
1171 FocusController::setFocusedNode. To fix this problem, we introduce
1172 oldFocusedNode argument to handleFocusEvent, and
1173 BaseMultipleFieldsDateAndTimeInputType::handleFocusEvent restores the
1174 focus to oldFocusedNode if oldFocusedNode is one of sub-fields.
1175 handleFocusEvent is called whenever the focused node is changed.
1177 We don't need InputType::willCancelFocus any more because the new code
1178 in handleFocusEvent covers it.
1180 Tests: Update fast/forms/time-multiple-fields/time-multiple-fields-focus.html.
1182 * html/HTMLTextFormControlElement.h:
1183 (WebCore::HTMLTextFormControlElement::handleFocusEvent):
1184 Add oldFocusedNode argument.
1185 * html/HTMLTextFormControlElement.cpp:
1186 (WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
1187 Pass oldFocusedNode to handleFocusEvent.
1189 * html/HTMLInputElement.h:
1191 - Add oldFocusedNode argument to handleFocusEvent.
1192 - Remove focus() override.
1193 * html/HTMLInputElement.cpp: Remove focus() override.
1194 (WebCore::HTMLInputElement::handleFocusEvent):
1195 Pass oldFocusedNode to InputType::handleFocusEvent.
1196 * html/InputType.cpp: Remove willCancelFocus.
1197 (WebCore::InputType::handleFocusEvent):
1198 Add oldFocusedNode argument.
1201 * html/PasswordInputType.cpp:
1202 (WebCore::PasswordInputType::handleFocusEvent): Ditto.
1203 * html/PasswordInputType.h:
1204 (PasswordInputType): Ditto.
1206 * html/BaseMultipleFieldsDateAndTimeInputType.h:
1207 (BaseMultipleFieldsDateAndTimeInputType):
1208 Remove willCancelFocus, and add oldFocusedNode argument to handleFocusEvent.
1209 * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
1210 (WebCore::BaseMultipleFieldsDateAndTimeInputType::handleFocusEvent):
1211 Pass oldFocusedNode to DateTimeEditElement::focusByOwner if the
1212 direction is FocusDirectionNone.
1214 * html/shadow/DateTimeEditElement.h:
1215 (DateTimeEditElement): Add oldFocusedNode argument to focusByOwner.
1216 * html/shadow/DateTimeEditElement.cpp:
1217 (WebCore::DateTimeEditElement::focusByOwner):
1218 If oldFocusedNode is one of sub-fields, focus on it again.
1220 2013-02-12 Takashi Sakamoto <tasak@google.com>
1222 [Refactoring] Make m_selectorChecker in StyleResolver an on-stack object.
1223 https://bugs.webkit.org/show_bug.cgi?id=108595
1225 Reviewed by Eric Seidel.
1227 StyleResolver uses SelectorChecker's mode to change its resolving mode.
1228 However it is a state of StyleResolver. StyleResolver should have the
1229 mode and make SelectorChecker instance on a stack while required.
1231 No new tests, just refactoring.
1233 * css/SelectorChecker.cpp:
1234 (WebCore::SelectorChecker::fastCheckRightmostSelector):
1235 (WebCore::SelectorChecker::fastCheck):
1236 (WebCore::SelectorChecker::commonPseudoClassSelectorMatches):
1237 (WebCore::SelectorChecker::matchesFocusPseudoClass):
1238 Changed to static class function, because these methods never use
1241 * css/SelectorChecker.h:
1243 * css/StyleResolver.cpp:
1244 (WebCore::StyleResolver::StyleResolver):
1245 (WebCore::StyleResolver::collectMatchingRules):
1246 Now, matchesFocusPseudoClass is not a static method of
1247 SelectorChecker, so replaced "m_selectorChecker." with
1248 "SelectorChecker::".
1249 (WebCore::StyleResolver::sortAndTransferMatchedRules):
1250 (WebCore::StyleResolver::collectMatchingRulesForList):
1251 (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
1252 (WebCore::StyleResolver::matchUARules):
1253 (WebCore::StyleResolver::adjustRenderStyle):
1254 (WebCore::StyleResolver::pseudoStyleRulesForElement):
1255 Use m_mode instead of m_selectorChecker.mode().
1256 Also use document()->inQuirksMode() instead of
1257 m_selectoChecker.strictParsing().
1258 (WebCore::StyleResolver::ruleMatches):
1259 (WebCore::StyleResolver::checkRegionSelector):
1260 Created an on-stack SelectorChecker object and used it to check
1262 * css/StyleResolver.h:
1263 (WebCore::StyleResolver::State::State):
1264 Added m_mode, this keeps m_selectorChecker's mode.
1267 Removed m_selectorChecker.
1269 2013-02-11 Viatcheslav Ostapenko <sl.ostapenko@samsung.com>
1271 [Qt][EFL][WebGL] Minor refactoring of GraphicsSurface/GraphicsSurfaceGLX
1272 https://bugs.webkit.org/show_bug.cgi?id=108686
1274 Reviewed by Noam Rosenthal.
1276 Remove unused platformSurface()/m_platformSurface from GraphicsSurface.
1277 Move m_texture from GraphicsSurface to GLX GraphicsSurfacePrivate to match
1278 Win and Mac implementations.
1280 No new tests, refactoring only.
1282 * platform/graphics/surfaces/GraphicsSurface.cpp:
1283 (WebCore::GraphicsSurface::GraphicsSurface):
1284 * platform/graphics/surfaces/GraphicsSurface.h:
1286 * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
1287 (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
1288 (WebCore::GraphicsSurfacePrivate::swapBuffers):
1289 (WebCore::GraphicsSurfacePrivate::surface):
1290 (GraphicsSurfacePrivate):
1291 (WebCore::GraphicsSurfacePrivate::textureID):
1292 (WebCore::GraphicsSurfacePrivate::clear):
1293 (WebCore::GraphicsSurface::platformExport):
1294 (WebCore::GraphicsSurface::platformGetTextureID):
1295 (WebCore::GraphicsSurface::platformSwapBuffers):
1296 (WebCore::GraphicsSurface::platformCreate):
1297 (WebCore::GraphicsSurface::platformImport):
1298 (WebCore::GraphicsSurface::platformDestroy):
1300 2013-02-11 Viatcheslav Ostapenko <sl.ostapenko@samsung.com>
1302 [EFL][WebGL] WebGL content is not painted after resizing the viewport.
1303 https://bugs.webkit.org/show_bug.cgi?id=106358
1305 Reviewed by Noam Rosenthal.
1307 When page size changes and layer parameters get updated LayerTreeRenderer::setLayerState
1308 clears the layer backing store and detaches the canvas surface from the layer. If the layer
1309 size is not changed then the canvas is not recreated. This leaves the canvas detached from
1310 the layer, but still referenced from m_surfaceBackingStores.
1311 Don't assign layer backing store to layer in assignImageBackingToLayer if there is a canvas
1312 surface already attached to the layer.
1314 Test: fast/canvas/webgl/webgl-layer-update.html
1316 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1317 (WebCore::CoordinatedGraphicsScene::setLayerState):
1318 (WebCore::CoordinatedGraphicsScene::assignImageBackingToLayer):
1319 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
1321 2013-02-11 Eric Carlson <eric.carlson@apple.com>
1323 [Mac] Track language selection should be sticky
1324 https://bugs.webkit.org/show_bug.cgi?id=109466
1326 Reviewed by Dean Jackson.
1328 Choosing a text track from the caption menu should make that track's language the
1329 preferred caption language. Turning captions off from the menu should disable captions
1330 in videos loaded subsequently.
1332 OS X has system support for these settings, so changes made by DRT should not change the
1333 settings on the user's system. Add support for all other ports in DRT only.
1335 Test: media/track/track-user-preferences.html
1337 * WebCore.exp.in: Export PageGroup::captionPreferences().
1339 * html/HTMLMediaElement.cpp:
1340 (WebCore::HTMLMediaElement::HTMLMediaElement): Use page()->group().captionPreferences().
1341 (WebCore::HTMLMediaElement::attach): Ditto.
1342 (WebCore::HTMLMediaElement::detach): Ditto.
1343 (WebCore::HTMLMediaElement::userPrefersCaptions): Ditto.
1344 (WebCore::HTMLMediaElement::configureTextTrackGroup): Ditto. Update for
1345 preferredLanguageFromList change.
1346 (WebCore::HTMLMediaElement::toggleTrackAtIndex): Set user prefs for captions visible and
1347 caption language as appropriate.
1349 * html/shadow/MediaControlElements.cpp:
1350 (WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler): Remove unneeded comment.
1351 (WebCore::MediaControlTextTrackContainerElement::updateSizes): Use page()->group().captionPreferences().
1353 * html/shadow/MediaControlsApple.cpp:
1354 (WebCore::MediaControlsApple::closedCaptionTracksChanged): Update caption menu button visibility.
1356 * page/CaptionUserPreferences.h:
1357 (WebCore::CaptionUserPreferences::userPrefersCaptions): Support "testing" mode.
1358 (WebCore::CaptionUserPreferences::setUserPrefersCaptions): Ditto.
1359 (WebCore::CaptionUserPreferences::registerForPreferencesChangedCallbacks): Ditto.
1360 (WebCore::CaptionUserPreferences::unregisterForPreferencesChangedCallbacks): Ditto.
1361 (WebCore::CaptionUserPreferences::setPreferredLanguage): Ditto.
1362 (WebCore::CaptionUserPreferences::preferredLanguages): Ditto.
1363 (WebCore::CaptionUserPreferences::testingMode): Ditto.
1364 (WebCore::CaptionUserPreferences::setTestingMode): Ditto.
1365 (WebCore::CaptionUserPreferences::CaptionUserPreferences): Ditto.
1367 * page/CaptionUserPreferencesMac.h:
1368 * page/CaptionUserPreferencesMac.mm:
1369 (WebCore::CaptionUserPreferencesMac::userPrefersCaptions): Support "testing" mode.
1370 (WebCore::CaptionUserPreferencesMac::setUserPrefersCaptions): Ditto.
1371 (WebCore::CaptionUserPreferencesMac::userHasCaptionPreferences): Ditto.
1372 (WebCore::CaptionUserPreferencesMac::registerForPreferencesChangedCallbacks): Change name from
1373 registerForCaptionPreferencesChangedCallbacks. Support "testing" mode.
1374 (WebCore::CaptionUserPreferencesMac::unregisterForPreferencesChangedCallbacks): Change name from
1375 unregisterForCaptionPreferencesChangedCallbacks. Support "testing" mode.
1376 (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Support "testing" mode.
1377 (WebCore::CaptionUserPreferencesMac::captionFontSizeScale): Ditto.
1378 (WebCore::CaptionUserPreferencesMac::setPreferredLanguage): Ditto.
1379 (WebCore::CaptionUserPreferencesMac::preferredLanguages): Ditto. Return the platform override when set.
1381 * page/PageGroup.cpp:
1382 (WebCore::PageGroup::registerForCaptionPreferencesChangedCallbacks): Remove because it is already
1383 available from the caption preference object.
1384 (WebCore::PageGroup::unregisterForCaptionPreferencesChangedCallbacks): Ditto.
1385 (WebCore::PageGroup::userPrefersCaptions): Ditto.
1386 (WebCore::PageGroup::userHasCaptionPreferences): Ditto.
1387 (WebCore::PageGroup::captionFontSizeScale): Ditto.
1390 * platform/Language.cpp:
1391 (WebCore::preferredLanguageFromList): Take the list of preferred languages instead of assuming
1393 * platform/Language.h:
1395 * testing/Internals.cpp:
1396 (WebCore::Internals::resetToConsistentState): Disable caption testing mode.
1397 (WebCore::Internals::Internals): Enable caption testing mode so the user's system
1398 preferences are not modified.
1400 2013-02-11 Huang Dongsung <luxtella@company100.net>
1402 Coordinated Graphics: Make CoordinatedGraphicsScene not know contents size.
1403 https://bugs.webkit.org/show_bug.cgi?id=108922
1405 Reviewed by Noam Rosenthal.
1407 Currently, CoordinatedGraphicsScene has two methods to know contents
1408 size: setContentsSize() and setVisibleContentsRect(). Contents size is
1409 used when adjusting a scroll position, but adjustment is not needed
1410 because EFL and Qt platform code (currently PageViewportController)
1411 already adjusts a scroll position, and it is natural for each platform
1412 to be in charge of adjusting. So this patch makes CoordinatedGraphicsScene
1413 not know contents size.
1415 In addition, now DrawingAreaProxy::coordinatedLayerTreeHostProxy() is only used
1416 to get CoordinatedGraphicsScene.
1418 This patch can only be tested manually since there is no automated
1419 testing facilities for in-motion touch.
1420 Test: ManualTests/fixed-position.html
1421 ManualTests/nested-fixed-position.html
1423 * platform/graphics/texmap/TextureMapperLayer.cpp:
1424 (WebCore::TextureMapperLayer::setScrollPositionDeltaIfNeeded):
1425 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1426 (WebCore::CoordinatedGraphicsScene::setScrollPosition):
1427 (WebCore::CoordinatedGraphicsScene::adjustPositionForFixedLayers):
1428 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
1429 (CoordinatedGraphicsScene):
1431 2013-02-11 Huang Dongsung <luxtella@company100.net>
1433 Coordinated Graphics: remove the DidChangeScrollPosition message.
1434 https://bugs.webkit.org/show_bug.cgi?id=108051
1436 Reviewed by Noam Rosenthal.
1437 Signed off for WebKit2 by Benjamin Poulain.
1439 Currently, we use the DidChangeScrollPosition message to send the scroll
1440 position that WebCore used in this frame to UI Process. We had to have
1441 some member variables for the DidChangeScrollPosition message.
1442 However, we can send a scroll position via the DidRenderFrame message,
1443 because CoordinatedGraphicsScene::m_renderedContentsScrollPosition is
1444 updated at the moment of flushing. So we can remove the
1445 DidChangeScrollPosition message and some redundant member variables.
1447 No tests. No change in behavior.
1449 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1450 (WebCore::CoordinatedGraphicsScene::flushLayerChanges):
1451 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
1452 (CoordinatedGraphicsScene):
1454 2013-02-11 Ryosuke Niwa <rniwa@webkit.org>
1456 Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface
1457 https://bugs.webkit.org/show_bug.cgi?id=109534
1459 Reviewed by Anders Carlsson.
1461 * editing/DeleteButtonController.cpp:
1462 (WebCore::DeleteButtonController::show):
1463 * editing/Editor.cpp:
1467 * loader/EmptyClients.h:
1468 (WebCore::EmptyEditorClient::shouldDeleteRange):
1469 (EmptyEditorClient):
1470 (WebCore::EmptyEditorClient::shouldShowDeleteInterface):
1471 * page/EditorClient.h:
1474 2013-02-11 Hayato Ito <hayato@chromium.org>
1476 Factor EventContext and introduces MouseOrFocusEventContext.
1477 https://bugs.webkit.org/show_bug.cgi?id=109278
1479 Reviewed by Dimitri Glazkov.
1481 To supoort Touch event retargeting (bug 107800), we have to factor
1482 event retargeting code so that it can support not only MouseEvent or FocusEvent,
1483 but also other events.
1485 This is the first attempt to refactor event retargeting code, a
1486 separated patch from bug 109156. EventContext is now factored and
1487 MouseOrFocusEventContext was introduced to support MouseEvent or
1488 FocusEvent separately.
1490 In following patches, I'll introduce TouchEventContext and
1491 TouchEventDispatchMediator to support Touch event retargeting.
1493 No new tests. No change in functionality.
1495 * dom/EventContext.cpp:
1496 (WebCore::EventContext::EventContext): Factor relatedTarget out from EventContext into MouseOrFocusEventContext.
1497 (WebCore::EventContext::~EventContext):
1499 (WebCore::EventContext::handleLocalEvents):
1500 (WebCore::EventContext::isMouseOrFocusEventContext):
1501 (WebCore::MouseOrFocusEventContext::MouseOrFocusEventContext): New. Handles MouseEvent's (or FocusEvent's) relatedTarget retargeting.
1502 (WebCore::MouseOrFocusEventContext::~MouseOrFocusEventContext):
1503 (WebCore::MouseOrFocusEventContext::handleLocalEvents):
1504 (WebCore::MouseOrFocusEventContext::isMouseOrFocusEventContext):
1505 * dom/EventContext.h:
1507 (WebCore::EventContext::node):
1508 (WebCore::EventContext::target):
1509 (WebCore::EventContext::currentTargetSameAsTarget):
1511 (MouseOrFocusEventContext):
1512 (WebCore::MouseOrFocusEventContext::relatedTarget):
1513 (WebCore::MouseOrFocusEventContext::setRelatedTarget):
1514 * dom/EventDispatcher.cpp:
1515 (WebCore::EventRelatedTargetAdjuster::adjust):
1516 (WebCore::EventDispatcher::adjustRelatedTarget):
1517 (WebCore::EventDispatcher::ensureEventPath): Renamad from ensureEventAncestors. Use the DOM Core terminology.
1518 (WebCore::EventDispatcher::dispatchEvent):
1519 (WebCore::EventDispatcher::dispatchEventAtCapturing):
1520 (WebCore::EventDispatcher::dispatchEventAtTarget):
1521 (WebCore::EventDispatcher::dispatchEventAtBubbling):
1522 (WebCore::EventDispatcher::dispatchEventPostProcess):
1523 (WebCore::EventDispatcher::topEventContext):
1524 * dom/EventDispatcher.h:
1525 (EventRelatedTargetAdjuster):
1527 * inspector/InspectorInstrumentation.cpp:
1529 (WebCore::eventHasListeners):
1530 (WebCore::InspectorInstrumentation::willDispatchEventImpl):
1531 * inspector/InspectorInstrumentation.h:
1532 (InspectorInstrumentation):
1533 (WebCore::InspectorInstrumentation::willDispatchEvent):
1535 2013-02-11 peavo@outlook.com <peavo@outlook.com>
1537 [Curl] setCookiesFromDOM function does not save cookies to disk.
1538 https://bugs.webkit.org/show_bug.cgi?id=109285
1540 Reviewed by Brent Fulgham.
1542 Write cookies to disk by using the Curl easy api.
1544 * platform/network/curl/CookieJarCurl.cpp:
1545 (WebCore::setCookiesFromDOM):Write cookie to disk.
1546 * platform/network/curl/ResourceHandleManager.cpp:
1547 (WebCore::ResourceHandleManager::getCurlShareHandle): Added method to get Curl share handle.
1548 (WebCore::ResourceHandleManager::getCookieJarFileName): Added method to get cookie file name.
1549 * platform/network/curl/ResourceHandleManager.h: Added methods to get cookie file name, and Curl share handle.
1551 2013-02-11 Hayato Ito <hayato@chromium.org>
1553 Split each RuleSet and feature out from StyleResolver into its own class.
1554 https://bugs.webkit.org/show_bug.cgi?id=107777
1556 Reviewed by Dimitri Glazkov.
1558 Re-landing r141964, which was reverted in r141973, since r141964 seem to be innocent.
1560 No tests. No change in behavior.
1563 * GNUmakefile.list.am:
1566 * WebCore.xcodeproj/project.pbxproj:
1567 * css/CSSAllInOne.cpp:
1568 * css/DocumentRuleSets.cpp: Added.
1570 (WebCore::DocumentRuleSets::DocumentRuleSets):
1571 (WebCore::DocumentRuleSets::~DocumentRuleSets):
1572 (WebCore::DocumentRuleSets::initUserStyle): New helper to initialize each RuleSets.
1573 (WebCore::DocumentRuleSets::collectRulesFromUserStyleSheets): Factored out from StyleResolver.
1574 (WebCore::makeRuleSet): Ditto.
1575 (WebCore::DocumentRuleSets::resetAuthorStyle): Ditto.
1576 (WebCore::DocumentRuleSets::appendAuthorStyleSheets): Ditto.
1577 (WebCore::DocumentRuleSets::collectFeatures): Ditto.
1578 (WebCore::DocumentRuleSets::reportMemoryUsage): New methods to report memory usage. Factored out from StyleResolver.
1579 * css/DocumentRuleSets.h: Added.
1582 (WebCore::DocumentRuleSets::authorStyle): Moved from StyleResolver.
1583 (WebCore::DocumentRuleSets::userStyle): Ditto.
1584 (WebCore::DocumentRuleSets::features): Ditto.
1585 (WebCore::DocumentRuleSets::sibling): Ditto.
1586 (WebCore::DocumentRuleSets::uncommonAttribute): Ditto.
1587 * css/StyleResolver.cpp:
1588 (WebCore::StyleResolver::StyleResolver):
1589 (WebCore::StyleResolver::appendAuthorStyleSheets): Now calls DocumentRuleSets::appendAuthorStyleSheets.
1590 (WebCore::StyleResolver::matchAuthorRules): Use m_ruleSets.
1591 (WebCore::StyleResolver::matchUserRules): Ditto.
1592 (WebCore::StyleResolver::classNamesAffectedByRules): Ditto.
1593 (WebCore::StyleResolver::locateCousinList): Ditto.
1594 (WebCore::StyleResolver::canShareStyleWithElement): Ditto.
1595 (WebCore::StyleResolver::locateSharedStyle): Ditto.
1596 (WebCore::StyleResolver::styleForPage): Ditto.
1597 (WebCore::StyleResolver::checkRegionStyle): Ditto.
1598 (WebCore::StyleResolver::applyProperty): Ditto.
1599 (WebCore::StyleResolver::reportMemoryUsage): Now calls DocumentRuleSets::reportMemoryUsage.
1600 * css/StyleResolver.h:
1601 (WebCore::StyleResolver::scopeResolver):
1603 (WebCore::StyleResolver::ruleSets): accessor r to DocumentRuleSets.
1604 (WebCore::StyleResolver::usesSiblingRules): Use m_ruleSets.
1605 (WebCore::StyleResolver::usesFirstLineRules): Ditto.
1606 (WebCore::StyleResolver::usesBeforeAfterRules): Ditto.
1607 (WebCore::StyleResolver::hasSelectorForAttribute): Ditto.
1608 (WebCore::StyleResolver::hasSelectorForClass): Ditto.
1609 (WebCore::StyleResolver::hasSelectorForId): Ditto.
1610 * dom/DocumentStyleSheetCollection.cpp:
1611 (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
1613 2013-02-11 Keishi Hattori <keishi@webkit.org>
1615 REGRESSION (r140778):Calendar Picker buttons are wrong when rtl
1616 https://bugs.webkit.org/show_bug.cgi?id=109158
1618 Reviewed by Kent Tamura.
1620 The calendar picker button's icon and position where wrong when rtl.
1623 Test: platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ar.html
1625 * Resources/pagepopups/calendarPicker.css:
1626 (.year-month-button-left .year-month-button): Use -webkit-margin-end so the margin is applide to the right side.
1627 (.year-month-button-right .year-month-button): Use -webkit-margin-start so the margin is applide to the right side.
1628 (.today-clear-area .today-button): Use -webkit-margin-end so the margin is applide to the right side.
1629 * Resources/pagepopups/calendarPicker.js:
1630 (YearMonthController.prototype._attachLeftButtonsTo): Flip icon image when rtl.
1631 (YearMonthController.prototype._attachRightButtonsTo): Ditto.
1633 2013-02-11 KwangYong Choi <ky0.choi@samsung.com>
1635 REGRESSION (r142549): Remove web intents code
1636 https://bugs.webkit.org/show_bug.cgi?id=109532
1638 Reviewed by Nico Weber.
1640 Remove remaning code related to web intents.
1642 No new tests, no change on behavior.
1645 * bindings/js/JSIntentConstructor.cpp: Removed.
1647 2013-02-11 Kenneth Russell <kbr@google.com>
1649 Add temporary typedef to ANGLEWebKitBridge to support incompatible API upgrade
1650 https://bugs.webkit.org/show_bug.cgi?id=109127
1652 Reviewed by Dean Jackson.
1654 No new tests. Built and tested WebKit and Chromium with this change.
1656 * platform/graphics/ANGLEWebKitBridge.cpp:
1658 Define temporary typedef spanning int -> size_t change.
1659 (WebCore::getValidationResultValue):
1660 (WebCore::getSymbolInfo):
1661 Use temporary typedef.
1663 2013-02-11 Kentaro Hara <haraken@chromium.org>
1665 [V8] ScheduledAction::m_context can be empty, so we shouldn't
1666 retrieve an Isolate by using m_context->GetIsolate()
1667 https://bugs.webkit.org/show_bug.cgi?id=109523
1669 Reviewed by Adam Barth.
1671 Chromium bug: https://code.google.com/p/chromium/issues/detail?id=175307#makechanges
1673 Currently ScheduledAction is retrieving an Isolate by using m_context->GetIsolate().
1674 This can crash because ScheduledAction::m_context can be empty. Specifically,
1675 ScheduledAction::m_context is set to ScriptController::currentWorldContext(),
1676 which can return an empty handle when a frame does not exist. In addition,
1677 'if(context.IsEmpty())' in ScheduledAction.cpp implies that it can be empty.
1679 Alternately, we should pass an Isolate explicitly when a ScheduledAction is instantiated.
1681 No tests. The Chromium crash report doesn't provide enough information
1682 to reproduce the bug.
1684 * bindings/v8/ScheduledAction.cpp:
1685 (WebCore::ScheduledAction::ScheduledAction):
1687 (WebCore::ScheduledAction::~ScheduledAction):
1688 * bindings/v8/ScheduledAction.h:
1690 * bindings/v8/custom/V8DOMWindowCustom.cpp:
1691 (WebCore::WindowSetTimeoutImpl):
1692 * bindings/v8/custom/V8WorkerContextCustom.cpp:
1693 (WebCore::SetTimeoutOrInterval):
1695 2013-02-11 Adenilson Cavalcanti <cavalcantii@gmail.com>
1697 Build fix: r142549 broke EFL build
1698 https://bugs.webkit.org/show_bug.cgi?id=109527
1700 Reviewed by Kentaro Hara.
1702 No new tests, no change on behavior.
1706 2013-02-11 Simon Fraser <simon.fraser@apple.com>
1708 REGRESSION (r142520?): Space no longer scrolls the page
1709 https://bugs.webkit.org/show_bug.cgi?id=109526
1711 Reviewed by Tim Horton.
1713 ScrollingTree::updateTreeFromStateNode() used to bail early when it had
1714 no children (no fixed or sticky elements), but that left updateAfterChildren()
1715 uncalled. Fix by always calling updateAfterChildren(), which updates the scroll
1718 * page/scrolling/ScrollingTree.cpp:
1719 (WebCore::ScrollingTree::updateTreeFromStateNode):
1721 2013-02-11 Tim Horton <timothy_horton@apple.com>
1723 Remove extra early-return in FrameView::setScrollPosition
1725 Rubber-stamped by Simon Fraser.
1727 * page/FrameView.cpp:
1728 (WebCore::FrameView::setScrollPosition):
1730 2013-02-11 Arko Saha <arko@motorola.com>
1732 [Microdata] Fix crash after r141034 in chromuim port
1733 https://bugs.webkit.org/show_bug.cgi?id=109514
1735 Reviewed by Ryosuke Niwa.
1737 Added V8SkipVTableValidation extended attribute to skip
1738 VTable validation check for DOMSettableTokenList interface.
1740 This patch fixes below test failures:
1741 Tests: fast/dom/MicroData/domsettabletokenlist-attributes-add-token.html
1742 fast/dom/MicroData/domsettabletokenlist-attributes-out-of-range-index.html
1743 fast/dom/MicroData/element-with-empty-itemprop.html
1744 fast/dom/MicroData/itemprop-add-remove-tokens.html
1745 fast/dom/MicroData/itemprop-for-an-element-must-be-correct.html
1746 fast/dom/MicroData/itemprop-must-be-read-only.html
1747 fast/dom/MicroData/itemprop-reflected-by-itemProp-property.html
1748 fast/dom/MicroData/itemref-add-remove-tokens.html
1749 fast/dom/MicroData/itemref-attribute-reflected-by-itemRef-property.html
1750 fast/dom/MicroData/itemref-for-an-element-must-be-correct.html
1751 fast/dom/MicroData/itemref-must-be-read-only.html
1752 fast/dom/MicroData/itemtype-add-remove-tokens.html
1753 fast/dom/MicroData/itemtype-attribute-test.html
1754 fast/dom/MicroData/microdata-domtokenlist-attribute-add-remove-tokens.html
1755 fast/dom/MicroData/properties-collection-namedgetter-with-invalid-name.html
1756 fast/dom/MicroData/propertynodelist-add-remove-itemprop-tokens.html
1757 fast/dom/MicroData/propertynodelist-add-remove-itemref-tokens.html
1759 * html/DOMSettableTokenList.idl:
1761 2013-02-11 Adam Barth <abarth@webkit.org>
1763 Load event fires too early with threaded HTML parser (take 2)
1764 https://bugs.webkit.org/show_bug.cgi?id=109485
1766 Reviewed by Eric Seidel.
1768 This patch restores the code that was removed in
1769 http://trac.webkit.org/changeset/142492 and adds code to
1770 DocumentLoader.cpp to avoid the regression.
1773 (WebCore::Document::hasActiveParser):
1774 (WebCore::Document::decrementActiveParserCount):
1775 * loader/DocumentLoader.cpp:
1776 (WebCore::DocumentLoader::isLoadingInAPISense):
1778 2013-02-11 Eric Seidel <eric@webkit.org>
1780 Fold HTMLTokenizerState back into HTMLTokenizer now that MarkupTokenizerBase is RFG
1781 https://bugs.webkit.org/show_bug.cgi?id=109502
1783 Reviewed by Tony Gentilcore.
1785 Just a search replace of HTMLTokenizerState with HTMLTokenizer and moving the enum.
1786 This restores us to the peacefull world pre-NEW_XML.
1788 * html/parser/BackgroundHTMLParser.cpp:
1789 (WebCore::BackgroundHTMLParser::forcePlaintextForTextDocument):
1790 (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
1791 * html/parser/HTMLDocumentParser.cpp:
1792 (WebCore::tokenizerStateForContextElement):
1793 (WebCore::HTMLDocumentParser::forcePlaintextForTextDocument):
1794 (WebCore::HTMLDocumentParser::pumpTokenizer):
1795 * html/parser/HTMLTokenizer.cpp:
1796 (WebCore::isEndTagBufferingState):
1798 (WebCore::HTMLTokenizer::reset):
1799 (WebCore::HTMLTokenizer::flushEmitAndResumeIn):
1800 (WebCore::HTMLTokenizer::nextToken):
1801 (WebCore::HTMLTokenizer::updateStateFor):
1802 * html/parser/HTMLTokenizer.h:
1804 (WebCore::HTMLTokenizer::create):
1805 (WebCore::HTMLTokenizer::shouldSkipNullCharacters):
1806 (WebCore::HTMLTokenizer::emitEndOfFile):
1807 * html/parser/HTMLTreeBuilder.cpp:
1808 (WebCore::HTMLTreeBuilder::processStartTagForInBody):
1809 (WebCore::HTMLTreeBuilder::processEndTag):
1810 (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag):
1811 (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag):
1812 (WebCore::HTMLTreeBuilder::processScriptStartTag):
1813 * html/parser/TextViewSourceParser.cpp:
1814 (WebCore::TextViewSourceParser::TextViewSourceParser):
1816 2013-02-11 Kentaro Hara <haraken@chromium.org>
1818 Build fix after r142528
1819 https://bugs.webkit.org/show_bug.cgi?id=109520
1821 Reviewed by Eric Seidel.
1823 r142528 changed GIFImageReader from a struct to a class.
1824 We also need to fix a forward declaration.
1828 * platform/image-decoders/gif/GIFImageDecoder.h:
1830 2013-02-11 Nico Weber <thakis@chromium.org>
1832 Remove web intents code
1833 https://bugs.webkit.org/show_bug.cgi?id=109501
1835 Reviewed by Eric Seidel.
1837 See thread "Removing ENABLE(WEB_INTENTS) code" on webkit-dev.
1839 * DerivedSources.make:
1840 * Modules/intents/DOMWindowIntents.cpp: Removed.
1841 * Modules/intents/DOMWindowIntents.h: Removed.
1842 * Modules/intents/DOMWindowIntents.idl: Removed.
1843 * Modules/intents/DeliveredIntent.cpp: Removed.
1844 * Modules/intents/DeliveredIntent.h: Removed.
1845 * Modules/intents/DeliveredIntent.idl: Removed.
1846 * Modules/intents/Intent.cpp: Removed.
1847 * Modules/intents/Intent.h: Removed.
1848 * Modules/intents/Intent.idl: Removed.
1849 * Modules/intents/IntentRequest.cpp: Removed.
1850 * Modules/intents/IntentRequest.h: Removed.
1851 * Modules/intents/IntentResultCallback.h: Removed.
1852 * Modules/intents/IntentResultCallback.idl: Removed.
1853 * Modules/intents/NavigatorIntents.cpp: Removed.
1854 * Modules/intents/NavigatorIntents.h: Removed.
1855 * Modules/intents/NavigatorIntents.idl: Removed.
1856 * WebCore.gyp/WebCore.gyp:
1858 * bindings/generic/RuntimeEnabledFeatures.cpp:
1860 * bindings/generic/RuntimeEnabledFeatures.h:
1861 (RuntimeEnabledFeatures):
1862 * bindings/v8/custom/V8IntentCustom.cpp: Removed.
1863 * html/HTMLElementsAllInOne.cpp:
1864 * html/HTMLIntentElement.cpp: Removed.
1865 * html/HTMLIntentElement.h: Removed.
1866 * html/HTMLIntentElement.idl: Removed.
1867 * loader/EmptyClients.cpp:
1868 * loader/EmptyClients.h:
1869 (EmptyFrameLoaderClient):
1870 * loader/FrameLoaderClient.h:
1872 * page/DOMWindow.idl:
1874 2013-02-11 Eric Seidel <eric@webkit.org>
1876 Fix Mac build after http://trac.webkit.org/changeset/142535.
1878 Unreviewed build fix.
1880 * html/parser/HTMLTokenizer.h:
1881 (WebCore::HTMLTokenizer::emitAndReconsumeIn):
1883 2013-02-11 David Farler <dfarler@apple.com>
1885 Make WebCore Derived Sources work with SDK identifiers too
1886 https://bugs.webkit.org/show_bug.cgi?id=109324
1888 Reviewed by Sam Weinig.
1890 * WebCore.xcodeproj/project.pbxproj: Pass SDKROOT to make for DerivedSources.make
1892 2013-02-11 Zhenyao Mo <zmo@google.com>
1894 WEBGL_compressed_texture_s3tc extension can be enabled even when not supported
1895 https://bugs.webkit.org/show_bug.cgi?id=109508
1897 Reviewed by Kenneth Russell.
1899 * html/canvas/WebGLRenderingContext.cpp:
1901 (WebCore::WebGLRenderingContext::getExtension): Check whether the extension support is there before returning the extension pointer.
1903 2013-02-11 Emil A Eklund <eae@chromium.org>
1905 Change RenderFrameSet::paint to use m-rows/m_cols directly.
1906 https://bugs.webkit.org/show_bug.cgi?id=108503
1908 Reviewed by Eric Seidel.
1910 Test: fast/frames/invalid-frameset.html
1912 * rendering/RenderFrameSet.cpp:
1913 (WebCore::RenderFrameSet::paint):
1915 2013-02-11 Yong Li <yoli@rim.com>
1917 XMLHttpRequestProgressEventThrottle::resume() always schedules timer even when unnecessary
1918 https://bugs.webkit.org/show_bug.cgi?id=105348
1920 Reviewed by Alexey Proskuryakov.
1922 Let resume() clear the defer flag and return if there is deferred events to dispatch.
1924 No new tests as this should not affect existing cross-platform behavior. It should be
1925 OK as long as it doesn't break anything.
1927 * xml/XMLHttpRequestProgressEventThrottle.cpp:
1928 (WebCore::XMLHttpRequestProgressEventThrottle::resume):
1930 2013-02-11 Eric Seidel <eric@webkit.org>
1932 Fold MarkupTokenizerBase into HTMLTokenizer now that it is the only subclass
1933 https://bugs.webkit.org/show_bug.cgi?id=109499
1935 Reviewed by Adam Barth.
1937 For great justice. And sanity.
1938 Epic amount of template code deleted.
1940 * GNUmakefile.list.am:
1943 * WebCore.vcproj/WebCore.vcproj:
1944 * WebCore.vcxproj/WebCore.vcxproj:
1945 * WebCore.vcxproj/WebCore.vcxproj.filters:
1946 * WebCore.xcodeproj/project.pbxproj:
1947 * html/parser/HTMLTokenizer.cpp:
1948 (WebCore::HTMLTokenizer::HTMLTokenizer):
1949 * html/parser/HTMLTokenizer.h:
1952 (WebCore::HTMLTokenizer::state):
1953 (WebCore::HTMLTokenizer::setState):
1954 (WebCore::HTMLTokenizer::shouldSkipNullCharacters):
1955 (WebCore::HTMLTokenizer::bufferCharacter):
1956 (WebCore::HTMLTokenizer::emitAndResumeIn):
1957 (WebCore::HTMLTokenizer::emitAndReconsumeIn):
1958 (WebCore::HTMLTokenizer::emitEndOfFile):
1959 (WebCore::HTMLTokenizer::haveBufferedCharacterToken):
1960 * xml/parser/MarkupTokenizerBase.h: Removed.
1962 2013-02-11 Anton Vayvod <avayvod@chromium.org>
1964 [Text Autosizing] Collect narrow descendants and process them separately. Refactoring for
1966 https://bugs.webkit.org/show_bug.cgi?id=109054
1968 Preparational change to combine narrow descendants of the same autosizing cluster into
1969 groups by the width difference between the descendant and the block containing all text of
1970 the parent autosizing cluster. The groups will be autosized with the same multiplier.
1972 For example, on sites with a sidebar, sometimes the paragraphs next to the sidebar will have
1973 a large margin individually applied (via a CSS selector), causing them all to individually
1974 appear narrower than their enclosing blockContainingAllText. Rather than making each of
1975 these paragraphs into a separate cluster, we eventually want to be able to merge them back
1976 together into one (or a few) descendant clusters.
1978 Reviewed by Julien Chaffraix.
1980 No behavioral changes thus no new tests or test changes.
1982 * rendering/TextAutosizer.cpp:
1983 (TextAutosizingClusterInfo): Vector of narrow descendants.
1984 (WebCore::TextAutosizer::processCluster): Process narrow descendants separately.
1985 (WebCore::TextAutosizer::processContainer):
1987 Remember narrow descendants of the parent cluster for later processing.
1989 2013-02-11 Enrica Casucci <enrica@apple.com>
1991 Add ENABLE_DELETION_UI to control the use of the deletion UI.
1992 https://bugs.webkit.org/show_bug.cgi?id=109463.
1994 Reviewed by Ryosuke Niwa.
1996 This patch adds #if ENABLE(DELETION_UI) in every spot where
1997 DeleteButtonController is used. This class is now only instantiated
1998 if the feature is enabled. I've also done some cleanup in the
1999 DeleteButtonController class, removing unused methods and making
2000 private some methods only used internally to the class.
2001 Both DeleteButtonController and DeleteButton classes are now excluded
2002 from the compilation if the feature is not enabled.
2004 No new tests, no change of functionality.
2006 * dom/ContainerNode.cpp:
2007 (WebCore::ContainerNode::cloneChildNodes):
2008 * editing/CompositeEditCommand.cpp:
2009 (WebCore::EditCommandComposition::unapply):
2010 (WebCore::EditCommandComposition::reapply):
2011 (WebCore::CompositeEditCommand::apply):
2012 * editing/DeleteButton.cpp:
2013 * editing/DeleteButtonController.cpp:
2014 * editing/DeleteButtonController.h: Some cleanup.
2015 (WebCore::DeleteButtonController::enabled): Made private.
2016 * editing/EditCommand.cpp:
2017 (WebCore::EditCommand::EditCommand):
2018 * editing/Editor.cpp:
2019 (WebCore::Editor::notifyComponentsOnChangedSelection):
2020 (WebCore::Editor::Editor):
2021 (WebCore::Editor::rangeForPoint):
2022 (WebCore::Editor::deviceScaleFactorChanged):
2024 * editing/htmlediting.cpp: avoidIntersectionWithNode is
2025 used only if the feature is enabled.
2026 * editing/htmlediting.h:
2027 * editing/markup.cpp:
2028 (WebCore::createMarkup):
2029 (WebCore::createFragmentFromNodes):
2030 * rendering/RenderTable.cpp: Removed unnecessary include
2031 fo DeleteButtonController.h
2033 2013-02-11 Rafael Weinstein <rafaelw@chromium.org>
2035 [HTMLTemplateElement] <template> inside of <head> may not create <body> if EOF is hit
2036 https://bugs.webkit.org/show_bug.cgi?id=109338
2038 Reviewed by Adam Barth.
2040 This patch adds the logic to clear the stack of open elements back to the first <template> when EOF
2041 is hit. This allows a <body> to be generated if the initial <template> was opened inside of <head>.
2043 Tests added to html5lib.
2045 * html/parser/HTMLTreeBuilder.cpp:
2047 (WebCore::HTMLTreeBuilder::popAllTemplates):
2048 (WebCore::HTMLTreeBuilder::processEndTag):
2049 (WebCore::HTMLTreeBuilder::processEndOfFile):
2050 * html/parser/HTMLTreeBuilder.h:
2053 2013-02-11 Andreas Kling <akling@apple.com>
2055 RenderText::isAllCollapsibleWhitespace() shouldn't upconvert string to 16-bit.
2056 <http://webkit.org/b/109354>
2058 Reviewed by Eric Seidel.
2060 254 KB progression on Membuster3.
2062 * rendering/RenderText.cpp:
2063 (WebCore::RenderText::isAllCollapsibleWhitespace):
2065 2013-02-11 Alpha Lam <hclam@chromium.org>
2067 Fix code style violations in GIFImageReader.{cc|h}
2068 https://bugs.webkit.org/show_bug.cgi?id=109007
2070 Reviewed by Stephen White.
2072 This is just a style clean up for GIFImageReader.{cc|h}.
2074 There's going to be a lot changes in these two files and style check
2075 will add a lot of noise in later reviews. Fix style problems first.
2077 There is no change in logic at all. Just style fixes.
2081 * platform/image-decoders/gif/GIFImageDecoder.cpp:
2082 (WebCore::GIFImageDecoder::frameCount):
2083 (WebCore::GIFImageDecoder::repetitionCount):
2084 (WebCore::GIFImageDecoder::haveDecodedRow):
2085 (WebCore::GIFImageDecoder::initFrameBuffer):
2086 * platform/image-decoders/gif/GIFImageReader.cpp:
2087 (GIFImageReader::outputRow):
2088 (GIFImageReader::doLZW):
2089 (GIFImageReader::read):
2090 * platform/image-decoders/gif/GIFImageReader.h:
2092 (GIFFrameContext::GIFFrameContext):
2093 (GIFFrameContext::~GIFFrameContext):
2094 (GIFImageReader::GIFImageReader):
2095 (GIFImageReader::~GIFImageReader):
2097 (GIFImageReader::imagesCount):
2098 (GIFImageReader::loopCount):
2099 (GIFImageReader::globalColormap):
2100 (GIFImageReader::globalColormapSize):
2101 (GIFImageReader::frameContext):
2103 2013-02-11 Bem Jones-Bey <bjonesbe@adobe.com>
2105 [CSS Exclusions] Handle shape-outside changing a float's overhang behavior
2106 https://bugs.webkit.org/show_bug.cgi?id=106927
2108 Reviewed by Julien Chaffraix.
2110 When the position on a shape outside causes a float to spill out into
2111 another block than it's container, it was not being drawn correctly. It
2112 became apparent that in order to fix this properly, the approach to
2113 positioning shape outsides and floats needed to be changed. The new
2114 approach also fixes some other outstanding issues, like hit detection.
2116 When a float has a shape outside, inline and float layout happens
2117 using the exclusion shape bounds instead of the float's box. The
2118 effect of this is that the float itself no longer has any effect on
2119 layout, both with respect to positioning of the float's siblings as
2120 well as positioning the float's box. This means that when the float is
2121 positioned, it is the shape's box that must obey the positioning rules
2122 for floats. When the shape is given a position relative to the float's
2123 box, the rules for float positioning determine where the shape sits
2124 in the parent, causing the float's box to be offset by the position of
2125 the shape. Since the float's box does not affect layout (due to the
2126 shape), this is similar to relative positioning in that the offset is
2127 a paint time occurrence.
2129 So the new approach is to implement positioning of shape outside on
2130 floats similar to how relative positioning is implemented, using a
2133 This is also tested by the existing tests for shape outside on floats positioning.
2135 Test: fast/exclusions/shape-outside-floats/shape-outside-floats-overhang.html
2137 * rendering/ExclusionShapeOutsideInfo.h:
2138 (WebCore::ExclusionShapeOutsideInfo::shapeLogicalOffset): Utility method to create a LayoutSize for computing the layer offset.
2139 (ExclusionShapeOutsideInfo):
2140 * rendering/LayoutState.cpp:
2141 (WebCore::LayoutState::LayoutState): Check for floats with shape outside as well as in flow positioning.
2142 * rendering/RenderBlock.cpp:
2143 (WebCore::RenderBlock::flipFloatForWritingModeForChild): Remove old positioning implementation.
2144 (WebCore::RenderBlock::paintFloats): Remove old positioning implementation.
2145 (WebCore::RenderBlock::blockSelectionGaps): Check for floats with shape outside as well as in flow positioning.
2146 (WebCore::RenderBlock::positionNewFloats): Remove old positioning implementation.
2147 (WebCore::RenderBlock::addOverhangingFloats): Remove FIXME.
2148 (WebCore::positionForPointRespectingEditingBoundaries): Check for floats with shape outside as well as in flow positioning.
2149 * rendering/RenderBlock.h:
2150 (RenderBlock): Remove old positioning implementation.
2151 (WebCore::RenderBlock::xPositionForFloatIncludingMargin): Remove old positioning implementation.
2152 (WebCore::RenderBlock::yPositionForFloatIncludingMargin): Remove old positioning implementation.
2153 * rendering/RenderBox.cpp:
2154 (WebCore::RenderBox::mapLocalToContainer): Check for floats with shape outside as well as in flow positioning.
2155 (WebCore::RenderBox::offsetFromContainer): Check for floats with shape outside as well as in flow positioning.
2156 (WebCore::RenderBox::computeRectForRepaint): Check for floats with shape outside as well as in flow positioning.
2157 (WebCore::RenderBox::layoutOverflowRectForPropagation): Check for floats with shape outside as well as in flow positioning.
2158 * rendering/RenderBox.h: Make floats with shape outside get a layer.
2159 * rendering/RenderBoxModelObject.cpp:
2160 (WebCore::RenderBoxModelObject::paintOffset): Method to return in flow
2161 positioning offset + offset from shape outside on floats.
2162 * rendering/RenderBoxModelObject.h:
2163 (RenderBoxModelObject): Add paintOffset method.
2164 * rendering/RenderInline.cpp:
2165 (WebCore::RenderInline::clippedOverflowRectForRepaint): Check for floats with shape outside as well as in flow positioning.
2166 (WebCore::RenderInline::computeRectForRepaint): Check for floats with shape outside as well as in flow positioning.
2167 (WebCore::RenderInline::mapLocalToContainer): Check for floats with shape outside as well as in flow positioning.
2168 * rendering/RenderLayer.cpp:
2169 (WebCore::RenderLayer::updateLayerPosition): Check for floats with shape outside as well as in flow positioning.
2170 (WebCore::RenderLayer::calculateClipRects): Check for floats with shape outside as well as in flow positioning.
2171 * rendering/RenderLayer.h:
2172 (WebCore::RenderLayer::paintOffset): Rename offsetForInFlowPosition to reflect that it's not just for
2173 in flow positioning, it also reflects shape outside position on floats.
2175 * rendering/RenderObject.h:
2176 (WebCore::RenderObject::hasPaintOffset): Determines if this object is in flow positioined or is a float with shape outside.
2177 * rendering/style/RenderStyle.h: Add hasPaintOffset method, analagous to method with same name on RenderObject.
2179 2013-02-11 Tim Horton <timothy_horton@apple.com>
2181 FrameView::setScrollPosition should clamp scroll position before handing it to
2182 ScrollingCoordinator instead of depending on ScrollView to do this
2183 https://bugs.webkit.org/show_bug.cgi?id=109497
2184 <rdar://problem/12631789>
2186 Reviewed by Simon Fraser.
2188 Clamp scroll position before handing it to ScrollingCoordinator. Also, like ScrollView does,
2189 bail out if we've already scrolled to the clamped scroll position.
2191 Test: platform/mac-wk2/tiled-drawing/clamp-out-of-bounds-scrolls.html
2193 * page/FrameView.cpp:
2194 (WebCore::FrameView::setScrollPosition):
2196 2013-02-11 Adam Barth <abarth@webkit.org>
2198 The threaded HTML parser should pass all the fast/parser tests
2199 https://bugs.webkit.org/show_bug.cgi?id=109486
2201 Reviewed by Tony Gentilcore.
2203 This patch fixes the last two test failures in fast/parser, which were
2204 crashes caused by not having a tokenizer when document.close() was
2205 called. (The tokenizer is created lazily by calls to document.write,
2206 which might not happen before document.close).
2208 fast/parser/document-close-iframe-load.html
2209 fast/parser/document-close-nested-iframe-load.html
2211 In addition, I've added a new test to make sure we flush the tokenizer
2212 properly in these cases.
2214 Test: fast/parser/document-close-iframe-load-partial-entity.html
2216 * html/parser/HTMLDocumentParser.cpp:
2217 (WebCore::HTMLDocumentParser::prepareToStopParsing):
2218 (WebCore::HTMLDocumentParser::pumpTokenizer):
2220 2013-02-11 Bruno de Oliveira Abinader <bruno.abinader@basyskom.com>
2222 [texmap] Implement frames-per-second debug counter
2223 https://bugs.webkit.org/show_bug.cgi?id=107942
2225 Reviewed by Noam Rosenthal.
2227 Adds FPS counter via WEBKIT_SHOW_FPS=<interval> environment variable,
2228 where <interval> is the period in seconds (i.e. =1.5) between FPS
2229 updates on screen. It is measured by counting
2230 CoordinatedGraphicsScene::paintTo* calls and is painted using
2231 drawRepaintCounter() after TextureMapperLayer has finished painting its
2234 Visual debugging feature, no need for new tests.
2236 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
2237 (WebCore::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
2238 (WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
2239 (WebCore::CoordinatedGraphicsScene::paintToGraphicsContext):
2240 (WebCore::CoordinatedGraphicsScene::updateFPS):
2241 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
2243 2013-02-11 Eric Seidel <eric@webkit.org>
2245 Fold MarkupTokenBase into HTMLToken now that it has no other subclasses
2246 https://bugs.webkit.org/show_bug.cgi?id=109483
2248 Reviewed by Adam Barth.
2250 This deletes an epic amount of template yuck, as well as removes
2251 a vtable !?! from HTMLToken.
2253 This paves the way for further cleanup of HTMLToken now that we
2254 can see the whole object at once.
2255 We'll also probably re-create an HTMLToken.cpp again, now that we're
2256 free from the chains of template nonsense.
2258 * GNUmakefile.list.am:
2261 * WebCore.vcproj/WebCore.vcproj:
2262 * WebCore.vcxproj/WebCore.vcxproj:
2263 * WebCore.vcxproj/WebCore.vcxproj.filters:
2264 * WebCore.xcodeproj/project.pbxproj:
2265 * html/parser/HTMLToken.h:
2266 (WebCore::findAttributeInVector):
2271 (WebCore::HTMLToken::HTMLToken):
2272 (WebCore::HTMLToken::clear):
2273 (WebCore::HTMLToken::isUninitialized):
2274 (WebCore::HTMLToken::type):
2275 (WebCore::HTMLToken::makeEndOfFile):
2276 (WebCore::HTMLToken::startIndex):
2277 (WebCore::HTMLToken::endIndex):
2278 (WebCore::HTMLToken::setBaseOffset):
2279 (WebCore::HTMLToken::end):
2280 (WebCore::HTMLToken::data):
2281 (WebCore::HTMLToken::isAll8BitData):
2282 (WebCore::HTMLToken::name):
2283 (WebCore::HTMLToken::appendToName):
2284 (WebCore::HTMLToken::nameString):
2285 (WebCore::HTMLToken::selfClosing):
2286 (WebCore::HTMLToken::setSelfClosing):
2287 (WebCore::HTMLToken::beginStartTag):
2288 (WebCore::HTMLToken::beginEndTag):
2289 (WebCore::HTMLToken::addNewAttribute):
2290 (WebCore::HTMLToken::beginAttributeName):
2291 (WebCore::HTMLToken::endAttributeName):
2292 (WebCore::HTMLToken::beginAttributeValue):
2293 (WebCore::HTMLToken::endAttributeValue):
2294 (WebCore::HTMLToken::appendToAttributeName):
2295 (WebCore::HTMLToken::appendToAttributeValue):
2296 (WebCore::HTMLToken::attributes):
2297 (WebCore::HTMLToken::eraseValueOfAttribute):
2298 (WebCore::HTMLToken::ensureIsCharacterToken):
2299 (WebCore::HTMLToken::characters):
2300 (WebCore::HTMLToken::appendToCharacter):
2301 (WebCore::HTMLToken::comment):
2302 (WebCore::HTMLToken::beginComment):
2303 (WebCore::HTMLToken::appendToComment):
2304 (WebCore::HTMLToken::eraseCharacters):
2305 * html/parser/HTMLTokenTypes.h:
2306 * html/parser/XSSAuditor.h:
2307 * xml/parser/MarkupTokenBase.h: Removed.
2309 2013-02-11 Gavin Barraclough <barraclough@apple.com>
2311 PluginProcess should quit immediately if idle in response to low-memory notifications
2312 https://bugs.webkit.org/show_bug.cgi?id=109103
2313 <rdar://problem/12679827>
2315 Reviewed by Brady Eidson.
2317 This patch allows a process to set a custom callback for low memory warnings
2318 (defaulting to the current behaviour, as implemented in releaseMemory).
2320 * platform/MemoryPressureHandler.cpp:
2321 (WebCore::MemoryPressureHandler::MemoryPressureHandler):
2322 - Initialize m_lowMemoryHandler to releaseMemory.
2323 (WebCore::MemoryPressureHandler::install):
2324 (WebCore::MemoryPressureHandler::uninstall):
2325 (WebCore::MemoryPressureHandler::holdOff):
2326 - Cleaned up spacing.
2327 (WebCore::MemoryPressureHandler::releaseMemory):
2328 - Added null implementation for non-Mac builds.
2329 * platform/MemoryPressureHandler.h:
2330 (WebCore::MemoryPressureHandler::setLowMemoryHandler):
2331 - Added method to set m_lowMemoryHandler.
2332 * platform/mac/MemoryPressureHandlerMac.mm:
2333 (WebCore::MemoryPressureHandler::respondToMemoryPressure):
2334 - Changed to call releaseMemory via m_lowMemoryHandler.
2336 2013-02-11 Simon Fraser <simon.fraser@apple.com>
2338 REGRESSION (r133807): Sticky-position review bar on bugzilla review page is jumpy
2339 https://bugs.webkit.org/show_bug.cgi?id=104276
2340 <rdar://problem/12827187>
2342 Reviewed by Tim Horton.
2344 When committing new scrolling tree state, if the root node has a scroll
2345 position update, we would handle that before updating the state of child
2346 nodes (with possibly new viewport constraints). That would cause incorrect
2347 child layer updates.
2349 Fix by adding a second 'update' phase that happens after child nodes,
2350 and moving the scroll position update into that.
2352 Scrolling tests only dump the state tree, so cannot test the bug.
2354 * page/FrameView.cpp:
2355 (WebCore::FrameView::setScrollPosition): If the scroll position didn't
2356 actually change, don't request a scroll position update from the ScrollingCoordinator.
2357 * page/scrolling/ScrollingTree.cpp:
2358 (WebCore::ScrollingTree::updateTreeFromStateNode): Keep track of the scrolling node so
2359 that we can call updateAfterChildren() on it.
2360 * page/scrolling/ScrollingTreeNode.h:
2361 (ScrollingTreeNode):
2362 (WebCore::ScrollingTreeNode::updateAfterChildren):
2363 * page/scrolling/ScrollingTreeScrollingNode.cpp:
2364 (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
2365 * page/scrolling/ScrollingTreeScrollingNode.h:
2366 (ScrollingTreeScrollingNode):
2367 * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2368 (WebCore::ScrollingCoordinatorMac::updateViewportConstrainedNode):
2369 In the current bug the scrolling tree was scheduled for commit because of a
2370 scroll position request, but if only the viewport constraints change, we also need
2372 * page/scrolling/mac/ScrollingTreeFixedNode.h:
2373 (ScrollingTreeFixedNode):
2374 * page/scrolling/mac/ScrollingTreeFixedNode.mm:
2375 (WebCore::ScrollingTreeFixedNode::updateBeforeChildren):
2376 * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
2377 (ScrollingTreeScrollingNodeMac):
2378 * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
2379 (WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
2380 (WebCore::ScrollingTreeScrollingNodeMac::updateAfterChildren): Move code here
2381 that updates things that have to happen after children.
2382 * page/scrolling/mac/ScrollingTreeStickyNode.h:
2383 (ScrollingTreeStickyNode):
2384 * page/scrolling/mac/ScrollingTreeStickyNode.mm:
2385 (WebCore::ScrollingTreeStickyNode::updateBeforeChildren):
2387 2013-02-11 Roger Fong <roger_fong@apple.com>
2389 Unreviewed. Build fix for Win7 Release.
2390 Because of InspectorAllInOne.cpp static globals must be named differently in files included by InspectorAllInOne.
2391 This was the case for UserInitiatedProfileName. Also removed the repeated HeapProfileType definition in
2392 InspectorHeapProfilerAgent.cpp since it wasn't being used anyways.
2394 * inspector/InspectorHeapProfilerAgent.cpp:
2396 (WebCore::InspectorHeapProfilerAgent::takeHeapSnapshot):
2398 2013-02-11 Tony Gentilcore <tonyg@chromium.org>
2400 SegmentedString's copy ctor should copy all fields
2401 https://bugs.webkit.org/show_bug.cgi?id=109477
2403 Reviewed by Adam Barth.
2405 This fixes http/tests/inspector-enabled/document-write.html (and likely others) for the threaded HTML parser.
2407 No new tests because covered by existing tests.
2409 * platform/text/SegmentedString.cpp:
2410 (WebCore::SegmentedString::SegmentedString):
2412 2013-02-11 Joshua Bell <jsbell@chromium.org>
2414 IndexedDB: database connections don't close after versionchange transaction aborts
2415 https://bugs.webkit.org/show_bug.cgi?id=102298
2417 Reviewed by Tony Chang.
2419 Per spec, close the database if the "versionchange" transaction aborts.
2421 Tests: storage/indexeddb/aborted-versionchange-closes.html
2422 storage/indexeddb/lazy-index-population.html
2423 storage/objectstore-basics.html
2425 * Modules/indexeddb/IDBTransaction.cpp:
2426 (WebCore::IDBTransaction::onAbort): Tell the IDBDatabase (connection) to close if
2427 this was a "versionchange" transaction.
2429 2013-02-11 Christophe Dumez <ch.dumez@sisa.samsung.com>
2431 [EFL] fast/forms/number/number-l10n-input.html is failing
2432 https://bugs.webkit.org/show_bug.cgi?id=109440
2434 Reviewed by Laszlo Gombos.
2436 Use LocaleICU instead of LocaleNone on EFL port. The EFL
2437 port already depends on ICU library and we get additional
2438 functionality this way.
2440 No new tests, already covered by existing tests.
2443 * PlatformBlackBerry.cmake:
2444 * PlatformEfl.cmake:
2445 * PlatformWinCE.cmake:
2447 2013-02-11 Benjamin Poulain <benjamin@webkit.org>
2449 Kill TestRunner::setMinimumTimerInterval; implement the feature with InternalSettings
2450 https://bugs.webkit.org/show_bug.cgi?id=109349
2452 Reviewed by Sam Weinig.
2454 Expose setMinimumTimerInterval() and implement the backup/restore to keep
2455 a consistent state between tests.
2457 * testing/InternalSettings.cpp:
2458 (WebCore::InternalSettings::Backup::Backup):
2459 (WebCore::InternalSettings::Backup::restoreTo):
2460 (WebCore::InternalSettings::setMinimumTimerInterval):
2462 * testing/InternalSettings.h:
2465 * testing/InternalSettings.idl:
2467 2013-02-11 Dean Jackson <dino@apple.com>
2469 Source/WebCore: Snapshotted plug-in should use shadow root
2470 https://bugs.webkit.org/show_bug.cgi?id=108284
2472 Reviewed by Simon Fraser.
2474 Take three - relanding after rollout in r142400 that was caused by a global
2475 selector interfering with CSS Instrumentation in the Inspector.
2477 A snapshotted plugin needs to indicate to the user that it can be clicked
2478 to be restarted. Previously this was done with an image that had embedded
2479 text. Instead, we now use an internal shadow root to embed some markup that
2480 will display instructions that can be localised.
2482 The UA stylesheet for plug-ins provides a default styling for the label, which
2483 can be overridden by ports.
2485 In the process, RenderSnapshottedPlugIn no longer inherits from RenderEmbeddedObject,
2486 since it is only responsible for drawing a paused plug-in. The snapshot creation
2487 can work with the default renderer, but a shadow root requires something like
2488 RenderBlock in order to draw its children. We swap from one renderer to another when
2489 necessary either by creating the shadow root or by explicitly detaching and attaching
2492 Unfortunately this is difficult to test, because the snapshotting requires
2493 time to execute, and also a PluginView to be instantiated.
2496 (object::-webkit-snapshotted-plugin-content): New rules for a default label style.
2498 * platform/LocalizedStrings.cpp: Make sure all ports have plugin strings, now it is called.
2499 * platform/LocalizedStrings.h:
2500 * platform/blackberry/LocalizedStringsBlackBerry.cpp:
2501 * platform/chromium/LocalizedStringsChromium.cpp:
2502 * platform/efl/LocalizedStringsEfl.cpp:
2503 * platform/gtk/LocalizedStringsGtk.cpp:
2504 * platform/qt/LocalizedStringsQt.cpp:
2506 * html/HTMLPlugInElement.cpp:
2507 (WebCore::HTMLPlugInElement::defaultEventHandler): Take into account the fact
2508 that RenderSnapshottedPlugIn no longer is an embedded object.
2510 * html/HTMLPlugInImageElement.cpp:
2511 (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): New default values in constructor.
2512 (WebCore::HTMLPlugInElement::defaultEventHandler): Make sure to call base class.
2513 (WebCore::HTMLPlugInElement::willRecalcStyle): No need to reattach if we're a snapshot.
2514 (WebCore::HTMLPlugInImageElement::createRenderer): If we're showing a snapshot, create such
2515 a renderer, otherwise use the typical plug-in path.
2516 (WebCore::HTMLPlugInImageElement::updateSnapshot): Keep a record of the snapshot, since we'll
2517 need to give it to the renderer.
2518 (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Build a subtree that will display a label.
2519 * html/HTMLPlugInImageElement.h:
2520 (HTMLPlugInImageElement): New member variable to record the snapshot image and whether the label
2521 should show immediately.
2522 (WebCore::HTMLPlugInImageElement::swapRendererTimerFired): The callback function triggered when we need
2523 to swap to the Shadow Root.
2524 (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): The user has tapped on the snapshot so the plugin
2525 in being recreated. Make sure we reattach so that a plugin renderer will be created.
2526 (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Make sure we set the right
2527 displayState for snapshots.
2528 * html/HTMLPlugInImageElement.h:
2529 (HTMLPlugInImageElement): The new methods listed above.
2530 (WebCore::HTMLPlugInImageElement::setShouldShowSnapshotLabelAutomatically): Indicates whether or not
2531 a snapshot should be immediately labeled.
2533 * page/ChromeClient.h: No need for plugInStartLabelImage any more.
2535 * rendering/RenderSnapshottedPlugIn.cpp:
2536 (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): New inheritance.
2537 (WebCore::RenderSnapshottedPlugIn::paint): If we're in the background paint phase, render the snapshot image.
2538 (WebCore::RenderSnapshottedPlugIn::paintSnapshotImage): Rename.
2539 (WebCore::RenderSnapshottedPlugIn::paintSnapshot): Rename.
2540 (WebCore::RenderSnapshottedPlugIn::paintSnapshotWithLabel): Rename. No need for label sizes.
2541 (WebCore::RenderSnapshottedPlugIn::getCursor):
2542 (WebCore::RenderSnapshottedPlugIn::handleEvent): The renderer doesn't restart the plug-in any more. Tell the element and it will do it.
2543 * rendering/RenderSnapshottedPlugIn.h:
2544 (RenderSnapshottedPlugIn): New inheritance. Some method renaming.
2546 2013-02-11 Mike West <mkwst@chromium.org>
2548 CSP reports for blocked 'data:' URLs should report the scheme only.
2549 https://bugs.webkit.org/show_bug.cgi?id=109429
2551 Reviewed by Adam Barth.
2553 https://dvcs.w3.org/hg/content-security-policy/rev/001dc8e8bcc3 changed
2554 the CSP 1.1 spec to require that blocked URLs that don't refer to
2555 generally resolvable schemes (e.g. 'data:', 'javascript:', etc.) be
2556 stripped down to their scheme in violation reports.
2558 Test: http/tests/security/contentSecurityPolicy/report-blocked-data-uri.html
2560 * page/ContentSecurityPolicy.cpp:
2561 (WebCore::ContentSecurityPolicy::reportViolation):
2562 If the blocked URL is a web-resolvable scheme, apply the current
2563 stripping logic to it, otherwise, strip it to the scheme only.
2566 Move KURL::isHierarchical() out into KURL's public API.
2568 2013-02-11 Simon Fraser <simon.fraser@apple.com>
2570 ScrollingTree node maps keep getting larger
2571 https://bugs.webkit.org/show_bug.cgi?id=109348
2573 Reviewed by Sam Weinig.
2575 When navigating between pages, nodes would get left in the ScrollingTree's
2576 node map, and the ScrollingStateTree's node map, so these would get larger
2577 and larger as you browse.
2579 Simplify map maintenance by clearing the map when setting a new root node
2580 (which happens on the first commit of a new page). Also, don't keep root nodes
2581 around, but create them afresh for each page, which simplifies their ID
2584 This is closer to the original behavior; keeping the root nodes around was
2585 a fix for bug 99668, but we avoid regressing that fix by bailing early
2586 from frameViewLayoutUpdated() if there is no root state node (we'll get
2587 called again anyway).
2589 This now allows state nodeIDs to be purely read-only.
2591 * page/scrolling/ScrollingStateNode.h:
2592 * page/scrolling/ScrollingStateTree.cpp:
2593 (WebCore::ScrollingStateTree::ScrollingStateTree):
2594 (WebCore::ScrollingStateTree::attachNode):
2595 (WebCore::ScrollingStateTree::clear):
2596 (WebCore::ScrollingStateTree::removeNode):
2597 * page/scrolling/ScrollingTree.cpp:
2598 (WebCore::ScrollingTree::updateTreeFromStateNode):
2599 * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2600 (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
2602 2013-02-11 Simon Fraser <simon.fraser@apple.com>
2604 Move m_stateNodeMap from ScrollingCoordinatorMac to ScrollingStateTree
2605 https://bugs.webkit.org/show_bug.cgi?id=109361
2607 Reviewed by Sam Weinig.
2609 The map of scrolling node IDs to ScollingStateNodes was maintained by
2610 ScrollingCoordinatorMac, rather than ScrollingStateTree. This is different
2611 from the ScrollingTree (which owns its node map), and added some amount
2612 of to-and-fro between ScrollingStateTree and ScrollingCoordinatorMac.
2614 Having ScrollingCoordinatorMac maintain the map of IDs to state nodes
2619 * page/scrolling/ScrollingStateTree.cpp:
2620 (WebCore::ScrollingStateTree::attachNode):
2621 (WebCore::ScrollingStateTree::detachNode):
2622 (WebCore::ScrollingStateTree::clear):
2623 (WebCore::ScrollingStateTree::removeNode):
2624 (WebCore::ScrollingStateTree::stateNodeForID):
2625 * page/scrolling/ScrollingStateTree.h:
2626 (ScrollingStateTree): Remove some stale comments.
2627 (WebCore::ScrollingStateTree::removedNodes):
2628 * page/scrolling/mac/ScrollingCoordinatorMac.h:
2629 (ScrollingCoordinatorMac):
2630 * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2631 (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
2632 (WebCore::ScrollingCoordinatorMac::recomputeWheelEventHandlerCountForFrameView):
2633 (WebCore::ScrollingCoordinatorMac::frameViewRootLayerDidChange):
2634 (WebCore::ScrollingCoordinatorMac::requestScrollPositionUpdate):
2635 (WebCore::ScrollingCoordinatorMac::attachToStateTree):
2636 (WebCore::ScrollingCoordinatorMac::detachFromStateTree):
2637 (WebCore::ScrollingCoordinatorMac::clearStateTree):
2638 (WebCore::ScrollingCoordinatorMac::updateScrollingNode):
2639 (WebCore::ScrollingCoordinatorMac::updateViewportConstrainedNode):
2641 2013-02-11 Mark Rowe <mrowe@apple.com>
2645 * platform/mac/PlatformSpeechSynthesizerMac.mm: Fix the case in the include.
2647 2013-02-11 Julien Chaffraix <jchaffraix@webkit.org>
2649 Regression(r131539): Heap-use-after-free in WebCore::RenderBlock::willBeDestroyed
2650 https://bugs.webkit.org/show_bug.cgi?id=107189
2652 Reviewed by Abhishek Arya.
2654 Test: fast/dynamic/continuation-detach-crash.html
2656 This patch reverts r131539 and the following changes (r132591 and r139664).
2657 This means we redo detaching from the bottom-up which solves the regression.
2658 It fixes the attached test case as we re-attach child nodes before detaching
2659 the parent. It seems wrong to do but this avoid a stale continuation.
2661 * dom/ContainerNode.cpp:
2662 (WebCore::ContainerNode::detach): Detach the children first, then ourself.
2664 (WebCore::Node::detach): Clear the renderer instead of ASSERT'ing.
2665 * rendering/RenderObject.cpp:
2666 (WebCore::RenderObject::willBeDestroyed): Removed the code to clear the associated node's renderer.
2667 (WebCore::RenderObject::destroyAndCleanupAnonymousWrappers):
2668 * rendering/RenderObjectChildList.cpp:
2669 (WebCore::RenderObjectChildList::removeChildNode):
2670 Moved the repainting logic back into removeChildNode from destroyAndCleanupAnonymousWrappers.
2671 (WebCore::RenderObjectChildList::destroyLeftoverChildren): Re-added the code to clear the associated node's
2673 * rendering/RenderTextFragment.cpp:
2674 (WebCore::RenderTextFragment::setText): Re-added the code to set the associated node's renderer.
2676 * dom/ContainerNode.cpp:
2677 (WebCore::ContainerNode::detach):
2679 (WebCore::Node::detach):
2680 * rendering/RenderObject.cpp:
2681 (WebCore::RenderObject::willBeDestroyed):
2682 (WebCore::RenderObject::destroyAndCleanupAnonymousWrappers):
2683 * rendering/RenderObjectChildList.cpp:
2684 (WebCore::RenderObjectChildList::destroyLeftoverChildren):
2685 (WebCore::RenderObjectChildList::removeChildNode):
2686 * rendering/RenderTextFragment.cpp:
2687 (WebCore::RenderTextFragment::setText):
2689 2013-02-11 Eric Seidel <eric@webkit.org>
2691 Make WebVTTTokenizer stop inheriting from MarkupTokenizerBase
2692 https://bugs.webkit.org/show_bug.cgi?id=109411
2694 Reviewed by Adam Barth.
2696 Moved InputStreamPreprocessor into its own header file so it can be
2697 used by both WebVTTTokenizer and HTMLTokenizer.
2699 Also split out kEndOfFileMarker from InputStreamPreprocessor<T> so that
2700 it can be used w/o a specific instantiation of the template class.
2701 This also made it possible to fix three old fixmes about wanting to share
2704 Again, separating WebVTT code from Markup* base classes made it simpler
2705 at the cost of a little copy/paste code. WebVTT tokenization is remarkably
2706 simple compared to HTML.
2708 This will make it immediately possible to pull MarkupTokenizerBase up into
2709 HTMLTokenizer and further simplify the code.
2711 * GNUmakefile.list.am:
2714 * WebCore.vcproj/WebCore.vcproj:
2715 * WebCore.vcxproj/WebCore.vcxproj:
2716 * WebCore.vcxproj/WebCore.vcxproj.filters:
2717 * WebCore.xcodeproj/project.pbxproj:
2718 * html/parser/BackgroundHTMLParser.cpp:
2719 (WebCore::BackgroundHTMLParser::markEndOfFile):
2720 * html/parser/HTMLInputStream.h:
2721 (WebCore::HTMLInputStream::markEndOfFile):
2722 * html/parser/HTMLTokenizer.cpp:
2723 (WebCore::HTMLTokenizer::nextToken):
2724 * html/parser/InputStreamPreprocessor.h: Added.
2726 (InputStreamPreprocessor):
2727 (WebCore::InputStreamPreprocessor::InputStreamPreprocessor):
2728 (WebCore::InputStreamPreprocessor::nextInputCharacter):
2729 (WebCore::InputStreamPreprocessor::peek):
2730 (WebCore::InputStreamPreprocessor::advance):
2731 (WebCore::InputStreamPreprocessor::skipNextNewLine):
2732 (WebCore::InputStreamPreprocessor::reset):
2733 (WebCore::InputStreamPreprocessor::shouldTreatNullAsEndOfFileMarker):
2734 * html/track/WebVTTTokenizer.cpp:
2735 (WebCore::WebVTTTokenizer::WebVTTTokenizer):
2736 (WebCore::WebVTTTokenizer::nextToken):
2737 * html/track/WebVTTTokenizer.h:
2739 (WebCore::WebVTTTokenizer::haveBufferedCharacterToken):
2740 (WebCore::WebVTTTokenizer::bufferCharacter):
2741 (WebCore::WebVTTTokenizer::emitAndResumeIn):
2742 (WebCore::WebVTTTokenizer::emitEndOfFile):
2743 (WebCore::WebVTTTokenizer::shouldSkipNullCharacters):
2744 * xml/parser/MarkupTokenizerBase.h:
2745 (MarkupTokenizerBase):
2746 (WebCore::MarkupTokenizerBase::bufferCharacter):
2748 2013-02-11 Adam Barth <abarth@webkit.org>
2750 document.write during window.onload can trigger DumpRenderTree to dump the render tree
2751 https://bugs.webkit.org/show_bug.cgi?id=109465
2753 Reviewed by Eric Seidel.
2755 This patch is a partial revert of
2756 http://trac.webkit.org/changeset/142378. It's not safe to call
2757 checkComplete during the load event. We'll need to find another way of
2758 calling checkComplete at the right time.
2760 Test: fast/parser/document-write-during-load.html
2763 (WebCore::Document::decrementActiveParserCount):
2765 2013-02-11 Andrey Kosyakov <caseq@chromium.org>
2767 Web Inspector: Timeline: invalidate and force locations are same for Layout records caused by style recalculaiton
2768 https://bugs.webkit.org/show_bug.cgi?id=109294
2770 Reviewed by Pavel Feldman.
2772 Use the stack that caused style recalculation as a cause for relayout performed due to
2773 layout invalidation caused by style recalculation.
2775 * inspector/front-end/TimelinePresentationModel.js:
2776 (WebInspector.TimelinePresentationModel.prototype.reset):
2777 (WebInspector.TimelinePresentationModel.Record):
2779 2013-02-01 Andrey Kosyakov <caseq@chromium.org>
2781 Web Inspector: [Extension API] adjust inspectedWindow.eval() callback parameters to expose non-exceptional error
2782 https://bugs.webkit.org/show_bug.cgi?id=108640
2784 Reviewed by Vsevolod Vlasov.
2786 - only set first parameter to eval() callback iff expression successfully evaluates;
2787 - use object, not bool as second parameter;
2788 - pass exceptions and extension errors as second parameter if evaluate failed;
2789 - minor drive-by changes in ExtensionAPI utilities.
2791 * inspector/front-end/ExtensionAPI.js:
2792 (injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setExpression):
2793 (injectedExtensionAPI.InspectedWindow.prototype.):
2794 (injectedExtensionAPI.InspectedWindow.prototype.eval):
2795 (injectedExtensionAPI.extractCallbackArgument):
2796 * inspector/front-end/ExtensionServer.js:
2797 (WebInspector.ExtensionServer.prototype.):
2798 (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
2799 (WebInspector.ExtensionStatus):
2801 2013-02-11 Andrey Kosyakov <caseq@chromium.org>
2803 Web Inspector: [Extensions API] expose ExtensionServerClient to tests so tests use same port as extensions API
2804 https://bugs.webkit.org/show_bug.cgi?id=109443
2806 Reviewed by Vsevolod Vlasov.
2808 Promote extensionServer var to the outer closure, so it may be accessed by platform-specific (or test) code.
2810 * inspector/front-end/ExtensionAPI.js:
2811 (buildExtensionAPIInjectedScript):
2813 2013-02-11 Eric Seidel <eric@webkit.org>
2815 Move WebVTTToken off of MarkupTokenBase
2816 https://bugs.webkit.org/show_bug.cgi?id=109410
2818 Reviewed by Tony Gentilcore.
2820 This introduces a small amount of "copy/paste" code
2821 but actually makes WebVTTToken much smaller and simpler!
2822 This also frees the HTMLParser to have its Token class
2823 back to itself so we can tune it to make HTML faster.
2825 * html/track/WebVTTToken.h:
2827 (WebCore::WebVTTToken::WebVTTToken):
2828 (WebCore::WebVTTToken::appendToName):
2829 (WebCore::WebVTTToken::type):
2830 (WebCore::WebVTTToken::name):
2831 (WebCore::WebVTTToken::ensureIsCharacterToken):
2832 (WebCore::WebVTTToken::appendToCharacter):
2833 (WebCore::WebVTTToken::beginEmptyStartTag):
2834 (WebCore::WebVTTToken::beginStartTag):
2835 (WebCore::WebVTTToken::beginEndTag):
2836 (WebCore::WebVTTToken::beginTimestampTag):
2837 (WebCore::WebVTTToken::makeEndOfFile):
2838 (WebCore::WebVTTToken::clear):
2840 2013-02-11 Joshua Bell <jsbell@chromium.org>
2842 [V8] IndexedDB: Minor GC can collect IDBDatabase wrapper with versionchange handler
2843 https://bugs.webkit.org/show_bug.cgi?id=108670
2845 Reviewed by Kentaro Hara.
2847 Prevent IDBDatabase's wrapper from being GC'd while the database is open if it has
2848 listeners, as those listeners may close the database in response to events.
2850 Also, removed extraneous super-calls from hasPendingActivity() overrides.
2852 Test: storage/indexeddb/database-wrapper.html
2854 * Modules/indexeddb/IDBDatabase.cpp:
2855 (WebCore::IDBDatabase::hasPendingActivity): Implemented.
2856 * Modules/indexeddb/IDBDatabase.h: Declared.
2857 * Modules/indexeddb/IDBRequest.cpp:
2858 (WebCore::IDBRequest::hasPendingActivity): Simplified.
2859 * Modules/indexeddb/IDBTransaction.cpp:
2860 (WebCore::IDBTransaction::hasPendingActivity): Simplified.
2862 2013-02-11 Eric Seidel <eric@webkit.org>
2864 Remove AttributeBase now that NEW_XML is gone
2865 https://bugs.webkit.org/show_bug.cgi?id=109408
2867 Reviewed by Adam Barth.
2869 Just deleting code. HTMLToken::Attribute is now just
2870 the real class and not a typedef.
2872 * html/parser/CompactHTMLToken.cpp:
2873 (WebCore::CompactHTMLToken::CompactHTMLToken):
2874 * html/parser/HTMLTokenizer.cpp:
2875 (WebCore::AtomicHTMLToken::nameForAttribute):
2876 * xml/parser/MarkupTokenBase.h:
2882 2013-02-11 Eric Seidel <eric@webkit.org>
2884 Rename PreloadTask to StartTagScanner to match its purpose
2885 https://bugs.webkit.org/show_bug.cgi?id=109406
2887 Reviewed by Sam Weinig.
2889 As discussed in bug 107807.
2891 * html/parser/HTMLPreloadScanner.cpp:
2892 (WebCore::StartTagScanner::StartTagScanner):
2893 (WebCore::StartTagScanner::processAttributes):
2894 (WebCore::HTMLPreloadScanner::processToken):
2896 2013-02-11 Vsevolod Vlasov <vsevik@chromium.org>
2898 Web Inspector: WebInspector.Project refactorings.
2899 https://bugs.webkit.org/show_bug.cgi?id=109433
2901 Reviewed by Alexander Pavlov.
2903 This change prepares Workspace and Project to migration to project-per-domain mode for network based projects.
2904 Renamed WebInspector.WorkspaceProvider to WebInspector.ProjectDelegate.
2905 Renamed Project.name() to Project.id() and delegated it to project delegate.
2906 Added Project.displayName() method that is delegated to project delegate.
2907 SimpleWorkspaceProvider is now responsible for creation of SimpleWorkspaceDelegates and
2908 isolates various mappings from Project/ProjectDelegate concept.
2909 UISourceCode is now created based on path in the project.
2910 UISourceCode uri is now calculated based on project and path (right now uri is equal to path).
2913 * WebCore.vcproj/WebCore.vcproj:
2914 * inspector/compile-front-end.py:
2915 * inspector/front-end/FileSystemProjectDelegate.js: Renamed from Source/WebCore/inspector/front-end/FileSystemWorkspaceProvider.js.
2916 (WebInspector.FileSystemProjectDelegate):
2917 (WebInspector.FileSystemProjectDelegate.prototype.id):
2918 (WebInspector.FileSystemProjectDelegate.prototype.type):
2919 (WebInspector.FileSystemProjectDelegate.prototype.displayName):
2920 (WebInspector.FileSystemProjectDelegate.prototype.innerCallback):
2921 (WebInspector.FileSystemProjectDelegate.prototype.requestFileContent):
2922 (WebInspector.FileSystemProjectDelegate.prototype.setFileContent):
2923 (WebInspector.FileSystemProjectDelegate.prototype.contentCallback):
2924 (WebInspector.FileSystemProjectDelegate.prototype.searchInFileContent):
2925 (WebInspector.FileSystemProjectDelegate.prototype._contentTypeForPath):
2926 (WebInspector.FileSystemProjectDelegate.prototype._populate.filesLoaded):
2927 (WebInspector.FileSystemProjectDelegate.prototype._populate):
2928 (WebInspector.FileSystemProjectDelegate.prototype._addFile):
2929 (WebInspector.FileSystemProjectDelegate.prototype._removeFile):
2930 (WebInspector.FileSystemProjectDelegate.prototype.reset):
2931 (WebInspector.FileSystemUtils):
2932 (WebInspector.FileSystemUtils.errorHandler):
2933 (WebInspector.FileSystemUtils.requestFileSystem):
2934 (.fileSystemLoaded):
2936 (WebInspector.FileSystemUtils.requestFilesRecursive):
2940 (WebInspector.FileSystemUtils.requestFileContent):
2941 (.fileWriterCreated.fileTruncated):
2942 (.fileWriterCreated):
2944 (WebInspector.FileSystemUtils.setFileContent):
2945 (WebInspector.FileSystemUtils._getDirectory):
2947 (WebInspector.FileSystemUtils._readDirectory):
2948 (WebInspector.FileSystemUtils._requestEntries):
2949 * inspector/front-end/IsolatedFileSystemModel.js:
2950 (WebInspector.IsolatedFileSystemModel.prototype._innerAddFileSystem):
2951 * inspector/front-end/SimpleWorkspaceProvider.js:
2952 (WebInspector.SimpleProjectDelegate):
2953 (WebInspector.SimpleProjectDelegate.prototype.id):
2954 (WebInspector.SimpleProjectDelegate.prototype.displayName):
2955 (WebInspector.SimpleProjectDelegate.prototype.requestFileContent):
2956 (WebInspector.SimpleProjectDelegate.prototype.setFileContent):
2957 (WebInspector.SimpleProjectDelegate.prototype.searchInFileContent):
2958 (WebInspector.SimpleProjectDelegate.prototype.addFile):
2959 (WebInspector.SimpleProjectDelegate.prototype._uniquePath):
2960 (WebInspector.SimpleProjectDelegate.prototype.removeFile):
2961 (WebInspector.SimpleProjectDelegate.prototype.reset):
2962 (WebInspector.SimpleWorkspaceProvider):
2963 (WebInspector.SimpleWorkspaceProvider.uriForURL):
2964 (WebInspector.SimpleWorkspaceProvider.prototype.addFileForURL):
2965 (WebInspector.SimpleWorkspaceProvider.prototype.addUniqueFileForURL):
2966 (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL):
2967 (WebInspector.SimpleWorkspaceProvider.prototype.removeFile):
2968 (WebInspector.SimpleWorkspaceProvider.prototype.reset):
2969 * inspector/front-end/UISourceCode.js:
2970 (WebInspector.UISourceCode):
2971 (WebInspector.UISourceCode.prototype.path):
2972 (WebInspector.UISourceCode.prototype.uri):
2973 * inspector/front-end/WebKit.qrc:
2974 * inspector/front-end/Workspace.js:
2975 (WebInspector.FileDescriptor):
2976 (WebInspector.ProjectDelegate):
2977 (WebInspector.ProjectDelegate.prototype.id):
2978 (WebInspector.ProjectDelegate.prototype.displayName):
2979 (WebInspector.ProjectDelegate.prototype.requestFileContent):
2980 (WebInspector.ProjectDelegate.prototype.setFileContent):
2981 (WebInspector.ProjectDelegate.prototype.searchInFileContent):
2982 (WebInspector.Project):
2983 (WebInspector.Project.prototype.id):
2984 (WebInspector.Project.prototype.type):
2985 (WebInspector.Project.prototype.displayName):
2986 (WebInspector.Project.prototype.isServiceProject):
2987 (WebInspector.Project.prototype._fileAdded):
2988 (WebInspector.Project.prototype._fileRemoved):
2989 (WebInspector.Project.prototype._reset):
2990 (WebInspector.Project.prototype.uiSourceCode):
2991 (WebInspector.Project.prototype.uiSourceCodeForOriginURL):
2992 (WebInspector.Project.prototype.uiSourceCodeForURI):
2993 (WebInspector.Project.prototype.uiSourceCodes):
2994 (WebInspector.Project.prototype.requestFileContent):
2995 (WebInspector.Project.prototype.setFileContent):
2996 (WebInspector.Project.prototype.searchInFileContent):
2997 (WebInspector.Project.prototype.dispose):
2998 (WebInspector.Workspace.prototype.uiSourceCode):
2999 (WebInspector.Workspace.prototype.uiSourceCodeForURI):
3000 (WebInspector.Workspace.prototype.addProject):
3001 (WebInspector.Workspace.prototype.removeProject):
3002 (WebInspector.Workspace.prototype.project):
3003 (WebInspector.Workspace.prototype.uiSourceCodes):
3004 (WebInspector.Workspace.prototype.projectForUISourceCode):
3005 * inspector/front-end/inspector.html:
3007 2013-02-11 Yury Semikhatsky <yurys@chromium.org>
3009 Web Inspector: fix closure compiler warnings in the profiler code
3010 https://bugs.webkit.org/show_bug.cgi?id=109432
3012 Reviewed by Pavel Feldman.
3014 Updated type annotations to match the code.
3016 * inspector/front-end/NativeMemorySnapshotView.js:
3017 * inspector/front-end/ProfilesPanel.js:
3019 2013-02-11 Alexander Shalamov <alexander.shalamov@intel.com>
3021 [QT] Regression (r142444): Broke qt linux minimal build
3022 https://bugs.webkit.org/show_bug.cgi?id=109423
3024 Reviewed by Kenneth Rohde Christiansen.
3026 Test: cssom/cssvalue-comparison.html
3029 (WebCore::CSSValue::equals):
3031 2013-02-11 Andrey Lushnikov <lushnikov@chromium.org>
3033 Web Inspector: introduce WebInspector.TextUtils
3034 https://bugs.webkit.org/show_bug.cgi?id=109289
3036 Reviewed by Pavel Feldman.
3038 Add new WebInspector.TextUtils file and extract commonly used
3039 text-operation subroutines from DefaultTextEditor into it.
3041 No new tests: no change in behaviour.
3044 * WebCore.vcproj/WebCore.vcproj:
3045 * inspector/compile-front-end.py:
3046 * inspector/front-end/DefaultTextEditor.js:
3047 (WebInspector.TextEditorMainPanel.TokenHighlighter.prototype._isWord):
3048 (WebInspector.DefaultTextEditor.WordMovementController.prototype._rangeForCtrlArrowMove):
3049 (WebInspector.TextEditorMainPanel.BraceHighlightController.prototype.handleSelectionChange):
3050 * inspector/front-end/TextUtils.js: Added.
3051 (WebInspector.TextUtils.isStopChar):
3052 (WebInspector.TextUtils.isWordChar):
3053 (WebInspector.TextUtils.isSpaceChar):
3054 (WebInspector.TextUtils.isWord):
3055 (WebInspector.TextUtils.isBraceChar):
3056 * inspector/front-end/WebKit.qrc:
3057 * inspector/front-end/inspector.html:
3059 2013-02-11 Zan Dobersek <zdobersek@igalia.com>
3061 [GTK][Clang] Build errors in LocalizedStringsGtk.cpp
3062 https://bugs.webkit.org/show_bug.cgi?id=109418
3064 Reviewed by Philippe Normand.
3066 Use the C++ isfinite(float) and abs(float) (instead of fabsf(float))
3067 methods by including the WTF MathExtras.h header. Use a static cast to
3068 an integer type on the float return value of the abs(float) method call
3069 instead of the C-style cast.
3071 No new tests - no new functiolnality.
3073 * platform/gtk/LocalizedStringsGtk.cpp:
3074 (WebCore::localizedMediaTimeDescription):
3076 2013-02-11 Zan Dobersek <zdobersek@igalia.com>
3078 Unreviewed build fix for the WTFURL backend of KURL.
3080 * platform/KURL.cpp:
3081 (WebCore::KURL::isSafeToSendToAnotherThread): m_urlImpl is of RefPtr type so use
3082 the appropriate operator on it when calling the isSafeToSendToAnotherThread method.
3084 2013-02-11 Mike West <mkwst@chromium.org>
3086 Range::collapsed callers should explicitly ASSERT_NO_EXCEPTION.
3087 https://bugs.webkit.org/show_bug.cgi?id=108921
3089 Reviewed by Jochen Eisinger.
3091 For clarity and consistency, this patch adjusts Range::collapsed() to
3092 drop the default value of the ExceptionCode parameter it accepts. The
3093 three call sites that called the method with no arguments (all part of
3094 Editor::rangeOfString) will now explicitly ASSERT_NO_EXCEPTION.
3098 * editing/Editor.cpp:
3099 (WebCore::Editor::rangeOfString):
3101 2013-02-11 Alexei Filippov <alph@chromium.org>
3103 Web Inspector: Split Profiler domain in protocol into Profiler and HeapProfiler
3104 https://bugs.webkit.org/show_bug.cgi?id=108653
3106 Reviewed by Yury Semikhatsky.
3108 Currently CPU and heap profilers share the same domain 'Profiler' in the protocol.
3109 In fact these two profile types have not too much in common. So put each into its own domain.
3110 It should also help when Profiles panel gets split into several tools.
3111 This is the phase 1 which adds InspectorHeapProfilerAgent but doesn't
3112 change the original InspectorProfilerAgent.
3115 * GNUmakefile.list.am:
3118 * WebCore.vcproj/WebCore.vcproj:
3119 * WebCore.vcxproj/WebCore.vcxproj:
3120 * WebCore.vcxproj/WebCore.vcxproj.filters:
3121 * WebCore.xcodeproj/project.pbxproj:
3122 * inspector/Inspector.json:
3123 * inspector/InspectorAllInOne.cpp:
3124 * inspector/InspectorController.cpp:
3125 (WebCore::InspectorController::InspectorController):
3126 * inspector/InspectorHeapProfilerAgent.cpp: Added.
3128 (WebCore::InspectorHeapProfilerAgent::create):
3129 (WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
3130 (WebCore::InspectorHeapProfilerAgent::~InspectorHeapProfilerAgent):
3131 (WebCore::InspectorHeapProfilerAgent::resetState):
3132 (WebCore::InspectorHeapProfilerAgent::resetFrontendProfiles):
3133 (WebCore::InspectorHeapProfilerAgent::setFrontend):
3134 (WebCore::InspectorHeapProfilerAgent::clearFrontend):
3135 (WebCore::InspectorHeapProfilerAgent::restore):
3136 (WebCore::InspectorHeapProfilerAgent::collectGarbage):
3137 (WebCore::InspectorHeapProfilerAgent::createSnapshotHeader):
3138 (WebCore::InspectorHeapProfilerAgent::hasHeapProfiler):
3139 (WebCore::InspectorHeapProfilerAgent::getProfileHeaders):
3140 (WebCore::InspectorHeapProfilerAgent::getHeapSnapshot):
3141 (WebCore::InspectorHeapProfilerAgent::removeProfile):
3142 (WebCore::InspectorHeapProfilerAgent::takeHeapSnapshot):
3143 (WebCore::InspectorHeapProfilerAgent::getObjectByHeapObjectId):
3144 (WebCore::InspectorHeapProfilerAgent::getHeapObjectId):
3145 (WebCore::InspectorHeapProfilerAgent::reportMemoryUsage):
3146 * inspector/InspectorHeapProfilerAgent.h: Added.
3148 (InspectorHeapProfilerAgent):
3149 (WebCore::InspectorHeapProfilerAgent::clearProfiles):
3150 * inspector/InspectorInstrumentation.cpp:
3152 (WebCore::InspectorInstrumentation::didCommitLoadImpl):
3153 * inspector/InstrumentingAgents.h:
3155 (InstrumentingAgents):
3156 (WebCore::InstrumentingAgents::inspectorHeapProfilerAgent):
3157 (WebCore::InstrumentingAgents::setInspectorHeapProfilerAgent):
3158 * inspector/WorkerInspectorController.cpp:
3159 (WebCore::WorkerInspectorController::WorkerInspectorController):
3160 * inspector/front-end/HeapSnapshotDataGrids.js:
3161 * inspector/front-end/HeapSnapshotGridNodes.js:
3162 (WebInspector.HeapSnapshotGenericObjectNode.prototype.queryObjectContent):
3163 * inspector/front-end/HeapSnapshotView.js:
3164 (WebInspector.HeapProfileHeader.prototype.startSnapshotTransfer):
3165 (WebInspector.HeapProfileHeader.prototype.saveToFile.onOpen):
3166 (WebInspector.HeapProfileHeader.prototype.saveToFile):
3167 * inspector/front-end/ProfilesPanel.js:
3168 (WebInspector.ProfilesPanel):
3169 (WebInspector.ProfilesPanel.prototype._clearProfiles):
3170 (WebInspector.ProfilesPanel.prototype._garbageCollectButtonClicked):
3171 (WebInspector.ProfilesPanel.prototype._removeProfileHeader):
3172 (WebInspector.ProfilesPanel.prototype._populateProfiles.var):
3173 (WebInspector.ProfilesPanel.prototype._populateProfiles.populateCallback):
3174 (WebInspector.ProfilesPanel.prototype._populateProfiles):
3175 (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot):
3176 (WebInspector.ProfilesPanel.prototype.revealInView):
3177 (WebInspector.HeapProfilerDispatcher):
3178 (WebInspector.HeapProfilerDispatcher.prototype.addProfileHeader):
3179 (WebInspector.HeapProfilerDispatcher.prototype.addHeapSnapshotChunk):
3180 (WebInspector.HeapProfilerDispatcher.prototype.finishHeapSnapshot):
3181 (WebInspector.HeapProfilerDispatcher.prototype.resetProfiles):
3182 (WebInspector.HeapProfilerDispatcher.prototype.reportHeapSnapshotProgress):
3183 * inspector/front-end/TimelinePanel.js:
3184 (WebInspector.TimelinePanel.prototype._garbageCollectButtonClicked):
3185 * inspector/front-end/inspector.js:
3186 (WebInspector.doLoadedDone):
3188 2013-02-11 Mike West <mkwst@chromium.org>
3190 Use IGNORE_EXCEPTION for Editor::countMatchesForText's ignored exceptions.
3191 https://bugs.webkit.org/show_bug.cgi?id=109372
3193 Reviewed by Jochen Eisinger.
3195 Rather than implicitly ignoring exceptions, we should use the
3196 IGNORE_EXCEPTION macro for clarity.
3198 * editing/Editor.cpp:
3199 (WebCore::Editor::countMatchesForText):
3201 2013-02-11 Zoltan Arvai <zarvai@inf.u-szeged.hu>
3203 [Qt] Unreviewed. Fix minimal build after r142444.
3206 (WebCore::CSSValue::equals):
3208 2013-02-11 Christophe Dumez <ch.dumez@sisa.samsung.com>
3210 [EFL] Stop using smart pointers for Ecore_Timer
3211 https://bugs.webkit.org/show_bug.cgi?id=109409
3213 Reviewed by Kenneth Rohde Christiansen.
3215 Stop using a smart pointer for Ecore_Timer in RunLoop::TimerBase. This
3216 is a bad idea because the timer handle becomes invalid as soon as the
3217 timer callback returns ECORE_CALLBACK_CANCEL. This may lead to crashes
3218 on destruction because OwnPtr calls ecore_timer_del() on an invalid
3221 No new tests, already covered by exiting tests.
3223 * platform/RunLoop.h:
3225 * platform/efl/RunLoopEfl.cpp:
3226 (WebCore::RunLoop::TimerBase::timerFired):
3227 (WebCore::RunLoop::TimerBase::start):
3228 (WebCore::RunLoop::TimerBase::stop):
3230 2013-02-11 Vladislav Kaznacheev <kaznacheev@chromium.org>
3232 Web Inspector: Allow SplitView to keep the sidebar size as a fraction of the container size
3233 https://bugs.webkit.org/show_bug.cgi?id=109414
3235 Reviewed by Vsevolod Vlasov.
3237 SplitView now interprets defaultSidebarWidth and defaultSidebarHeight values between 0 and 1 as
3238 fractions of the total container size. The sidebar then will grow or shrink along with the container.
3239 When the sidebar is resized manually the updated ratio is stored in the settings.
3241 * inspector/front-end/SplitView.js:
3242 (WebInspector.SplitView):
3243 (WebInspector.SplitView.prototype._removeAllLayoutProperties):
3244 (WebInspector.SplitView.prototype._updateTotalSize):
3245 (WebInspector.SplitView.prototype._innerSetSidebarSize):
3246 (WebInspector.SplitView.prototype._saveSidebarSize):
3248 2013-02-11 Pavel Feldman <pfeldman@chromium.org>
3250 Web Inspector: highlight DOM nodes on hover while debugging
3251 https://bugs.webkit.org/show_bug.cgi?id=109355
3253 Reviewed by Vsevolod Vlasov.
3255 Along with showing the popover, highlight the remote object as node.
3257 * inspector/front-end/ObjectPopoverHelper.js:
3258 (WebInspector.ObjectPopoverHelper.prototype.):
3259 (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover):
3260 (WebInspector.ObjectPopoverHelper.prototype._onHideObjectPopover):
3262 2013-02-11 Andrey Lushnikov <lushnikov@chromium.org>
3264 Web Inspector: displaying whitespace characters is broken
3265 https://bugs.webkit.org/show_bug.cgi?id=109412
3267 Reviewed by Vsevolod Vlasov.
3269 Add "pointer-events: none" rule for pseudo-class "before", which
3270 maintains rendering of whitespace characters.
3274 * inspector/front-end/inspectorSyntaxHighlight.css:
3275 (.webkit-whitespace::before):
3277 2013-02-11 Alexander Pavlov <apavlov@chromium.org>
3279 Web Inspector: Implement position-based sourcemapping for stylesheets
3280 https://bugs.webkit.org/show_bug.cgi?id=109168
3282 Reviewed by Vsevolod Vlasov.
3284 This change introduces support for position-based source maps for CSS stylesheets.
3285 Sourcemaps and originating resources (sass, scss, etc.) are loaded synchronously
3286 upon the CSS UISourceCode addition. RangeBasedSourceMap is removed as it is not used.
3288 Test: http/tests/inspector/stylesheet-source-mapping.html
3290 * inspector/front-end/CSSStyleModel.js:
3291 (WebInspector.CSSStyleModel):
3292 (WebInspector.CSSStyleModel.prototype.setSourceMapping):
3293 (WebInspector.CSSStyleModel.prototype.rawLocationToUILocation):
3294 (WebInspector.CSSStyleModel.LiveLocation.prototype.uiLocation):
3295 (WebInspector.CSSLocation):
3296 (WebInspector.CSSProperty):
3297 (WebInspector.CSSProperty.parsePayload):
3298 * inspector/front-end/CompilerScriptMapping.js:
3299 (WebInspector.CompilerScriptMapping):
3300 (WebInspector.CompilerScriptMapping.prototype.rawLocationToUILocation):
3301 (WebInspector.CompilerScriptMapping.prototype.loadSourceMapForScript):
3302 * inspector/front-end/SASSSourceMapping.js:
3303 (WebInspector.SASSSourceMapping):
3304 (WebInspector.SASSSourceMapping.prototype._styleSheetChanged.callback):
3305 (WebInspector.SASSSourceMapping.prototype._styleSheetChanged):
3306 (WebInspector.SASSSourceMapping.prototype._reloadCSS):
3307 (WebInspector.SASSSourceMapping.prototype._resourceAdded.didRequestContent):
3308 (WebInspector.SASSSourceMapping.prototype._resourceAdded):
3309 (WebInspector.SASSSourceMapping.prototype._loadAndProcessSourceMap):
3310 (WebInspector.SASSSourceMapping.prototype.loadSourceMapForStyleSheet):
3311 (WebInspector.SASSSourceMapping.prototype._bindUISourceCode):
3312 (WebInspector.SASSSourceMapping.prototype.rawLocationToUILocation):
3313 (WebInspector.SASSSourceMapping.prototype.uiLocationToRawLocation):
3314 (WebInspector.SASSSourceMapping.prototype._reset):
3315 * inspector/front-end/SourceMap.js:
3316 (WebInspector.SourceMap):
3317 (WebInspector.SourceMap.load):
3318 (WebInspector.SourceMap.prototype.findEntry):
3319 (WebInspector.SourceMap.prototype.findEntryReversed):
3320 (WebInspector.SourceMap.prototype._parseMap):
3321 * inspector/front-end/StylesSourceMapping.js:
3322 (WebInspector.StylesSourceMapping):
3323 (WebInspector.StylesSourceMapping.prototype._bindUISourceCode):
3324 * inspector/front-end/inspector.js:
3326 2013-02-11 Alexander Shalamov <alexander.shalamov@intel.com>
3328 Implement CSSValue::equals(const CSSValue&) to optimise CSSValue comparison
3329 https://bugs.webkit.org/show_bug.cgi?id=102901
3331 Reviewed by Antti Koivisto.
3333 Added comparison method to CSSValue and its children, so that the
3334 css values could be compared efficiently. Before this patch, CSSValue
3335 objects were compared using strings that were generated by the cssText() method.
3337 Test: cssom/cssvalue-comparison.html
3339 * css/CSSAspectRatioValue.cpp:
3340 (WebCore::CSSAspectRatioValue::equals):
3342 * css/CSSAspectRatioValue.h:
3343 (CSSAspectRatioValue):
3344 * css/CSSBasicShapes.cpp:
3345 (WebCore::CSSBasicShapeRectangle::equals):
3347 (WebCore::CSSBasicShapeCircle::equals):
3348 (WebCore::CSSBasicShapeEllipse::equals):
3349 (WebCore::CSSBasicShapePolygon::equals):
3350 * css/CSSBasicShapes.h:
3351 (CSSBasicShapeRectangle):
3352 (CSSBasicShapeCircle):
3353 (CSSBasicShapeEllipse):
3354 (CSSBasicShapePolygon):
3355 * css/CSSBorderImageSliceValue.cpp:
3356 (WebCore::CSSBorderImageSliceValue::equals):
3358 * css/CSSBorderImageSliceValue.h:
3359 (CSSBorderImageSliceValue):
3360 * css/CSSCalculationValue.cpp:
3361 (WebCore::CSSCalcValue::equals):
3363 (WebCore::CSSCalcPrimitiveValue::equals):
3364 (CSSCalcPrimitiveValue):
3365 (WebCore::CSSCalcPrimitiveValue::type):
3366 (WebCore::CSSCalcBinaryOperation::equals):
3367 (CSSCalcBinaryOperation):
3368 (WebCore::CSSCalcBinaryOperation::type):
3369 * css/CSSCalculationValue.h:
3370 (WebCore::CSSCalcExpressionNode::equals):
3371 (CSSCalcExpressionNode):
3373 * css/CSSCanvasValue.cpp:
3374 (WebCore::CSSCanvasValue::equals):
3376 * css/CSSCanvasValue.h:
3378 * css/CSSComputedStyleDeclaration.cpp:
3379 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3380 (WebCore::CSSComputedStyleDeclaration::cssPropertyMatches):
3381 (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForSidesShorthand):
3382 * css/CSSCrossfadeValue.cpp:
3383 (WebCore::CSSCrossfadeValue::equals):
3385 * css/CSSCrossfadeValue.h:
3386 (CSSCrossfadeValue):
3387 * css/CSSCursorImageValue.cpp:
3388 (WebCore::CSSCursorImageValue::equals):
3390 * css/CSSCursorImageValue.h:
3391 (CSSCursorImageValue):
3392 * css/CSSFontFaceSrcValue.cpp:
3393 (WebCore::CSSFontFaceSrcValue::equals):
3395 * css/CSSFontFaceSrcValue.h:
3396 (CSSFontFaceSrcValue):
3397 * css/CSSFunctionValue.cpp:
3398 (WebCore::CSSFunctionValue::equals):
3400 * css/CSSFunctionValue.h:
3402 * css/CSSGradientValue.cpp:
3403 (WebCore::CSSLinearGradientValue::equals):
3405 (WebCore::CSSRadialGradientValue::equals):
3406 * css/CSSGradientValue.h:
3407 (WebCore::CSSGradientColorStop::operator==):
3408 (CSSLinearGradientValue):
3409 (CSSRadialGradientValue):
3410 * css/CSSImageValue.cpp:
3411 (WebCore::CSSImageValue::equals):
3413 * css/CSSImageValue.h:
3415 * css/CSSInheritedValue.h:
3416 (WebCore::CSSInheritedValue::equals):
3417 (CSSInheritedValue):
3418 * css/CSSInitialValue.h:
3419 (WebCore::CSSInitialValue::equals):
3421 * css/CSSLineBoxContainValue.h:
3422 (WebCore::CSSLineBoxContainValue::equals):
3423 * css/CSSPrimitiveValue.cpp:
3424 (WebCore::CSSPrimitiveValue::equals):
3426 * css/CSSPrimitiveValue.h:
3427 (CSSPrimitiveValue):
3428 * css/CSSReflectValue.cpp:
3429 (WebCore::CSSReflectValue::equals):
3431 * css/CSSReflectValue.h:
3433 * css/CSSTimingFunctionValue.cpp:
3434 (WebCore::CSSCubicBezierTimingFunctionValue::equals):
3436 (WebCore::CSSStepsTimingFunctionValue::equals):
3437 * css/CSSTimingFunctionValue.h:
3438 (WebCore::CSSLinearTimingFunctionValue::equals):
3439 (CSSLinearTimingFunctionValue):
3440 (CSSCubicBezierTimingFunctionValue):
3441 (CSSStepsTimingFunctionValue):