fix bug graphene::chain::account_id_type from string

--- libraries/plugins/account_history/account_history_plugin.cpp
+++ libraries/plugins/account_history/account_history_plugin.cpp
@@ -192,7 +192,7 @@
        obj.total_ops = ath.sequence;
    });

-   flat_set<account_id_type>& full_accounts = _self.full_history_accounts();
+   const flat_set<account_id_type>& full_accounts = _self.full_history_accounts();
    if (full_accounts.count(account_id)){
 	   uint32_t num = stats_obj.total_ops - stats_obj.removed_ops;
 	   if (num > 100){
@@ -300,11 +300,12 @@
 	if (options.count("max-ops-per-account")) {
 		my->_max_ops_per_account = options["max-ops-per-account"].as<uint32_t>();
 	}
-	LOAD_VALUE_SET(options, "full-history", my->_full_history_accounts, graphene::chain::account_id_type);
-
+
 	if (options.count("full-history")) {
 			const std::vector<std::string>& ops = options["full-history"].as<std::vector<std::string>>();
-			std::transform(ops.begin(), ops.end(), std::inserter(my->_full_history_accounts, my->_full_history_accounts.end()), &graphene::app::dejsonify<graphene::chain::account_id_type>);
+    std::transform(ops.begin(), ops.end(), std::inserter(my->_full_history_accounts, my->_full_history_accounts.end()), [](string s){
+      return fc::variant(s).as<graphene::chain::account_id_type>();
+    });
 	}

 	//if (options.count("full-history")){


Fix certificate parsing in mbed TLS init

Signed-off-by: José Simões <1616ff7a83d123f98f8f38fa2524eab406644781@eclo.solutions>

--- src/PAL/COM/sockets/ssl/mbedTLS/ssl_generic_init_internal.cpp
+++ src/PAL/COM/sockets/ssl/mbedTLS/ssl_generic_init_internal.cpp
@@ -160,14 +160,15 @@
     // parse certificate if passed
     if(certificate != NULL && certLength > 0)
     {
-        if(mbedtls_x509_crt_parse( &ca, (const unsigned char*)certificate, certLength ) != 0)
+        // need to add an extra byte here because the mbed TLS API is expecting
+        // the buffer length INCLUDING the terminator
+        if(mbedtls_x509_crt_parse( &ca, (const unsigned char*)certificate, certLength + 1 ) != 0)
         {
             // x509_crt_parse_failed
             goto error;
         }

         mbedtls_ssl_conf_ca_chain( context->conf, &ca, NULL );
-        mbedtls_ssl_conf_authmode( context->conf, MBEDTLS_SSL_VERIFY_REQUIRED );
     }

     // set certificate verification


Don't disconnect folderComplete signals that have just been connected
by the next round of queued mail checks as a result of a finishedCheck
signal.

Also don't emit checkDone() when that is not the case.

Those two should finally fix queuing dimap mailchecks.

svn path=/trunk/kdepim/; revision=293689

--- kmail/kmacctcachedimap.cpp
+++ kmail/kmacctcachedimap.cpp
@@ -329,17 +329,16 @@
   connect(folder, SIGNAL(folderComplete(KMFolderCachedImap*, bool)),
 	  this, SLOT(postProcessNewMail(KMFolderCachedImap*, bool)));
   folder->serverSync( interactive && isProgressDialogEnabled() );
-  checkDone(false, 0);
 }

 void KMAcctCachedImap::postProcessNewMail( KMFolderCachedImap* folder, bool )
 {
   mSyncActive = false;
+  disconnect(folder, SIGNAL(folderComplete(KMFolderCachedImap*, bool)),
+             this, SLOT(postProcessNewMail(KMFolderCachedImap*, bool)));
   setCheckingMail( false );
   emit finishedCheck(false);
-  disconnect(folder, SIGNAL(folderComplete(KMFolderCachedImap*, bool)),
-      this, SLOT(postProcessNewMail(KMFolderCachedImap*, bool)));
-  //postProcessNewMail(static_cast<KMFolder*>(folder));
+   //postProcessNewMail(static_cast<KMFolder*>(folder));
 }

 //


adding some #ifndef NDEBUG

adding some #ifndef NDEBUG

svn path=/trunk/kdenetwork/kmail/; revision=198966

--- kmail/objecttreeparser.cpp
+++ kmail/objecttreeparser.cpp
@@ -1442,7 +1442,7 @@
     if ( !cryptPlug )
       cryptPlug = kernel->cryptPlugList()->active();
     if( cryptPlug ) {
-      /// ### add ifdef NDEBUG
+#ifndef NDEBUG
       if( !doCheck )
 	kdDebug(5006) << "ObjectTreeParser::writeOpaqueOrMultipartSignedData: showing OpenPGP (Encrypted+Signed) data" << endl;
       else
@@ -1450,7 +1450,7 @@
 	  kdDebug(5006) << "ObjectTreeParser::writeOpaqueOrMultipartSignedData: processing SMIME Signed data" << endl;
 	else
 	  kdDebug(5006) << "ObjectTreeParser::writeOpaqueOrMultipartSignedData: processing Opaque Signed data" << endl;
-
+#endif
       if( doCheck ){
         kdDebug(5006) << "ObjectTreeParser::writeOpaqueOrMultipartSignedData: going to call CRYPTPLUG "
 		      << cryptPlug->libName() << endl;
@@ -1777,7 +1777,7 @@
         fileC.close();
       }
     }
-    // ### add ifdef NDEBUG
+#ifndef NDEBUG
     QCString deb;
     deb =  "\n\nE N C R Y P T E D    D A T A = ";
     if( cipherIsBinary )
@@ -1789,7 +1789,7 @@
     }
     deb += "\n\n";
     kdDebug(5006) << deb << endl;
-
+#endif


Corrected typo.

svn path=/trunk/kdepim/; revision=297076

--- kmail/objecttreeparser.cpp
+++ kmail/objecttreeparser.cpp
@@ -561,7 +561,7 @@
                        .arg( cryptPlugLibName );
             break;
           case CANT_VERIFY_SIGNATURES:
-            errorMsg = i18n( "Crypto plug-in \"%1\" cannott verify signatures." )
+            errorMsg = i18n( "Crypto plug-in \"%1\" cannot verify signatures." )
                        .arg( cryptPlugLibName );
             break;
           case NO_PLUGIN:


cleanup kDebugs

cleanup kDebugs

svn path=/branches/kdepim/enterprise4/kdepim/; revision=972796

--- kmail/objecttreeparser.cpp
+++ kmail/objecttreeparser.cpp
@@ -650,7 +650,7 @@

 void ObjectTreeParser::writeDecryptionInProgressBlock()
 {
-  kDebug(5006) << k_funcinfo << endl;
+  kDebug();
   assert( mReader );
   // PENDING(marc) find an animated icon here:
   //const QString iconName = KGlobal::instance()->iconLoader()->iconPath( "decrypted", KIcon::Small );
@@ -2190,10 +2190,10 @@
 static QString makeShowAuditLogLink( const GpgME::Error & err, const QString & auditLog ) {
   if ( const unsigned int code = err.code() ) {
     if ( code == GPG_ERR_NOT_IMPLEMENTED ) {
-      kDebug(5006) << "makeShowAuditLogLink: not showing link (not implemented)";
+      kDebug() << "not showing link (not implemented)";
       return QString();
     } else if ( code == GPG_ERR_NO_DATA ) {
-      kDebug(5006) << "makeShowAuditLogLink: not showing link (not available)";
+      kDebug() << "not showing link (not available)";
       return i18n("No Audit Log available");
     } else {
       return i18n("Error Retrieving Audit Log: %1", QString::fromLocal8Bit( err.asString() ) );


Backport r928247 by tmcguire from trunk to the 4.2 branch:

Merged revisions 928245 via svnmerge from
svn+ssh://tmcguire@svn.kde.org/home/kde/branches/kdepim/enterprise4/kdepim

................
  r928245 | tmcguire | 2009-02-19 10:09:22 +0100 (Thu, 19 Feb 2009) | 9 lines

  Merged revisions 927605 via svnmerge from
  svn+ssh://tmcguire@svn.kde.org/home/kde/branches/kdepim/enterprise/kdepim

  ........
    r927605 | mutz | 2009-02-17 22:58:13 +0100 (Tue, 17 Feb 2009) | 1 line

    Don't leak Kleo::Jobs
  ........
................

svn path=/branches/KDE/4.2/kdepim/; revision=928260

--- kmail/objecttreeparser.cpp
+++ kmail/objecttreeparser.cpp
@@ -440,17 +440,19 @@
     if ( doCheck && cryptProto ) {
       GpgME::VerificationResult result;
       if ( data ) { // detached
-        if ( Kleo::VerifyDetachedJob * const job = cryptProto->verifyDetachedJob() ) {
+        const std::auto_ptr<Kleo::VerifyDetachedJob> job( cryptProto->verifyDetachedJob() );
+        if ( job.get() ) {
           KleoJobExecutor executor;
-          result = executor.exec( job, signaturetext, cleartext );
+          result = executor.exec( job.get(), signaturetext, cleartext );
           messagePart.auditLog = executor.auditLogAsHtml();
         } else {
           cryptPlugError = CANT_VERIFY_SIGNATURES;
         }
       } else { // opaque
-        if ( Kleo::VerifyOpaqueJob * const job = cryptProto->verifyOpaqueJob() ) {
+        const std::auto_ptr<Kleo::VerifyOpaqueJob> job( cryptProto->verifyOpaqueJob() );
+        if ( job.get() ) {
           KleoJobExecutor executor;
-          result = executor.exec( job, signaturetext, cleartext );
+          result = executor.exec( job.get(), signaturetext, cleartext );
           messagePart.auditLog = executor.auditLogAsHtml();
         } else {
           cryptPlugError = CANT_VERIFY_SIGNATURES;
@@ -479,7 +481,7 @@
         messagePart.isGoodSignature = true;

       // get key for this signature
-      Kleo::KeyListJob *job = cryptProto->keyListJob();
+      const std::auto_ptr<Kleo::KeyListJob> job( cryptProto->keyListJob() );
       std::vector<GpgME::Key> keys;
       if ( signature.fingerprint() ) // if the fingerprint is empty, the keylisting would return all available keys
         GpgME::KeyListResult keyListRes = job->exec( QStringList( QString::fromLatin1( signature.fingerprint() ) ),
@@ -689,14 +691,14 @@
     if ( mReader )
       emit mReader->noDrag(); // in case pineentry pops up, don't let kmheaders start a drag afterwards

-    Kleo::DecryptVerifyJob* job = cryptProto->decryptVerifyJob();
-    if ( !job ) {
+    const std::auto_ptr<Kleo::DecryptVerifyJob> job( cryptProto->decryptVerifyJob() );
+    if ( !job.get() ) {
       cryptPlugError = CANT_DECRYPT;
       cryptProto = 0;
     } else {
       QByteArray plainText;
       KleoJobExecutor executor;
-      const std::pair<GpgME::DecryptionResult,GpgME::VerificationResult> res = executor.exec( job, ciphertext, plainText );
+      const std::pair<GpgME::DecryptionResult,GpgME::VerificationResult> res = executor.exec( job.get(), ciphertext, plainText );
       const GpgME::DecryptionResult decryptResult = res.first;
       const GpgME::VerificationResult verifyResult = res.second;
       signatureFound = verifyResult.signatures().size() > 0;
@@ -1462,9 +1464,9 @@

       const QByteArray certData = node->msgPart().bodyDecodedBinary();

-      Kleo::ImportJob *import = smimeCrypto->importJob();
+      const std::auto_ptr<Kleo::ImportJob> import( smimeCrypto->importJob() );
       KleoJobExecutor executor;
-      const GpgME::ImportResult res = executor.exec( import, certData );
+      const GpgME::ImportResult res = executor.exec( import.get(), certData );
       if ( res.error() ) {
         htmlWriter()->queue( i18n( "Sorry, certificate could not be imported.<br />"
                                    "Reason: %1", QString::fromLocal8Bit( res.error().asString() ) ) );
@@ -1683,8 +1685,8 @@
   GlobalSettings::setChiasmusDecryptionKey( selectorDlg.key() );
   assert( !GlobalSettings::chiasmusDecryptionKey().isEmpty() );

-  Kleo::SpecialJob * job = chiasmus->specialJob( "x-decrypt", QMap<QString,QVariant>() );
-  if ( !job ) {
+  const std::auto_ptr<Kleo::SpecialJob> job( chiasmus->specialJob( "x-decrypt", QMap<QString,QVariant>() ) );
+  if ( !job.get() ) {
     errorText = i18n( "Chiasmus backend does not offer the "
                       "\"x-decrypt\" function. Please report this bug." );
     return false;


Reinstate ResolveURL step in nacl manifest resolver -- mistake from 122409.

R=sehr@google.com
BUG= none
TEST= nacl_integration (should add one for this manifest lookup issue though)

Review URL: https://chromiumcodereview.appspot.com/9422006

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@122568 0039d316-1c4b-4281-b951-d872f2087c98

--- ppapi/native_client/src/trusted/plugin/json_manifest.cc
+++ ppapi/native_client/src/trusted/plugin/json_manifest.cc
@@ -300,14 +300,15 @@
   }
   const Json::Value& isa_dict = dictionary[key];
   nacl::string error_string;
+  nacl::string relative_url;
   if (!GetURLFromISADictionary(isa_dict, key, sandbox_isa, prefer_portable,
-                               full_url, &error_string, pnacl_translate)) {
+                               &relative_url, &error_string, pnacl_translate)) {
     error_info->SetReport(ERROR_MANIFEST_RESOLVE_URL,
                           key + nacl::string(" manifest resolution error: ") +
                           error_string);
     return false;
   }
-  return true;
+  return manifest->ResolveURL(relative_url, full_url, error_info);
 }

 }  // namespace


#i12587# Inserting/editing arbitrary text objects in chart

--- chart2/source/controller/main/ChartController_Window.cxx
+++ chart2/source/controller/main/ChartController_Window.cxx
@@ -564,21 +564,6 @@
     if( isDoubleClick(rMEvt) ) //do not change selection if double click
         return;//double click is handled further in mousebutton up

-    // #i12587# support for shapes in chart
-    if ( m_eDrawMode == CHARTDRAW_INSERT )
-    {
-        if ( m_aSelection.hasSelection() )
-        {
-            m_aSelection.clearSelection();
-        }
-        if ( !pDrawViewWrapper->IsAction() )
-        {
-            pDrawViewWrapper->BegCreateObj( aMPos);
-        }
-        impl_SetMousePointer( rMEvt );
-        return;
-    }
-
     SdrHdl* pHitSelectionHdl = 0;
     //switch from move to resize if handle is hit on a resizeable object
     if( m_aSelection.isResizeableObjectSelected() )
@@ -586,6 +571,22 @@
     //only change selection if no selection handles are hit
     if( !pHitSelectionHdl )
     {
+        // #i12587# support for shapes in chart
+        if ( m_eDrawMode == CHARTDRAW_INSERT &&
+             ( !pDrawViewWrapper->IsMarkedHit( aMPos ) || !m_aSelection.isDragableObjectSelected() ) )
+        {
+            if ( m_aSelection.hasSelection() )
+            {
+                m_aSelection.clearSelection();
+            }
+            if ( !pDrawViewWrapper->IsAction() )
+            {
+                pDrawViewWrapper->BegCreateObj( aMPos);
+            }
+            impl_SetMousePointer( rMEvt );
+            return;
+        }
+
         m_aSelection.adaptSelectionToNewPos( aMPos, pDrawViewWrapper
             , rMEvt.IsRight(), m_bWaitingForDoubleClick );

@@ -689,29 +690,26 @@
         }

         // #i12587# support for shapes in chart
-        if ( m_eDrawMode == CHARTDRAW_INSERT )
-        {
-            if ( pDrawViewWrapper->IsCreateObj() )
-            {
-                pDrawViewWrapper->EndCreateObj( SDRCREATE_FORCEEND );
-                if ( pDrawViewWrapper->AreObjectsMarked() )
-                {
-                    if ( pDrawViewWrapper->GetCurrentObjIdentifier() == OBJ_TEXT )
-                    {
-                        executeDispatch_EditText();
-                    }
-                    else
-                    {
-                        m_aSelection.adaptSelectionToNewPos( aMPos, pDrawViewWrapper, rMEvt.IsRight(), m_bWaitingForDoubleClick );
-                        m_aSelection.applySelection( pDrawViewWrapper );
-                    }
+        if ( m_eDrawMode == CHARTDRAW_INSERT && pDrawViewWrapper->IsCreateObj() )
+        {
+            pDrawViewWrapper->EndCreateObj( SDRCREATE_FORCEEND );
+            if ( pDrawViewWrapper->AreObjectsMarked() )
+            {
+                if ( pDrawViewWrapper->GetCurrentObjIdentifier() == OBJ_TEXT )
+                {
+                    executeDispatch_EditText();
                 }
                 else
                 {
                     m_aSelection.adaptSelectionToNewPos( aMPos, pDrawViewWrapper, rMEvt.IsRight(), m_bWaitingForDoubleClick );
                     m_aSelection.applySelection( pDrawViewWrapper );
-                    setDrawMode( CHARTDRAW_SELECT );
-                }
+                }
+            }
+            else
+            {
+                m_aSelection.adaptSelectionToNewPos( aMPos, pDrawViewWrapper, rMEvt.IsRight(), m_bWaitingForDoubleClick );
+                m_aSelection.applySelection( pDrawViewWrapper );
+                setDrawMode( CHARTDRAW_SELECT );
             }
         }
         else if ( pDrawViewWrapper->IsDragObj() )
@@ -1540,38 +1538,7 @@
         sal_uInt16 nModifier = rEvent.GetModifier();
         BOOL bLeftDown = rEvent.IsLeft();

-        if ( m_eDrawMode == CHARTDRAW_INSERT )
-        {
-            // #i12587# support for shapes in chart
-            PointerStyle ePointerStyle = POINTER_DRAW_RECT;
-            SdrObjKind eKind = static_cast< SdrObjKind >( m_pDrawViewWrapper->GetCurrentObjIdentifier() );
-            switch ( eKind )
-            {
-                case OBJ_LINE:
-                    {
-                        ePointerStyle = POINTER_DRAW_LINE;
-                    }
-                    break;
-                case OBJ_RECT:
-                    {
-                        ePointerStyle = POINTER_DRAW_RECT;
-                    }
-                    break;
-                case OBJ_TEXT:
-                    {
-                        ePointerStyle = POINTER_DRAW_TEXT;
-                    }
-                    break;
-                default:
-                    {
-                        ePointerStyle = POINTER_DRAW_RECT;
-                    }
-                    break;
-            }
-            pWindow->SetPointer( Pointer( ePointerStyle ) );
-            return;
-        }
-        else if ( m_pDrawViewWrapper->IsTextEdit() )
+        if ( m_pDrawViewWrapper->IsTextEdit() )
         {
             if( m_pDrawViewWrapper->IsTextEditHit( aMousePos, HITPIX) )
             {
@@ -1632,6 +1599,39 @@
         }
         else
         {
+            // #i12587# support for shapes in chart
+            if ( m_eDrawMode == CHARTDRAW_INSERT &&
+                 ( !m_pDrawViewWrapper->IsMarkedHit( aMousePos ) || !m_aSelection.isDragableObjectSelected() ) )
+            {
+                PointerStyle ePointerStyle = POINTER_DRAW_RECT;
+                SdrObjKind eKind = static_cast< SdrObjKind >( m_pDrawViewWrapper->GetCurrentObjIdentifier() );
+                switch ( eKind )
+                {
+                    case OBJ_LINE:
+                        {
+                            ePointerStyle = POINTER_DRAW_LINE;
+                        }
+                        break;
+                    case OBJ_RECT:
+                        {
+                            ePointerStyle = POINTER_DRAW_RECT;
+                        }
+                        break;
+                    case OBJ_TEXT:
+                        {
+                            ePointerStyle = POINTER_DRAW_TEXT;
+                        }
+                        break;
+                    default:
+                        {
+                            ePointerStyle = POINTER_DRAW_RECT;
+                        }
+                        break;
+                }
+                pWindow->SetPointer( Pointer( ePointerStyle ) );
+                return;
+            }
+
             ::rtl::OUString aHitObjectCID(
                 SelectionHelper::getHitObjectCID(
                     aMousePos, *m_pDrawViewWrapper, true /*bGetDiagramInsteadOf_Wall*/ ));


Add preedit-text area for ChromeOS IME candidate window.

This patch is the third-step for enabling off-the-spot IME on Pepper on ChromeOS.
When the focus is on a PPAPI plugin that can not draw preedit text by themselves
(since current PPAPI have no support for IMEs, this applies to all PPAPI plugins
for now), Chrome take care of it. To this end, the candidate window need to be
able to draw preedit text on it.

BUG=chromium-os:13374
TEST=1. Please apply http://codereview.chromium.org/7041003 (under review) which switches
on/off preedit display (via gtk_im_context API) depending on focus information.
2. Open a page with PPAPI plugin (e.g., weathernews.jp with PPAPI flash, or the
example plugin in src/ppapi/example)
3. Focus the plugin
(Actually, http://crosbug.com/16500 seems blocking this to work. So for testing,
please focus the plugin, unfocus by clicking outer html area, and re-focus)
4. Turn ime on and type some string.
5. Verify preedit text is displayed in addition to the candidate table.

Proper placement of the candidate window is not included in this patch (it'll
be displayed on a rather random position.)

Review URL: http://codereview.chromium.org/7189008

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@89643 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/chromeos/input_method/candidate_window.cc
+++ chrome/browser/chromeos/input_method/candidate_window.cc
@@ -56,6 +56,9 @@
 // window. We use this value to prevent the candidate window from being
 // too wide when one of candidates are long.
 const int kMaxCandidateLabelWidth = 500;
+// The minimum width of preedit area. We use this value to prevent the
+// candidate window from being too narrow when candidate lists are not shown.
+const int kMinPreeditAreaWidth = 134;

 // VerticalCandidateLabel is used for rendering candidate text in
 // the vertical candidate window.
@@ -297,6 +300,104 @@
   return annotation_column_width;
 }

+// HidableArea is used as an area to place optional information that can be
+// turned displaying off if it is unnecessary.
+class HidableArea : public views::View {
+ public:
+  HidableArea() {
+    // |place_holder_| will be deleted by scoped_ptr, rather than
+    // the standard owning relation of views::View.
+    //
+    // This is because we swap the contents of HidableArea between
+    // |place_holder_| (to show nothing) and |contents_| (to show something).
+    // In other words, the HidableArea only contains one of the two views
+    // hence cannot own the two views at the same time.
+    place_holder_.reset(new views::View);
+    place_holder_->set_parent_owned(false);  // Won't own
+
+    // Initially show nothing.
+    SetLayoutManager(new views::FillLayout);
+    AddChildView(place_holder_.get());
+  }
+
+  // Sets the content view.
+  void SetContents(views::View* contents) {
+    contents_.reset(contents);
+    contents_->set_parent_owned(false);  // Won't own
+  }
+
+  // Shows the content.
+  void Show() {
+    if (contents_.get() && contents_->parent() != this) {
+      RemoveAllChildViews(false);  // Don't delete child views.
+      AddChildView(contents_.get());
+    }
+  }
+
+  // Hides the content.
+  void Hide() {
+    if (IsShown()) {
+      RemoveAllChildViews(false);  // Don't delete child views.
+      AddChildView(place_holder_.get());
+    }
+  }
+
+  // Returns whether the content is already set and shown.
+  bool IsShown() const {
+    return contents_.get() && contents_->parent() == this;
+  }
+
+  // Returns the content.
+  views::View* contents() {
+    return contents_.get();
+  }
+
+ private:
+  scoped_ptr<views::View> contents_;
+  scoped_ptr<views::View> place_holder_;
+};
+
+// InformationTextArea is a HidableArea having a single Label in it.
+class InformationTextArea : public HidableArea {
+ public:
+  // Specify the alignment and initialize the control.
+  InformationTextArea(views::Label::Alignment align, int minWidth)
+  : minWidth_(minWidth) {
+    label_ = new views::Label;
+    label_->SetHorizontalAlignment(align);
+
+    const gfx::Insets kInsets(2, 2, 2, 4);
+    views::View* contents = WrapWithPadding(label_, kInsets);
+    SetContents(contents);
+    contents->set_border(
+        views::Border::CreateSolidBorder(1, kFrameColor));
+    contents->set_background(
+        views::Background::CreateVerticalGradientBackground(
+            kFooterTopColor,
+            kFooterBottomColor));
+  }
+
+  // Set the displayed text.
+  void SetText(const std::string& utf8_text) {
+    label_->SetText(UTF8ToWide(utf8_text));
+  }
+
+ protected:
+  virtual gfx::Size GetPreferredSize() OVERRIDE {
+    gfx::Size size = HidableArea::GetPreferredSize();
+    // Hack. +2 is needed as the same reason as in VerticalCandidateLabel
+    size.set_width(size.width() + 2);
+    if (size.width() < minWidth_) {
+      size.set_width(minWidth_);
+    }
+    return size;
+  }
+
+ private:
+  views::Label* label_;
+  int minWidth_;
+};
+
 }  // namespace

 namespace chromeos {
@@ -349,11 +450,26 @@
   // Hides the auxiliary text.
   void HideAuxiliaryText();

+  // Hides the preedit text.
+  void HidePreeditText();
+
+  // Hides whole the candidate window.
+  void HideAll();
+
+  // Shows the lookup table.
+  void ShowLookupTable();
+
   // Shows the auxiliary text.
   void ShowAuxiliaryText();

+  // Shows the preedit text.
+  void ShowPreeditText();
+
   // Updates the auxiliary text.
   void UpdateAuxiliaryText(const std::string& utf8_text);
+
+  // Updates the preedit text.
+  void UpdatePreeditText(const std::string& utf8_text);

   // Returns true if we should update candidate views in the window.  For
   // instance, if we are going to show the same candidates as before, we
@@ -414,12 +530,8 @@
   void MaybeInitializeCandidateViews(
       const InputMethodLookupTable& lookup_table);

-  // Creates the footer area, where we show status information.
-  // For instance, we show a cursor position like 2/19.
-  views::View* CreateFooterArea();
-
-  // Creates the header area, where we show auxiliary text.
-  views::View* CreateHeaderArea();
+  // Returns the appropriate area (header or footer) to put auxiliary texts.
+  InformationTextArea* GetAuxiliaryTextArea();

   // The lookup table (candidates).
   InputMethodLookupTable lookup_table_;
@@ -436,30 +548,22 @@
   // Views created in the class will be part of tree of |this|, so these
   // child views will be deleted when |this| is deleted.

+  // The preedit area is where the preedit text is shown, if it is needed
+  // in cases such as the focus is on a plugin that doesn't support in-line
+  // preedit drawing.
+  InformationTextArea* preedit_area_;
+  // The header area is where the auxiliary text is shown, if the
+  // orientation is horizontal. If the auxiliary text is not provided, we
+  // show nothing.  For instance, we show pinyin text like "zhong'guo".
+  InformationTextArea* header_area_;
   // The candidate area is where candidates are rendered.
-  views::View* candidate_area_;
+  HidableArea* candidate_area_;
+  // The candidate views are used for rendering candidates.
+  std::vector<CandidateView*> candidate_views_;
   // The footer area is where the auxiliary text is shown, if the
   // orientation is vertical. Usually the auxiliary text is used for
   // showing candidate number information like 2/19.
-  views::View* footer_area_;
-  // We use this when we show something in the footer area.
-  scoped_ptr<views::View> footer_area_contents_;
-  // We use this when we show nothing in the footer area.
-  scoped_ptr<views::View> footer_area_place_holder_;
-  // The header area is where the auxiliary text is shown, if the
-  // orientation is horizontal. If the auxiliary text is not provided, we
-  // show nothing.  For instance, we show pinyin text like "zhong'guo".
-  views::View* header_area_;
-  // We use this when we show something in the header area.
-  scoped_ptr<views::View> header_area_contents_;
-  // We use this when we show nothing in the header area.
-  scoped_ptr<views::View> header_area_place_holder_;
-  // The candidate views are used for rendering candidates.
-  std::vector<CandidateView*> candidate_views_;
-  // The header label is shown in the header area.
-  views::Label* header_label_;
-  // The footer label is shown in the footer area.
-  views::Label* footer_label_;
+  InformationTextArea* footer_area_;

   // Current columns width in |candidate_area_|.
   int previous_shortcut_column_width_;
@@ -738,11 +842,10 @@
     views::Widget* parent_frame)
     : selected_candidate_index_in_page_(0),
       parent_frame_(parent_frame),
+      preedit_area_(NULL),
+      header_area_(NULL),
       candidate_area_(NULL),
       footer_area_(NULL),
-      header_area_(NULL),
-      header_label_(NULL),
-      footer_label_(NULL),
       previous_shortcut_column_width_(0),
       previous_candidate_column_width_(0),
       previous_annotation_column_width_(0),
@@ -755,20 +858,25 @@
       views::Background::CreateSolidBackground(kDefaultBackgroundColor));
   set_border(views::Border::CreateSolidBorder(1, kFrameColor));

-  // Create the header area.
-  header_area_ = CreateHeaderArea();
-  // Create the candidate area.
-  candidate_area_ = new views::View;
-  // Create the footer area.
-  footer_area_ = CreateFooterArea();
+  // Create areas.
+  preedit_area_ = new InformationTextArea(views::Label::ALIGN_LEFT,
+                                          kMinPreeditAreaWidth);
+  header_area_ = new InformationTextArea(views::Label::ALIGN_LEFT, 0);
+  candidate_area_ = new HidableArea;
+  candidate_area_->SetContents(new views::View);
+  footer_area_ = new InformationTextArea(views::Label::ALIGN_RIGHT, 0);

   // Set the window layout of the view
   views::GridLayout* layout = new views::GridLayout(this);
-  SetLayoutManager(layout);  // |this| owns layout|.
+  SetLayoutManager(layout);  // |this| owns |layout|.
   views::ColumnSet* column_set = layout->AddColumnSet(0);
   column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL,
                         0, views::GridLayout::USE_PREF, 0, 0);

+  // Add the preedit area
+  layout->StartRow(0, 0);
+  layout->AddView(preedit_area_);  // |preedit_area_| is owned by |this|.
+
   // Add the header area.
   layout->StartRow(0, 0);
   layout->AddView(header_area_);  // |header_area_| is owned by |this|.
@@ -782,9 +890,17 @@
   layout->AddView(footer_area_);  // |footer_area_| is owned by |this|.
 }

+void CandidateWindowView::HideAll() {
+  parent_frame_->Hide();
+}
+
 void CandidateWindowView::HideLookupTable() {
   if (!mouse_is_pressed_) {
-    parent_frame_->Hide();
+    candidate_area_->Hide();
+    if (preedit_area_->IsShown())
+      ResizeAndMoveParentFrame();
+    else
+      parent_frame_->Hide();
     return;
   }

@@ -833,40 +949,47 @@
   mouse_is_pressed_ = false;
 }

+InformationTextArea* CandidateWindowView::GetAuxiliaryTextArea() {
+  return (lookup_table_.orientation == InputMethodLookupTable::kHorizontal ?
+          header_area_ : footer_area_);
+}
+
 void CandidateWindowView::HideAuxiliaryText() {
-  views::View* target_area = (
-      lookup_table_.orientation == InputMethodLookupTable::kHorizontal ?
-      header_area_ : footer_area_);
-  views::View* target_place_holder = (
-      lookup_table_.orientation == InputMethodLookupTable::kHorizontal ?
-      header_area_place_holder_.get() :
-      footer_area_place_holder_.get());
-  // Put the place holder to the target display area.
-  target_area->RemoveAllChildViews(false);  // Don't delete child views.
-  target_area->AddChildView(target_place_holder);
+  GetAuxiliaryTextArea()->Hide();
+  ResizeAndMoveParentFrame();
 }

 void CandidateWindowView::ShowAuxiliaryText() {
-  views::View* target_area = (
-      lookup_table_.orientation == InputMethodLookupTable::kHorizontal ?
-      header_area_ : footer_area_);
-  views::View* target_contents = (
-      lookup_table_.orientation == InputMethodLookupTable::kHorizontal ?
-      header_area_contents_.get() :
-      footer_area_contents_.get());
-
-  if (target_contents->parent() != target_area) {
-    // If contents not in display area, put it in.
-    target_area->RemoveAllChildViews(false);  // Don't delete child views.
-    target_area->AddChildView(target_contents);
-  }
+  GetAuxiliaryTextArea()->Show();
+  ResizeAndMoveParentFrame();
 }

 void CandidateWindowView::UpdateAuxiliaryText(const std::string& utf8_text) {
-  views::Label* target_label = (
-      lookup_table_.orientation == InputMethodLookupTable::kHorizontal ?
-      header_label_ : footer_label_);
-  target_label->SetText(UTF8ToWide(utf8_text));
+  GetAuxiliaryTextArea()->SetText(utf8_text);
+}
+
+void CandidateWindowView::HidePreeditText() {
+  preedit_area_->Hide();
+  if (candidate_area_->IsShown())
+    ResizeAndMoveParentFrame();
+  else
+    parent_frame_->Hide();
+}
+
+void CandidateWindowView::ShowPreeditText() {
+  preedit_area_->Show();
+  ResizeAndMoveParentFrame();
+  parent_frame_->Show();
+}
+
+void CandidateWindowView::UpdatePreeditText(const std::string& utf8_text) {
+  preedit_area_->SetText(utf8_text);
+}
+
+void CandidateWindowView::ShowLookupTable() {
+  candidate_area_->Show();
+  ResizeAndMoveParentFrame();
+  parent_frame_->Show();
 }

 bool CandidateWindowView::ShouldUpdateCandidateViews(
@@ -959,6 +1082,7 @@
   const InputMethodLookupTable::Orientation orientation =
       lookup_table.orientation;
   const int page_size = lookup_table.page_size;
+  views::View* candidate_area_contents = candidate_area_->contents();

   // Current column width.
   int shortcut_column_width = 0;
@@ -997,13 +1121,13 @@

   // Clear the existing candidate_views if any.
   for (size_t i = 0; i < candidate_views_.size(); ++i) {
-    candidate_area_->RemoveChildView(candidate_views_[i]);
+    candidate_area_contents->RemoveChildView(candidate_views_[i]);
   }
   candidate_views_.clear();

-  views::GridLayout* layout = new views::GridLayout(candidate_area_);
-  // |candidate_area_| owns |layout|.
-  candidate_area_->SetLayoutManager(layout);
+  views::GridLayout* layout = new views::GridLayout(candidate_area_contents);
+  // |candidate_area_contents| owns |layout|.
+  candidate_area_contents->SetLayoutManager(layout);
   // Initialize the column set.
   views::ColumnSet* column_set = layout->AddColumnSet(0);
   if (orientation == InputMethodLookupTable::kVertical) {
@@ -1042,7 +1166,7 @@
     if (orientation == InputMethodLookupTable::kVertical) {
       layout->StartRow(0, 0);
     }
-    // |candidate_row| will be owned by |candidate_area_|.
+    // |candidate_row| will be owned by |candidate_area_contents|.
     layout->AddView(candidate_row);
   }

@@ -1052,71 +1176,7 @@
   // moves right from the correct position in ResizeAndMoveParentFrame().
   // TODO(nhiroki): Figure out why it returns invalid value.
   // It seems that the x-position of the candidate labels is not set.
-  layout->Layout(candidate_area_);
-}
-
-views::View* CandidateWindowView::CreateHeaderArea() {
-  // |header_area_place_holder_| will not be owned by another view.
-  // This will be deleted by scoped_ptr.
-  //
-  // This is because we swap the contents of |header_area_| between
-  // |header_area_place_holder_| (to show nothing) and
-  // |header_area_contents_| (to show something). In other words,
-  // |header_area_| only contains one of the two views hence cannot own
-  // the two views at the same time.
-  header_area_place_holder_.reset(new views::View);
-  header_area_place_holder_->set_parent_owned(false);  // Won't be owened.
-
-  // |header_label_| will be owned by |header_area_contents_|.
-  header_label_ = new views::Label;
-  header_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
-
-  const gfx::Insets kHeaderInsets(2, 2, 2, 4);
-  // |header_area_contents_| will not be owned by another view.
-  // See a comment at |header_area_place_holder_| for why.
-  header_area_contents_.reset(
-      WrapWithPadding(header_label_, kHeaderInsets));
-  header_area_contents_->set_parent_owned(false);  // Won't be owened.
-  header_area_contents_->set_border(
-      views::Border::CreateSolidBorder(1, kFrameColor));
-  header_area_contents_->set_background(
-      views::Background::CreateVerticalGradientBackground(
-          kFooterTopColor,
-          kFooterBottomColor));
-
-  views::View* header_area = new views::View;
-  header_area->SetLayoutManager(new views::FillLayout);
-  // Initialize the header area with the place holder (i.e. show nothing).
-  header_area->AddChildView(header_area_place_holder_.get());
-  return header_area;
-}
-
-views::View* CandidateWindowView::CreateFooterArea() {
-  // |footer_area_place_holder_| will not be owned by another view.
-  // See also the comment about |header_area_place_holder_| in
-  // CreateHeaderArea().
-  footer_area_place_holder_.reset(new views::View);
-  footer_area_place_holder_->set_parent_owned(false);  // Won't be owened.
-
-  footer_label_ = new views::Label();
-  footer_label_->SetHorizontalAlignment(views::Label::ALIGN_RIGHT);
-
-  const gfx::Insets kFooterInsets(2, 2, 2, 4);
-  footer_area_contents_.reset(
-      WrapWithPadding(footer_label_, kFooterInsets));
-  footer_area_contents_->set_parent_owned(false);  // Won't be owened.
-  footer_area_contents_->set_border(
-      views::Border::CreateSolidBorder(1, kFrameColor));
-  footer_area_contents_->set_background(
-      views::Background::CreateVerticalGradientBackground(
-          kFooterTopColor,
-          kFooterBottomColor));
-
-  views::View* footer_area = new views::View;
-  footer_area->SetLayoutManager(new views::FillLayout);
-  // Initialize the footer area with the place holder (i.e. show nothing).
-  footer_area->AddChildView(footer_area_place_holder_.get());
-  return footer_area;
+  layout->Layout(candidate_area_contents);
 }

 void CandidateWindowView::SelectCandidateAt(int index_in_page) {
@@ -1235,6 +1295,9 @@
 }

 bool CandidateWindowController::Impl::Init() {
+  // Create the candidate window view.
+  CreateView();
+
   // Initialize the input method UI status connection.
   InputMethodUiStatusMonitorFunctions functions;
   functions.hide_auxiliary_text =
@@ -1260,9 +1323,6 @@
       &CandidateWindowController::Impl::OnHidePreeditText,
       &CandidateWindowController::Impl::OnUpdatePreeditText);

-  // Create the candidate window view.
-  CreateView();
-
   return true;
 }

@@ -1295,21 +1355,21 @@
     void* input_method_library) {
   CandidateWindowController::Impl* controller =
       static_cast<CandidateWindowController::Impl*>(input_method_library);
-
   controller->candidate_window_->HideAuxiliaryText();
-  controller->candidate_window_->ResizeAndMoveParentFrame();
 }

 void CandidateWindowController::Impl::OnHideLookupTable(
     void* input_method_library) {
   CandidateWindowController::Impl* controller =
       static_cast<CandidateWindowController::Impl*>(input_method_library);
-
   controller->candidate_window_->HideLookupTable();
 }

 void CandidateWindowController::Impl::OnHidePreeditText(
     void* input_method_library) {
+  CandidateWindowController::Impl* controller =
+      static_cast<CandidateWindowController::Impl*>(input_method_library);
+  controller->candidate_window_->HidePreeditText();
 }

 void CandidateWindowController::Impl::OnSetCursorLocation(
@@ -1352,7 +1412,6 @@
   }
   controller->candidate_window_->UpdateAuxiliaryText(utf8_text);
   controller->candidate_window_->ShowAuxiliaryText();
-  controller->candidate_window_->ResizeAndMoveParentFrame();
 }

 void CandidateWindowController::Impl::OnUpdateLookupTable(
@@ -1361,20 +1420,29 @@
   CandidateWindowController::Impl* controller =
       static_cast<CandidateWindowController::Impl*>(input_method_library);

-  // If it's not visible, hide the window and return.
+  // If it's not visible, hide the lookup table and return.
   if (!lookup_table.visible) {
     controller->candidate_window_->HideLookupTable();
     return;
   }

   controller->candidate_window_->UpdateCandidates(lookup_table);
-  controller->candidate_window_->ResizeAndMoveParentFrame();
-  controller->frame_->Show();
+  controller->candidate_window_->ShowLookupTable();
 }

 void CandidateWindowController::Impl::OnUpdatePreeditText(
     void* input_method_library,
     const std::string& utf8_text, unsigned int cursor, bool visible) {
+  CandidateWindowController::Impl* controller =
+      static_cast<CandidateWindowController::Impl*>(input_method_library);
+
+  // If it's not visible, hide the preedit text and return.
+  if (!visible || utf8_text.empty()) {
+    controller->candidate_window_->HidePreeditText();
+    return;
+  }
+  controller->candidate_window_->UpdatePreeditText(utf8_text);
+  controller->candidate_window_->ShowPreeditText();
 }

 void CandidateWindowController::Impl::OnCandidateCommitted(int index,
@@ -1389,7 +1457,7 @@
   if (!connected) {
     CandidateWindowController::Impl* controller =
         static_cast<CandidateWindowController::Impl*>(input_method_library);
-    controller->candidate_window_->HideLookupTable();
+    controller->candidate_window_->HideAll();
   }
 }


am 9dffe171: Merge "Do not require signed zero support in ldexp tests()" into lmp-mr1-dev

* commit '9dffe171837245135e71dff20cf34bc4fcac687d':
  Do not require signed zero support in ldexp tests()

--- modules/gles31/functional/es31fShaderCommonFunctionTests.cpp
+++ modules/gles31/functional/es31fShaderCommonFunctionTests.cpp
@@ -1877,7 +1877,6 @@
 		const glu::DataType		type			= m_spec.inputs[0].varType.getBasicType();
 		const glu::Precision	precision		= m_spec.inputs[0].varType.getPrecision();
 		const int				scalarSize		= glu::getDataTypeScalarSize(type);
-		const bool				signedZero		= supportsSignedZero(precision);

 		const int				mantissaBits	= getMinMantissaBits(precision);
 		const deUint32			maxUlpDiff		= getMaxUlpDiffFromBits(mantissaBits);
@@ -1888,7 +1887,7 @@
 			const int		in1			= ((const int*)inputs[1])[compNdx];
 			const float		out0		= ((const float*)outputs[0])[compNdx];
 			const float		refOut0		= ldexp(in0, in1);
-			const deUint32	ulpDiff		= signedZero ? getUlpDiff(out0, refOut0) : getUlpDiffIgnoreZeroSign(out0, refOut0);
+			const deUint32	ulpDiff		= getUlpDiffIgnoreZeroSign(out0, refOut0);

 			const int		inExp		= tcu::Float32(in0).exponent();


[cros] Aura sign in transition - update comment.

BUG=106704
TEST=None
TBR=oshima

Review URL: http://codereview.chromium.org/9188033

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@117438 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/chromeos/login/base_login_display_host.cc
+++ chrome/browser/chromeos/login/base_login_display_host.cc
@@ -184,9 +184,8 @@

 void BaseLoginDisplayHost::OnSessionStart() {
   DVLOG(1) << "Session starting";
-  // In Aura case wait for first tab starting loading (NOTIFICATION_LOAD_START),
-  // then start transition animation. Display host is deleted once animation
-  // completes since sign in screen widget has to stay alive.
+  // Display host is deleted once animation is completed
+  // since sign in screen widget has to stay alive.
 #if defined(USE_AURA)
   if (kEnableSigninTransitions)
     StartAnimation();


Reverts r65780.

Reverts r65780.

Now fix for OpaqueBrowserFrameView NULL pointer access is in,
we can remove FLAKY prefix for ExtensionAPITest.Incognito.

BUG=chromium-os:9049
TEST=run browser_test --gtest_filter="ExtensionAPITest.Incognito" for chromiumos_linux and other targets.

Review URL: http://codereview.chromium.org/5151002

git-svn-id: http://src.chromium.org/svn/trunk/src@67238 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

Former-commit-id: 5bd9080e28e546113cc0ad373b57e31c61f894e5

--- chrome/browser/extensions/extension_incognito_apitest.cc
+++ chrome/browser/extensions/extension_incognito_apitest.cc
@@ -91,16 +91,8 @@
   ASSERT_FALSE(browser()->profile()->HasOffTheRecordProfile());
 }

-// TODO(kochi): Flaky at r65757 and after on buildbot for ChromiumOS.
-// http://crosbug.com/9049
-#if defined(OS_CHROMEOS)
-#define MAYBE_Incognito FLAKY_Incognito
-#else
-#define MAYBE_Incognito Incognito
-#endif
-
 // Tests that the APIs in an incognito-enabled extension work properly.
-IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_Incognito) {
+IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Incognito) {
   host_resolver()->AddRule("*", "127.0.0.1");
   ASSERT_TRUE(StartTestServer());


Planning: consider multiple obstacles in side pass.


benchmarks: add missing include.

benchmarks: add missing include.

--- moveit_ros/benchmarks/benchmarks/src/benchmark_execution.cpp
+++ moveit_ros/benchmarks/benchmarks/src/benchmark_execution.cpp
@@ -49,6 +49,7 @@
 #include <boost/algorithm/string.hpp>
 #include <boost/math/constants/constants.hpp>
 #include <boost/progress.hpp>
+#include <boost/date_time/posix_time/posix_time.hpp>

 #include <eigen_conversions/eigen_msg.h>
 #include <Eigen/Core>


Mark any descendant child view of the keyboard unfocusable.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/7003125

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@88745 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/ui/touch/frame/keyboard_container_view.cc
+++ chrome/browser/ui/touch/frame/keyboard_container_view.cc
@@ -74,7 +74,7 @@
 void KeyboardContainerView::ViewHierarchyChanged(bool is_add,
                                                  View* parent,
                                                  View* child) {
-  if (is_add && parent == this)
+  if (is_add && Contains(child))
     MakeViewHierarchyUnfocusable(child);
 }


- использование boost::format

 - использование boost::format

git-svn-id: 41bd7e47c31e4d43f97241d7529f6785d233c6d8@7930 23f926e6-80f1-49ca-85a0-60d4a27bb3ac


Add L2 p9_mss_scrub

Add L2 p9_mss_scrub

  Change inversion so in sim we run with inversion off
  Change address counting mode to be disabled by default
  Remove ATTR_MCBIST attributes

Change-Id: If7549c3435730be5746a176147d7dd436db9ee29
Original-Change-Id: I233851de5186e053df0b5a4b25eee42763b35755
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/22914
Tested-by: Jenkins Server
Tested-by: Hostboot CI
Reviewed-by: Louis Stermole <a2bef96d502debd02962600aef4d81d949c35039@us.ibm.com>
Reviewed-by: STEPHEN GLANCY <7301c4b00f53e5772c2576cd0c5f485155c2ece1@us.ibm.com>
Reviewed-by: JACOB L. HARVEY <3228c361e36065d481020c968085ab1d20e47d22@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <ab93eca12e43608f33daa16a67357cd7b7e867ab@us.ibm.com>

--- src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.H
+++ src/import/chips/p9/procedures/hwp/memory/lib/mcbist/mcbist.H
@@ -101,6 +101,10 @@
         static const uint64_t END_ADDRESS_1 = MCBIST_MCBEA1Q;
         static const uint64_t END_ADDRESS_2 = MCBIST_MCBEA2Q;
         static const uint64_t END_ADDRESS_3 = MCBIST_MCBEA3Q;
+
+        // Sometimes we want to access the start/end address registers based off
+        // of an index, like master rank. This allows us to do that.
+        static const std::pair<uint64_t, uint64_t> address_pairs[];

         enum
         {
@@ -484,16 +488,17 @@
             // Enable the maintenance mode addressing
             change_maint_address_mode(mss::ON);

-            // Enable 64b lengths, required in maint mode.
+            // Enable 64B lengths by default. Commands which need 128B (scrub, steer, alter, display)
+            // can change this to 128B (mss::OFF).
             change_len64(mss::ON);

-            // Turn on counting mode for all address configs
-            iv_addr_gen.insertFromRight<TT::ADDR_COUNTER_MODE, TT::ADDR_COUNTER_MODE_LEN>(0b1111);
-        }
-
-        ///
-        /// @brief Change the mcbist 64/128 bit control
-        /// @param[in] i_state mss::ON if you want 64b,mss::OFF if you want 128b
+            // Turn off counting mode for all address configs
+            iv_addr_gen.insertFromRight<TT::ADDR_COUNTER_MODE, TT::ADDR_COUNTER_MODE_LEN>(0b0000);
+        }
+
+        ///
+        /// @brief Change the mcbist 64/128 byte control
+        /// @param[in] i_state mss::ON if you want 64B, mss::OFF if you want 128B
         /// @return void
         ///
         inline void change_len64( const mss::states i_state )
@@ -906,11 +911,35 @@
 }

 ///
+/// @brief Configure address range based on index
+/// @tparam T the fapi2::TargetType - derived
+/// @tparam TT the mcbistTraits associated with T - derived
+/// @param[in] i_target the target to effect
+/// @param[in] i_start 64b right-aligned address
+/// @param[in] i_end 64b right-aligned address
+/// @param[in] i_index which start/end pair to effect
+/// @return FAPI2_RC_SUCCSS iff ok
+/// @note Only the right-most 37 bits of the start/end are used.
+/// @warn if address counting mode is enabled in the MCBIST program, these bits are start, len
+///
+template< fapi2::TargetType T, typename TT = mcbistTraits<T> >
+inline fapi2::ReturnCode config_address_range( const fapi2::Target<T>& i_target, const uint64_t i_start,
+        const uint64_t i_end, const uint64_t i_index )
+{
+    FAPI_DBG("config MCBIST address range %d start: 0x%016lx (0x%016lx), end/len 0x%016lx (0x%016lx)",
+             i_index, i_start, (i_start << 26), i_end, (i_end << 26));
+    FAPI_TRY( mss::putScom(i_target, TT::address_pairs[i_index].first, i_start << 26) );
+    FAPI_TRY( mss::putScom(i_target, TT::address_pairs[i_index].second, i_end << 26) );
+
+fapi_try_exit:
+    return fapi2::current_err;
+}
+
+///
 /// @brief Configure address range 0
 /// @tparam T the fapi2::TargetType - derived
 /// @tparam TT the mcbistTraits associated with T - derived
 /// @param[in] i_target the target to effect
-/// @param[in] i_program the mcbist::program
 /// @param[in] i_start 64b right-aligned address
 /// @param[in] i_end 64b right-aligned address
 /// @return FAPI2_RC_SUCCSS iff ok
@@ -921,13 +950,7 @@
 inline fapi2::ReturnCode config_address_range0( const fapi2::Target<T>& i_target, const uint64_t i_start,
         const uint64_t i_end )
 {
-    FAPI_DBG("config MCBIST address range 0 start: 0x%016lx (0x%016lx), end/len 0x%016lx (0x%016lx)",
-             i_start, (i_start << 26), i_end, (i_end << 26));
-    FAPI_TRY( mss::putScom(i_target, TT::START_ADDRESS_0, i_start << 26) );
-    FAPI_TRY( mss::putScom(i_target, TT::END_ADDRESS_0, i_end << 26) );
-
-fapi_try_exit:
-    return fapi2::current_err;
+    return config_address_range(i_target, i_start, i_end, 0);
 }

@@ -936,7 +959,6 @@
 /// @tparam T the fapi2::TargetType - derived
 /// @tparam TT the mcbistTraits associated with T - derived
 /// @param[in] i_target the target to effect
-/// @param[in] i_program the mcbist::program
 /// @param[in] i_start 64b right-aligned address
 /// @param[in] i_end 64b right-aligned address
 /// @return FAPI2_RC_SUCCSS iff ok
@@ -947,13 +969,7 @@
 inline fapi2::ReturnCode config_address_range1( const fapi2::Target<T>& i_target, const uint64_t i_start,
         const uint64_t i_end )
 {
-    FAPI_DBG("config MCBIST address range 1 start: 0x%016lx (0x%016lx), end/len 0x%016lx (0x%016lx)",
-             i_start, (i_start << 26), i_end, (i_end << 26));
-    FAPI_TRY( mss::putScom(i_target, TT::START_ADDRESS_1, i_start << 26) );
-    FAPI_TRY( mss::putScom(i_target, TT::END_ADDRESS_1, i_end << 26) );
-
-fapi_try_exit:
-    return fapi2::current_err;
+    return config_address_range(i_target, i_start, i_end, 1);
 }

@@ -962,7 +978,6 @@
 /// @tparam T the fapi2::TargetType - derived
 /// @tparam TT the mcbistTraits associated with T - derived
 /// @param[in] i_target the target to effect
-/// @param[in] i_program the mcbist::program
 /// @param[in] i_start 64b right-aligned address
 /// @param[in] i_end 64b right-aligned address
 /// @return FAPI2_RC_SUCCSS iff ok
@@ -973,13 +988,7 @@
 inline fapi2::ReturnCode config_address_range2( const fapi2::Target<T>& i_target, const uint64_t i_start,
         const uint64_t i_end )
 {
-    FAPI_DBG("config MCBIST address range 2 start: 0x%016lx (0x%016lx), end/len 0x%016lx (0x%016lx)",
-             i_start, (i_start << 26), i_end, (i_end << 26));
-    FAPI_TRY( mss::putScom(i_target, TT::START_ADDRESS_2, i_start << 26) );
-    FAPI_TRY( mss::putScom(i_target, TT::END_ADDRESS_2, i_end << 26) );
-
-fapi_try_exit:
-    return fapi2::current_err;
+    return config_address_range(i_target, i_start, i_end, 2);
 }

@@ -988,7 +997,6 @@
 /// @tparam T the fapi2::TargetType - derived
 /// @tparam TT the mcbistTraits associated with T - derived
 /// @param[in] i_target the target to effect
-/// @param[in] i_program the mcbist::program
 /// @param[in] i_start 64b right-aligned address
 /// @param[in] i_end 64b right-aligned address
 /// @return FAPI2_RC_SUCCSS iff ok
@@ -998,13 +1006,7 @@
 inline fapi2::ReturnCode config_address_range3( const fapi2::Target<T>& i_target, const uint64_t i_start,
         const uint64_t i_end )
 {
-    FAPI_DBG("config MCBIST address range 3 start: 0x%016lx (0x%016lx), end/len 0x%016lx (0x%016lx)",
-             i_start, (i_start << 26), i_end, (i_end << 26));
-    FAPI_TRY( mss::putScom(i_target, TT::START_ADDRESS_3, i_start << 26) );
-    FAPI_TRY( mss::putScom(i_target, TT::END_ADDRESS_3, i_end << 26) );
-
-fapi_try_exit:
-    return fapi2::current_err;
+    return config_address_range(i_target, i_start, i_end, 3);
 }

 ///


Attribute Review - Nest

Attribute Review - Nest

Change-Id: I70faf4662ea60beab2859555290dcd85213466c5
Original-Change-Id: I6af714a8975122a4e83c955a21913ede0d643453
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/23164
Tested-by: Jenkins Server
Tested-by: PPE CI
Tested-by: Hostboot CI
Reviewed-by: Daniel M. Crowell <912029ca9254ac7b5854e56910561d682e1fa2d0@us.ibm.com>
Reviewed-by: Joseph J. McGill <4a85c6614f9f065f63d8fd57cde15e48af07ea2a@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <ab93eca12e43608f33daa16a67357cd7b7e867ab@us.ibm.com>

--- src/import/chips/p9/procedures/hwp/nest/p9_mss_eff_grouping.C
+++ src/import/chips/p9/procedures/hwp/nest/p9_mss_eff_grouping.C
@@ -108,7 +108,7 @@
     uint8_t iv_selectiveMode = 0;        // ATTR_MEM_MIRROR_PLACEMENT_POLICY
     uint8_t iv_enhancedNoMirrorMode = 0; // ATTR_MRW_ENHANCED_GROUPING_NO_MIRRORING
     uint8_t iv_fabricAddrBarMode = 0;    // ATTR_PROC_FABRIC_ADDR_BAR_MODE
-
+    uint8_t iv_groupsAllowed = 0;        // ATTR_MSS_INTERLEAVE_ENABLE
 };

 // See doxygen in struct definition.
@@ -135,6 +135,12 @@
     FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_PROC_FABRIC_ADDR_BAR_MODE,
                            FAPI_SYSTEM, iv_fabricAddrBarMode),
              "Error getting ATTR_PROC_FABRIC_ADDR_BAR_MODE, l_rc 0x%.8X",
+             (uint64_t)fapi2::current_err);
+
+    // Get interleave option
+    FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_MSS_INTERLEAVE_ENABLE, FAPI_SYSTEM,
+                           iv_groupsAllowed),
+             "Error getting ATTR_MSS_INTERLEAVE_ENABLE, l_rc 0x%.8X",
              (uint64_t)fapi2::current_err);

     // Display attribute values
@@ -142,6 +148,7 @@
     FAPI_INF("   ATTR_MEM_MIRROR_PLACEMENT_POLICY 0x%.8X", iv_selectiveMode);
     FAPI_INF("   ATTR_MRW_ENHANCED_GROUPING_NO_MIRRORING 0x%.8X", iv_enhancedNoMirrorMode);
     FAPI_INF("   ATTR_PROC_FABRIC_ADDR_BAR_MODE 0x%.8X", iv_fabricAddrBarMode);
+    FAPI_INF("   ATTR_MSS_INTERLEAVE_ENABLE 0x%.8X", iv_groupsAllowed);

 fapi_try_exit:
     FAPI_DBG("Exiting EffGroupingSysAttrs::getAttrs");
@@ -188,7 +195,6 @@
         const EffGroupingSysAttrs i_sysAttrs);

     // Public data
-    uint8_t  iv_groupsAllowed = 0;  // ATTR_MSS_INTERLEAVE_ENABLE
     uint64_t iv_memBaseAddr = 0;    // ATTR_PROC_MEM_BASE
     uint64_t iv_mirrorBaseAddr = 0; // ATTR_PROC_MIRROR_BASE
     uint64_t iv_htmBarSizes[NUM_OF_HTM_REGIONS] = {0, 0}; // ATTR_PROC_HTM_BAR_SIZES
@@ -238,12 +244,6 @@
     FAPI_DBG("Entering EffGroupingProcAttrs::getAttrs");
     fapi2::ReturnCode l_rc;

-    // Get interleave option
-    FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_MSS_INTERLEAVE_ENABLE, i_target,
-                           iv_groupsAllowed),
-             "Error getting ATTR_MSS_INTERLEAVE_ENABLE, l_rc 0x%.8X",
-             (uint64_t)fapi2::current_err);
-
     // Get Hardware Trace Macro (HTM) bar size
     FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_PROC_HTM_BAR_SIZES, i_target, iv_htmBarSizes),
              "Error getting ATTR_PROC_HTM_BAR_SIZES, l_rc 0x%.8X",
@@ -281,7 +281,6 @@

     // Display attribute values
     FAPI_INF("EffGroupingProcAttrs::getAttrs: ");
-    FAPI_INF("  ATTR_MSS_INTERLEAVE_ENABLE 0x%.8X", iv_groupsAllowed);
     FAPI_INF("  ATTR_PROC_HTM_BAR_SIZES[0] 0x%.16llX", iv_htmBarSizes[0]);
     FAPI_INF("  ATTR_PROC_HTM_BAR_SIZES[1] 0x%.16llX", iv_htmBarSizes[1]);
     FAPI_INF("  ATTR_PROC_OCC_SANDBOX_SIZE 0x%.16llX", iv_occSandboxSize);
@@ -1215,9 +1214,9 @@

     // There must be at least one type of grouping allowed
     // Unused bits are don't care (i.e.: 0x10, 040)
-    FAPI_ASSERT( ((i_procAttrs.iv_groupsAllowed & ALL_GROUPS) != 0),
+    FAPI_ASSERT( ((i_sysAttrs.iv_groupsAllowed & ALL_GROUPS) != 0),
                  fapi2::MSS_EFF_GROUPING_NO_GROUP_ALLOWED()
-                 .set_MSS_INTERLEAVE_ENABLE_VALUE(i_procAttrs.iv_groupsAllowed)
+                 .set_MSS_INTERLEAVE_ENABLE_VALUE(i_sysAttrs.iv_groupsAllowed)
                  .set_CHIP(i_target),
                  "grouping_checkValidAttributes: No valid group type allowed" );

@@ -2470,32 +2469,32 @@
     FAPI_INF("Attempt memory grouping");

     // Group MCs
-    if (l_procAttrs.iv_groupsAllowed & GROUP_8)
+    if (l_sysAttrs.iv_groupsAllowed & GROUP_8)
     {
         grouping_group8PortsPerGroup(l_memInfo, l_groupData);
     }

-    if (l_procAttrs.iv_groupsAllowed & GROUP_6)
+    if (l_sysAttrs.iv_groupsAllowed & GROUP_6)
     {
         grouping_group6PortsPerGroup(l_memInfo, l_groupData);
     }

-    if (l_procAttrs.iv_groupsAllowed & GROUP_4)
+    if (l_sysAttrs.iv_groupsAllowed & GROUP_4)
     {
         grouping_group4PortsPerGroup(l_memInfo, l_groupData);
     }

-    if (l_procAttrs.iv_groupsAllowed & GROUP_3)
+    if (l_sysAttrs.iv_groupsAllowed & GROUP_3)
     {
         grouping_group3PortsPerGroup(l_memInfo, l_groupData);
     }

-    if (l_procAttrs.iv_groupsAllowed & GROUP_2)
+    if (l_sysAttrs.iv_groupsAllowed & GROUP_2)
     {
         grouping_group2PortsPerGroup(l_memInfo, l_groupData);
     }

-    if (l_procAttrs.iv_groupsAllowed & GROUP_1)
+    if (l_sysAttrs.iv_groupsAllowed & GROUP_1)
     {
         grouping_group1PortsPerGroup(l_memInfo, l_groupData);
     }


Update hardware procedure metadata

Update hardware procedure metadata

update the metadata to reflect that HWPs
are product ready (HWP Level: 3)

Change-Id: I7c43a09201d6a1852a337bcb086aec8c3f37d4a7
Original-Change-Id: I5a7380e9f34865b3e0ef7872d6338a840b08aa4a
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46789
Tested-by: FSP CI Jenkins <aa9e4d9ac7cd25905e9c0dd36d4150516e73dd86@us.ibm.com>
Tested-by: Jenkins Server <8e3f934e4c44875bc48d33da3ea13d93ba9a233f@us.ibm.com>
Tested-by: HWSV CI <ae069ce3805842f4ed79e0ef7868baadb5df0a6b@us.ibm.com>
Tested-by: PPE CI <dc75934ba5befb9221434e67a247b93aec46b36b@us.ibm.com>
Tested-by: Hostboot CI <52521565bd8ea18a2b112942dce4f4220a97c2c8@us.ibm.com>
Reviewed-by: Joseph J. McGill <4a85c6614f9f065f63d8fd57cde15e48af07ea2a@us.ibm.com>
Reviewed-by: SRINIVAS V. POLISETTY <56f0c2e4236ce2352f11655a765c7ff32aee4dbb@in.ibm.com>
Reviewed-by: Jennifer A. Stofer <ab93eca12e43608f33daa16a67357cd7b7e867ab@us.ibm.com>

--- src/import/chips/p9/procedures/hwp/perv/p9_setup_sbe_config.C
+++ src/import/chips/p9/procedures/hwp/perv/p9_setup_sbe_config.C
@@ -31,7 +31,7 @@
 // *HWP HW Backup Owner : Srinivas V Naga <srinivan@in.ibm.com>
 // *HWP FW Owner        : Brian Silver <bsilver@us.ibm.com>
 // *HWP Team            : Perv
-// *HWP Level           : 2
+// *HWP Level           : 3
 // *HWP Consumed by     : FSP
 //------------------------------------------------------------------------------


literal definitions

literal definitions

instead of constants in
the optimized procs

Change-Id: I761ec79dc173465cd502844b6e2da7eff7dd800c
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/37954
Tested-by: Jenkins Server <8e3f934e4c44875bc48d33da3ea13d93ba9a233f@us.ibm.com>
Tested-by: Hostboot CI <52521565bd8ea18a2b112942dce4f4220a97c2c8@us.ibm.com>
Tested-by: PPE CI <dc75934ba5befb9221434e67a247b93aec46b36b@us.ibm.com>
Reviewed-by: Soma Bhanutej <92c79b5945b50481db2fb6f073a7397943fceb73@in.ibm.com>
Reviewed-by: SRINIVAS V. POLISETTY <56f0c2e4236ce2352f11655a765c7ff32aee4dbb@in.ibm.com>
Reviewed-by: PARVATHI RACHAKONDA <a0da56bbbdb5d4397c091d2bf396c6c777ec9b89@in.ibm.com>

--- src/import/chips/p9/procedures/hwp/perv/p9_setup_sbe_config.C
+++ src/import/chips/p9/procedures/hwp/perv/p9_setup_sbe_config.C
@@ -41,6 +41,7 @@

 #include <p9_perv_scom_addresses.H>
 #include <p9_perv_scom_addresses_fld.H>
+#include <p9_const_common.H>

 enum P9_SETUP_SBE_CONFIG_Private_Constants
 {
@@ -161,28 +162,28 @@
             FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_OPTICS_CONFIG_MODE, targ, l_optics_cfg_mode),
                      "Error from FAPI_ATTR_GET(ATTR_OPTICS_CONFIG_MODE)");

-            if (l_chipletID == 9)
+            if (l_chipletID == OB0_CHIPLET_ID)
             {
                 l_read_scratch_reg.writeBit<ATTR_OPTICS_CONFIG_MODE_OBUS0_BIT>(((l_optics_cfg_mode ==
                         fapi2::ENUM_ATTR_OPTICS_CONFIG_MODE_SMP)
                         || (l_optics_cfg_mode == fapi2::ENUM_ATTR_OPTICS_CONFIG_MODE_CAPI)) ? (1) : (0));
             }

-            if (l_chipletID == 10)
+            if (l_chipletID == OB1_CHIPLET_ID)
             {
                 l_read_scratch_reg.writeBit<ATTR_OPTICS_CONFIG_MODE_OBUS1_BIT>(((l_optics_cfg_mode ==
                         fapi2::ENUM_ATTR_OPTICS_CONFIG_MODE_SMP)
                         || (l_optics_cfg_mode == fapi2::ENUM_ATTR_OPTICS_CONFIG_MODE_CAPI)) ? (1) : (0));
             }

-            if (l_chipletID == 11)
+            if (l_chipletID == OB2_CHIPLET_ID)
             {
                 l_read_scratch_reg.writeBit<ATTR_OPTICS_CONFIG_MODE_OBUS2_BIT>(((l_optics_cfg_mode ==
                         fapi2::ENUM_ATTR_OPTICS_CONFIG_MODE_SMP)
                         || (l_optics_cfg_mode == fapi2::ENUM_ATTR_OPTICS_CONFIG_MODE_CAPI)) ? (1) : (0));
             }

-            if (l_chipletID == 12)
+            if (l_chipletID == OB3_CHIPLET_ID)
             {
                 l_read_scratch_reg.writeBit<ATTR_OPTICS_CONFIG_MODE_OBUS3_BIT>(((l_optics_cfg_mode ==
                         fapi2::ENUM_ATTR_OPTICS_CONFIG_MODE_SMP)


GPTR/Overlays stage-2 support

GPTR/Overlays stage-2 support

-Updated ringClass to include Gptr for Nest/EQ/EX/EC to support
CME/SGPE.
- Bug fixes:
  - big endian to local host endian conversion
  - now also processing Gptr rings in RT_CME/SGPE sysPhases
  - improved error checking, error capturing and trace outs

Change-Id: If65660d68f8cd6587f33222a17c557f1d7b16b39
Original-Change-Id: Idfc19bdf1b7187d6f75c459f7ddbeda80ccfec28
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43080
Reviewed-by: Claus M. Olsen <2da381e13dc4aeb07a557ddfc89fbb05265c54a4@us.ibm.com>
Reviewed-by: Thi N. Tran <25a2bca7ae5a8ea03be09ca8d282480c08c13052@us.ibm.com>
Tested-by: Jenkins Server <8e3f934e4c44875bc48d33da3ea13d93ba9a233f@us.ibm.com>
Tested-by: PPE CI <dc75934ba5befb9221434e67a247b93aec46b36b@us.ibm.com>
Tested-by: Hostboot CI <52521565bd8ea18a2b112942dce4f4220a97c2c8@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <ab93eca12e43608f33daa16a67357cd7b7e867ab@us.ibm.com>

--- src/import/chips/p9/utils/imageProcs/p9_ring_identification.H
+++ src/import/chips/p9/utils/imageProcs/p9_ring_identification.H
@@ -83,14 +83,17 @@
 enum VpdRingClass
 {
     VPD_RING_CLASS_NEST = 0,   // Indicates NEST [common] rings, except GPTR #G rings.
-    VPD_RING_CLASS_GPTR = 1,   // Indicates GPTR #G [common]rings
-    VPD_RING_CLASS_EQ = 2,     // Indicates EQ [common] rings
-    VPD_RING_CLASS_EX = 3,     // Indicates EX [common] rings
-    VPD_RING_CLASS_EC = 4,     // Indicates EC [common] rings
-    VPD_RING_CLASS_EQ_INS = 5, // Indicates EQ instance rings
-    VPD_RING_CLASS_EX_INS = 6, // Indicates EX instance rings
-    VPD_RING_CLASS_EC_INS = 7, // Indicates EC instance rings
-    VPD_RING_CLASS_LAST = 8,
+    VPD_RING_CLASS_GPTR_NEST = 1,   // Indicates GPTR #G [common]rings-NEST
+    VPD_RING_CLASS_GPTR_EQ = 2,   // Indicates GPTR #G [common]rings-EQ
+    VPD_RING_CLASS_GPTR_EX = 3,   // Indicates GPTR #G [common]rings-EX
+    VPD_RING_CLASS_GPTR_EC = 4,   // Indicates GPTR #G [common]rings-EC
+    VPD_RING_CLASS_EQ = 5,     // Indicates EQ [common] rings
+    VPD_RING_CLASS_EX = 6,     // Indicates EX [common] rings
+    VPD_RING_CLASS_EC = 7,     // Indicates EC [common] rings
+    VPD_RING_CLASS_EQ_INS = 8, // Indicates EQ instance rings
+    VPD_RING_CLASS_EX_INS = 9, // Indicates EX instance rings
+    VPD_RING_CLASS_EC_INS = 10, // Indicates EC instance rings
+    VPD_RING_CLASS_LAST = 11,
 };


[RF] Sanitise integral of RooCBShape.

[RF] Sanitise integral of RooCBShape.

The integral of the crystal ball shape might vanish quickly due to
a finite precision when integrating far from the centre.
This leads to divisions by zero.
Now, a very small value is returned.